Merge branch 'develop' into fix/discount-regions-validation

This commit is contained in:
Riqwan Thamir
2022-12-08 10:50:20 +01:00
committed by GitHub
890 changed files with 101176 additions and 38064 deletions
@@ -15,4 +15,4 @@ jobs:
-H "Authorization: Bearer ${{secrets.STAGING_ACCESS_TOKEN}}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/@medusajs/medusa-staging/actions/workflows/deploy.yml/dispatches \
-d '{"ref":"main"}'
-d '{"ref":"main"}'
-13
View File
@@ -1,13 +0,0 @@
let ignore = [`**/dist`];
// Jest needs to compile this code, but generally we don't want this copied
// to output folders
if (process.env.NODE_ENV !== `test`) {
ignore.push(`**/__tests__`);
}
module.exports = {
sourceMaps: true,
presets: ["babel-preset-medusa-package"],
ignore,
};
-4
View File
@@ -1,4 +0,0 @@
dist/
node_modules
*yarn-error.log
@@ -1,62 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/admin/auth", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
await dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /admin/products", () => {
beforeEach(async () => {
try {
await adminSeeder(dbConnection);
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "user"`);
});
it("authenticates user", async () => {
const api = useApi();
const response = await api
.post("/admin/auth", {
email: "admin@medusa.js",
password: "secret_password",
})
.catch((err) => {
console.log(err);
});
expect(response.status).toEqual(200);
fixtureWriter.addFixture("user", response.data.user);
});
});
});
@@ -1,69 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const productSeeder = require("../../helpers/product-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/admin/collections", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
await dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /admin/products", () => {
beforeEach(async () => {
try {
await adminSeeder(dbConnection);
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "user"`);
});
it("creates a product", async () => {
const api = useApi();
const payload = {
title: "Summer Collection",
handle: "summer-collection",
};
const response = await api
.post("/admin/collections", payload, {
headers: {
Authorization: "Bearer test_token",
},
})
.catch((err) => {
console.log(err);
});
expect(response.status).toEqual(200);
fixtureWriter.addFixture("product_collection", response.data.collection);
});
});
});
@@ -1,78 +0,0 @@
const path = require("path");
const { dropDatabase } = require("pg-god");
const { Customer, Address } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/admin/customers", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
await dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("GET /admin/customers", () => {
let id;
beforeEach(async () => {
try {
await adminSeeder(dbConnection);
const manager = dbConnection.manager;
const created = manager.create(Customer, {
email: "test1@email.com",
});
const newly = await manager.save(created);
id = newly.id;
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "address"`);
await manager.query(`DELETE FROM "customer"`);
await manager.query(`DELETE FROM "user"`);
});
it("lists customers and query count", async () => {
const api = useApi();
const response = await api
.get(`/admin/customers/${id}`, {
headers: {
Authorization: "Bearer test_token",
},
})
.catch((err) => {
console.log(err);
});
expect(response.status).toEqual(200);
fixtureWriter.addFixture("customer", response.data.customer);
});
});
});
@@ -1,82 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { Region } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/discounts", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /store/carts", () => {
let regId;
beforeEach(async () => {
await adminSeeder(dbConnection);
const manager = dbConnection.manager;
const created = manager.create(Region, {
id: "region",
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
});
const newReg = await manager.save(created);
regId = newReg.id;
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "discount"`);
await manager.query(`DELETE FROM "discount_rule"`);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a cart", async () => {
const api = useApi();
const getRes = await api.post(
`/admin/discounts`,
{
code: "10DISC",
rule: {
description: "10 Percent",
type: "percentage",
allocation: "total",
value: 10,
},
regions: [regId],
},
{
headers: {
Authorization: "Bearer test_token",
},
}
);
expect(getRes.status).toEqual(200);
fixtureWriter.addFixture("discount", getRes.data.discount);
fixtureWriter.addFixture("discount_rule", getRes.data.discount.rule);
});
});
});
@@ -1,75 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { Region } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/discounts", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /admin/gift-cards", () => {
let regId;
beforeEach(async () => {
await adminSeeder(dbConnection);
const manager = dbConnection.manager;
const created = manager.create(Region, {
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
});
const newReg = await manager.save(created);
regId = newReg.id;
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "discount"`);
await manager.query(`DELETE FROM "discount_rule"`);
await manager.query(`DELETE FROM "gift_card"`);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a cart", async () => {
const api = useApi();
const getRes = await api.post(
`/admin/gift-cards`,
{
value: 1000,
region_id: regId,
},
{
headers: {
Authorization: "Bearer test_token",
},
}
);
expect(getRes.status).toEqual(200);
fixtureWriter.addFixture("gift_card", getRes.data.gift_card);
});
});
});
@@ -1,73 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { Notification } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const orderSeeder = require("../../helpers/order-seeder");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/admin/orders", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
await dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("GET /notifications", () => {
beforeEach(async () => {
try {
await adminSeeder(dbConnection);
const manager = dbConnection.manager;
const noti = manager.create(Notification, {
event_name: "order.placed",
resource_type: "order",
resource_id: "order_01F0BF66ZBXNJ98WDQ9SCWH8Y7",
provider_id: "test-not",
data: {},
to: "test@email.com",
});
await manager.save(noti);
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "notification"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a claim", async () => {
const api = useApi();
const response = await api.get(`/admin/notifications`, {
headers: {
authorization: "Bearer test_token",
},
});
expect(response.status).toEqual(200);
fixtureWriter.addFixture("notification", response.data.notifications[0]);
});
});
});
@@ -1,254 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { ProductVariant } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const orderSeeder = require("../../helpers/order-seeder");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/admin/orders", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
await dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("GET /admin/orders/:id", () => {
let id;
beforeEach(async () => {
try {
await adminSeeder(dbConnection);
const order = await orderSeeder(dbConnection);
id = order.id;
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "cart"`);
await manager.query(`DELETE FROM "fulfillment_item"`);
await manager.query(`DELETE FROM "fulfillment"`);
await manager.query(`DELETE FROM "swap"`);
await manager.query(`DELETE FROM "return"`);
await manager.query(`DELETE FROM "claim_image"`);
await manager.query(`DELETE FROM "claim_tag"`);
await manager.query(`DELETE FROM "claim_item"`);
await manager.query(`DELETE FROM "shipping_method"`);
await manager.query(`DELETE FROM "line_item"`);
await manager.query(`DELETE FROM "claim_order"`);
await manager.query(`DELETE FROM "money_amount"`);
await manager.query(`DELETE FROM "product_option_value"`);
await manager.query(`DELETE FROM "product_option"`);
await manager.query(`DELETE FROM "product_variant"`);
await manager.query(`DELETE FROM "product"`);
await manager.query(`DELETE FROM "shipping_option"`);
await manager.query(`DELETE FROM "discount"`);
await manager.query(`DELETE FROM "payment"`);
await manager.query(`DELETE FROM "order"`);
await manager.query(`DELETE FROM "customer"`);
await manager.query(
`UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'`
);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a claim", async () => {
const api = useApi();
const response = await api.get(`/admin/orders/${id}`, {
headers: {
authorization: "Bearer test_token",
},
});
expect(response.status).toEqual(200);
fixtureWriter.addFixture("order", response.data.order);
});
});
describe("POST /admin/orders/:id/returns", () => {
let id;
beforeEach(async () => {
try {
await adminSeeder(dbConnection);
const order = await orderSeeder(dbConnection);
id = order.id;
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "cart"`);
await manager.query(`DELETE FROM "fulfillment_item"`);
await manager.query(`DELETE FROM "fulfillment"`);
await manager.query(`DELETE FROM "swap"`);
await manager.query(`DELETE FROM "return_item"`);
await manager.query(`DELETE FROM "return"`);
await manager.query(`DELETE FROM "claim_image"`);
await manager.query(`DELETE FROM "claim_tag"`);
await manager.query(`DELETE FROM "claim_item"`);
await manager.query(`DELETE FROM "shipping_method"`);
await manager.query(`DELETE FROM "line_item"`);
await manager.query(`DELETE FROM "claim_order"`);
await manager.query(`DELETE FROM "money_amount"`);
await manager.query(`DELETE FROM "product_option_value"`);
await manager.query(`DELETE FROM "product_option"`);
await manager.query(`DELETE FROM "product_variant"`);
await manager.query(`DELETE FROM "product"`);
await manager.query(`DELETE FROM "shipping_option"`);
await manager.query(`DELETE FROM "discount"`);
await manager.query(`DELETE FROM "payment"`);
await manager.query(`DELETE FROM "order"`);
await manager.query(`DELETE FROM "customer"`);
await manager.query(
`UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'`
);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a return", async () => {
const api = useApi();
const { data } = await api.get(`/admin/orders/${id}`, {
headers: {
authorization: "Bearer test_token",
},
});
const order = data.order;
const response = await api.post(
`/admin/orders/${id}/return`,
{
items: [
{
item_id: order.items[0].id,
quantity: 1,
},
],
},
{
headers: {
authorization: "Bearer test_token",
},
}
);
expect(response.status).toEqual(200);
fixtureWriter.addFixture("return", response.data.order.returns[0]);
});
});
describe("POST /admin/orders/:id/swaps", () => {
let id;
let varId;
beforeEach(async () => {
try {
await adminSeeder(dbConnection);
const order = await orderSeeder(dbConnection, {
fulfillment_status: "fulfilled",
payment_status: "captured",
});
id = order.id;
const pVar = await dbConnection.manager.findOne(ProductVariant, {});
varId = pVar.id;
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "fulfillment_item"`);
await manager.query(`DELETE FROM "fulfillment"`);
await manager.query(`DELETE FROM "return_item"`);
await manager.query(`DELETE FROM "return"`);
await manager.query(`DELETE FROM "claim_image"`);
await manager.query(`DELETE FROM "claim_tag"`);
await manager.query(`DELETE FROM "claim_item"`);
await manager.query(`DELETE FROM "shipping_method"`);
await manager.query(`DELETE FROM "line_item"`);
await manager.query(`DELETE FROM "swap"`);
await manager.query(`DELETE FROM "cart"`);
await manager.query(`DELETE FROM "claim_order"`);
await manager.query(`DELETE FROM "money_amount"`);
await manager.query(`DELETE FROM "product_option_value"`);
await manager.query(`DELETE FROM "product_option"`);
await manager.query(`DELETE FROM "product_variant"`);
await manager.query(`DELETE FROM "product"`);
await manager.query(`DELETE FROM "shipping_option"`);
await manager.query(`DELETE FROM "discount"`);
await manager.query(`DELETE FROM "payment"`);
await manager.query(`DELETE FROM "order"`);
await manager.query(`DELETE FROM "customer"`);
await manager.query(
`UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'`
);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a swap", async () => {
const api = useApi();
const { data } = await api.get(`/admin/orders/${id}`, {
headers: {
authorization: "Bearer test_token",
},
});
const order = data.order;
const response = await api.post(
`/admin/orders/${id}/swaps`,
{
return_items: [
{
item_id: order.items[0].id,
quantity: 1,
},
],
additional_items: [
{
variant_id: varId,
quantity: 2,
},
],
},
{
headers: {
authorization: "Bearer test_token",
},
}
);
expect(response.status).toEqual(200);
fixtureWriter.addFixture("swap", response.data.order.swaps[0]);
});
});
});
@@ -1,110 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const productSeeder = require("../../helpers/product-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/admin/products", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
await dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /admin/products", () => {
beforeEach(async () => {
try {
await productSeeder(dbConnection);
await adminSeeder(dbConnection);
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "product_option_value"`);
await manager.query(`DELETE FROM "product_option"`);
await manager.query(`DELETE FROM "money_amount"`);
await manager.query(`DELETE FROM "product_variant"`);
await manager.query(`DELETE FROM "product"`);
await manager.query(`DELETE FROM "product_collection"`);
await manager.query(`DELETE FROM "product_tag"`);
await manager.query(`DELETE FROM "product_type"`);
await manager.query(
`UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'`
);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a product", async () => {
const api = useApi();
const payload = {
title: "Test product",
description: "test-product-description",
type: { value: "test-type" },
collection_id: "test-collection",
tags: [{ value: "123" }, { value: "456" }],
options: [{ title: "size" }, { title: "color" }],
variants: [
{
title: "Test variant",
inventory_quantity: 10,
prices: [{ currency_code: "usd", amount: 100 }],
options: [{ value: "large" }, { value: "green" }],
},
],
};
const response = await api
.post("/admin/products", payload, {
headers: {
Authorization: "Bearer test_token",
},
})
.catch((err) => {
console.log(err);
});
expect(response.status).toEqual(200);
fixtureWriter.addFixture("product", response.data.product);
fixtureWriter.addFixture(
"product_variant",
response.data.product.variants[0]
);
fixtureWriter.addFixture(
"product_option",
response.data.product.options[0]
);
fixtureWriter.addFixture(
"product_option_value",
response.data.product.variants[0].options[0]
);
fixtureWriter.addFixture(
"money_amount",
response.data.product.variants[0].prices[0]
);
});
});
});
@@ -1,83 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { Region } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/shipping-options", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /admin/shipping-options", () => {
let regId;
beforeEach(async () => {
await adminSeeder(dbConnection);
const manager = dbConnection.manager;
const created = manager.create(Region, {
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
fulfillment_providers: [
{
id: "test-ful",
},
],
});
const newReg = await manager.save(created);
regId = newReg.id;
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "shipping_option"`);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a cart", async () => {
const api = useApi();
const getRes = await api.post(
`/admin/shipping-options`,
{
name: "Free Shipping",
region_id: regId,
provider_id: "test-ful",
data: {},
price_type: "flat_rate",
amount: 100,
},
{
headers: {
Authorization: "Bearer test_token",
},
}
);
expect(getRes.status).toEqual(200);
fixtureWriter.addFixture("region", getRes.data.shipping_option.region);
fixtureWriter.addFixture("shipping_option", getRes.data.shipping_option);
});
});
});
@@ -1,74 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { Region } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/shipping-profiles", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /admin/shipping-profiles", () => {
let regId;
beforeEach(async () => {
await adminSeeder(dbConnection);
const manager = dbConnection.manager;
const created = manager.create(Region, {
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
fulfillment_providers: [
{
id: "test-ful",
},
],
});
const newReg = await manager.save(created);
regId = newReg.id;
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "shipping_option"`);
await manager.query(`DELETE FROM "region"`);
await manager.query(`DELETE FROM "user"`);
});
it("creates a cart", async () => {
const api = useApi();
const getRes = await api.get(`/admin/shipping-profiles`, {
headers: {
Authorization: "Bearer test_token",
},
});
expect(getRes.status).toEqual(200);
fixtureWriter.addFixture(
"shipping_profile",
getRes.data.shipping_profiles[0]
);
});
});
});
@@ -1,56 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { Region } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const adminSeeder = require("../../helpers/admin-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/shipping-profiles", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("GET /admin/store", () => {
let regId;
beforeEach(async () => {
await adminSeeder(dbConnection);
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "user"`);
});
it("creates a cart", async () => {
const api = useApi();
const getRes = await api.get(`/admin/store`, {
headers: {
Authorization: "Bearer test_token",
},
});
expect(getRes.status).toEqual(200);
fixtureWriter.addFixture("store", getRes.data.store);
});
});
});
@@ -1,67 +0,0 @@
const { dropDatabase } = require("pg-god");
const path = require("path");
const { Region } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const cartSeeder = require("../../helpers/cart-seeder");
const fixtureWriter = require("../../utils/write-fixture").default;
jest.setTimeout(30000);
describe("/store/carts", () => {
let medusaProcess;
let dbConnection;
beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", ".."));
dbConnection = await initDb({ cwd });
medusaProcess = await setupServer({ cwd });
});
afterAll(async () => {
dbConnection.close();
await dropDatabase({ databaseName: "medusa-fixtures" });
medusaProcess.kill();
});
describe("POST /store/carts", () => {
beforeEach(async () => {
const manager = dbConnection.manager;
await manager.insert(Region, {
id: "region",
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
});
await manager.query(
`UPDATE "country" SET region_id='region' WHERE iso_2 = 'us'`
);
});
afterEach(async () => {
const manager = dbConnection.manager;
await manager.query(`DELETE FROM "cart"`);
await manager.query(
`UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'`
);
await manager.query(`DELETE FROM "region"`);
});
it("creates a cart", async () => {
const api = useApi();
const response = await api.post("/store/carts");
expect(response.status).toEqual(200);
const getRes = await api.post(`/store/carts/${response.data.cart.id}`);
expect(getRes.status).toEqual(200);
fixtureWriter.addFixture("cart", getRes.data.cart);
});
});
});
@@ -1,17 +0,0 @@
const Scrypt = require("scrypt-kdf");
const { User } = require("@medusajs/medusa");
module.exports = async (connection, data = {}) => {
const manager = connection.manager;
const buf = await Scrypt.kdf("secret_password", { logN: 1, r: 1, p: 1 });
const password_hash = buf.toString("base64");
await manager.insert(User, {
id: "admin_user",
email: "admin@medusa.js",
api_token: "test_token",
password_hash,
...data,
});
};
@@ -1,47 +0,0 @@
const { Customer, Region, Cart } = require("@medusajs/medusa");
module.exports = async (connection, data = {}) => {
const manager = connection.manager;
await manager.insert(Region, {
id: "test-region",
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
});
await manager.query(
`UPDATE "country" SET region_id='test-region' WHERE iso_2 = 'us'`
);
await manager.insert(Customer, {
id: "test-customer",
email: "test@email.com",
});
await manager.insert(Customer, {
id: "test-customer-2",
email: "test-2@email.com",
});
await manager.insert(Customer, {
id: "some-customer",
email: "some-customer@email.com",
});
const cart = manager.create(Cart, {
id: "test-cart",
customer_id: "some-customer",
email: "some-customer@email.com",
shipping_address: {
id: "test-shipping-address",
first_name: "lebron",
country_code: "us",
},
region_id: "test-region",
currency_code: "usd",
items: [],
});
await manager.save(cart);
};
@@ -1,27 +0,0 @@
const { Customer, Address } = require("@medusajs/medusa");
module.exports = async (connection, data = {}) => {
const manager = connection.manager;
await manager.insert(Customer, {
id: "test-customer-1",
email: "test1@email.com",
});
await manager.insert(Customer, {
id: "test-customer-2",
email: "test2@email.com",
});
await manager.insert(Customer, {
id: "test-customer-3",
email: "test3@email.com",
});
await manager.insert(Address, {
id: "test-address",
first_name: "Lebron",
last_name: "James",
customer_id: "test-customer-1",
});
};
@@ -1,152 +0,0 @@
const {
ShippingProfile,
Customer,
MoneyAmount,
LineItem,
Country,
ShippingOption,
ShippingMethod,
Product,
ProductOption,
ProductVariant,
Region,
Order,
} = require("@medusajs/medusa");
module.exports = async (connection, data = {}) => {
const manager = connection.manager;
const defaultProfile = await manager.findOne(ShippingProfile, {
type: "default",
});
const prodOption = manager.create(ProductOption, {
title: "Size",
});
const newProdOption = await manager.save(prodOption);
const prod = manager.create(Product, {
title: "test product",
profile_id: defaultProfile.id,
options: [newProdOption],
});
const newProd = await manager.save(prod);
const prodVar = manager.create(ProductVariant, {
title: "test variant",
product_id: newProd.id,
inventory_quantity: 1,
options: [
{
option_id: newProdOption.id,
value: "Size",
},
],
});
const newProdVar = await manager.save(prodVar);
const ma = manager.create(MoneyAmount, {
variant_id: newProdVar.id,
currency_code: "usd",
amount: 8000,
});
await manager.save(ma);
const region = manager.create(Region, {
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
});
const newReg = await manager.save(region);
await manager.query(
`UPDATE "country" SET region_id='${newReg.id}' WHERE iso_2 = 'us'`
);
const customer = manager.create(Customer, {
email: "test@email.com",
});
const newCustomer = await manager.save(customer);
const shipOpt = manager.create(ShippingOption, {
name: "test-option",
provider_id: "test-ful",
region_id: newReg.id,
profile_id: defaultProfile.id,
price_type: "flat_rate",
amount: 1000,
data: {},
});
const newShipOpt = await manager.save(shipOpt);
const order = manager.create(Order, {
customer_id: newCustomer.id,
email: "test@email.com",
billing_address: {
first_name: "lebron",
},
shipping_address: {
first_name: "lebron",
country_code: "us",
},
region_id: newReg.id,
currency_code: "usd",
tax_rate: 0,
discounts: [
{
id: "test-discount",
code: "TEST134",
is_dynamic: false,
rule: {
id: "test-rule",
description: "Test Discount",
type: "percentage",
value: 10,
allocation: "total",
},
is_disabled: false,
regions: [
{
id: newReg.id,
},
],
},
],
payments: [
{
id: "test-payment",
amount: 10000,
currency_code: "usd",
amount_refunded: 0,
provider_id: "test",
data: {},
},
],
items: [
{
id: "test-item",
fulfilled_quantity: 1,
title: "Line Item",
description: "Line Item Desc",
thumbnail: "https://test.js/1234",
unit_price: 8000,
quantity: 1,
variant_id: newProdVar.id,
},
],
...data,
});
const newOrder = await manager.save(order);
const shipMeth = manager.create(ShippingMethod, {
order_id: newOrder.id,
shipping_option_id: newShipOpt.id,
price: 1000,
data: {},
});
await manager.save(shipMeth);
return newOrder;
};
@@ -1,68 +0,0 @@
const {
ProductCollection,
ProductTag,
ProductType,
Region,
Product,
ShippingProfile,
ProductVariant,
} = require("@medusajs/medusa");
module.exports = async (connection, data = {}) => {
const manager = connection.manager;
const defaultProfile = await manager.findOne(ShippingProfile, {
type: "default",
});
const coll = manager.create(ProductCollection, {
id: "test-collection",
title: "Test collection",
});
await manager.save(coll);
const tag = manager.create(ProductTag, {
id: "tag1",
value: "123",
});
await manager.save(tag);
const type = manager.create(ProductType, {
id: "test-type",
value: "test-type",
});
await manager.save(type);
await manager.insert(Region, {
id: "test-region",
name: "Test Region",
currency_code: "usd",
tax_rate: 0,
});
await manager.insert(Product, {
id: "test-product",
title: "Test product",
profile_id: defaultProfile.id,
description: "test-product-description",
collection_id: "test-collection",
type: { id: "test-type", value: "test-type" },
tags: [
{ id: "tag1", value: "123" },
{ tag: "tag2", value: "456" },
],
options: [{ id: "test-option", title: "Default value" }],
});
await manager.insert(ProductVariant, {
id: "test-variant",
inventory_quantity: 10,
title: "Test variant",
product_id: "test-product",
prices: [{ id: "test-price", currency_code: "usd", amount: 100 }],
options: [{ id: "test-variant-option", value: "Default variant" }],
});
};
-8
View File
@@ -1,8 +0,0 @@
module.exports = {
plugins: [],
projectConfig: {
// redis_url: REDIS_URL,
database_url: "postgres://localhost/medusa-fixtures",
database_type: "postgres",
},
};
-19
View File
@@ -1,19 +0,0 @@
{
"name": "api",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"build": "babel src -d dist --extensions \".ts,.js\""
},
"dependencies": {
"@medusajs/medusa": "1.1.11-dev-1615929449260",
"medusa-interfaces": "1.1.1-dev-1615929449260"
},
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/node": "^7.12.10",
"babel-preset-medusa-package": "1.1.0-dev-1615929449260"
}
}
-12
View File
@@ -1,12 +0,0 @@
const fixtureWriter = require("./utils/write-fixture").default;
const { dropDatabase } = require("pg-god");
beforeAll(() => {
console.log(fixtureWriter);
});
afterAll(async () => {
console.log(fixtureWriter);
await dropDatabase({ databaseName: "medusa-fixtures" });
await fixtureWriter.execute();
});
@@ -1,49 +0,0 @@
import { FulfillmentService } from "medusa-interfaces";
class TestFulService extends FulfillmentService {
static identifier = "test-ful";
constructor() {
super();
}
getFulfillmentOptions() {
return [
{
id: "manual-fulfillment",
},
];
}
validateFulfillmentData(data, cart) {
return data;
}
validateOption(data) {
return true;
}
canCalculate() {
return false;
}
calculatePrice() {
throw Error("Manual Fulfillment service cannot calculatePrice");
}
createOrder() {
// No data is being sent anywhere
return Promise.resolve({});
}
createFulfillment() {
// No data is being sent anywhere
return Promise.resolve({});
}
cancelFulfillment() {
return Promise.resolve({});
}
}
export default TestFulService;
@@ -1,19 +0,0 @@
import { NotificationService } from "medusa-interfaces";
class TestNotiService extends NotificationService {
static identifier = "test-not";
constructor() {
super();
}
async sendNotification() {
return Promise.resolve();
}
async resendNotification() {
return Promise.resolve();
}
}
export default TestNotiService;
@@ -1,67 +0,0 @@
import { AbstractPaymentService } from "@medusajs/medusa"
class TestPayService extends AbstractPaymentService {
static identifier = "test-pay"
constructor(_) {
super(_)
}
async getStatus(paymentData) {
return "authorized"
}
async retrieveSavedMethods(customer) {
return Promise.resolve([])
}
async createPayment() {
return {}
}
async createPaymentNew() {
return {}
}
async retrievePayment(data) {
return {}
}
async getPaymentData(sessionData) {
return {}
}
async authorizePayment(sessionData, context = {}) {
return {}
}
async updatePaymentData(sessionData, update) {
return {}
}
async updatePayment(sessionData, cart) {
return {}
}
async updatePaymentNew(sessionData, paymentInput) {
return {}
}
async deletePayment(payment) {
return {}
}
async capturePayment(payment) {
return {}
}
async refundPayment(payment, amountToRefund) {
return {}
}
async cancelPayment(payment) {
return {}
}
}
export default TestPayService
@@ -1,30 +0,0 @@
const fs = require("fs").promises;
const path = require("path");
class FixtureWriter {
constructor() {
const resolvedPath = path.resolve("./docs/api/fixtures.json");
const existing = require(resolvedPath);
this.toWrite_ = existing.resources;
this.resolvedPath_ = resolvedPath;
}
addFixture(key, data) {
this.toWrite_ = {
...this.toWrite_,
[key]: data,
};
}
async execute() {
const toSet = {
resources: this.toWrite_,
};
const s = JSON.stringify(toSet, null, 2);
return await fs.writeFile(this.resolvedPath_, s);
}
}
const instance = new FixtureWriter();
export default instance;
File diff suppressed because it is too large Load Diff
-30
View File
@@ -1,30 +0,0 @@
const path = require("path");
const { spawn } = require("child_process");
const { setPort } = require("./use-api");
module.exports = ({ cwd }) => {
const serverPath = path.join(__dirname, "test-server.js");
return new Promise((resolve, reject) => {
const medusaProcess = spawn("node", [path.resolve(serverPath)], {
cwd,
env: {
...process.env,
NODE_ENV: "development",
JWT_SECRET: "test",
COOKIE_SECRET: "test",
},
stdio: ["ignore", "ignore", "inherit", "ipc"],
});
medusaProcess.on("uncaughtException", (err) => {
medusaProcess.kill();
});
medusaProcess.on("message", (port) => {
setPort(port);
resolve(medusaProcess);
});
});
};
-34
View File
@@ -1,34 +0,0 @@
const path = require("path")
const express = require("express")
const getPort = require("get-port")
const importFrom = require("import-from")
const initialize = async () => {
const app = express()
const cwd = process.cwd()
const loaders = importFrom(cwd, "@medusajs/medusa/dist/loaders").default
const { dbConnection } = await loaders({
directory: path.resolve(process.cwd()),
expressApp: app,
})
const PORT = await getPort()
return {
db: dbConnection,
app,
port: PORT,
}
}
const setup = async () => {
const { app, port } = await initialize()
app.listen(port, (err) => {
process.send(port)
})
}
setup()
-21
View File
@@ -1,21 +0,0 @@
const axios = require("axios").default;
const ServerTestUtil = {
port_: null,
client_: null,
setPort: function (port) {
this.client_ = axios.create({ baseURL: `http://localhost:${port}` });
},
};
const instance = ServerTestUtil;
module.exports = {
setPort: function (port) {
instance.setPort(port);
},
useApi: function () {
return instance.client_;
},
};
-73
View File
@@ -1,73 +0,0 @@
const { dropDatabase, createDatabase } = require("pg-god")
const { createConnection } = require("typeorm")
const path = require("path")
const DbTestUtil = {
db_: null,
setDb: function (connection) {
this.db_ = connection
},
clear: function () {
return this.db_.synchronize(true)
},
shutdown: async function () {
await this.db_.close()
return dropDatabase({ databaseName })
},
}
const instance = DbTestUtil
module.exports = {
initDb: async function ({ cwd }) {
const migrationDir = path.resolve(
path.join(
cwd,
`node_modules`,
`@medusajs`,
`medusa`,
`dist`,
`migrations`
)
)
const databaseName = "medusa-fixtures"
await createDatabase({ databaseName })
const connection = await createConnection({
type: "postgres",
url: "postgres://localhost/medusa-fixtures",
migrations: [`${migrationDir}/*.js`],
})
await connection.runMigrations()
await connection.close()
const modelsLoader = require(path.join(
cwd,
`node_modules`,
`@medusajs`,
`medusa`,
`dist`,
`loaders`,
`models`
)).default
const entities = modelsLoader({}, { register: false })
const dbConnection = await createConnection({
type: "postgres",
url: "postgres://localhost/medusa-fixtures",
entities,
})
instance.setDb(dbConnection)
return dbConnection
},
useDb: function () {
return instance
},
}
-41
View File
@@ -1,41 +0,0 @@
const ServerTestUtil = {
server_: null,
app_: null,
setApp: function (app) {
this.app_ = app;
},
start: async function () {
this.server_ = await new Promise((resolve, reject) => {
const s = this.app_.listen(PORT, (err) => {
if (err) {
reject(err);
}
});
resolve(s);
});
},
kill: function () {
return new Promise((resolve, _) => {
if (this.server_) {
this.server_.close(() => resolve());
}
resolve();
});
},
};
const instance = ServerTestUtil;
module.exports = {
setApp: function (app) {
instance.setApp(app);
return instance;
},
useServer: function () {
return instance;
},
};
-22
View File
@@ -1,22 +0,0 @@
const glob = require(`glob`);
const pkgs = glob
.sync(`${__dirname}/*/`)
.map((p) => p.replace(__dirname, `<rootDir>/docs-util`));
module.exports = {
testEnvironment: `node`,
rootDir: `../`,
roots: pkgs,
testPathIgnorePatterns: [
`/examples/`,
`/www/`,
`/dist/`,
`/node_modules/`,
`__tests__/fixtures`,
`__testfixtures__`,
`.cache`,
],
transform: { "^.+\\.[jt]s$": `<rootDir>/jest-transformer.js` },
setupFilesAfterEnv: ["<rootDir>/docs-util/setup.js"],
};
-7
View File
@@ -1,7 +0,0 @@
const fixtureWriter = require("./fixture-gen/utils/write-fixture").default;
const { dropDatabase } = require("pg-god");
afterAll(async () => {
await dropDatabase({ databaseName: "medusa-fixtures" });
await fixtureWriter.execute();
});
+2 -1
View File
@@ -11766,7 +11766,7 @@ paths:
description: The number of types to return.
schema:
type: integer
default: 10
default: 20
- in: query
name: offset
description: The number of items to skip before the results.
@@ -13792,6 +13792,7 @@ paths:
$ref: '#/components/responses/500_error'
/products/types:
get:
deprecated: true
operationId: GetProductsTypes
summary: List Product Types
description: Retrieves a list of Product Types.
+2 -1
View File
@@ -11766,7 +11766,7 @@ paths:
description: The number of types to return.
schema:
type: integer
default: 10
default: 20
- in: query
name: offset
description: The number of items to skip before the results.
@@ -13792,6 +13792,7 @@ paths:
$ref: '#/components/responses/500_error'
/products/types:
get:
deprecated: true
operationId: GetProductsTypes
summary: List Product Types
description: Retrieves a list of Product Types.
+1 -1
View File
@@ -9,7 +9,7 @@ get:
description: The number of types to return.
schema:
type: integer
default: 10
default: 20
- in: query
name: offset
description: The number of items to skip before the results.
+1
View File
@@ -1,4 +1,5 @@
get:
deprecated: true
operationId: GetProductsTypes
summary: List Product Types
description: Retrieves a list of Product Types.
+154
View File
@@ -2937,6 +2937,160 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/product-types:
get:
operationId: GetProductTypes
summary: List Product Types
description: Retrieve a list of Product Types.
x-authenticated: true
parameters:
- in: query
name: limit
description: The number of types to return.
schema:
type: integer
default: 20
- in: query
name: offset
description: The number of items to skip before the results.
schema:
type: integer
default: 0
- in: query
name: order
description: The field to sort items by.
schema:
type: string
- in: query
name: discount_condition_id
description: The discount condition id on which to filter the product types.
schema:
type: string
- in: query
name: value
style: form
explode: false
description: The type values to search for
schema:
type: array
items:
type: string
- in: query
name: id
style: form
explode: false
description: The type IDs to search for
schema:
type: array
items:
type: string
- in: query
name: q
description: A query string to search values for
schema:
type: string
- in: query
name: created_at
description: Date comparison for when resulting product types were created.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: updated_at
description: Date comparison for when resulting product types were updated.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
x-codeSamples:
- lang: JavaScript
label: JS Client
source: >
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
3 })
// must be previously logged in or use api token
medusa.store.productTypes.list()
.then(({ product_types }) => {
console.log(product_types.length);
});
- lang: Shell
label: cURL
source: >
curl --location --request GET
'https://medusa-url.com/store/product-types' \
--header 'Authorization: Bearer {api_token}'
security:
- api_token: []
- cookie_auth: []
tags:
- Product Type
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
product_types:
$ref: '#/components/schemas/product_type'
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of items skipped before these items
limit:
type: integer
description: The number of items per page
'400':
$ref: '#/components/responses/400_error'
'401':
$ref: '#/components/responses/unauthorized'
'404':
$ref: '#/components/responses/not_found_error'
'409':
$ref: '#/components/responses/invalid_state_error'
'422':
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
'/products/{id}':
get:
operationId: GetProductsProduct
+154
View File
@@ -2937,6 +2937,160 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/product-types:
get:
operationId: GetProductTypes
summary: List Product Types
description: Retrieve a list of Product Types.
x-authenticated: true
parameters:
- in: query
name: limit
description: The number of types to return.
schema:
type: integer
default: 20
- in: query
name: offset
description: The number of items to skip before the results.
schema:
type: integer
default: 0
- in: query
name: order
description: The field to sort items by.
schema:
type: string
- in: query
name: discount_condition_id
description: The discount condition id on which to filter the product types.
schema:
type: string
- in: query
name: value
style: form
explode: false
description: The type values to search for
schema:
type: array
items:
type: string
- in: query
name: id
style: form
explode: false
description: The type IDs to search for
schema:
type: array
items:
type: string
- in: query
name: q
description: A query string to search values for
schema:
type: string
- in: query
name: created_at
description: Date comparison for when resulting product types were created.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: updated_at
description: Date comparison for when resulting product types were updated.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
x-codeSamples:
- lang: JavaScript
label: JS Client
source: >
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
3 })
// must be previously logged in or use api token
medusa.store.productTypes.list()
.then(({ product_types }) => {
console.log(product_types.length);
});
- lang: Shell
label: cURL
source: >
curl --location --request GET
'https://medusa-url.com/store/product-types' \
--header 'Authorization: Bearer {api_token}'
security:
- api_token: []
- cookie_auth: []
tags:
- Product Type
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
product_types:
$ref: '#/components/schemas/product_type'
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of items skipped before these items
limit:
type: integer
description: The number of items per page
'400':
$ref: '#/components/responses/400_error'
'401':
$ref: '#/components/responses/unauthorized'
'404':
$ref: '#/components/responses/not_found_error'
'409':
$ref: '#/components/responses/invalid_state_error'
'422':
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
'/products/{id}':
get:
operationId: GetProductsProduct
@@ -0,0 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.store.productTypes.list()
.then(({ product_types }) => {
console.log(product_types.length);
});
@@ -0,0 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/product-types' \
--header 'Authorization: Bearer {api_token}'
+2
View File
@@ -207,6 +207,8 @@ paths:
$ref: paths/orders_{id}.yaml
/orders:
$ref: paths/orders.yaml
/product-types:
$ref: paths/product-types.yaml
/products/{id}:
$ref: paths/products_{id}.yaml
/products:
+139
View File
@@ -0,0 +1,139 @@
get:
operationId: GetProductTypes
summary: List Product Types
description: Retrieve a list of Product Types.
x-authenticated: true
parameters:
- in: query
name: limit
description: The number of types to return.
schema:
type: integer
default: 20
- in: query
name: offset
description: The number of items to skip before the results.
schema:
type: integer
default: 0
- in: query
name: order
description: The field to sort items by.
schema:
type: string
- in: query
name: discount_condition_id
description: The discount condition id on which to filter the product types.
schema:
type: string
- in: query
name: value
style: form
explode: false
description: The type values to search for
schema:
type: array
items:
type: string
- in: query
name: id
style: form
explode: false
description: The type IDs to search for
schema:
type: array
items:
type: string
- in: query
name: q
description: A query string to search values for
schema:
type: string
- in: query
name: created_at
description: Date comparison for when resulting product types were created.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: updated_at
description: Date comparison for when resulting product types were updated.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/product-types/getundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/product-types/getundefined
security:
- api_token: []
- cookie_auth: []
tags:
- Product Type
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
product_types:
$ref: ../components/schemas/product_type.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of items skipped before these items
limit:
type: integer
description: The number of items per page
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
+11 -7
View File
@@ -187,18 +187,22 @@ If youre using a [Next.js](../starters/nextjs-medusa-starter.md) storefront,
If this configuration is not added, youll receive the error ["next/image Un-configured Host”](https://nextjs.org/docs/messages/next-image-unconfigured-host).
In `next.config.js` add the following option in the exported object:
In `next.config.js` add the following option in the exported object:
```jsx
module.exports = {
//other options
images: {
const { withStoreConfig } = require("./store-config")
//...
module.exports = withStoreConfig({
//...
images: {
domains: [
"127.0.0.1",
//any other domains...
//...
"127.0.0.1",
],
},
}
})
```
Where `127.0.0.1` is the domain of your local MinIO server.
+4
View File
@@ -157,6 +157,10 @@ If this configuration is not added, youll receive the error ["next/image Un-
In `next.config.js` add the following option in the exported object:
```jsx
const { withStoreConfig } = require("./store-config")
//...
module.exports = withStoreConfig({
//...
images: {
+4
View File
@@ -144,6 +144,10 @@ If this configuration is not added, youll receive the error ["next/image Un-
In `next.config.js` add the following option in the exported object:
```jsx
const { withStoreConfig } = require("./store-config")
//...
module.exports = withStoreConfig({
//...
images: {
@@ -79,6 +79,7 @@ formData.append('files', file); //file is an instance of File
fetch(`<YOUR_SERVER>/admin/uploads`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'multipart/form-data',
},
@@ -134,6 +135,7 @@ medusa.admin.batchJobs.create({
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -210,7 +212,9 @@ medusa.admin.batchJobs.retrieve(batchJobId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`)
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ batch_job }) => {
console.log(batch_job.status, batch_job.result);
@@ -270,7 +274,8 @@ medusa.admin.batchJobs.confirm(batchJobId)
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}/confirm`, {
method: 'POST'
method: 'POST',
credentials: 'include',
})
.then((response) => response.json())
.then(({ batch_job }) => {
@@ -13,7 +13,7 @@ Using Medusas [Batch Job Admin APIs](https://docs.medusajs.com/api/admin/#tag
### Medusa Components
It is assumed that you already have a Medusa server installed and set up. If not, you can follow our [quickstart guide](../../quickstart/quick-start.md) to get started.
It is assumed that you already have a Medusa server installed and set up. If not, you can follow the [quickstart guide](../../quickstart/quick-start.md) to get started.
### Redis
@@ -46,7 +46,7 @@ If you follow the JS Client code blocks, its assumed you already have [Medusa
You must be an authenticated admin user before following along with the steps in the tutorial.
You can learn more about [authenticating as an admin user in the API reference](https://docs.medusajs.com/api/admin/#section/Authentication).
You can learn more about [authenticating as an admin user in the API reference](/api/admin/#section/Authentication).
## 1. Upload CSV File
@@ -73,6 +73,7 @@ formData.append('files', file); //file is an instance of File
fetch(`<YOUR_SERVER>/admin/uploads`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'multipart/form-data',
},
@@ -127,6 +128,7 @@ medusa.admin.batchJobs.create({
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -198,7 +200,9 @@ medusa.admin.batchJobs.retrieve(batchJobId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`)
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ batch_job }) => {
console.log(batch_job.status, batch_job.result);
@@ -258,7 +262,8 @@ medusa.admin.batchJobs.confirm(batchJobId)
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}/confirm`, {
method: 'POST'
method: 'POST',
credentials: 'include',
})
.then((response) => response.json())
.then(({ batch_job }) => {
@@ -0,0 +1,494 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Manage Discounts using Admin APIs
In this document, youll learn how to use the Admins Discount APIs to manage discounts, discount conditions, and more.
:::tip
If you want to learn about the Discount architecture in-depth, check out the [Discount Architecture](../backend/discounts/index.md) documentation instead.
:::
## Overview
Using Medusas Discount Admin APIs, you can manage discounts, their conditions, status, rules, and more. You can also manage [dynamic discounts and their discount codes](/api/admin/#tag/Discount/operation/PostDiscountsDiscountDynamicCodes).
### Scenario
You want to add or use general admin functionalities related to:
- Creating discounts of different types, configurations, and rules.
- Updating and deleting discounts.
- Managing conditions in that discount, including adding, retrieving, updating, and removing conditions.
:::tip
You can use Medusas Admin APIs to achieve more functionalities as well. Check out the [API reference](/api/admin/#tag/Discount) to learn more.
:::
# Prerequisites
### Medusa Components
It is assumed that you already have a Medusa server installed and set up. If not, you can follow the [quickstart guide](../../quickstart/quick-start.md) to get started.
### JS Client
This guide includes code snippets to send requests to your Medusa server using Medusas JS Client, JavaScripts Fetch API, or cURL.
If you follow the JS Client code blocks, its assumed you already have [Medusas JS Client](../../js-client/overview.md) installed and have [created an instance of the client](../../js-client/overview.md#configuration).
### Authenticated Admin User
You must be an authenticated admin user before following along with the steps in the tutorial.
You can learn more about [authenticating as an admin user in the API reference](/api/admin/#section/Authentication).
## Create a Discount
You can create a discount by sending a request to the [Create Discount](/api/admin/#tag/Discount/operation/PostDiscounts) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
import { AllocationType, DiscountRuleType } from "@medusajs/medusa"
//...
medusa.admin.discounts.create({
code,
rule: {
type: DiscountRuleType.FIXED,
value: 10,
allocation: AllocationType.ITEM
},
regions: [
regionId
]
})
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/discounts`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
code,
rule: {
type: 'fixed',
value: 10,
allocation: 'item'
},
regions: [
regionId
]
})
})
.then((response) => response.json())
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="curl" label="cURL">
```bash
curl --location --request POST '<YOUR_SERVER>/admin/discounts' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "<CODE>",
"rule": {
"type": "fixed",
"value": 10,
"allocation": "item"
},
"regions": [
"<REGION_ID>"
]
}'
```
</TabItem>
</Tabs>
This request accepts [many request-body parameters](/api/admin/#tag/Discount/operation/PostDiscounts) including:
- `code`: This parameter is required. It is a unique code. The customer redeems the discount using this code.
- `rule`: This parameter is required. It is an object having at least the following fields:
- `type`: A string indicating the type of discount. It can be `fixed`, `percentage`, or `free_shipping`. When using the Medusa JS Client, you must use the enum type [DiscountRuleType](../../references/js-client/enums/internal.discountruletype/) for the value.
- `value`: A number indicating the value of the discount. If the discount type is `fixed`, then it will be the fixed amount to discount from the carts totals or its items. If the discount type is `percentage`, then it will be the percentage to discount from the items in the cart. If the type is `free_shipping`, it has no effect and can be set to `0`.
- `allocation`: A string indicating how the discount should be applied. Can be `item` or `total`. If the type is not `fixed`, then this has no effect. When using the Medusa JS Client, you must use the enum type [AllocationType](../../references/js-client/enums/internal.allocationtype/) for the value.
- `regions`: An array of region IDs this discount can be used in. If the type of discount is `fixed`, only one region can be passed.
This request returns the full `discount` object.
## Update Discount
You can update any of the discounts information, configurations, and conditions by sending a request to the [Update Discount](/api/admin/#tag/Discount/operation/PostDiscountsDiscount) endpoint.
For example, you can update the discounts description and status by sending the following request:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
medusa.admin.discounts.update(discountId, {
description: "New description",
is_disabled: true
})
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/discounts/${discountId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: "New description",
is_disabled: true
})
})
.then((response) => response.json())
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="curl" label="cURL">
```bash
curl --location --request POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"description": "New description",
"is_disabled": true
}'
```
</TabItem>
</Tabs>
This request accepts the discount ID as a path parameter. You can pass the parameters you want to update in the request body. In the example above, you pass the `description` and `is_disabled` parameters to update them.
You can check the [API reference](/api/admin/#tag/Discount/operation/PostDiscountsDiscount) for all the accepted parameters to update the discount.
This updates the discounts information and returns the full updated `discount` object in the response.
## Manage Conditions
### Create a Condition
:::tip
You can learn more about conditions and conditions types in the [Discount Architecture](../backend/discounts/index.md) documentation.
:::
You can send a request to the [Create Condition](/api/admin/#tag/Discount-Condition/operation/PostDiscountsDiscountConditions) endpoint to create a condition in a discount:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
import { DiscountConditionOperator } from "@medusajs/medusa"
//...
medusa.admin.discounts.createCondition(discount_id, {
operator: DiscountConditionOperator.IN,
products: [
productId
]
})
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
operator: 'in',
products: [
productId
]
})
})
.then((response) => response.json())
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="curl" label="cURL">
```bash
curl --location --request POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"operator": "in",
"products": [
"<PRODUCT_ID>"
]
}'
```
</TabItem>
</Tabs>
This request accepts the discount ID as a path parameter.
It also requires the request-body parameter `operator` which can have one of the following values:
- `in` indicates that the discount should be applied to the specified resources in this condition. When using the Medusa JS Client, `DiscountConditionOperator.IN` must be used as the value.
- `not_in` indicates that the discount should be applied to all resources except those specified in this condition. When using the Medusa JS Client, `DiscountConditionOperator.NOT_IN` must be used as the value.
In addition, every condition has a condition type. Based on that condition type, a different additional parameter is required for the request.
For example, if the condition type is product, meaning that the condition specifies which products this discount apply/doesnt apply for, the parameter `products` is required.
The additional required parameter must be an array of IDs of the resources. For the previous example, `products` would be an array of product IDs.
You can check the [API reference](/api/admin/#tag/Discount-Condition/operation/PostDiscountsDiscountConditions) for a full list of accepted parameters based on the condition type.
This request returns the full `discount` object in the response which includes all conditions under `discount.rule.conditions`.
### Retrieve Condition
You can retrieve a condition and its resources by sending a request to the [Get Condition](/api/admin/#tag/Discount-Condition/operation/GetDiscountsDiscountConditionsCondition) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
medusa.admin.discounts.getCondition(discountId, conditionId, {
expand: 'products'
})
.then(({ discount_condition }) => {
console.log(discount_condition.id, discount_condition.products);
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions/${conditionId}&expand=products`, {
credentials: 'include'
})
.then((response) => response.json())
.then(({ discount_condition }) => {
console.log(discount_condition.id, discount_condition.products);
});
```
</TabItem>
<TabItem value="curl" label="cURL">
```bash
curl --location --request GET '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>&expand=products' \
--header 'Authorization: Bearer <API_TOKEN>'
```
</TabItem>
</Tabs>
This request accepts as path parameters the discount ID and the condition ID. You can optionally pass a query parameter `expand` which specifies which relations to include in the returned object.
By default, this request returns the discount condition object without any of its resources (In the previous example the resources are the products). To ensure the resources are included in the returned object, you must pass the name of the conditions type as a value to the `expand` query parameter.
In the previous example, you pass `expand=products` as a query parameter, which returns inside the `discount_condition` object a `products` attribute. The value of `products` is an array of products that belong to this condition.
### Update Condition
You can update a conditions resources using the [Update Condition](/api/admin/#tag/Discount/operation/PostDiscountsDiscountConditionsCondition) endpoint. You cant update a conditions operator.
For example, to update the products in a condition:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
medusa.admin.discounts.updateCondition(discountId, conditionId, {
products: [
productId1,
productId2
]
})
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions/${conditionId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
products: [
productId1,
productId2
]
})
})
.then((response) => response.json())
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="curl" label="cURL">
```bash
curl --location --request POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"products": [
"<PRODUCT_ID_1>",
"<PRODUCT_ID_2>"
]
}'
```
</TabItem>
</Tabs>
This request accepts as a path parameter the discount ID and the condition ID. In its body, it accepts the resources of the same type that were used when the condition was created.
For example, if a condition was created for `products`, you cant pass in the update request `product_collections`. You must pass in the update request a `products` array as well.
This request returns the full `discount` object with the updated condition in the response.
### Delete Condition
You can delete a condition by sending a request to the [Delete Condition](/api/admin/#tag/Discount-Condition/operation/DeleteDiscountsDiscountConditionsCondition) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
medusa.admin.discounts.deleteCondition(discountId, conditionId)
.then(({ discount }) => {
console.log(discount);
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions/${conditionId}`, {
method: 'DELETE',
credentials: 'include'
})
.then((response) => response.json())
.then(({ discount }) => {
console.log(discount.id);
});
```
</TabItem>
<TabItem value="curl" label="cURL">
```bash
curl --location --request DELETE '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
--header 'Authorization: Bearer <API_TOKEN>'
```
</TabItem>
</Tabs>
This request accepts as a path parameter the discount ID and the condition ID.
It returns the `discount` object in the response.
## Delete Discount
You can delete a discount by sending a request to the [Delete Discount](/api/admin/#tag/Discount/operation/DeleteDiscountsDiscount) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
medusa.admin.discounts.delete(discount_id)
.then(({ id, object, deleted }) => {
console.log(id);
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/discounts/${discountId}`, {
method: 'DELETE',
credentials: 'include'
})
.then((response) => response.json())
.then(({ id, object, deleted }) => {
console.log(id);
});
```
</TabItem>
<TabItem value="curl" label="cURL">
```bash
curl --location --request DELETE '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>' \
--header 'Authorization: Bearer <API_TOKEN>'
```
</TabItem>
</Tabs>
This request accepts the discount ID as a path parameter.
It returns in the response the following fields:
- `id`: The ID of the deleted discount.
- `object`: A string indicating the type of object deleted. By default, its value is `discount`.
- `deleted`: A boolean value indicating whether the discount was deleted or not.
## Whats Next
- Check out more [Admin Discount APIs in the API reference](/api/admin/#tag/Discount).
- Learn how you can [use Discounts on the storefront](../storefront/use-discounts-in-checkout.mdx).
@@ -57,6 +57,7 @@ medusa.admin.customerGroups.create({
```jsx
fetch(`<SERVER_URL>/admin/customer-groups`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -107,7 +108,9 @@ medusa.admin.customerGroups.list()
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/customer-groups`)
fetch(`<SERVER_URL>/admin/customer-groups`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ customer_groups, limit, offset, count }) => {
console.log(customer_groups.length)
@@ -149,7 +152,9 @@ medusa.admin.customerGroups.retrieve(customerGroupId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}`)
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ customer_group }) => {
console.log(customer_group.id)
@@ -195,6 +200,7 @@ medusa.admin.customerGroups.update(customerGroupId, {
```jsx
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -250,7 +256,8 @@ medusa.admin.customerGroups.delete(customerGroupId)
```jsx
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}`, {
method: 'DELETE'
method: 'DELETE',
credentials: 'include',
})
.then((response) => response.json())
.then(({ id, object, deleted }) => {
@@ -301,6 +308,7 @@ medusa.admin.customerGroups.addCustomers(customerGroupId, {
```jsx
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}/customers/batch`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -357,7 +365,9 @@ medusa.admin.customerGroups.listCustomers(customerGroupId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}/customers`)
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}/customers`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ customers, count, offset, limit }) => {
console.log(customers.length)
@@ -409,6 +419,7 @@ medusa.admin.customerGroups.removeCustomers(customer_group_id, {
```jsx
fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}/customers/batch`, {
method: 'DELETE',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -274,6 +274,7 @@ medusa.admin.batchJobs.create({
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -328,7 +329,9 @@ medusa.admin.batchJobs.retrieve(batchJobId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`)
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ batch_job }) => {
console.log(batch_job.status, batch_job.result);
@@ -382,7 +385,8 @@ medusa.admin.batchJobs.confirm(batchJobId)
```jsx
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}/confirm`, {
method: 'POST'
method: 'POST',
credentials: 'include',
})
.then((response) => response.json())
.then(({ batch_job }) => {
@@ -0,0 +1,104 @@
# Discounts Architecture
In this document, youll learn about Discounts architecture and how it works.
## What are Discounts
Discounts allow you to offer promotions to your users generally for marketing purposes. Customers can apply a discount code to their checkout flow to use the discount if its valid for them.
Discounts can be limited by a set of configurations and conditions. For example, you can indicate how many times a discount can be used or by which customer group. You can also specify which products this discount can be used with, among other conditions.
### Discount Types
There are three types of discounts:
1. Percentage discount: remove a percentage of the price every product in the cart that the discount can be applied to.
2. Fixed discount: remove a fixed amount either of the customers total checkout amount or of the price every product in the cart that the discount can be applied to.
3. Free shipping discount: remove any shipping amount from the customers order during checkout.
### Example Use Cases
Discounts can be used in many use cases including:
1. Applying discounted amounts for wholesale or B2B customers.
2. Creating a sale within a specific period of time (for example, a summer sale).
3. Give your customers free shipping for a limited time.
![Discounts Architecture](https://res.cloudinary.com/dza7lstvk/image/upload/v1669900544/Medusa%20Docs/Diagrams/discounts_cdxec1.jpg)
---
## Discount Entity Overview
A discount is represented by the [`Discount`](../../../references/entities/classes/Discount.md) entity. Some of its important attributes are:
- `code` is a unique code that you specify when you create the discount. Customers use this code to apply the discount during checkout. The code can only include upper-case letters and numbers.
- `rule_id` is the ID of the rule of this discount. The `rule` attribute is the expanded object of the `DiscountRule` entity. You can use the `rule` attribute to get details regarding the discount type. You can learn more about this in the [`DiscountRule` entity overview](#discountrule-entity-overview) later.
- `is_disabled` is a boolean value that indicates whether this discount is published or not.
- `regions` are the regions this discount can be used in.
- `starts_at` and `ends_at` are timestamps that indicate when the discount starts and ends. If no expiry date is set for the discount, `ends_at` will be `null`.
- `usage_limit` is the number of times the discount can be used. If there is no limit the value will be `null`.
- `usage_count` is the number of times the discount has been used.
### Dynamic Discounts
Dynamic discounts are a set of discount conditions and configurations that you can reuse across many discounts.
After creating a dynamic discount, you can use it to create “child” discounts. Child discounts have the same conditions and configurations as the “parent” dynamic discount but with a different discount code.
The `is_dynamic` attribute in the `Discount` entity is a boolean value that determines whether the discount is dynamic or not. Child discounts are related to the parent discount using the `parent_discount_id` attribute which is a foreign key to the same `Discount` entity.
---
## DiscountRule Entity Overview
Every `Discount` entity belongs to a [`DiscountRule`](./../../../references/entities/classes/DiscountRule.md) entity. `DiscountRule` includes details such as the type of discount, the amount to be discounted, and more.
Some of the `DiscountRule` entitys important attributes are:
- `type` is an enum string indicating the type of the discount. It must be either `fixed`, `percentage`, or `free_shipping`.
- `value` is the value to be discounted. The value of this depends on the value of `type`:
- If `type` is `fixed`, `value` will be the amount to be removed either from the total or from each product this discount is applied to.
- If `type` is `percentage`, `value` will be the percentage to be removed from each product this discount is applied to.
- If `type` is `free_shipping`, `value` will be 0.
- `conditions` is an array of all discount conditions, if there are any.
---
## DiscountCondition Entity Overview
A discount can optionally have discount conditions. Discount conditions are used to further add limitations on when the discount can be applied.
A [`DiscountCondition`](../../../references/entities/classes/DiscountCondition.md) belongs to a `DiscountRule` entity. The `discount_rule_id` attribute indicates the ID of the `DiscountRule` it belongs to.
Discount conditions have an attribute `type` that indicates the conditions type. Its value must be one of the following:
- `products` means the condition applies to products.
- `product_types` means the condition applies to product types.
- `product_collections` means the condition applies to product collections.
- `product_tags` means the condition applies to product tags.
- `customer_groups` means the condition applies to customer groups.
Each condition type can be used for one condition in a discount. For example, you can add only one `product` discount condition to a discount.
Discount conditions also have an attribute `operator` that indicates how the condition should be applied. It must have one of the following values:
- `in` means the discount can be applied only for the items specified in the condition. For example, if the `type` is `product` and the `operator` is `in`, it means this condition defines which products must be available in the customers cart for the discount to apply.
- `not_in` means the discount can be applied for all items except those specified in the condition. For example, if the `type` is `product` and the `operator` is `not_in`, it means that the discount can be applied to any item in the cart that's not specified in the condition.
### Condition Type Relations
Based on the value of `type`, one of the following relations can be used to retrieve the conditions items:
- `products` is an array of products that this condition applies to if the conditions `type` is `products`. Each item of the array would be a [`DiscountConditionProduct`](../../../references/entities/classes/DiscountConditionProduct.md).
- `product_types` is an array of product types that this condition applies to if the conditions `type` is `product_types`. Each item of the array would be a [`DiscountConditionProductType`](../../../references/entities/classes/DiscountConditionProductType.md).
- `product_collections` is an array of product types that this condition applies to if the conditions `type` is `product_collections`. Each item of the array would be a [`DiscountConditionProductCollection`](../../../references/entities/classes/DiscountConditionProductCollection.md).
- `product_tags` is an array of product types that this condition applies to if the conditions `type` is `product_tags`. Each item of the array would be a [`DiscountConditionProductTag`](../../../references/entities/classes/DiscountConditionProductTag.md).
- `customer_groups` is an array of product types that this condition applies to if the conditions `type` is `customer_groups`. Each item of the array would be a [`DiscountConditionCustomerGroup`](../../../references/entities/classes/DiscountConditionCustomerGroup.md).
---
## Whats Next
- Learn [how to create a discount using the admin APIs](../../admin/manage-discounts.mdx)
- Learn [how to use discounts on the storefront](../../storefront/use-discounts-in-checkout.mdx)
@@ -16,7 +16,7 @@ You also need to [setup Redis](../../../tutorial/0-set-up-your-development-envir
## Create a Notification Provider
Creating a Notification Provider is as simple as creating a TypeScript or JavaScript file in `src/services`. The name of the file is the name of the provider (for example, `sendgrid.ts`). A Notification Provider is essentially a Service that extends the `NotificationService` from `medusa-interfaces`.
Creating a Notification Provider is as simple as creating a TypeScript or JavaScript file in `src/services`. The name of the file is the name of the provider (for example, `sendgrid.ts`). A Notification Provider is essentially a Service that extends the `AbstractNotificationService` from `@medusajs/medusa`.
For example, create the file `src/services/email-sender.ts` with the following content:
@@ -100,6 +100,7 @@ medusa.admin.priceLists.create({
```jsx
fetch(`<SERVER_URL>/admin/price-lists`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -186,7 +187,9 @@ medusa.admin.priceLists.retrieve(priceListId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/price-lists/${priceListId}`)
fetch(`<SERVER_URL>/admin/price-lists/${priceListId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ price_list }) => {
console.log(price_list.id)
@@ -230,6 +233,7 @@ medusa.admin.priceLists.update(priceListId, {
```jsx
fetch(`<SERVER_URL>/admin/price-lists/${priceListId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -298,6 +302,7 @@ medusa.admin.priceLists.addPrices(priceListId, {
```jsx
fetch(`<SERVER_URL>/admin/price-lists/${priceListId}/prices/batch`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -361,7 +366,8 @@ medusa.admin.priceLists.deleteProductPrices(priceListId, productId)
```jsx
fetch(`<SERVER_URL>/admin/price-lists/${priceListId}/products/${productId}/prices`, {
method: 'DELETE'
method: 'DELETE',
credentials: 'include',
})
.then((response) => response.json())
.then(({ ids, object, deleted }) => {
@@ -401,7 +407,8 @@ medusa.admin.priceLists.deleteVariantPrices(priceListId, variantId)
```jsx
fetch(`<SERVER_URL>/admin/price-lists/${priceListId}/variants/${variantId}/prices`, {
method: 'DELETE'
method: 'DELETE',
credentials: 'include',
})
.then((response) => response.json())
.then(({ ids, object, deleted }) => {
@@ -443,7 +450,8 @@ medusa.admin.priceLists.delete(priceListId)
```jsx
fetch(`<SERVER_URL>/admin/price-lists/${priceListId}`, {
method: 'DELETE'
method: 'DELETE',
credentials: 'include',
})
.then((response) => response.json())
.then(({ id, object, deleted }) => {
@@ -39,14 +39,22 @@ export default class MyPriceListStrategy extends AbstractPriceSelectionStrategy
You can use services or repositories in the strategy by adding them to the constructor and updating the parameters passed to the `MyPriceListStrategy` constructor in `withTransaction`. For example:
```typescript
import {
AbstractPriceSelectionStrategy,
CustomerService,
IPriceSelectionStrategy,
PriceSelectionContext,
PriceSelectionResult
} from "@medusajs/medusa";
export default class MyPriceListStrategy extends AbstractPriceSelectionStrategy {
private productsService: ProductService
private customerService: CustomerService
constructor({
productsService
customerService
}) {
super()
this.productsService = productsService
this.customerService = customerService
}
withTransaction(manager: EntityManager): IPriceSelectionStrategy {
@@ -55,7 +63,7 @@ export default class MyPriceListStrategy extends AbstractPriceSelectionStrategy
}
return new MyPriceListStrategy({
productsService: this.productsService
customerService: this.customerService
})
}
//...
@@ -71,6 +71,7 @@ medusa.admin.salesChannels.create({
```jsx
fetch(`<SERVER_URL>/admin/sales-channels`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -125,7 +126,9 @@ medusa.admin.salesChannels.list()
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/sales-channels`)
fetch(`<SERVER_URL>/admin/sales-channels`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ sales_channels, limit, offset, count }) => {
console.log(sales_channels.length)
@@ -165,7 +168,9 @@ medusa.admin.salesChannels.retrieve(salesChannelId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/sales-channels/${salesChannelId}`)
fetch(`<SERVER_URL>/admin/sales-channels/${salesChannelId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ sales_channels, limit, offset, count }) => {
console.log(sales_channels.length)
@@ -209,6 +214,7 @@ medusa.admin.salesChannels.update(salesChannelId, {
```jsx
fetch(`<SERVER_URL>/admin/sales-channels/${salesChannelId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -264,7 +270,8 @@ medusa.admin.salesChannels.delete(salesChannelId)
```jsx
fetch(`<SERVER_URL>/admin/sales-channels/${salesChannelId}`, {
method: 'DELETE'
method: 'DELETE',
credentials: 'include',
})
.then((response) => response.json())
.then(({ id, object, deleted }) => {
@@ -315,6 +322,7 @@ medusa.admin.salesChannels.addProducts(salesChannelId, {
```jsx
fetch(`<SERVER_URL>/admin/sales-channels/${salesChannelId}/products/batch`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -377,7 +385,9 @@ medusa.admin.products.list({
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/products?sales_channel_id[0]=${salesChannelId}`)
fetch(`<SERVER_URL>/admin/products?sales_channel_id[0]=${salesChannelId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ products, limit, offset, count }) => {
console.log(products.length)
@@ -429,6 +439,7 @@ medusa.admin.salesChannels.removeProducts(salesChannelId, {
```jsx
fetch(`<SERVER_URL>/admin/sales-channels/${salesChannelId}/products/batch`, {
method: 'DELETE',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -495,7 +506,9 @@ medusa.admin.orders.list({
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/admin/orders?sales_channel_id[0]=${salesChannelId}`)
fetch(`<SERVER_URL>/admin/orders?sales_channel_id[0]=${salesChannelId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ orders, limit, offset, count }) => {
console.log(orders.length)
@@ -18,7 +18,7 @@ The [Calculate Cart Taxes](https://docs.medusajs.com/api/store/#tag/Cart/operati
This calculates and retrieves the taxes on the cart and each of the line items in that cart.
### Use CartService
### Use CartService's retrieve Method
The `CartService` class has a method `retrieve` that gets a cart by ID. In that method, taxes are calculated only if automatic taxes calculation is enabled for the region the cart belongs to.
@@ -36,13 +36,11 @@ You can learn how to [retrieve and use services](../services/create-service.md#u
:::
### Use decorateLineItemsWithTotals function in Endpoints
### Use CartService's decorateTotals Method
If you want to calculate the taxes of line items on the storefront in an endpoint and return the necessary fields in the result, you can use the `decorateLineItemsWithTotals` method in your endpoint:
Another way you can use the `CartService` to calculate taxes is using the method `decorateTotals`:
```jsx
//at the beginning of the file
import { decorateLineItemsWithTotals } from "@medusajs/medusa/dist/api/routes/store/carts/decorate-line-items-with-totals"
export default () => {
//...
@@ -54,16 +52,16 @@ export default () => {
//...
//retrieve taxes of line items
const data = await decorateLineItemsWithTotals(cart, req, {
const data = await decorateTotals(cart, {
force_taxes: true
});
})
return res.status(200).json({ cart: data });
})
}
```
The `decorateLineItemsWithTotals` method accepts an options object as a third parameter. If you set `force_taxes` to `true` in that object, the totals of the line items can be retrieved regardless of whether the automatic calculation is enabled in the line items region.
The `decorateTotals` method accepts the cart as a first parameter and an options object as a second parameter. If you set `force_taxes` to `true` in that object, the totals of the line items can be retrieved regardless of whether the automatic calculation is enabled in the line items region.
### Use TotalsService
@@ -33,7 +33,7 @@ If you follow the JS Client code blocks, its assumed you already have [Medusa
### Previous Steps
This document assumes youve already taken care of the add-to-cart flow. So, you should have a [cart created](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCart) for the customer with at least [one product in it](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCartsCartLineItems).
This document assumes youve already taken care of the add-to-cart flow. So, you should have a [cart created](/api/store/#tag/Cart/operation/PostCart) for the customer with at least [one product in it](/api/store/#tag/Cart/operation/PostCartsCartLineItems).
You can learn how to implement the cart flow using [this documentation](../../guides/carts-in-medusa.mdx).
@@ -43,7 +43,7 @@ In this step, the customer generally enters their shipping info, then chooses th
### Add Shipping Address
After the customer enters their shipping address information, you must send a `POST` request to the [Update a Cart](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCartsCart) API endpoint:
After the customer enters their shipping address information, you must send a `POST` request to the [Update a Cart](/api/store/#tag/Cart/operation/PostCartsCart) API endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
@@ -74,6 +74,7 @@ medusa.carts.update(cartId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
shipping_address: {
company,
@@ -109,7 +110,7 @@ The request returns the updated cart, with the new shipping address available in
After updating the cart with the customers address, the list of available [shipping options](../backend/shipping/overview.md#shipping-option) for that cart might change. So, you should retrieve the updated list of options.
You can retrieve the list of shipping options by sending a `GET` request to the [Retrieve Shipping Options for Cart API](https://docs.medusajs.com/api/store/#tag/Shipping-Option/operation/GetShippingOptionsCartId) endpoint:
You can retrieve the list of shipping options by sending a `GET` request to the [Retrieve Shipping Options for Cart API](/api/store/#tag/Shipping-Option/operation/GetShippingOptionsCartId) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
@@ -125,7 +126,9 @@ medusa.shippingOptions.listCartOptions(cartId)
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/store/shipping-options/${cartId}`)
fetch(`<SERVER_URL>/store/shipping-options/${cartId}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ shipping_options }) => {
console.log(shipping_options.length);
@@ -135,11 +138,11 @@ fetch(`<SERVER_URL>/store/shipping-options/${cartId}`)
</TabItem>
</Tabs>
The request accepts the ID of the cart as a path parameter. It returns the array of [shipping options](https://docs.medusajs.com/api/store/#tag/Shipping-Option/operation/GetShippingOptions). Typically you would display those options to the customer to choose from.
The request accepts the ID of the cart as a path parameter. It returns the array of [shipping options](/api/store/#tag/Shipping-Option/operation/GetShippingOptions). Typically you would display those options to the customer to choose from.
### Choose Shipping Option
Once the customer chooses one of the available shipping options, send a `POST` request to the [Add a Shipping Method](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCartsCartShippingMethod) API endpoint. This will create a [shipping method](../backend/shipping/overview.md#shipping-method) based on the shipping option chosen and will associate it with the customers cart:
Once the customer chooses one of the available shipping options, send a `POST` request to the [Add a Shipping Method](/api/store/#tag/Cart/operation/PostCartsCartShippingMethod) API endpoint. This will create a [shipping method](../backend/shipping/overview.md#shipping-method) based on the shipping option chosen and will associate it with the customers cart:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
@@ -159,6 +162,7 @@ medusa.carts.addShippingMethod(cartId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/shipping-methods`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
option_id: shippingOptionId //the ID of the selected option
}),
@@ -187,7 +191,7 @@ In this step, the customer generally chooses a payment method to complete their
When the page opens and before the payment providers are displayed to the customer to choose from, you must initialize the [payment sessions](./../backend/payment/overview.md#payment-session) for the current cart. Each payment provider will have a payment session associated with it. These payment sessions will be used later when the customer chooses the payment provider they want to complete their purchase with.
To initialize the payment sessions, send a `POST` request to the [Initialize Payment Sessions](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCartsCartPaymentSessions) API endpoint:
To initialize the payment sessions, send a `POST` request to the [Initialize Payment Sessions](/api/store/#tag/Cart/operation/PostCartsCartPaymentSessions) API endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
@@ -204,7 +208,8 @@ medusa.carts.createPaymentSessions(cartId)
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/payment-sessions`, {
method: 'POST'
method: 'POST',
credentials: 'include',
})
.then((response) => response.json())
.then(({ cart }) => {
@@ -219,7 +224,7 @@ This endpoint accepts the ID of the cart as a path parameter. It returns the upd
### Select Payment Session
When the customer chooses the payment provider they want to complete purchase with, you should select the payment session associated with that payment provider. To do that, send a `POST` request to the [Select a Payment Session](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCartsCartPaymentSession) API endpoint:
When the customer chooses the payment provider they want to complete purchase with, you should select the payment session associated with that payment provider. To do that, send a `POST` request to the [Select a Payment Session](/api/store/#tag/Cart/operation/PostCartsCartPaymentSession) API endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
@@ -239,6 +244,7 @@ medusa.carts.setPaymentSession(cartId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/payment-session`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
provider_id: paymentProviderId // retrieved from the payment session selected by the customer
}),
@@ -269,7 +275,7 @@ If you have one payment provider or if only one payment provider is available fo
This step is optional and is only necessary for some payment providers. As mentioned in the [Payment Architecture](../backend/payment/overview.md#overview) documentation, the `PaymentSession` model has a `data` attribute that holds any data required for the Payment Provider to perform payment operations such as capturing payment.
If you need to update that data at any point before the purchase is made, send a request to [Update a Payment Session](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCartsCartPaymentSessionUpdate) API endpoint:
If you need to update that data at any point before the purchase is made, send a request to [Update a Payment Session](/api/store/#tag/Cart/operation/PostCartsCartPaymentSessionUpdate) API endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
@@ -293,6 +299,7 @@ medusa.carts.updatePaymentSession(cartId, paymentProviderId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/payment-sessions/${paymentProviderId}`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
data: {
//pass any data you want to add in the `data` attribute
@@ -321,7 +328,7 @@ It returns the updated cart. You can access the payment session's data on `cart.
The last step is to place the order by completing the cart. When you complete the cart, your Medusa server will try to authorize the payment first, then place the order if the authorization is successful. So, you should perform any necessary action with your payment provider first to make sure the authorization is successful when you send the request to complete the cart.
To complete a cart, send a `POST` request to the [Complete a Cart](https://docs.medusajs.com/api/store/#tag/Cart/operation/PostCartsCartComplete) API endpoint:
To complete a cart, send a `POST` request to the [Complete a Cart](/api/store/#tag/Cart/operation/PostCartsCartComplete) API endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
@@ -339,6 +346,7 @@ medusa.carts.complete(cartId)
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/complete`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
}
@@ -0,0 +1,244 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Use Discounts in Checkout
In this document, learn how to use discounts during checkout on the storefront.
:::info
You can check out the [Discounts Architecture documentation](../backend/discounts/index.md) to learn more about how discounts work.
:::
## Overview
Customers can use discounts during checkout to benefit from promotions that the merchant provides. Discounts are added to a cart using its unique code.
In this document, youll learn how to add a discount to a cart, how to display details related to the discount, and how to remove a discount from a cart.
## Scenario
You want to implement discount functionality in your store to allow customers to apply discount codes to their cart and remove them from the cart. You also want to display the discount details for the customer.
## Prerequisites
### Medusa Components
It's assumed that you already have a Medusa server installed and set up. If not, you can follow our [quickstart guide](../../quickstart/quick-start.md) to get started.
It is also assumed you already have a storefront set up. It can be a custom storefront or one of Medusas storefronts. If you dont have a storefront set up, you can install either the [Next.js](../../starters/nextjs-medusa-starter.md) or [Gatsby](../../starters/gatsby-medusa-starter.md) storefronts.
### JS Client
This guide includes code snippets to send requests to your Medusa server using Medusas JS Client and JavaScripts Fetch API.
If you follow the JS Client code blocks, its assumed you already have [Medusas JS Client installed](../../js-client/overview.md) and have [created an instance of the client](../../js-client/overview.md#configuration).
### Previous Steps
This document assumes youve already taken care of the add-to-cart flow. So, you should have a [cart created](/api/store/#tag/Cart/operation/PostCart) for the customer with at least [one product in it](/api/store/#tag/Cart/operation/PostCartsCartLineItems).
You can learn how to implement the cart flow using [this documentation](../../guides/carts-in-medusa.mdx).
## Add Discount to Cart
The customer can enter a discount code during the checkout flow to benefit from a promotion.
You can add a discount to a customers cart by sending the [Update Cart request](/api/store/#tag/Cart/operation/PostCartsCart):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
medusa.carts.update(cartId, {
discounts: [
{
code
}
]
})
.then(({ cart }) => {
console.log(cart.discounts)
})
.catch((e) => {
//display an error to the customer
alert('Discount is invalid')
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
discounts: [
{
code
}
],
}),
headers: {
'Content-Type': 'application/json'
}
})
.then((response) => response.json())
.then(({ cart }) => {
console.log(cart.discounts);
})
.catch((e) => {
//display an error to the customer
alert('Discount is invalid')
});
```
</TabItem>
</Tabs>
This request requires the customers cart ID as a path parameter. In the body of the request, you can update many cart-related details, including adding discounts by passing the `discounts` field. It is an array of objects, with each object having a property `code` with its value being the discounts unique code.
:::info
Customers can add more than one discount to their cart.
:::
If the discount is applied successfully, the entire cart object will be returned. You can access the discounts applied on the cart in the `cart.discounts` array.
In case the customer enters an invalid discount or the discount cannot be applied to the cart because it doesnt meet its conditions, the request will return an error. You can handle the error in the `catch` method.
## Display Discount Details
After the customer enters a discount code and it is applied to the cart, you can display the discount details to the customer. This shows the customer how much they benefitted from the discount.
The previous request returns the full cart object with different fields that can be used to display the discount details depending on the discount type.
### Display Discount Information
In the returned `cart` object, all discounts applied can be found in the `discounts` array. The following properties can be used to display the discount information:
```json
{
"discounts": [
{
"code": "TEST",
"is_dynamic": false,
"starts_at": "2022-12-01T15:09:21.149Z",
"ends_at": null,
"usage_limit": null,
"usage_count": 0,
"rule": {
"description": "percentage discount",
"type": "percentage",
"value": 20,
"allocation": "total",
"conditions": [
//...
],
//...
},
//...
}
],
//...
}
```
- The `code` property is the code of the discount. This is the code that the customer enters to apply the discount.
- The `starts_at` and `ends_at` indicate the start and expiry dates of the discount. If theres no end date, the `ends_at` property will be null.
- The `usage_limit` property indicates if there is any usage limit set on the discount. The `usage_count` property indicates how many times this discount has been used.
- The `rule` property includes details related to the type of discount, its value, and its conditions if there are any.
### Display Item Discounts
In the returned `cart` object, the property `items` is an array of items in the cart. If a discount is applied to an item, the following properties inside the item can be used to get the item-specific discount details:
```json
{
"items": [
{
"adjustments": [
{
"description": "discount",
"discount_id": "disc_01GK73RBCRXXT8HWEYMQE4RCY6",
"amount": 730,
//...
}
],
"subtotal": 3650,
"discount_total": 730,
"total": 2920,
//...
}
]
}
```
- The `adjustments` property is an array of objects, each containing details about the adjustment made to the item. Discounts applied to the item will be represented by an adjustment in this array. It will have the `description` property with the value `discount`, the `discount_id` property, and the `amount` of the discount.
- The `subtotal` property is the price before the discounts are applied.
- The `discount_total` property is the sum of all discount amounts.
- The `total` property is the total of the item after applying the discounts.
### Display Cart Discounts
The returned `cart` object has the following properties that can be used to display carts general discount details:
```json
{
"subtotal": 11550,
"discount_total": 1910,
"shipping_total": 0,
"total": 9640,
//...
}
```
- The `subtotal` property is the total of the cart before applying any discount.
- The `discount_total` property is the total discount amounts applied to the cart.
- The `shipping_total` property is the total shipping amount. If a Free Shipping discount is applied to the cart, `shipping_total` and `discount_total` will be 0.
- The `total` property is the total amount of the cart after applying the discount.
## Remove Discount from Cart
The customer can choose to remove a discount from their cart.
You can remove a discount from a customers cart using the [Remove Discount request](/api/store/#tag/Cart/operation/DeleteCartsCartDiscountsDiscount):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<TabItem value="client" label="Medusa JS Client" default>
```jsx
medusa.carts.deleteDiscount(cartId, code)
.then(({ cart }) => {
console.log(cart.discounts)
});
```
</TabItem>
<TabItem value="fetch" label="Fetch API">
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/discounts/${code}`, {
method: 'DELETE',
credentials: 'include'
})
.then((response) => response.json())
.then(({ cart }) => {
console.log(cart.discounts);
});
```
</TabItem>
</Tabs>
This request accepts the cart ID and the code of the discount to remove. If the discount is removed successfully, the request returns the updated cart object, where you wont find the discount in the `discounts` array anymore.
The totals of the cart and its items will be updated as well.
## Whats Next
- Learn [how to implement the checkout flow](./how-to-implement-checkout-flow.mdx).
- Learn [how to create discounts using the admin APIs](/api/admin/#tag/Discount/operation/PostDiscounts).
@@ -0,0 +1,204 @@
---
description: 'Learn step-by-step.'
---
# Deploy Your Medusa Server to Railway
In this document, youll learn how to deploy your Medusa server to Railway.
## What is Railway
[Railway](https://railway.app/) is a hosting provider that you can use to deploy web applications and databases without having to worry about managing the full infrastructure.
Railway provides a free plan that allows you to deploy your Medusa server along with PostgreSQL and Redis databases. This is useful mainly for development and demo purposes.
## Prerequisites
### Medusa Server
It is assumed that you already have a Medusa server installed locally. If you dont, please follow the [quickstart guide](../../quickstart/quick-start.md).
Furthermore, your Medusa server should be configured to work with PostgreSQL and Redis. You can follow the [Configure your Server documentation](./../../usage/configurations.md) to learn how to do that.
### Needed Accounts
- A [Railway](https://railway.app/) account.
- A [GitHub](https://github.com/) account to create a repository to host your servers codebase.
### Required Tools
- Gits CLI tool. You can follow [this documentation to learn how to install it for your operating system](./../../tutorial/0-set-up-your-development-environment.mdx#git).
## Changes to Medusa Server Codebase
By default, Railway looks for a Dockerfile in the root of the codebase. If there is one, it will try to deploy your server using it.
As this guide doesn't use Docker, make sure to delete `Dockerfile` from the root of your Medusa server.
## Create GitHub Repository
Before you can deploy your Medusa server you need to create a GitHub repository and push the code base to it.
On GitHub, click the plus icon at the top right, then click New Repository.
![Click plus then choose new repository from dropdown](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001782/Medusa%20Docs/Netlify/0YlxBRi_aiywpo.png)
Youll then be redirected to a new page with a form. In the form, enter the Repository Name then scroll down and click Create repository.
![New repository form](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001800/Medusa%20Docs/Netlify/YPYXAF2_lypjne.png)
### Push Code to GitHub Repository
The next step is to push the code to the GitHub repository you just created.
After creating the repository, youll be redirected to the repositorys page. On that page, you should see a URL that you can copy to connect your repository to a local directory.
![GitHub repository's URL](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001818/Medusa%20Docs/Netlify/pHfSTuT_w544lr.png)
Copy the link. Then, open your terminal in the directory that holds your Medusa server codebase and run the following commands:
```bash
git init
git remote add origin <GITHUB_URL>
```
Where `<GITHUB_URL>` is the URL you just copied.
Then, add, commit, and push the changes into the repository:
```bash
git add .
git commit -m "initial commit"
git push origin master
```
After pushing the changes, you can find the files in your GitHub repository.
## Deploy to Railway
In this section, youll create the PostgreSQL and Redis databases first, then deploy the server from the GitHub repository.
### Create the PostgreSQL Database
On the Railway dashboard:
1. Click on the ”New Project**”** button.
2. Choose from the dropdown the ”Provision PostgreSQL” option.
A new database will be created and, after a few seconds, you will be redirected to the project page where you will see the newly-created database.
To find the PostgreSQL database URL which youll need later:
1. Click on the PostgreSQL card.
2. Choose the Connect tab.
3. Copy the Postgres Connection URL.
### Create the Redis Database
In the same project view:
1. Click on the New button.
2. Choose the Database option.
3. Choose Add Redis**.**
A new Redis database will be added to the project view in a few seconds. Click on it to open the database sidebar.
To find the Redis database URL which youll need later:
1. Click on the Redis card.
2. Choose the Connect tab.
3. Copy the Redis Connection URL.
### Deploy the Medusa Server Repository
In the same project view:
1. Click on the New button.
2. Choose the ”GitHub Repo” option.
3. Choose the ”Configure GitHub App” option to give Railway permission to read and pull your code from GitHub.
4. Choose the repository from the GitHub Repo dropdown.
:::tip
If the GitHub repositories in the dropdown are stuck on loading and aren't showing, you might need to delete the project and start over. This only happens before you configure your account with GitHub.
:::
It will take the server a few minutes to deploy successfully.
### Configure Environment Variables
To configure the environment variables of your Medusa server:
1. Click on the GitHub repositorys card.
2. Choose the Variables tab.
3. Add the following environment variables:
```bash
PORT=9000
JWT_SECRET=something
COOKIE_SECRET=something
DATABASE_URL=<YOUR_DATABASE_URL>
REDIS_URL=<YOUR_REDIS_URL>
```
Where `<YOUR_DATABASE_URL>` and `<YOUR_REDIS_URL>` are the URLs you copied earlier when you created the PostgreSQL and Redis databases respectively.
:::warning
Its highly recommended to use strong, randomly generated secrets for `JWT_SECRET` and ****`COOKIE_SECRET`.
:::
### Change Start Command
The start command is the command used to run the server. Youll change it to run any available migrations, then run the Medusa server. This way if you create your own migrations or update the Medusa server, it's guaranteed that these migrations are run first before the server starts.
To change the start command of your Medusa server:
1. Click on the GitHub repositorys card.
2. Click on the Settings tab and scroll down to the Service section.
3. Paste the following in the Start Command field:
```bash
medusa migrations run && medusa develop
```
### Add Domain Name
The last step is to add a domain name to your Medusa server. To do that:
1. Click on the GitHub repositorys card.
2. Click on the Settings tab and scroll down to the Domains section.
3. Either click on the Custom Domain button to enter your own domain or the Generate Domain button to generate a random domain.
## Test your Server
Every change you make to the settings redeploys the server. You can check the Deployments of the server by clicking on the GitHub repositorys card and choosing the Deployments tab.
After the server is redeployed successfully, open the app in your browser using the domain name. For example, you can open the URL `<YOUR_APP_URL>/store/products` which will return the products available on your server.
:::tip
If you generated a random domain, you can find it by clicking on the GitHub repositorys card → Deployment tab.
:::
## Troubleshooting
If you run into any issues or a problem with your deployed server, you can check the logs in your Railway container instance by:
1. Click on the GitHub repositorys card.
2. Click on the Deployments tab.
3. Click on the View Logs button.
## Run Commands on Server
To run commands on your server, you can use [Railways CLI tool to run a local shell and execute commands](https://docs.railway.app/develop/cli#local-shell).
For example, you can run commands on the server to seed the database or create a new user using [Medusas CLI tool](../../cli/reference.md).
## Whats Next
- Learn [how to deploy the Medusa Admin to Netlify](../admin/deploying-on-netlify.md).
- Learn [how to deploy the Gatsby Storefront to Netlify](../storefront/deploying-gatsby-on-netlify.md).
+13 -3
View File
@@ -56,7 +56,8 @@ medusa.carts.create()
```jsx
fetch(`<SERVER_URL>/store/carts`, {
method: 'POST'
method: 'POST',
credentials: 'include',
})
.then((response) => response.json())
.then(({ cart }) => {
@@ -95,6 +96,7 @@ medusa.carts.create({
```jsx
fetch(`<SERVER_URL>/store/carts`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -146,7 +148,9 @@ if (id) {
const id = localStorage.getItem('cart_id');
if (id) {
fetch(`<SERVER_URL>/store/carts/${id}`)
fetch(`<SERVER_URL>/store/carts/${id}`, {
credentials: 'include',
})
.then((response) => response.json())
.then(({ cart }) => setCart(cart));
}
@@ -187,6 +191,7 @@ medusa.carts.update(cartId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -229,6 +234,7 @@ medusa.carts.update(cartId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -267,6 +273,7 @@ medusa.carts.update(cartId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -302,6 +309,7 @@ medusa.carts.lineItems.create(cartId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/line-items`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -349,6 +357,7 @@ medusa.carts.lineItems.update(cartId, lineItemId, {
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/line-items/${lineItemId}`, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
@@ -384,7 +393,8 @@ medusa.carts.lineItems.delete(cartId, lineItemId)
```jsx
fetch(`<SERVER_URL>/store/carts/${cartId}/line-items/${lineItemId}`, {
method: 'DELETE'
method: 'DELETE',
credentials: 'include',
})
.then((response) => response.json())
.then(({ cart }) => setCart(cart));
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/address.ts:36](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L36)
[models/address.ts:36](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L36)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/address.ts:39](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L39)
[models/address.ts:39](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L39)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/address.ts:42](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L42)
[models/address.ts:42](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L42)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/address.ts:27](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L27)
[models/address.ts:27](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L27)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/address.ts:49](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L49)
[models/address.ts:49](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L49)
___
@@ -78,7 +78,7 @@ ___
#### Defined in
[models/address.ts:45](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L45)
[models/address.ts:45](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L45)
___
@@ -92,7 +92,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -102,7 +102,7 @@ ___
#### Defined in
[models/address.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L24)
[models/address.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L24)
___
@@ -112,7 +112,7 @@ ___
#### Defined in
[models/address.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L20)
[models/address.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L20)
___
@@ -126,7 +126,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -136,7 +136,7 @@ ___
#### Defined in
[models/address.ts:30](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L30)
[models/address.ts:30](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L30)
___
@@ -150,7 +150,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -160,7 +160,7 @@ ___
#### Defined in
[models/address.ts:33](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L33)
[models/address.ts:33](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L33)
___
@@ -170,7 +170,7 @@ ___
#### Defined in
[models/address.ts:61](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L61)
[models/address.ts:61](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L61)
___
@@ -180,7 +180,7 @@ ___
#### Defined in
[models/address.ts:58](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L58)
[models/address.ts:58](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L58)
___
@@ -190,7 +190,7 @@ ___
#### Defined in
[models/address.ts:55](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L55)
[models/address.ts:55](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L55)
___
@@ -200,7 +200,7 @@ ___
#### Defined in
[models/address.ts:52](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L52)
[models/address.ts:52](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L52)
___
@@ -214,7 +214,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -228,4 +228,4 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/address.ts:63](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/address.ts#L63)
[models/address.ts:63](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/address.ts#L63)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/analytics-config.ts:17](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/analytics-config.ts#L17)
[models/analytics-config.ts:17](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/analytics-config.ts#L17)
___
@@ -42,7 +42,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -70,7 +70,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -80,7 +80,7 @@ ___
#### Defined in
[models/analytics-config.ts:14](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/analytics-config.ts#L14)
[models/analytics-config.ts:14](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/analytics-config.ts#L14)
___
@@ -94,7 +94,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -104,7 +104,7 @@ ___
#### Defined in
[models/analytics-config.ts:11](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/analytics-config.ts#L11)
[models/analytics-config.ts:11](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/analytics-config.ts#L11)
## Methods
@@ -118,4 +118,4 @@ ___
#### Defined in
[models/analytics-config.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/analytics-config.ts#L19)
[models/analytics-config.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/analytics-config.ts#L19)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/batch-job.ts:62](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L62)
[models/batch-job.ts:62](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L62)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/batch-job.ts:59](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L59)
[models/batch-job.ts:59](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L59)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/batch-job.ts:56](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L56)
[models/batch-job.ts:56](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L56)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/batch-job.ts:33](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L33)
[models/batch-job.ts:33](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L33)
___
@@ -72,7 +72,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -82,7 +82,7 @@ ___
#### Defined in
[models/batch-job.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L26)
[models/batch-job.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L26)
___
@@ -92,7 +92,7 @@ ___
#### Defined in
[models/batch-job.ts:30](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L30)
[models/batch-job.ts:30](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L30)
___
@@ -106,7 +106,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[models/batch-job.ts:47](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L47)
[models/batch-job.ts:47](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L47)
___
@@ -126,7 +126,7 @@ ___
#### Defined in
[models/batch-job.ts:65](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L65)
[models/batch-job.ts:65](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L65)
___
@@ -140,7 +140,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/batch-job.ts:50](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L50)
[models/batch-job.ts:50](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L50)
___
@@ -160,7 +160,7 @@ ___
#### Defined in
[models/batch-job.ts:53](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L53)
[models/batch-job.ts:53](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L53)
___
@@ -170,7 +170,7 @@ ___
#### Defined in
[models/batch-job.ts:36](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L36)
[models/batch-job.ts:36](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L36)
___
@@ -180,7 +180,7 @@ ___
#### Defined in
[models/batch-job.ts:67](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L67)
[models/batch-job.ts:67](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L67)
___
@@ -190,7 +190,7 @@ ___
#### Defined in
[models/batch-job.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L23)
[models/batch-job.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L23)
___
@@ -204,7 +204,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -218,7 +218,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/batch-job.ts:94](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L94)
[models/batch-job.ts:94](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L94)
___
@@ -232,7 +232,7 @@ ___
#### Defined in
[models/batch-job.ts:69](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L69)
[models/batch-job.ts:69](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L69)
___
@@ -246,4 +246,4 @@ ___
#### Defined in
[models/batch-job.ts:99](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/batch-job.ts#L99)
[models/batch-job.ts:99](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/batch-job.ts#L99)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/cart.ts:226](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L226)
[models/cart.ts:226](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L226)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/cart.ts:220](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L220)
[models/cart.ts:220](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L220)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/cart.ts:311](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L311)
[models/cart.ts:311](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L311)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/cart.ts:320](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L320)
[models/cart.ts:320](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L320)
___
@@ -72,7 +72,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -82,7 +82,7 @@ ___
#### Defined in
[models/cart.ts:285](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L285)
[models/cart.ts:285](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L285)
___
@@ -92,7 +92,7 @@ ___
#### Defined in
[models/cart.ts:281](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L281)
[models/cart.ts:281](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L281)
___
@@ -106,7 +106,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[models/cart.ts:335](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L335)
[models/cart.ts:335](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L335)
___
@@ -126,7 +126,7 @@ ___
#### Defined in
[models/cart.ts:263](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L263)
[models/cart.ts:263](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L263)
___
@@ -136,7 +136,7 @@ ___
#### Defined in
[models/cart.ts:216](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L216)
[models/cart.ts:216](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L216)
___
@@ -146,7 +146,7 @@ ___
#### Defined in
[models/cart.ts:344](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L344)
[models/cart.ts:344](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L344)
___
@@ -156,7 +156,7 @@ ___
#### Defined in
[models/cart.ts:343](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L343)
[models/cart.ts:343](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L343)
___
@@ -166,7 +166,7 @@ ___
#### Defined in
[models/cart.ts:277](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L277)
[models/cart.ts:277](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L277)
___
@@ -180,7 +180,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -190,7 +190,7 @@ ___
#### Defined in
[models/cart.ts:317](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L317)
[models/cart.ts:317](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L317)
___
@@ -200,7 +200,7 @@ ___
#### Defined in
[models/cart.ts:336](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L336)
[models/cart.ts:336](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L336)
___
@@ -210,7 +210,7 @@ ___
#### Defined in
[models/cart.ts:241](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L241)
[models/cart.ts:241](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L241)
___
@@ -220,7 +220,7 @@ ___
#### Defined in
[models/cart.ts:323](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L323)
[models/cart.ts:323](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L323)
___
@@ -230,7 +230,7 @@ ___
#### Defined in
[models/cart.ts:213](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L213)
[models/cart.ts:213](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L213)
___
@@ -240,7 +240,7 @@ ___
#### Defined in
[models/cart.ts:300](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L300)
[models/cart.ts:300](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L300)
___
@@ -250,7 +250,7 @@ ___
#### Defined in
[models/cart.ts:314](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L314)
[models/cart.ts:314](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L314)
___
@@ -260,7 +260,7 @@ ___
#### Defined in
[models/cart.ts:296](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L296)
[models/cart.ts:296](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L296)
___
@@ -270,7 +270,7 @@ ___
#### Defined in
[models/cart.ts:287](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L287)
[models/cart.ts:287](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L287)
___
@@ -280,7 +280,7 @@ ___
#### Defined in
[models/cart.ts:292](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L292)
[models/cart.ts:292](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L292)
___
@@ -290,7 +290,7 @@ ___
#### Defined in
[models/cart.ts:342](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L342)
[models/cart.ts:342](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L342)
___
@@ -300,7 +300,7 @@ ___
#### Defined in
[models/cart.ts:339](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L339)
[models/cart.ts:339](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L339)
___
@@ -310,7 +310,7 @@ ___
#### Defined in
[models/cart.ts:249](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L249)
[models/cart.ts:249](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L249)
___
@@ -320,7 +320,7 @@ ___
#### Defined in
[models/cart.ts:245](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L245)
[models/cart.ts:245](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L245)
___
@@ -330,7 +330,7 @@ ___
#### Defined in
[models/cart.ts:332](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L332)
[models/cart.ts:332](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L332)
___
@@ -340,7 +340,7 @@ ___
#### Defined in
[models/cart.ts:326](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L326)
[models/cart.ts:326](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L326)
___
@@ -350,7 +350,7 @@ ___
#### Defined in
[models/cart.ts:236](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L236)
[models/cart.ts:236](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L236)
___
@@ -360,7 +360,7 @@ ___
#### Defined in
[models/cart.ts:230](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L230)
[models/cart.ts:230](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L230)
___
@@ -370,7 +370,7 @@ ___
#### Defined in
[models/cart.ts:305](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L305)
[models/cart.ts:305](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L305)
___
@@ -380,7 +380,7 @@ ___
#### Defined in
[models/cart.ts:337](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L337)
[models/cart.ts:337](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L337)
___
@@ -390,7 +390,7 @@ ___
#### Defined in
[models/cart.ts:334](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L334)
[models/cart.ts:334](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L334)
___
@@ -400,7 +400,7 @@ ___
#### Defined in
[models/cart.ts:341](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L341)
[models/cart.ts:341](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L341)
___
@@ -410,7 +410,7 @@ ___
#### Defined in
[models/cart.ts:338](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L338)
[models/cart.ts:338](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L338)
___
@@ -420,7 +420,7 @@ ___
#### Defined in
[models/cart.ts:340](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L340)
[models/cart.ts:340](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L340)
___
@@ -430,7 +430,7 @@ ___
#### Defined in
[models/cart.ts:308](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L308)
[models/cart.ts:308](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L308)
___
@@ -444,7 +444,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -458,7 +458,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/cart.ts:346](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L346)
[models/cart.ts:346](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L346)
___
@@ -472,4 +472,4 @@ ___
#### Defined in
[models/cart.ts:353](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/cart.ts#L353)
[models/cart.ts:353](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/cart.ts#L353)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/claim-image.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-image.ts#L23)
[models/claim-image.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-image.ts#L23)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/claim-image.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-image.ts#L19)
[models/claim-image.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-image.ts#L19)
___
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -90,7 +90,7 @@ ___
#### Defined in
[models/claim-image.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-image.ts#L29)
[models/claim-image.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-image.ts#L29)
___
@@ -104,7 +104,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -114,7 +114,7 @@ ___
#### Defined in
[models/claim-image.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-image.ts#L26)
[models/claim-image.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-image.ts#L26)
## Methods
@@ -128,4 +128,4 @@ ___
#### Defined in
[models/claim-image.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-image.ts#L31)
[models/claim-image.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-image.ts#L31)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/claim-item.ts:42](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L42)
[models/claim-item.ts:42](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L42)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/claim-item.ts:38](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L38)
[models/claim-item.ts:38](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L38)
___
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -90,7 +90,7 @@ ___
#### Defined in
[models/claim-item.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L34)
[models/claim-item.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L34)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/claim-item.ts:50](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L50)
[models/claim-item.ts:50](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L50)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/claim-item.ts:46](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L46)
[models/claim-item.ts:46](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L46)
___
@@ -120,7 +120,7 @@ ___
#### Defined in
[models/claim-item.ts:84](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L84)
[models/claim-item.ts:84](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L84)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[models/claim-item.ts:64](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L64)
[models/claim-item.ts:64](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L64)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[models/claim-item.ts:67](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L67)
[models/claim-item.ts:67](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L67)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/claim-item.ts:61](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L61)
[models/claim-item.ts:61](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L61)
___
@@ -160,7 +160,7 @@ ___
#### Defined in
[models/claim-item.ts:81](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L81)
[models/claim-item.ts:81](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L81)
___
@@ -174,7 +174,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -184,7 +184,7 @@ ___
#### Defined in
[models/claim-item.ts:58](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L58)
[models/claim-item.ts:58](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L58)
___
@@ -194,7 +194,7 @@ ___
#### Defined in
[models/claim-item.ts:54](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L54)
[models/claim-item.ts:54](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L54)
## Methods
@@ -208,4 +208,4 @@ ___
#### Defined in
[models/claim-item.ts:86](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-item.ts#L86)
[models/claim-item.ts:86](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-item.ts#L86)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/claim-order.ts:69](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L69)
[models/claim-order.ts:69](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L69)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/claim-order.ts:107](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L107)
[models/claim-order.ts:107](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L107)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/claim-order.ts:66](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L66)
[models/claim-order.ts:66](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L66)
___
@@ -62,7 +62,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[models/claim-order.ts:110](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L110)
[models/claim-order.ts:110](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L110)
___
@@ -76,7 +76,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[models/claim-order.ts:116](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L116)
[models/claim-order.ts:116](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L116)
___
@@ -86,7 +86,7 @@ ___
#### Defined in
[models/claim-order.ts:63](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L63)
[models/claim-order.ts:63](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L63)
___
@@ -96,7 +96,7 @@ ___
#### Defined in
[models/claim-order.ts:101](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L101)
[models/claim-order.ts:101](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L101)
___
@@ -110,7 +110,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -120,7 +120,7 @@ ___
#### Defined in
[models/claim-order.ts:125](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L125)
[models/claim-order.ts:125](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L125)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[models/claim-order.ts:122](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L122)
[models/claim-order.ts:122](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L122)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[models/claim-order.ts:119](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L119)
[models/claim-order.ts:119](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L119)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/claim-order.ts:80](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L80)
[models/claim-order.ts:80](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L80)
___
@@ -160,7 +160,7 @@ ___
#### Defined in
[models/claim-order.ts:76](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L76)
[models/claim-order.ts:76](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L76)
___
@@ -170,7 +170,7 @@ ___
#### Defined in
[models/claim-order.ts:56](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L56)
[models/claim-order.ts:56](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L56)
___
@@ -180,7 +180,7 @@ ___
#### Defined in
[models/claim-order.ts:104](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L104)
[models/claim-order.ts:104](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L104)
___
@@ -190,7 +190,7 @@ ___
#### Defined in
[models/claim-order.ts:83](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L83)
[models/claim-order.ts:83](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L83)
___
@@ -200,7 +200,7 @@ ___
#### Defined in
[models/claim-order.ts:91](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L91)
[models/claim-order.ts:91](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L91)
___
@@ -210,7 +210,7 @@ ___
#### Defined in
[models/claim-order.ts:87](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L87)
[models/claim-order.ts:87](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L87)
___
@@ -220,7 +220,7 @@ ___
#### Defined in
[models/claim-order.ts:96](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L96)
[models/claim-order.ts:96](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L96)
___
@@ -230,7 +230,7 @@ ___
#### Defined in
[models/claim-order.ts:72](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L72)
[models/claim-order.ts:72](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L72)
___
@@ -244,7 +244,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/claim-order.ts:113](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L113)
[models/claim-order.ts:113](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L113)
## Methods
@@ -258,4 +258,4 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/claim-order.ts:127](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-order.ts#L127)
[models/claim-order.ts:127](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-order.ts#L127)
@@ -32,7 +32,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -46,7 +46,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -60,7 +60,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -70,7 +70,7 @@ ___
#### Defined in
[models/claim-tag.ts:14](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-tag.ts#L14)
[models/claim-tag.ts:14](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-tag.ts#L14)
___
@@ -84,7 +84,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -94,7 +94,7 @@ ___
#### Defined in
[models/claim-tag.ts:11](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-tag.ts#L11)
[models/claim-tag.ts:11](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-tag.ts#L11)
## Methods
@@ -108,4 +108,4 @@ ___
#### Defined in
[models/claim-tag.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/claim-tag.ts#L16)
[models/claim-tag.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/claim-tag.ts#L16)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/country.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L31)
[models/country.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L31)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/country.ts:15](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L15)
[models/country.ts:15](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L15)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/country.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L19)
[models/country.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L19)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/country.ts:22](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L22)
[models/country.ts:22](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L22)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/country.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L28)
[models/country.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L28)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/country.ts:25](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L25)
[models/country.ts:25](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L25)
___
@@ -78,7 +78,7 @@ ___
#### Defined in
[models/country.ts:39](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L39)
[models/country.ts:39](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L39)
___
@@ -88,4 +88,4 @@ ___
#### Defined in
[models/country.ts:35](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/country.ts#L35)
[models/country.ts:35](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/country.ts#L35)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/currency.ts:8](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/currency.ts#L8)
[models/currency.ts:8](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/currency.ts#L8)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/currency.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/currency.ts#L20)
[models/currency.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/currency.ts#L20)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/currency.ts:17](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/currency.ts#L17)
[models/currency.ts:17](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/currency.ts#L17)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/currency.ts:11](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/currency.ts#L11)
[models/currency.ts:11](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/currency.ts#L11)
___
@@ -58,4 +58,4 @@ ___
#### Defined in
[models/currency.ts:14](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/currency.ts#L14)
[models/currency.ts:14](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/currency.ts#L14)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/custom-shipping-option.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/custom-shipping-option.ts#L37)
[models/custom-shipping-option.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/custom-shipping-option.ts#L37)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/custom-shipping-option.ts:33](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/custom-shipping-option.ts#L33)
[models/custom-shipping-option.ts:33](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/custom-shipping-option.ts#L33)
___
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -90,7 +90,7 @@ ___
#### Defined in
[models/custom-shipping-option.ts:40](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/custom-shipping-option.ts#L40)
[models/custom-shipping-option.ts:40](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/custom-shipping-option.ts#L40)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/custom-shipping-option.ts:21](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/custom-shipping-option.ts#L21)
[models/custom-shipping-option.ts:21](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/custom-shipping-option.ts#L21)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/custom-shipping-option.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/custom-shipping-option.ts#L29)
[models/custom-shipping-option.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/custom-shipping-option.ts#L29)
___
@@ -120,7 +120,7 @@ ___
#### Defined in
[models/custom-shipping-option.ts:25](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/custom-shipping-option.ts#L25)
[models/custom-shipping-option.ts:25](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/custom-shipping-option.ts#L25)
___
@@ -134,7 +134,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -148,4 +148,4 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/custom-shipping-option.ts:42](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/custom-shipping-option.ts#L42)
[models/custom-shipping-option.ts:42](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/custom-shipping-option.ts#L42)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/customer.ts:38](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L38)
[models/customer.ts:38](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L38)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/customer.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L34)
[models/customer.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L34)
___
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -76,7 +76,7 @@ ___
#### Defined in
[models/customer.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L24)
[models/customer.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L24)
___
@@ -86,7 +86,7 @@ ___
#### Defined in
[models/customer.ts:27](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L27)
[models/customer.ts:27](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L27)
___
@@ -96,7 +96,7 @@ ___
#### Defined in
[models/customer.ts:69](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L69)
[models/customer.ts:69](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L69)
___
@@ -106,7 +106,7 @@ ___
#### Defined in
[models/customer.ts:50](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L50)
[models/customer.ts:50](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L50)
___
@@ -120,7 +120,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[models/customer.ts:30](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L30)
[models/customer.ts:30](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L30)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[models/customer.ts:72](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L72)
[models/customer.ts:72](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L72)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/customer.ts:53](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L53)
[models/customer.ts:53](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L53)
___
@@ -160,7 +160,7 @@ ___
#### Defined in
[models/customer.ts:44](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L44)
[models/customer.ts:44](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L44)
___
@@ -170,7 +170,7 @@ ___
#### Defined in
[models/customer.ts:47](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L47)
[models/customer.ts:47](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L47)
___
@@ -180,7 +180,7 @@ ___
#### Defined in
[models/customer.ts:41](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L41)
[models/customer.ts:41](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L41)
___
@@ -194,7 +194,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -208,4 +208,4 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/customer.ts:74](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer.ts#L74)
[models/customer.ts:74](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer.ts#L74)
@@ -32,7 +32,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -42,7 +42,7 @@ ___
#### Defined in
[models/customer-group.ts:18](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer-group.ts#L18)
[models/customer-group.ts:18](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer-group.ts#L18)
___
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -70,7 +70,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -80,7 +80,7 @@ ___
#### Defined in
[models/customer-group.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer-group.ts#L26)
[models/customer-group.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer-group.ts#L26)
___
@@ -90,7 +90,7 @@ ___
#### Defined in
[models/customer-group.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer-group.ts#L13)
[models/customer-group.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer-group.ts#L13)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/customer-group.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer-group.ts#L23)
[models/customer-group.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer-group.ts#L23)
___
@@ -114,7 +114,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -128,4 +128,4 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/customer-group.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/customer-group.ts#L28)
[models/customer-group.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/customer-group.ts#L28)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/discount.ts:22](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L22)
[models/discount.ts:22](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L22)
___
@@ -42,7 +42,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -66,7 +66,7 @@ ___
#### Defined in
[models/discount.ts:52](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L52)
[models/discount.ts:52](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L52)
___
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -90,7 +90,7 @@ ___
#### Defined in
[models/discount.ts:36](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L36)
[models/discount.ts:36](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L36)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/discount.ts:25](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L25)
[models/discount.ts:25](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L25)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/discount.ts:78](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L78)
[models/discount.ts:78](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L78)
___
@@ -120,7 +120,7 @@ ___
#### Defined in
[models/discount.ts:43](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L43)
[models/discount.ts:43](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L43)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[models/discount.ts:39](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L39)
[models/discount.ts:39](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L39)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[models/discount.ts:69](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L69)
[models/discount.ts:69](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L69)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/discount.ts:33](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L33)
[models/discount.ts:33](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L33)
___
@@ -160,7 +160,7 @@ ___
#### Defined in
[models/discount.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L29)
[models/discount.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L29)
___
@@ -170,7 +170,7 @@ ___
#### Defined in
[models/discount.ts:49](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L49)
[models/discount.ts:49](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L49)
___
@@ -184,7 +184,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -194,7 +194,7 @@ ___
#### Defined in
[models/discount.ts:75](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L75)
[models/discount.ts:75](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L75)
___
@@ -204,7 +204,7 @@ ___
#### Defined in
[models/discount.ts:72](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L72)
[models/discount.ts:72](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L72)
___
@@ -214,7 +214,7 @@ ___
#### Defined in
[models/discount.ts:55](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L55)
[models/discount.ts:55](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L55)
## Methods
@@ -228,4 +228,4 @@ ___
#### Defined in
[models/discount.ts:80](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount.ts#L80)
[models/discount.ts:80](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount.ts#L80)
@@ -32,7 +32,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -42,7 +42,7 @@ ___
#### Defined in
[models/discount-condition.ts:127](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L127)
[models/discount-condition.ts:127](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L127)
___
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -66,7 +66,7 @@ ___
#### Defined in
[models/discount-condition.ts:57](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L57)
[models/discount-condition.ts:57](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L57)
___
@@ -76,7 +76,7 @@ ___
#### Defined in
[models/discount-condition.ts:53](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L53)
[models/discount-condition.ts:53](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L53)
___
@@ -90,7 +90,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/discount-condition.ts:130](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L130)
[models/discount-condition.ts:130](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L130)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/discount-condition.ts:49](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L49)
[models/discount-condition.ts:49](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L49)
___
@@ -120,7 +120,7 @@ ___
#### Defined in
[models/discount-condition.ts:113](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L113)
[models/discount-condition.ts:113](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L113)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[models/discount-condition.ts:99](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L99)
[models/discount-condition.ts:99](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L99)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[models/discount-condition.ts:85](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L85)
[models/discount-condition.ts:85](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L85)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/discount-condition.ts:71](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L71)
[models/discount-condition.ts:71](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L71)
___
@@ -160,7 +160,7 @@ ___
#### Defined in
[models/discount-condition.ts:43](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L43)
[models/discount-condition.ts:43](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L43)
___
@@ -174,7 +174,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -188,4 +188,4 @@ SoftDeletableEntity.updated\_at
#### Defined in
[models/discount-condition.ts:132](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition.ts#L132)
[models/discount-condition.ts:132](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition.ts#L132)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/discount-condition-customer-group.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-customer-group.ts#L20)
[models/discount-condition-customer-group.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-customer-group.ts#L20)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/discount-condition-customer-group.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-customer-group.ts#L31)
[models/discount-condition-customer-group.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-customer-group.ts#L31)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/discount-condition-customer-group.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-customer-group.ts#L24)
[models/discount-condition-customer-group.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-customer-group.ts#L24)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/discount-condition-customer-group.ts:17](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-customer-group.ts#L17)
[models/discount-condition-customer-group.ts:17](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-customer-group.ts#L17)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/discount-condition-customer-group.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-customer-group.ts#L28)
[models/discount-condition-customer-group.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-customer-group.ts#L28)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/discount-condition-customer-group.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-customer-group.ts#L37)
[models/discount-condition-customer-group.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-customer-group.ts#L37)
___
@@ -78,4 +78,4 @@ ___
#### Defined in
[models/discount-condition-customer-group.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-customer-group.ts#L34)
[models/discount-condition-customer-group.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-customer-group.ts#L34)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/discount-condition-product.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product.ts#L20)
[models/discount-condition-product.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product.ts#L20)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/discount-condition-product.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product.ts#L31)
[models/discount-condition-product.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product.ts#L31)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/discount-condition-product.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product.ts#L28)
[models/discount-condition-product.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product.ts#L28)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/discount-condition-product.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product.ts#L37)
[models/discount-condition-product.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product.ts#L37)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/discount-condition-product.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product.ts#L24)
[models/discount-condition-product.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product.ts#L24)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/discount-condition-product.ts:17](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product.ts#L17)
[models/discount-condition-product.ts:17](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product.ts#L17)
___
@@ -78,4 +78,4 @@ ___
#### Defined in
[models/discount-condition-product.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product.ts#L34)
[models/discount-condition-product.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product.ts#L34)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/discount-condition-product-collection.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-collection.ts#L20)
[models/discount-condition-product-collection.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-collection.ts#L20)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/discount-condition-product-collection.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-collection.ts#L31)
[models/discount-condition-product-collection.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-collection.ts#L31)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/discount-condition-product-collection.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-collection.ts#L28)
[models/discount-condition-product-collection.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-collection.ts#L28)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/discount-condition-product-collection.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-collection.ts#L37)
[models/discount-condition-product-collection.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-collection.ts#L37)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/discount-condition-product-collection.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-collection.ts#L24)
[models/discount-condition-product-collection.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-collection.ts#L24)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/discount-condition-product-collection.ts:17](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-collection.ts#L17)
[models/discount-condition-product-collection.ts:17](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-collection.ts#L17)
___
@@ -78,4 +78,4 @@ ___
#### Defined in
[models/discount-condition-product-collection.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-collection.ts#L34)
[models/discount-condition-product-collection.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-collection.ts#L34)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/discount-condition-product-tag.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-tag.ts#L20)
[models/discount-condition-product-tag.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-tag.ts#L20)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/discount-condition-product-tag.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-tag.ts#L31)
[models/discount-condition-product-tag.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-tag.ts#L31)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/discount-condition-product-tag.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-tag.ts#L28)
[models/discount-condition-product-tag.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-tag.ts#L28)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/discount-condition-product-tag.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-tag.ts#L37)
[models/discount-condition-product-tag.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-tag.ts#L37)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/discount-condition-product-tag.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-tag.ts#L24)
[models/discount-condition-product-tag.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-tag.ts#L24)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/discount-condition-product-tag.ts:17](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-tag.ts#L17)
[models/discount-condition-product-tag.ts:17](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-tag.ts#L17)
___
@@ -78,4 +78,4 @@ ___
#### Defined in
[models/discount-condition-product-tag.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-tag.ts#L34)
[models/discount-condition-product-tag.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-tag.ts#L34)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/discount-condition-product-type.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-type.ts#L20)
[models/discount-condition-product-type.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-type.ts#L20)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/discount-condition-product-type.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-type.ts#L31)
[models/discount-condition-product-type.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-type.ts#L31)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/discount-condition-product-type.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-type.ts#L28)
[models/discount-condition-product-type.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-type.ts#L28)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/discount-condition-product-type.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-type.ts#L37)
[models/discount-condition-product-type.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-type.ts#L37)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/discount-condition-product-type.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-type.ts#L24)
[models/discount-condition-product-type.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-type.ts#L24)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/discount-condition-product-type.ts:17](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-type.ts#L17)
[models/discount-condition-product-type.ts:17](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-type.ts#L17)
___
@@ -78,4 +78,4 @@ ___
#### Defined in
[models/discount-condition-product-type.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-condition-product-type.ts#L34)
[models/discount-condition-product-type.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-condition-product-type.ts#L34)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/discount-rule.ts:38](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-rule.ts#L38)
[models/discount-rule.ts:38](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-rule.ts#L38)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/discount-rule.ts:41](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-rule.ts#L41)
[models/discount-rule.ts:41](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-rule.ts#L41)
___
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -76,7 +76,7 @@ ___
#### Defined in
[models/discount-rule.ts:22](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-rule.ts#L22)
[models/discount-rule.ts:22](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-rule.ts#L22)
___
@@ -90,7 +90,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/discount-rule.ts:44](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-rule.ts#L44)
[models/discount-rule.ts:44](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-rule.ts#L44)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/discount-rule.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-rule.ts#L28)
[models/discount-rule.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-rule.ts#L28)
___
@@ -124,7 +124,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -134,7 +134,7 @@ ___
#### Defined in
[models/discount-rule.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-rule.ts#L31)
[models/discount-rule.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-rule.ts#L31)
## Methods
@@ -148,4 +148,4 @@ ___
#### Defined in
[models/discount-rule.ts:46](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/discount-rule.ts#L46)
[models/discount-rule.ts:46](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/discount-rule.ts#L46)
@@ -28,7 +28,7 @@ BaseEntity.constructor
#### Defined in
[models/draft-order.ts:54](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L54)
[models/draft-order.ts:54](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L54)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/draft-order.ts:43](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L43)
[models/draft-order.ts:43](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L43)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/draft-order.ts:39](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L39)
[models/draft-order.ts:39](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L39)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/draft-order.ts:57](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L57)
[models/draft-order.ts:57](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L57)
___
@@ -72,7 +72,7 @@ BaseEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -82,7 +82,7 @@ ___
#### Defined in
[models/draft-order.ts:35](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L35)
[models/draft-order.ts:35](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L35)
___
@@ -96,7 +96,7 @@ BaseEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -106,7 +106,7 @@ ___
#### Defined in
[models/draft-order.ts:66](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L66)
[models/draft-order.ts:66](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L66)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[models/draft-order.ts:63](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L63)
[models/draft-order.ts:63](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L63)
___
@@ -126,7 +126,7 @@ ___
#### Defined in
[models/draft-order.ts:60](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L60)
[models/draft-order.ts:60](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L60)
___
@@ -136,7 +136,7 @@ ___
#### Defined in
[models/draft-order.ts:51](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L51)
[models/draft-order.ts:51](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L51)
___
@@ -146,7 +146,7 @@ ___
#### Defined in
[models/draft-order.ts:47](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L47)
[models/draft-order.ts:47](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L47)
___
@@ -156,7 +156,7 @@ ___
#### Defined in
[models/draft-order.ts:30](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L30)
[models/draft-order.ts:30](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L30)
___
@@ -170,7 +170,7 @@ BaseEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -184,4 +184,4 @@ BaseEntity.updated\_at
#### Defined in
[models/draft-order.ts:68](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/draft-order.ts#L68)
[models/draft-order.ts:68](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/draft-order.ts#L68)
@@ -28,7 +28,7 @@ BaseEntity.constructor
#### Defined in
[models/fulfillment.ts:79](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L79)
[models/fulfillment.ts:79](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L79)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/fulfillment.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L29)
[models/fulfillment.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L29)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/fulfillment.ts:25](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L25)
[models/fulfillment.ts:25](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L25)
___
@@ -62,7 +62,7 @@ BaseEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -72,7 +72,7 @@ ___
#### Defined in
[models/fulfillment.ts:73](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L73)
[models/fulfillment.ts:73](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L73)
___
@@ -86,7 +86,7 @@ BaseEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -96,7 +96,7 @@ ___
#### Defined in
[models/fulfillment.ts:85](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L85)
[models/fulfillment.ts:85](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L85)
___
@@ -106,7 +106,7 @@ ___
#### Defined in
[models/fulfillment.ts:62](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L62)
[models/fulfillment.ts:62](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L62)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[models/fulfillment.ts:82](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L82)
[models/fulfillment.ts:82](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L82)
___
@@ -126,7 +126,7 @@ ___
#### Defined in
[models/fulfillment.ts:48](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L48)
[models/fulfillment.ts:48](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L48)
___
@@ -136,7 +136,7 @@ ___
#### Defined in
[models/fulfillment.ts:45](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L45)
[models/fulfillment.ts:45](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L45)
___
@@ -146,7 +146,7 @@ ___
#### Defined in
[models/fulfillment.ts:41](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L41)
[models/fulfillment.ts:41](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L41)
___
@@ -156,7 +156,7 @@ ___
#### Defined in
[models/fulfillment.ts:56](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L56)
[models/fulfillment.ts:56](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L56)
___
@@ -166,7 +166,7 @@ ___
#### Defined in
[models/fulfillment.ts:52](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L52)
[models/fulfillment.ts:52](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L52)
___
@@ -176,7 +176,7 @@ ___
#### Defined in
[models/fulfillment.ts:76](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L76)
[models/fulfillment.ts:76](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L76)
___
@@ -186,7 +186,7 @@ ___
#### Defined in
[models/fulfillment.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L37)
[models/fulfillment.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L37)
___
@@ -196,7 +196,7 @@ ___
#### Defined in
[models/fulfillment.ts:33](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L33)
[models/fulfillment.ts:33](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L33)
___
@@ -206,7 +206,7 @@ ___
#### Defined in
[models/fulfillment.ts:67](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L67)
[models/fulfillment.ts:67](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L67)
___
@@ -216,7 +216,7 @@ ___
#### Defined in
[models/fulfillment.ts:70](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L70)
[models/fulfillment.ts:70](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L70)
___
@@ -230,7 +230,7 @@ BaseEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -244,4 +244,4 @@ BaseEntity.updated\_at
#### Defined in
[models/fulfillment.ts:87](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment.ts#L87)
[models/fulfillment.ts:87](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment.ts#L87)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/fulfillment-item.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment-item.ts#L16)
[models/fulfillment-item.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment-item.ts#L16)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/fulfillment-item.ts:9](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment-item.ts#L9)
[models/fulfillment-item.ts:9](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment-item.ts#L9)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/fulfillment-item.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment-item.ts#L20)
[models/fulfillment-item.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment-item.ts#L20)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/fulfillment-item.ts:12](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment-item.ts#L12)
[models/fulfillment-item.ts:12](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment-item.ts#L12)
___
@@ -58,4 +58,4 @@ ___
#### Defined in
[models/fulfillment-item.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment-item.ts#L23)
[models/fulfillment-item.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment-item.ts#L23)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/fulfillment-provider.ts:6](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment-provider.ts#L6)
[models/fulfillment-provider.ts:6](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment-provider.ts#L6)
___
@@ -28,4 +28,4 @@ ___
#### Defined in
[models/fulfillment-provider.ts:9](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/fulfillment-provider.ts#L9)
[models/fulfillment-provider.ts:9](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/fulfillment-provider.ts#L9)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/gift-card.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L26)
[models/gift-card.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L26)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/gift-card.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L20)
[models/gift-card.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L20)
___
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -76,7 +76,7 @@ ___
#### Defined in
[models/gift-card.ts:51](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L51)
[models/gift-card.ts:51](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L51)
___
@@ -90,7 +90,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/gift-card.ts:45](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L45)
[models/gift-card.ts:45](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L45)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/gift-card.ts:54](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L54)
[models/gift-card.ts:54](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L54)
___
@@ -120,7 +120,7 @@ ___
#### Defined in
[models/gift-card.ts:42](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L42)
[models/gift-card.ts:42](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L42)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[models/gift-card.ts:38](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L38)
[models/gift-card.ts:38](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L38)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[models/gift-card.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L34)
[models/gift-card.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L34)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/gift-card.ts:30](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L30)
[models/gift-card.ts:30](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L30)
___
@@ -164,7 +164,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -174,7 +174,7 @@ ___
#### Defined in
[models/gift-card.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L23)
[models/gift-card.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L23)
## Methods
@@ -188,4 +188,4 @@ ___
#### Defined in
[models/gift-card.ts:56](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card.ts#L56)
[models/gift-card.ts:56](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card.ts#L56)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/gift-card-transaction.ts:40](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L40)
[models/gift-card-transaction.ts:40](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L40)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:43](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L43)
[models/gift-card-transaction.ts:43](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L43)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L29)
[models/gift-card-transaction.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L29)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:25](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L25)
[models/gift-card-transaction.ts:25](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L25)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:22](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L22)
[models/gift-card-transaction.ts:22](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L22)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:46](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L46)
[models/gift-card-transaction.ts:46](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L46)
___
@@ -78,7 +78,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L37)
[models/gift-card-transaction.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L37)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:33](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L33)
[models/gift-card-transaction.ts:33](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L33)
___
@@ -98,7 +98,7 @@ ___
#### Defined in
[models/gift-card-transaction.ts:49](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L49)
[models/gift-card-transaction.ts:49](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L49)
## Methods
@@ -112,4 +112,4 @@ ___
#### Defined in
[models/gift-card-transaction.ts:51](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/gift-card-transaction.ts#L51)
[models/gift-card-transaction.ts:51](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/gift-card-transaction.ts#L51)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/idempotency-key.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L23)
[models/idempotency-key.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L23)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/idempotency-key.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L16)
[models/idempotency-key.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L16)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/idempotency-key.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L20)
[models/idempotency-key.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L20)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/idempotency-key.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L26)
[models/idempotency-key.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L26)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/idempotency-key.ts:44](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L44)
[models/idempotency-key.ts:44](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L44)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/idempotency-key.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L29)
[models/idempotency-key.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L29)
___
@@ -78,7 +78,7 @@ ___
#### Defined in
[models/idempotency-key.ts:32](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L32)
[models/idempotency-key.ts:32](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L32)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[models/idempotency-key.ts:35](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L35)
[models/idempotency-key.ts:35](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L35)
___
@@ -98,7 +98,7 @@ ___
#### Defined in
[models/idempotency-key.ts:41](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L41)
[models/idempotency-key.ts:41](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L41)
___
@@ -108,7 +108,7 @@ ___
#### Defined in
[models/idempotency-key.ts:38](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L38)
[models/idempotency-key.ts:38](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L38)
## Methods
@@ -122,4 +122,4 @@ ___
#### Defined in
[models/idempotency-key.ts:46](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/idempotency-key.ts#L46)
[models/idempotency-key.ts:46](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/idempotency-key.ts#L46)
@@ -32,7 +32,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -46,7 +46,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -60,7 +60,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -70,7 +70,7 @@ ___
#### Defined in
[models/image.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/image.ts#L13)
[models/image.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/image.ts#L13)
___
@@ -84,7 +84,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -94,7 +94,7 @@ ___
#### Defined in
[models/image.ts:10](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/image.ts#L10)
[models/image.ts:10](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/image.ts#L10)
## Methods
@@ -108,4 +108,4 @@ ___
#### Defined in
[models/image.ts:15](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/image.ts#L15)
[models/image.ts:15](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/image.ts#L15)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/invite.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/invite.ts#L23)
[models/invite.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/invite.ts#L23)
___
@@ -42,7 +42,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -66,7 +66,7 @@ ___
#### Defined in
[models/invite.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/invite.ts#L29)
[models/invite.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/invite.ts#L29)
___
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -90,7 +90,7 @@ ___
#### Defined in
[models/invite.ts:32](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/invite.ts#L32)
[models/invite.ts:32](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/invite.ts#L32)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/invite.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/invite.ts#L20)
[models/invite.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/invite.ts#L20)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/invite.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/invite.ts#L26)
[models/invite.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/invite.ts#L26)
___
@@ -124,7 +124,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -134,7 +134,7 @@ ___
#### Defined in
[models/invite.ts:12](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/invite.ts#L12)
[models/invite.ts:12](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/invite.ts#L12)
## Methods
@@ -148,4 +148,4 @@ ___
#### Defined in
[models/invite.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/invite.ts#L34)
[models/invite.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/invite.ts#L34)
@@ -28,7 +28,7 @@ BaseEntity.constructor
#### Defined in
[models/line-item.ts:85](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L85)
[models/line-item.ts:85](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L85)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/line-item.ts:127](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L127)
[models/line-item.ts:127](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L127)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/line-item.ts:53](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L53)
[models/line-item.ts:53](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L53)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/line-item.ts:49](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L49)
[models/line-item.ts:49](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L49)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/line-item.ts:77](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L77)
[models/line-item.ts:77](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L77)
___
@@ -78,7 +78,7 @@ ___
#### Defined in
[models/line-item.ts:73](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L73)
[models/line-item.ts:73](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L73)
___
@@ -92,7 +92,7 @@ BaseEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -102,7 +102,7 @@ ___
#### Defined in
[models/line-item.ts:112](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L112)
[models/line-item.ts:112](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L112)
___
@@ -112,7 +112,7 @@ ___
#### Defined in
[models/line-item.ts:167](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L167)
[models/line-item.ts:167](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L167)
___
@@ -122,7 +122,7 @@ ___
#### Defined in
[models/line-item.ts:147](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L147)
[models/line-item.ts:147](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L147)
___
@@ -132,7 +132,7 @@ ___
#### Defined in
[models/line-item.ts:168](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L168)
[models/line-item.ts:168](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L168)
___
@@ -142,7 +142,7 @@ ___
#### Defined in
[models/line-item.ts:130](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L130)
[models/line-item.ts:130](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L130)
___
@@ -156,7 +156,7 @@ BaseEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -166,7 +166,7 @@ ___
#### Defined in
[models/line-item.ts:159](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L159)
[models/line-item.ts:159](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L159)
___
@@ -176,7 +176,7 @@ ___
#### Defined in
[models/line-item.ts:121](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L121)
[models/line-item.ts:121](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L121)
___
@@ -186,7 +186,7 @@ ___
#### Defined in
[models/line-item.ts:118](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L118)
[models/line-item.ts:118](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L118)
___
@@ -196,7 +196,7 @@ ___
#### Defined in
[models/line-item.ts:156](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L156)
[models/line-item.ts:156](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L156)
___
@@ -206,7 +206,7 @@ ___
#### Defined in
[models/line-item.ts:61](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L61)
[models/line-item.ts:61](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L61)
___
@@ -216,7 +216,7 @@ ___
#### Defined in
[models/line-item.ts:106](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L106)
[models/line-item.ts:106](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L106)
___
@@ -226,7 +226,7 @@ ___
#### Defined in
[models/line-item.ts:97](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L97)
[models/line-item.ts:97](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L97)
___
@@ -236,7 +236,7 @@ ___
#### Defined in
[models/line-item.ts:57](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L57)
[models/line-item.ts:57](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L57)
___
@@ -246,7 +246,7 @@ ___
#### Defined in
[models/line-item.ts:91](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L91)
[models/line-item.ts:91](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L91)
___
@@ -256,7 +256,7 @@ ___
#### Defined in
[models/line-item.ts:166](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L166)
[models/line-item.ts:166](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L166)
___
@@ -266,7 +266,7 @@ ___
#### Defined in
[models/line-item.ts:165](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L165)
[models/line-item.ts:165](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L165)
___
@@ -276,7 +276,7 @@ ___
#### Defined in
[models/line-item.ts:144](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L144)
[models/line-item.ts:144](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L144)
___
@@ -286,7 +286,7 @@ ___
#### Defined in
[models/line-item.ts:161](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L161)
[models/line-item.ts:161](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L161)
___
@@ -296,7 +296,7 @@ ___
#### Defined in
[models/line-item.ts:150](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L150)
[models/line-item.ts:150](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L150)
___
@@ -306,7 +306,7 @@ ___
#### Defined in
[models/line-item.ts:153](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L153)
[models/line-item.ts:153](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L153)
___
@@ -316,7 +316,7 @@ ___
#### Defined in
[models/line-item.ts:124](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L124)
[models/line-item.ts:124](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L124)
___
@@ -326,7 +326,7 @@ ___
#### Defined in
[models/line-item.ts:162](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L162)
[models/line-item.ts:162](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L162)
___
@@ -336,7 +336,7 @@ ___
#### Defined in
[models/line-item.ts:69](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L69)
[models/line-item.ts:69](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L69)
___
@@ -346,7 +346,7 @@ ___
#### Defined in
[models/line-item.ts:65](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L65)
[models/line-item.ts:65](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L65)
___
@@ -356,7 +356,7 @@ ___
#### Defined in
[models/line-item.ts:80](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L80)
[models/line-item.ts:80](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L80)
___
@@ -366,7 +366,7 @@ ___
#### Defined in
[models/line-item.ts:163](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L163)
[models/line-item.ts:163](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L163)
___
@@ -376,7 +376,7 @@ ___
#### Defined in
[models/line-item.ts:115](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L115)
[models/line-item.ts:115](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L115)
___
@@ -386,7 +386,7 @@ ___
#### Defined in
[models/line-item.ts:109](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L109)
[models/line-item.ts:109](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L109)
___
@@ -396,7 +396,7 @@ ___
#### Defined in
[models/line-item.ts:164](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L164)
[models/line-item.ts:164](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L164)
___
@@ -406,7 +406,7 @@ ___
#### Defined in
[models/line-item.ts:133](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L133)
[models/line-item.ts:133](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L133)
___
@@ -420,7 +420,7 @@ BaseEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -430,7 +430,7 @@ ___
#### Defined in
[models/line-item.ts:141](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L141)
[models/line-item.ts:141](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L141)
___
@@ -440,7 +440,7 @@ ___
#### Defined in
[models/line-item.ts:137](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L137)
[models/line-item.ts:137](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L137)
## Methods
@@ -454,4 +454,4 @@ ___
#### Defined in
[models/line-item.ts:170](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item.ts#L170)
[models/line-item.ts:170](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item.ts#L170)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/line-item-adjustment.ts:45](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L45)
[models/line-item-adjustment.ts:45](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L45)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/line-item-adjustment.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L34)
[models/line-item-adjustment.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L34)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/line-item-adjustment.ts:38](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L38)
[models/line-item-adjustment.ts:38](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L38)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/line-item-adjustment.ts:42](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L42)
[models/line-item-adjustment.ts:42](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L42)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/line-item-adjustment.ts:23](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L23)
[models/line-item-adjustment.ts:23](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L23)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/line-item-adjustment.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L31)
[models/line-item-adjustment.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L31)
___
@@ -78,7 +78,7 @@ ___
#### Defined in
[models/line-item-adjustment.ts:27](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L27)
[models/line-item-adjustment.ts:27](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L27)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[models/line-item-adjustment.ts:48](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L48)
[models/line-item-adjustment.ts:48](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L48)
## Methods
@@ -102,4 +102,4 @@ ___
#### Defined in
[models/line-item-adjustment.ts:50](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-adjustment.ts#L50)
[models/line-item-adjustment.ts:50](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-adjustment.ts#L50)
@@ -32,7 +32,7 @@ TaxLine.code
#### Defined in
[models/tax-line.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/tax-line.ts#L13)
[models/tax-line.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/tax-line.ts#L13)
___
@@ -46,7 +46,7 @@ TaxLine.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -60,7 +60,7 @@ TaxLine.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -70,7 +70,7 @@ ___
#### Defined in
[models/line-item-tax-line.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-tax-line.ts#L24)
[models/line-item-tax-line.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-tax-line.ts#L24)
___
@@ -80,7 +80,7 @@ ___
#### Defined in
[models/line-item-tax-line.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-tax-line.ts#L20)
[models/line-item-tax-line.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-tax-line.ts#L20)
___
@@ -94,7 +94,7 @@ TaxLine.metadata
#### Defined in
[models/tax-line.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/tax-line.ts#L16)
[models/tax-line.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/tax-line.ts#L16)
___
@@ -108,7 +108,7 @@ TaxLine.name
#### Defined in
[models/tax-line.ts:10](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/tax-line.ts#L10)
[models/tax-line.ts:10](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/tax-line.ts#L10)
___
@@ -122,7 +122,7 @@ TaxLine.rate
#### Defined in
[models/tax-line.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/tax-line.ts#L7)
[models/tax-line.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/tax-line.ts#L7)
___
@@ -136,7 +136,7 @@ TaxLine.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -150,4 +150,4 @@ TaxLine.updated\_at
#### Defined in
[models/line-item-tax-line.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/line-item-tax-line.ts#L26)
[models/line-item-tax-line.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/line-item-tax-line.ts#L26)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/money-amount.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L28)
[models/money-amount.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L28)
___
@@ -42,7 +42,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -52,7 +52,7 @@ ___
#### Defined in
[models/money-amount.ts:25](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L25)
[models/money-amount.ts:25](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L25)
___
@@ -62,7 +62,7 @@ ___
#### Defined in
[models/money-amount.ts:21](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L21)
[models/money-amount.ts:21](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L21)
___
@@ -76,7 +76,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -90,7 +90,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/money-amount.ts:34](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L34)
[models/money-amount.ts:34](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L34)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/money-amount.ts:31](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L31)
[models/money-amount.ts:31](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L31)
___
@@ -120,7 +120,7 @@ ___
#### Defined in
[models/money-amount.ts:44](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L44)
[models/money-amount.ts:44](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L44)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[models/money-amount.ts:37](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L37)
[models/money-amount.ts:37](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L37)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[models/money-amount.ts:62](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L62)
[models/money-amount.ts:62](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L62)
___
@@ -150,7 +150,7 @@ ___
#### Defined in
[models/money-amount.ts:58](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L58)
[models/money-amount.ts:58](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L58)
___
@@ -164,7 +164,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -174,7 +174,7 @@ ___
#### Defined in
[models/money-amount.ts:54](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L54)
[models/money-amount.ts:54](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L54)
___
@@ -184,7 +184,7 @@ ___
#### Defined in
[models/money-amount.ts:48](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L48)
[models/money-amount.ts:48](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L48)
## Methods
@@ -198,4 +198,4 @@ ___
#### Defined in
[models/money-amount.ts:64](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/money-amount.ts#L64)
[models/money-amount.ts:64](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/money-amount.ts#L64)
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
#### Defined in
[models/note.ts:33](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/note.ts#L33)
[models/note.ts:33](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/note.ts#L33)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/note.ts:29](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/note.ts#L29)
[models/note.ts:29](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/note.ts#L29)
___
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -90,7 +90,7 @@ ___
#### Defined in
[models/note.ts:36](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/note.ts#L36)
[models/note.ts:36](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/note.ts#L36)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[models/note.ts:26](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/note.ts#L26)
[models/note.ts:26](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/note.ts#L26)
___
@@ -110,7 +110,7 @@ ___
#### Defined in
[models/note.ts:22](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/note.ts#L22)
[models/note.ts:22](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/note.ts#L22)
___
@@ -124,7 +124,7 @@ SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
@@ -134,7 +134,7 @@ ___
#### Defined in
[models/note.ts:18](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/note.ts#L18)
[models/note.ts:18](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/note.ts#L18)
## Methods
@@ -148,4 +148,4 @@ ___
#### Defined in
[models/note.ts:38](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/note.ts#L38)
[models/note.ts:38](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/note.ts#L38)
@@ -32,7 +32,7 @@ BaseEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L16)
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
@@ -42,7 +42,7 @@ ___
#### Defined in
[models/notification.ts:36](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L36)
[models/notification.ts:36](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L36)
___
@@ -52,7 +52,7 @@ ___
#### Defined in
[models/notification.ts:32](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L32)
[models/notification.ts:32](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L32)
___
@@ -62,7 +62,7 @@ ___
#### Defined in
[models/notification.ts:42](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L42)
[models/notification.ts:42](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L42)
___
@@ -72,7 +72,7 @@ ___
#### Defined in
[models/notification.ts:20](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L20)
[models/notification.ts:20](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L20)
___
@@ -86,7 +86,7 @@ BaseEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L13)
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
@@ -96,7 +96,7 @@ ___
#### Defined in
[models/notification.ts:45](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L45)
[models/notification.ts:45](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L45)
___
@@ -106,7 +106,7 @@ ___
#### Defined in
[models/notification.ts:49](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L49)
[models/notification.ts:49](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L49)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[models/notification.ts:59](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L59)
[models/notification.ts:59](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L59)
___
@@ -126,7 +126,7 @@ ___
#### Defined in
[models/notification.ts:55](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L55)
[models/notification.ts:55](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L55)
___
@@ -136,7 +136,7 @@ ___
#### Defined in
[models/notification.ts:52](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L52)
[models/notification.ts:52](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L52)
___
@@ -146,7 +146,7 @@ ___
#### Defined in
[models/notification.ts:28](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L28)
[models/notification.ts:28](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L28)
___
@@ -156,7 +156,7 @@ ___
#### Defined in
[models/notification.ts:24](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L24)
[models/notification.ts:24](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L24)
___
@@ -166,7 +166,7 @@ ___
#### Defined in
[models/notification.ts:39](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L39)
[models/notification.ts:39](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L39)
___
@@ -180,7 +180,7 @@ BaseEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/interfaces/models/base-entity.ts#L19)
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
@@ -194,4 +194,4 @@ BaseEntity.updated\_at
#### Defined in
[models/notification.ts:61](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/notification.ts#L61)
[models/notification.ts:61](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/notification.ts#L61)
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
#### Defined in
[models/oauth.ts:16](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/oauth.ts#L16)
[models/oauth.ts:16](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/oauth.ts#L16)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[models/oauth.ts:25](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/oauth.ts#L25)
[models/oauth.ts:25](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/oauth.ts#L25)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[models/oauth.ts:12](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/oauth.ts#L12)
[models/oauth.ts:12](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/oauth.ts#L12)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[models/oauth.ts:9](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/oauth.ts#L9)
[models/oauth.ts:9](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/oauth.ts#L9)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[models/oauth.ts:19](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/oauth.ts#L19)
[models/oauth.ts:19](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/oauth.ts#L19)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[models/oauth.ts:22](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/oauth.ts#L22)
[models/oauth.ts:22](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/oauth.ts#L22)
## Methods
@@ -82,4 +82,4 @@ ___
#### Defined in
[models/oauth.ts:27](https://github.com/medusajs/medusa/blob/884322447/packages/medusa/src/models/oauth.ts#L27)
[models/oauth.ts:27](https://github.com/medusajs/medusa/blob/da7ea8c5d/packages/medusa/src/models/oauth.ts#L27)

Some files were not shown because too many files have changed in this diff Show More