docs: update imports and package names across docs (#9375)

* docs: update imports and package names across docs
+ reference configs

* generate files

* fix import

* change preview to rc
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-10-01 11:03:42 +02:00
1 parent c726ed54f5
commit 2e16949979
196 files changed
+1379 -1491

No files matched your search

@@ -15,7 +15,7 @@ For example, if a store is deleted, its product should also be deleted.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const Store = model.define("store", {
id: model.id(),
@@ -15,7 +15,7 @@ and have conditions.
An example of a simple index:
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
id: model.id(),
@@ -33,7 +33,7 @@ export default MyCustom
To add a condition on the index, use the `where` option:
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
id: model.id(),
@@ -54,7 +54,7 @@ export default MyCustom
The condition can also be a negation. For example:
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
id: model.id(),
@@ -12,7 +12,7 @@ This method defines the default value of a property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
color: model
@@ -12,7 +12,7 @@ This method defines an index on a property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
id: model.id(),
@@ -12,7 +12,7 @@ This method indicates that a property's value can be `null`.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
price: model.bigNumber().nullable(),
@@ -13,7 +13,7 @@ A unique index is created on the property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const User = model.define("user", {
email: model.text().unique(),
@@ -12,7 +12,7 @@ This method defines an array of strings property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
names: model.array(),
@@ -12,7 +12,7 @@ This method defines a number property that expects large numbers, such as prices
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
price: model.bigNumber(),
@@ -12,7 +12,7 @@ This method defines a boolean property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
hasAccount: model.boolean(),
@@ -12,7 +12,7 @@ This method defines a timestamp property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
date_of_birth: model.dateTime(),
@@ -12,7 +12,7 @@ This method defines a property whose value can only be one of the specified valu
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
color: model.enum(["black", "white"]),
@@ -15,7 +15,7 @@ primary key.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const User = model.define("User", {
id: model.id().primaryKey(),
@@ -12,7 +12,7 @@ This method defines a property whose value is a stringified JSON object.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
metadata: model.json(),
@@ -12,7 +12,7 @@ This method defines a number property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
age: model.number(),
@@ -12,7 +12,7 @@ This method defines a string property.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
name: model.text(),
@@ -16,7 +16,7 @@ For example, a store "hasMany" products.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const Store = model.define("store", {
id: model.id(),
@@ -19,7 +19,7 @@ the other data model.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const User = model.define("user", {
id: model.id(),
@@ -16,7 +16,7 @@ is associated with many orders.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const Order = model.define("order", {
id: model.id(),
@@ -11,7 +11,7 @@ This method defines a data model.
## Example
```ts
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
id: model.id(),