feat: Add support for search to all endpoints (#7149)

* feat: Add search capability to api keys

* feat: Add support for searching to currency and customer endpoints

* fix: Clean up product search filters

* feat: Add search support to regions

* feat: Add search support to sales channels

* feat: Add search support to store module

* feat: Add search support to user module

* fix: Clean up inventory search

* feat: Add search support for payments

* fix: Add searchable attributes to stock location models

* feat: Add search support to tax

* feat: Add search support to promotions

* feat: Add search support for pricing, filtering cleanup

* fix: Further cleanups around search
This commit is contained in:
Stevche Radevski authored and GitHub committed 2024-04-25 17:36:59 +02:00
1 parent d02905cefa
commit f03a822253
52 files changed
+640 -64

No files matched your search

@@ -1,4 +1,4 @@
import { generateEntityId } from "@medusajs/utils"
import { Searchable, generateEntityId } from "@medusajs/utils"
import {
BeforeInsert,
Column,
@@ -24,15 +24,19 @@ export class StockLocationAddress {
@DeleteDateColumn({ type: "timestamptz" })
deleted_at: Date | null
@Searchable()
@Column({ type: "text" })
address_1: string
@Searchable()
@Column({ type: "text", nullable: true })
address_2: string | null
@Searchable()
@Column({ type: "text", nullable: true })
company: string | null
@Searchable()
@Column({ type: "text", nullable: true })
city: string | null
@@ -43,9 +47,11 @@ export class StockLocationAddress {
@Column({ type: "text", nullable: true })
phone: string | null
@Searchable()
@Column({ type: "text", nullable: true })
province: string | null
@Searchable()
@Column({ type: "text", nullable: true })
postal_code: string | null
@@ -1,4 +1,4 @@
import { generateEntityId } from "@medusajs/utils"
import { Searchable, generateEntityId } from "@medusajs/utils"
import {
BeforeInsert,
Column,
@@ -27,6 +27,7 @@ export class StockLocation {
@DeleteDateColumn({ type: "timestamptz" })
deleted_at: Date | null
@Searchable()
@Column({ type: "text" })
name: string
@@ -34,6 +35,7 @@ export class StockLocation {
@Column({ type: "text", nullable: true })
address_id: string | null
@Searchable()
@ManyToOne(() => StockLocationAddress)
@JoinColumn({ name: "address_id" })
address: StockLocationAddress | null