@vendure/docs 0.0.0-202601281114 → 0.0.0-202601281409

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,24 @@ class ProductReview extends VendureEntity {
39
39
  }
40
40
  ```
41
41
 
42
+ :::caution[TypeScript ES2022+ Compatibility]
43
+ If your `tsconfig.json` uses `"target": "ES2022"` or later (including **Node.js v24+**), you **must** also set `"useDefineForClassFields": false`.
44
+
45
+ Without this setting, ES2022 class field semantics cause entity fields to be overwritten with `undefined` after the constructor runs, resulting in "null value in column violates not-null constraint" database errors.
46
+
47
+ ```json title="tsconfig.json"
48
+ {
49
+ "compilerOptions": {
50
+ "target": "ES2022",
51
+ // highlight-next-line
52
+ "useDefineForClassFields": false
53
+ }
54
+ }
55
+ ```
56
+
57
+ See the [TypeScript documentation](https://www.typescriptlang.org/tsconfig/useDefineForClassFields.html) for more details.
58
+ :::
59
+
42
60
  :::note
43
61
  Any custom entities *must* extend the [`VendureEntity`](/reference/typescript-api/entities/vendure-entity/) class.
44
62
  :::
@@ -4,7 +4,7 @@ sidebar_position: 6
4
4
  ---
5
5
 
6
6
  The heart of Vendure is its plugin system. Plugins not only allow you to instantly add new functionality to your
7
- Vendure server via third-part npm packages, they are also the means by which you build out the custom business
7
+ Vendure server via third-party npm packages, they are also the means by which you build out the custom business
8
8
  logic of your application.
9
9
 
10
10
  Plugins in Vendure allow one to:
@@ -5,8 +5,8 @@ title: 'Custom Form Elements'
5
5
  The dashboard allows you to create custom form elements that provide complete control over how data is rendered and how users
6
6
  interact with forms. This includes:
7
7
 
8
- - **Custom Field Components** - Globally-registered components that can be used to render **custom fields** and **configurable operation arguments**
9
- - **Detail Form Components** - Form input components that target specific fields of detail pages.
8
+ - **[Custom Field Components](#custom-field-components)** Globally-registered components that can be used to render **custom fields** and **configurable operation arguments**
9
+ - **[Detail Form Components](#detail-form-components)** Form input components that target specific fields of detail pages
10
10
 
11
11
  ## Anatomy of a Form Component
12
12
 
@@ -7,6 +7,12 @@ customize any existing detail page in the Dashboard.
7
7
 
8
8
  ## Custom form inputs
9
9
 
10
+ :::warning[Custom Fields]
11
+ This feature replaces inputs for **built-in entity fields** only (like `name`, `description`, `slug`).
12
+
13
+ To customize the form input for a **custom field** you defined in your plugin, use the [Custom Field Components](/guides/extending-the-dashboard/custom-form-components/#custom-field-components) instead.
14
+ :::
15
+
10
16
  You can replace any of the default form inputs with your own components using the `inputs` property.
11
17
 
12
18
  Let's say you want to replace the default HTML description editor with a markdown editor component:
@@ -2,7 +2,7 @@
2
2
  title: "MolliePlugin"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/payments-plugin/src/mollie/mollie.plugin.ts" sourceLine="195" packageName="@vendure/payments-plugin" />
5
+ <GenerationInfo sourceFile="packages/payments-plugin/src/mollie/mollie.plugin.ts" sourceLine="203" packageName="@vendure/payments-plugin" />
6
6
 
7
7
  Plugin to enable payments through the [Mollie platform](https://docs.mollie.com/).
8
8
  This plugin uses the Order API from Mollie, not the Payments API.
@@ -148,6 +148,7 @@ interface MolliePluginOptions {
148
148
  ctx: RequestContext,
149
149
  order: Order | null,
150
150
  ) => AdditionalEnabledPaymentMethodsParams | Promise<AdditionalEnabledPaymentMethodsParams>;
151
+ immediateCapture?: boolean;
151
152
  }
152
153
  ```
153
154
 
@@ -195,6 +196,14 @@ export const config: VendureConfig = {
195
196
  ],
196
197
  };
197
198
  ```
199
+ ### immediateCapture
200
+
201
+ <MemberInfo kind="property" type={`boolean`} />
202
+
203
+ Immediate capture mode for pay-later methods like Klarna.
204
+ Setting this option will make the plugin ignore the `immediateCapture` option in the `createMolliePaymentIntent` mutation.
205
+
206
+ The default is true, unless set otherwise as input in the `createMolliePaymentIntent` mutation.
198
207
 
199
208
 
200
209
  </div>
@@ -2,7 +2,7 @@
2
2
  title: "UsePaginatedList"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/dashboard/src/lib/components/shared/paginated-list-data-table.tsx" sourceLine="179" packageName="@vendure/dashboard" since="3.4.0" />
5
+ <GenerationInfo sourceFile="packages/dashboard/src/lib/hooks/use-paginated-list.ts" sourceLine="22" packageName="@vendure/dashboard" since="3.4.0" />
6
6
 
7
7
  Returns the context for the paginated list data table. Must be used within a PaginatedListDataTable.
8
8
 
@@ -2,7 +2,7 @@
2
2
  title: "UseWidgetFilters"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/dashboard/src/lib/framework/dashboard-widget/widget-filters-context.tsx" sourceLine="29" packageName="@vendure/dashboard" since="3.5.0" />
5
+ <GenerationInfo sourceFile="packages/dashboard/src/lib/hooks/use-widget-filters.ts" sourceLine="14" packageName="@vendure/dashboard" since="3.5.0" />
6
6
 
7
7
  Exposes a context object for use in building Insights page widgets.
8
8
 
@@ -2,7 +2,7 @@
2
2
  title: "DataTable"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/dashboard/src/lib/components/data-table/data-table.tsx" sourceLine="164" packageName="@vendure/dashboard" since="3.4.0" />
5
+ <GenerationInfo sourceFile="packages/dashboard/src/lib/components/data-table/data-table.tsx" sourceLine="171" packageName="@vendure/dashboard" since="3.4.0" />
6
6
 
7
7
  A data table which includes sorting, filtering, pagination, bulk actions, column controls etc.
8
8
 
@@ -17,7 +17,7 @@ Parameters
17
17
 
18
18
  <MemberInfo kind="parameter" type={`Readonly<<a href='/reference/dashboard/list-views/data-table#datatableprops'>DataTableProps</a><TData>>`} />
19
19
 
20
- <GenerationInfo sourceFile="packages/dashboard/src/lib/components/data-table/data-table.tsx" sourceLine="113" packageName="@vendure/dashboard" since="3.4.0" />
20
+ <GenerationInfo sourceFile="packages/dashboard/src/lib/components/data-table/data-table.tsx" sourceLine="120" packageName="@vendure/dashboard" since="3.4.0" />
21
21
 
22
22
  Props for configuring the [DataTable](/reference/dashboard/list-views/data-table#datatable).
23
23
 
@@ -2,7 +2,7 @@
2
2
  title: "PaginatedListDataTable"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/dashboard/src/lib/components/shared/paginated-list-data-table.tsx" sourceLine="366" packageName="@vendure/dashboard" since="3.4.0" />
5
+ <GenerationInfo sourceFile="packages/dashboard/src/lib/components/shared/paginated-list-data-table.tsx" sourceLine="336" packageName="@vendure/dashboard" since="3.4.0" />
6
6
 
7
7
  A wrapper around the [DataTable](/reference/dashboard/list-views/data-table#datatable) component, which automatically configures functionality common to
8
8
  list queries that implement the `PaginatedList` interface, which is the common way of representing lists
@@ -117,7 +117,7 @@ Parameters
117
117
 
118
118
  <MemberInfo kind="parameter" type={`Readonly<<a href='/reference/dashboard/list-views/paginated-list-data-table#paginatedlistdatatableprops'>PaginatedListDataTableProps</a><T, U, V, AC>>`} />
119
119
 
120
- <GenerationInfo sourceFile="packages/dashboard/src/lib/components/shared/paginated-list-data-table.tsx" sourceLine="202" packageName="@vendure/dashboard" since="3.4.0" />
120
+ <GenerationInfo sourceFile="packages/dashboard/src/lib/components/shared/paginated-list-data-table.tsx" sourceLine="172" packageName="@vendure/dashboard" since="3.4.0" />
121
121
 
122
122
  Props to configure the [PaginatedListDataTable](/reference/dashboard/list-views/paginated-list-data-table#paginatedlistdatatable) component.
123
123
 
@@ -648,6 +648,7 @@ input BooleanOperators {
648
648
  position: NumberOperators
649
649
  description: StringOperators
650
650
  parentId: IDOperators
651
+ productVariantCount: NumberOperators
651
652
  _and: [CollectionFilterParameter!]
652
653
  _or: [CollectionFilterParameter!]
653
654
  }`}
@@ -703,6 +704,7 @@ input BooleanOperators {
703
704
  position: SortOrder
704
705
  description: SortOrder
705
706
  parentId: SortOrder
707
+ productVariantCount: SortOrder
706
708
  }`}
707
709
  </GraphQLDoc>
708
710
 
@@ -601,6 +601,7 @@ type ChannelDefaultLanguageError {
601
601
  filters: [ConfigurableOperation!]!
602
602
  translations: [CollectionTranslation!]!
603
603
  productVariants(options: ProductVariantListOptions): ProductVariantList!
604
+ productVariantCount: Int!
604
605
  customFields: JSON
605
606
  }`}
606
607
  </GraphQLDoc>
@@ -99,6 +99,7 @@ input BooleanOperators {
99
99
  position: NumberOperators
100
100
  description: StringOperators
101
101
  parentId: IDOperators
102
+ productVariantCount: NumberOperators
102
103
  _and: [CollectionFilterParameter!]
103
104
  _or: [CollectionFilterParameter!]
104
105
  }`}
@@ -154,6 +155,7 @@ input BooleanOperators {
154
155
  position: SortOrder
155
156
  description: SortOrder
156
157
  parentId: SortOrder
158
+ productVariantCount: SortOrder
157
159
  }`}
158
160
  </GraphQLDoc>
159
161
 
@@ -377,6 +377,7 @@ scalar Boolean`}
377
377
  filters: [ConfigurableOperation!]!
378
378
  translations: [CollectionTranslation!]!
379
379
  productVariants(options: ProductVariantListOptions): ProductVariantList!
380
+ productVariantCount: Int!
380
381
  customFields: JSON
381
382
  }`}
382
383
  </GraphQLDoc>
@@ -2,7 +2,7 @@
2
2
  title: "CurrencyCode"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="1004" packageName="@vendure/common" />
5
+ <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="1007" packageName="@vendure/common" />
6
6
 
7
7
  ISO 4217 currency code
8
8
 
@@ -2,7 +2,7 @@
2
2
  title: "JobState"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="2256" packageName="@vendure/common" />
5
+ <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="2259" packageName="@vendure/common" />
6
6
 
7
7
  The state of a Job in the JobQueue
8
8
 
@@ -2,7 +2,7 @@
2
2
  title: "LanguageCode"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="2274" packageName="@vendure/common" />
5
+ <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="2277" packageName="@vendure/common" />
6
6
 
7
7
  Languages in the form of a ISO 639-1 language code with optional
8
8
  region or script modifier (e.g. de_AT). The selection available is based
@@ -2,7 +2,7 @@
2
2
  title: "Permission"
3
3
  generated: true
4
4
  ---
5
- <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="4491" packageName="@vendure/common" />
5
+ <GenerationInfo sourceFile="packages/common/src/generated-types.ts" sourceLine="4494" packageName="@vendure/common" />
6
6
 
7
7
  Permissions for administrators and customers. Used to control access to
8
8
  GraphQL resolvers via the [Allow](/reference/typescript-api/request/allow-decorator#allow) decorator.
@@ -16,6 +16,7 @@ class CollectionService implements OnModuleInit {
16
16
  getAvailableFilters(ctx: RequestContext) => ConfigurableOperationDefinition[];
17
17
  getParent(ctx: RequestContext, collectionId: ID) => Promise<Collection | undefined>;
18
18
  getChildren(ctx: RequestContext, collectionId: ID) => Promise<Collection[]>;
19
+ getProductVariantCounts(ctx: RequestContext, collectionIds: ID[]) => Promise<Map<ID, number>>;
19
20
  getBreadcrumbs(ctx: RequestContext, collection: Collection) => Promise<Array<{ name: string; id: ID; slug: string }>>;
20
21
  getCollectionsByProductId(ctx: RequestContext, productId: ID, publicOnly: boolean) => Promise<Array<Translated<Collection>>>;
21
22
  getDescendants(ctx: RequestContext, rootId: ID, maxDepth: number = Number.MAX_SAFE_INTEGER) => Promise<Array<Translated<Collection>>>;
@@ -80,6 +81,13 @@ Returns all configured CollectionFilters, as specified by the [CatalogOptions](/
80
81
  <MemberInfo kind="method" type={`(ctx: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, collectionId: <a href='/reference/typescript-api/common/id#id'>ID</a>) => Promise<<a href='/reference/typescript-api/entities/collection#collection'>Collection</a>[]>`} />
81
82
 
82
83
  Returns all child Collections of the Collection with the given id.
84
+ ### getProductVariantCounts
85
+
86
+ <MemberInfo kind="method" type={`(ctx: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, collectionIds: <a href='/reference/typescript-api/common/id#id'>ID</a>[]) => Promise<Map<<a href='/reference/typescript-api/common/id#id'>ID</a>, number>>`} />
87
+
88
+ Returns a Map of collection IDs to their product variant counts.
89
+ This performs a single bulk query to get counts for all provided collection IDs,
90
+ avoiding N+1 query issues when resolving productVariantCount on multiple collections.
83
91
  ### getBreadcrumbs
84
92
 
85
93
  <MemberInfo kind="method" type={`(ctx: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, collection: <a href='/reference/typescript-api/entities/collection#collection'>Collection</a>) => Promise<Array<{ name: string; id: <a href='/reference/typescript-api/common/id#id'>ID</a>; slug: string }>>`} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure/docs",
3
- "version": "0.0.0-202601281114",
3
+ "version": "0.0.0-202601281409",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,6 +11,10 @@
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/vendurehq/vendure"
17
+ },
14
18
  "files": [
15
19
  "dist",
16
20
  "docs",
@@ -22,8 +26,9 @@
22
26
  "prebuild": "npm run generate-dates",
23
27
  "build": "rimraf dist && tsc -p ./tsconfig.build.json",
24
28
  "prepublishOnly": "npm run test:mdx && npm run build",
25
- "publish:local": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish",
29
+ "publish:local": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish --tag latest",
26
30
  "publish:local:next": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish --tag next",
31
+ "pretest:mdx": "npm run generate-dates",
27
32
  "test:mdx": "tsx scripts/test-mdx.ts",
28
33
  "test:mdx:verbose": "tsx scripts/test-mdx.ts --verbose",
29
34
  "typecheck": "tsc --noEmit"
@@ -32,6 +37,7 @@
32
37
  "@vendure-io/docs-provider": "^0.9.0"
33
38
  },
34
39
  "devDependencies": {
40
+ "@types/node": "^22.10.10",
35
41
  "rimraf": "^5.0.5",
36
42
  "tsx": "^4.7.0",
37
43
  "typescript": "5.8.2"