Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
203022a
wip
brunozoric Nov 20, 2025
1ae9f60
wip
brunozoric Nov 20, 2025
a65c8e8
feat: add WB sidebar footer config
Pavel910 Nov 20, 2025
d85f559
wip
brunozoric Nov 21, 2025
8afb365
wip
brunozoric Nov 21, 2025
1fc764f
wip
brunozoric Nov 21, 2025
fc9a063
fix(app-workflows): use dialog object for step instead of separate st…
brunozoric Nov 21, 2025
9a82463
feat(app-website-builder): configurable auto save
brunozoric Nov 21, 2025
6447b4b
feat(app-website-builder-workflows): wip
brunozoric Nov 21, 2025
31feefc
chore: lint fix run
brunozoric Nov 21, 2025
bbc7c56
wip
brunozoric Nov 24, 2025
634603a
wip
brunozoric Nov 24, 2025
e7efcae
wip
brunozoric Nov 25, 2025
fbb704c
chore: prettier
brunozoric Nov 26, 2025
64a0582
fix: after next merge
brunozoric Nov 28, 2025
d484752
fix(api-website-builder-workflows): attach event only for wb page
brunozoric Nov 28, 2025
6fcc081
fix(app-workflows): remove gap when editing step
brunozoric Dec 1, 2025
64a6822
fix: remove AcoConfig and use config composition
Pavel910 Dec 4, 2025
527737d
chore: remove console logs
brunozoric Dec 4, 2025
7ffb3aa
fix: remove AcoConfig and use config composition
Pavel910 Dec 4, 2025
948dd37
fix: create PageListPresenter feature via DI
Pavel910 Dec 4, 2025
181b8c1
chore: add legacy apollo client abstraction
Pavel910 Dec 5, 2025
0ec695c
chore: improve app-aco features with DI
Pavel910 Dec 6, 2025
75a25a8
chore: improve app-aco features with DI (delete)
Pavel910 Dec 6, 2025
f45a3e4
chore: improve app-aco features with DI (getDescendantFolders)
Pavel910 Dec 6, 2025
4b29bfb
chore: improve app-aco features with DI (getFolder)
Pavel910 Dec 6, 2025
fe2021c
chore: improve app-aco features with DI (getFolderAncestors)
Pavel910 Dec 6, 2025
c06b9eb
chore: improve app-aco features with DI (getFolderExtensionsFields)
Pavel910 Dec 7, 2025
afb24de
chore: improve app-aco features with DI (loadFolderHierarchy)
Pavel910 Dec 7, 2025
f5cad00
chore: improve app-aco features with DI (getFolderLevelPermission)
Pavel910 Dec 7, 2025
9a19b5f
chore: improve app-aco features with DI (listFolders)
Pavel910 Dec 7, 2025
a7300ae
chore: improve app-aco features with DI (model provider)
Pavel910 Dec 7, 2025
b0b251d
chore: improve app-aco features with DI (listFoldersByParentIds)
Pavel910 Dec 7, 2025
1c2962a
chore: improve app-aco features with DI
Pavel910 Dec 7, 2025
2796baa
fix(app-aco): update tests
Pavel910 Dec 8, 2025
339a162
wip
brunozoric Dec 8, 2025
137eb58
test: resolve aliases in tests within src
Pavel910 Dec 8, 2025
c0de89d
fix: remove obsolete types
Pavel910 Dec 8, 2025
37c424a
feat(app-website-builder): enable field selection via di
brunozoric Dec 8, 2025
608d048
fix: after merge
brunozoric Dec 8, 2025
ffd21e9
chore: update to @webiny/di@0.2.2
Pavel910 Dec 8, 2025
23f3ef8
wip
brunozoric Dec 9, 2025
8c5a106
wip: gateway field selection
Pavel910 Dec 9, 2025
8695408
wip
brunozoric Dec 9, 2025
6dd5087
wip: update @webiny/di
Pavel910 Dec 9, 2025
dbb8dc1
wip
brunozoric Dec 9, 2025
f684002
wip
brunozoric Dec 10, 2025
602c196
wip
brunozoric Dec 10, 2025
4199d16
chore: eslint
brunozoric Dec 10, 2025
2b7d341
wip
brunozoric Dec 11, 2025
2c44224
chore: after next merge
brunozoric Dec 11, 2025
87428fd
fix: tests
brunozoric Dec 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
297 changes: 149 additions & 148 deletions ai-context/backend-developer-guide.md

Large diffs are not rendered by default.

102 changes: 95 additions & 7 deletions ai-context/core-features-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ This document provides the correct import paths and type definitions for commonl
## Features

### TenantContext
- **Import:** `import { TenantContext } from "@webiny/api-tenancy/features/TenantContext"`
- **Interface Type:** See `packages/api-tenancy/src/features/TenantContext/abstractions.ts`
- **Import:** `import { TenantContext } from "@webiny/api-core/features/TenantContext"`
- **Interface Type:** See `packages/api-core/src/features/TenantContext/abstractions.ts`
- **Usage:** Access current tenant information

### IdentityContext
- **Import:** `import { IdentityContext } from "@webiny/api-security/features/IdentityContext"`
- **Interface Type:** See `packages/api-security/src/features/IdentityContext/abstractions.ts`
- **Import:** `import { IdentityContext } from "@webiny/api-core/features/IdentityContext"`
- **Interface Type:** See `packages/api-core/src/features/IdentityContext/abstractions.ts`
- **Usage:** Access current user identity and permissions

### EventPublisher
- **Import:** `import { EventPublisher } from "@webiny/api-core"`
- **Import:** `import { EventPublisher } from "@webiny/api-core/features/EventPublisher"`
- **Interface Type:** See `packages/api-core/src/event-publisher/abstractions.ts`
- **Usage:** Publish domain events

### WcpContext
- **Import:** `import { WcpContext } from "@webiny/api-wcp/features/WcpContext"`
- **Interface Type:** See `packages/api-wcp/src/features/WcpContext/abstractions.ts`
- **Import:** `import { WcpContext } from "@webiny/api-core/features/WcpContext"`
- **Interface Type:** See `packages/api-core/src/features/WcpContext/abstractions.ts`
- **Usage:** WCP (Webiny Control Panel) integration for seats/tenants management

### GetSettings
Expand All @@ -43,6 +43,94 @@ This document provides the correct import paths and type definitions for commonl

---

## Headless CMS Features

### Content Entry Features

#### GetEntryById
- **Import:** `import { GetEntryByIdUseCase } from "@webiny/api-headless-cms/features/contentEntry/GetEntryById"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/GetEntryById/abstractions.ts`
- **Usage:** Fetch single entry by exact revision ID

#### GetEntry
- **Import:** `import { GetEntryUseCase } from "@webiny/api-headless-cms/features/contentEntry/GetEntry"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/GetEntry/abstractions.ts`
- **Usage:** Get single entry by query parameters (where + sort)

#### ListLatestEntries
- **Import:** `import { ListLatestEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/ListEntries/abstractions.ts`
- **Usage:** List latest entries (manage API)

#### ListPublishedEntries
- **Import:** `import { ListPublishedEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/ListEntries/abstractions.ts`
- **Usage:** List published entries (read API)

#### ListDeletedEntries
- **Import:** `import { ListDeletedEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/ListEntries/abstractions.ts`
- **Usage:** List deleted entries (manage API)

#### CreateEntry
- **Import:** `import { CreateEntryUseCase } from "@webiny/api-headless-cms/features/contentEntry/CreateEntry"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/CreateEntry/abstractions.ts`
- **Usage:** Create new content entry

#### UpdateEntry
- **Import:** `import { UpdateEntryUseCase } from "@webiny/api-headless-cms/features/contentEntry/UpdateEntry"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/UpdateEntry/abstractions.ts`
- **Usage:** Update existing content entry

#### DeleteEntry
- **Import:** `import { DeleteEntryUseCase } from "@webiny/api-headless-cms/features/contentEntry/DeleteEntry"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/DeleteEntry/abstractions.ts`
- **Usage:** Delete content entry

#### ListEntriesRepository
- **Import:** `import { ListEntriesRepository } from "@webiny/api-headless-cms/features/contentEntry/ListEntries"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentEntry/ListEntries/abstractions.ts`
- **Usage:** Repository for fetching entries from storage

### Content Model Features

#### GetModel
- **Import:** `import { GetModelUseCase } from "@webiny/api-headless-cms/features/contentModel/GetModel"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentModel/GetModel/abstractions.ts`
- **Usage:** Retrieve single model by ID with access control

#### ListModels
- **Import:** `import { ListModelsUseCase } from "@webiny/api-headless-cms/features/contentModel/ListModels"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentModel/ListModels/abstractions.ts`
- **Usage:** List all accessible content models

#### GetModelRepository
- **Import:** `import { GetModelRepository } from "@webiny/api-headless-cms/features/contentModel/GetModel"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentModel/GetModel/abstractions.ts`
- **Usage:** Fetch model from cache (plugin + DB models)

#### ListModelsRepository
- **Import:** `import { ListModelsRepository } from "@webiny/api-headless-cms/features/contentModel/ListModels"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentModel/ListModels/abstractions.ts`
- **Usage:** Fetch all models from cache

#### ModelsFetcher
- **Import:** `import { ModelsFetcher } from "@webiny/api-headless-cms/features/contentModel/shared"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentModel/shared/abstractions.ts`
- **Usage:** Centralized model fetching with caching and access control

#### ModelCache
- **Import:** `import { ModelCache } from "@webiny/api-headless-cms/features/contentModel/shared"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentModel/shared/abstractions.ts`
- **Usage:** Cache for content models

#### PluginModelsProvider
- **Import:** `import { PluginModelsProvider } from "@webiny/api-headless-cms/features/contentModel/shared"`
- **Interface Type:** See `packages/api-headless-cms/src/features/contentModel/shared/abstractions.ts`
- **Usage:** Access to plugin-defined models

---

## Notes

- Always import abstractions from the feature path (not from package root)
Expand Down
47 changes: 46 additions & 1 deletion ai-context/di-container.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,61 @@
```ts
// Abstraction.ts
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { Constructor, Dependencies, GetInterface, MapDependencies } from "./types.js";
import { Metadata } from "./Metadata.js";

type DropLast<T> = T extends [...infer P, any] ? [...P] : never;

type Implementation<A extends Abstraction<any>, I extends Constructor> = I & {
__abstraction: A;
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export class Abstraction<T> {
public readonly token: symbol;

constructor(name: string) {
this.token = Symbol.for(name);
this.token = Symbol(name);
}

toString(): string {
return this.token.description || this.token.toString();
}

createImplementation<I extends Constructor<GetInterface<this>>>(params: {
implementation: I;
dependencies: Dependencies<I>;
}): Implementation<this, I> {
const metadata = new Metadata(params.implementation);
metadata.setAbstraction(this);
metadata.setDependencies(params.dependencies);

return params.implementation as Implementation<this, I>;
}

createDecorator<I extends Constructor>(params: {
decorator: I;
dependencies: MapDependencies<DropLast<ConstructorParameters<I>>>;
}): Implementation<this, I> {
const metadata = new Metadata(params.decorator);
metadata.setAbstraction(this);
metadata.setDependencies(params.dependencies as any);
metadata.setAttribute("IS_DECORATOR", true);

return params.decorator as Implementation<this, I>;
}

createComposite<I extends Constructor<GetInterface<this>>>(params: {
implementation: I;
dependencies: Dependencies<I>;
}): Implementation<this, I> {
const metadata = new Metadata(params.implementation);
metadata.setAbstraction(this);
metadata.setDependencies(params.dependencies);
metadata.setAttribute("IS_COMPOSITE", true);

return params.implementation as Implementation<this, I>;
}
}
```

Expand Down
32 changes: 11 additions & 21 deletions ai-context/event-publisher.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class EventPublisher implements Abstraction.Interface {
```ts
// __tests__/EventPublisher.test.ts
import { describe, it, expect, beforeEach } from "vitest";
import { Container, Abstraction, createImplementation } from "@webiny/di";
import { Container, Abstraction } from "@webiny/di";
import { EventPublisherFeature } from "../feature";
import { EventPublisher as EventPublisherAbstraction } from "../abstractions";
import type { DomainEvent, IEventHandler } from "../abstractions";
Expand Down Expand Up @@ -123,8 +123,7 @@ class SendNotificationHandler implements IEventHandler<PagePublishedEvent> {
}
}

export const SendNotificationHandlerImpl = createImplementation({
abstraction: PagePublishedHandler,
export const SendNotificationHandlerImpl = PagePublishedHandler.createImplementation({
implementation: SendNotificationHandler,
dependencies: []
});
Expand All @@ -138,8 +137,7 @@ class UpdateSearchIndexHandler implements IEventHandler<PagePublishedEvent> {
}
}

export const UpdateSearchIndexHandlerImpl = createImplementation({
abstraction: PagePublishedHandler,
export const UpdateSearchIndexHandlerImpl = PagePublishedHandler.createImplementation({
implementation: UpdateSearchIndexHandler,
dependencies: []
});
Expand All @@ -155,8 +153,7 @@ class LogPagePublishedHandler implements IEventHandler<PagePublishedEvent> {
}
}

export const LogPagePublishedHandlerImpl = createImplementation({
abstraction: PagePublishedHandler,
export const LogPagePublishedHandlerImpl = PagePublishedHandler.createImplementation({
implementation: LogPagePublishedHandler,
dependencies: []
});
Expand All @@ -174,8 +171,7 @@ class SendWelcomeEmailHandler implements IEventHandler<UserRegisteredEvent> {
}
}

export const SendWelcomeEmailHandlerImpl = createImplementation({
abstraction: UserRegisteredHandler,
export const SendWelcomeEmailHandlerImpl = UserRegisteredHandler.createImplementation({
implementation: SendWelcomeEmailHandler,
dependencies: []
});
Expand All @@ -189,8 +185,7 @@ class CreateUserProfileHandler implements IEventHandler<UserRegisteredEvent> {
}
}

export const CreateUserProfileHandlerImpl = createImplementation({
abstraction: UserRegisteredHandler,
export const CreateUserProfileHandlerImpl = UserRegisteredHandler.createImplementation({
implementation: CreateUserProfileHandler,
dependencies: []
});
Expand All @@ -204,8 +199,7 @@ class TrackUserRegistrationHandler implements IEventHandler<UserRegisteredEvent>
}
}

export const TrackUserRegistrationHandlerImpl = createImplementation({
abstraction: UserRegisteredHandler,
export const TrackUserRegistrationHandlerImpl = UserRegisteredHandler.createImplementation({
implementation: TrackUserRegistrationHandler,
dependencies: []
});
Expand All @@ -223,8 +217,7 @@ class ProcessPaymentHandler implements IEventHandler<OrderPlacedEvent> {
}
}

export const ProcessPaymentHandlerImpl = createImplementation({
abstraction: OrderPlacedHandler,
export const ProcessPaymentHandlerImpl = OrderPlacedHandler.createImplementation({
implementation: ProcessPaymentHandler,
dependencies: []
});
Expand All @@ -238,8 +231,7 @@ class SendOrderConfirmationHandler implements IEventHandler<OrderPlacedEvent> {
}
}

export const SendOrderConfirmationHandlerImpl = createImplementation({
abstraction: OrderPlacedHandler,
export const SendOrderConfirmationHandlerImpl = OrderPlacedHandler.createImplementation({
implementation: SendOrderConfirmationHandler,
dependencies: []
});
Expand All @@ -253,8 +245,7 @@ class UpdateInventoryHandler implements IEventHandler<OrderPlacedEvent> {
}
}

export const UpdateInventoryHandlerImpl = createImplementation({
abstraction: OrderPlacedHandler,
export const UpdateInventoryHandlerImpl = OrderPlacedHandler.createImplementation({
implementation: UpdateInventoryHandler,
dependencies: []
});
Expand Down Expand Up @@ -541,8 +532,7 @@ describe("EventPublisher", () => {
}
}

const FailingHandlerImpl = createImplementation({
abstraction: PagePublishedHandler,
const FailingHandlerImpl = PagePublishedHandler.createImplementation({
implementation: FailingHandler,
dependencies: []
});
Expand Down
16 changes: 4 additions & 12 deletions ai-context/simple-models.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
```ts
// Page/PageModelBuilder.ts
import { ModelBuilder as Builder } from "~/models/ModelBuilder.js";
import { createImplementation } from "@webiny/di";
import { PageSchema, PageModelBuilder as BuilderAbstraction, type IPage } from "./abstractions";

class PageModelBuilderImpl implements BuilderAbstraction.Interface {
Expand All @@ -15,16 +14,14 @@ class PageModelBuilderImpl implements BuilderAbstraction.Interface {
}
}

export const PageModelBuilder = createImplementation({
abstraction: BuilderAbstraction,
export const PageModelBuilder = BuilderAbstraction.createImplementation({
implementation: PageModelBuilderImpl,
dependencies: []
});
```

```ts
// Page/PageModelFactory.ts
import { createImplementation } from "@webiny/di";
import {
PageModelFactory as FactoryAbstraction,
PageModelBuilder,
Expand All @@ -49,16 +46,14 @@ class PageModelFactoryImpl implements FactoryAbstraction.Interface {
}
}

export const PageModelFactory = createImplementation({
abstraction: FactoryAbstraction,
export const PageModelFactory = FactoryAbstraction.createImplementation({
implementation: PageModelFactoryImpl,
dependencies: [PageModelBuilder]
});
```

```ts
// Page/__tests__/PageModelBuilderDecorator.ts
import { createDecorator } from "@webiny/di";
import { PageModelBuilder as BuilderAbstraction } from "../abstractions";

class PageModelBuilderDecoratorImpl implements BuilderAbstraction.Interface {
Expand All @@ -81,8 +76,7 @@ class PageModelBuilderDecoratorImpl implements BuilderAbstraction.Interface {
}
}

export const PageModelBuilderDecorator = createDecorator({
abstraction: BuilderAbstraction,
export const PageModelBuilderDecorator = BuilderAbstraction.createDecorator({
decorator: PageModelBuilderDecoratorImpl,
dependencies: []
});
Expand All @@ -100,7 +94,6 @@ declare module "~/simple/Page/abstractions.js" {

```ts
// Page/__tests__/PageModelBuilderDecorator2.ts
import { createDecorator } from "@webiny/di";
import { PageModelBuilder as BuilderAbstraction } from "../abstractions";

class PageModelBuilderDecorator2Impl implements BuilderAbstraction.Interface {
Expand All @@ -117,8 +110,7 @@ class PageModelBuilderDecorator2Impl implements BuilderAbstraction.Interface {
}
}

export const PageModelBuilderDecorator2 = createDecorator({
abstraction: BuilderAbstraction,
export const PageModelBuilderDecorator2 = BuilderAbstraction.createDecorator({
decorator: PageModelBuilderDecorator2Impl,
dependencies: []
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
"packageManager": "yarn@4.10.2",
"dependencies": {
"@types/hoist-non-react-statics": "^3.3.7",
"@webiny/di": "^0.2.1"
"@webiny/di": "^0.2.3"
},
"engines": {
"node": ">=22.0.0"
Expand Down
7 changes: 7 additions & 0 deletions packages/admin-ui/src/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ const defineColumns = <T,>(
...firstColumn,
accessorKey: firstColumn.id as string,
header: props => {
if (!props) {
return null;
}

return (
<div className={"flex items-center gap-xl"}>
<CheckboxPrimitive
Expand All @@ -223,6 +227,9 @@ const defineColumns = <T,>(
);
},
cell: props => {
if (!props) {
return null;
}
return (
<div className={"flex items-center gap-xl"}>
<CheckboxPrimitive
Expand Down
Loading