Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core-types): Adding metadata to be filterable on product list admin #10052

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/core/types/src/http/product/admin/queries.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { BaseFilterable, OperatorMap } from "../../../dal"
import { FindParams } from "../../common"
import { BaseProductListParams, BaseProductOptionParams } from "../common"
import {
BaseProductListParams,
BaseProductMetadataParams,
BaseProductOptionParams,
} from "../common"

export interface AdminProductOptionParams
extends Omit<BaseProductOptionParams, "product_id"> {}
Expand All @@ -19,4 +23,5 @@ export interface AdminProductListParams
extends Omit<BaseProductListParams, "categories"> {
price_list_id?: string | string[]
variants?: AdminProductVariantParams
metadata?: BaseProductMetadataParams
}
7 changes: 7 additions & 0 deletions packages/core/types/src/http/product/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,10 @@ export interface BaseProductVariantParams
updated_at?: OperatorMap<string>
deleted_at?: OperatorMap<string>
}

export interface BaseProductMetadataParams
extends FindParams,
BaseFilterable<BaseProductMetadataParams> {
q?: string
[key: string]: unknown
}