Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b3c0e88
chore: revises docs
lasomethingsomething Mar 16, 2026
30b83ef
Update get.md
lasomethingsomething Mar 16, 2026
0488e2f
Update index.md
lasomethingsomething Mar 16, 2026
0fa4100
Update index.md
lasomethingsomething Mar 16, 2026
dfe4def
Update index.md
lasomethingsomething Mar 16, 2026
9a2abdc
Update index.md
lasomethingsomething Mar 16, 2026
f7b5704
Update settingsItem.md
lasomethingsomething Mar 16, 2026
f0e9e2f
Update sidebars.md
lasomethingsomething Mar 16, 2026
82e1611
Update index.md
lasomethingsomething Mar 16, 2026
44dd652
Update index.md
lasomethingsomething Mar 16, 2026
ded179b
Update index.md
lasomethingsomething Mar 16, 2026
2b6c948
Update registerCmsBlock.md
lasomethingsomething Mar 16, 2026
3bd481e
Update index.md
lasomethingsomething Mar 16, 2026
ab2cc5f
Update registerCmsBlock.md
lasomethingsomething Mar 16, 2026
bf68f2a
Update registerCmsElement.md
lasomethingsomething Mar 16, 2026
650cc4d
Update registerCmsBlock.md
lasomethingsomething Mar 16, 2026
61b679a
Update context.md
lasomethingsomething Mar 16, 2026
54282bb
Update index.md
lasomethingsomething Mar 16, 2026
13243c3
Update index.md
lasomethingsomething Mar 16, 2026
a3538a3
Update index.md
lasomethingsomething Mar 16, 2026
14dd9b2
Update location.md
lasomethingsomething Mar 16, 2026
b939706
Merge branch 'main' into docs-changes-mar12
lasomethingsomething Mar 17, 2026
5b4885b
Update migrating-admin-plugins.md
lasomethingsomething Mar 17, 2026
16557d0
Update migrating-admin-plugins.md
lasomethingsomething Mar 19, 2026
33b87cf
Update index.md
lasomethingsomething Mar 19, 2026
bb771a8
Update index.md
lasomethingsomething Mar 19, 2026
be116ed
Update index.md
lasomethingsomething Mar 19, 2026
2e21e15
fixes api ref
lasomethingsomething Mar 19, 2026
78a819e
docs: apply code suggestions for api-reference and concepts
gweiermann Mar 23, 2026
103e6d5
docs: revise installation guides and index page
gweiermann Mar 23, 2026
6e4fe12
docs: demote Usage/Parameters/Return/Example headings to h4
gweiermann Mar 23, 2026
43ac5c3
docs: add context descriptions, fix develop index, improve toast/noti…
gweiermann Mar 23, 2026
321a294
docs: fix broken link in translations.md
gweiermann Mar 23, 2026
b1ee186
docs: address review feedback on previous changes
gweiermann Mar 23, 2026
259a932
docs: add getRepository docs, fix window import, add location availab…
gweiermann Mar 23, 2026
01928f3
docs: resolve discussions and open questions from PR review
gweiermann Mar 23, 2026
5ca87a1
docs: use info blocks for Shopware below 6.7 notes in plugin guide
gweiermann Mar 23, 2026
1ee53bd
docs: flatten context.md hierarchy, fix develop nav, update resolved.md
gweiermann Mar 23, 2026
aca8098
docs: refine base-options intro example and use warning block
gweiermann Mar 23, 2026
4e9d1a3
docs: add npm/cdn import tabs to all API reference pages, improve app…
gweiermann Mar 23, 2026
72af6f8
docs: restructure landing pages, improve app installation guide
gweiermann Mar 23, 2026
183e3da
docs: include app name in manifest sync warning
gweiermann Mar 23, 2026
9356698
docs: show configureAppServer config, explicit manifest path, restore…
gweiermann Mar 23, 2026
49a7a2f
docs: update toast documentation and fix header casing in mainModule …
gweiermann Apr 1, 2026
741c5de
docs: move Notification and Toast pages into ui
gweiermann Apr 1, 2026
82fc7e3
docs: remove section on using UI components from the Administration U…
gweiermann Apr 1, 2026
9fff1cf
docs: enhance API documentation for base options, useRepository, useS…
gweiermann Apr 1, 2026
a519dab
docs: remove cdn alternative and only mention it in "without npm"
gweiermann Apr 1, 2026
8d36b1a
docs: remove getRepository documentation and update references to use…
gweiermann Apr 1, 2026
4027a96
docs: fix inconsistencies
gweiermann Apr 2, 2026
e4be5dc
docs: remove CDN usage section and streamline SDK usage instructions
gweiermann Apr 2, 2026
aab6a0a
docs: update installation guide for Meteor Admin SDK, add Vite setup …
gweiermann Apr 2, 2026
225ab08
docs: update installation instructions for Meteor Admin SDK, add Vue …
gweiermann Apr 2, 2026
933cf98
Merge remote-tracking branch 'origin/main' into pr-1075
gweiermann Apr 2, 2026
1b20a85
docs: update code examples
davidtraum Apr 10, 2026
9bc7c9b
chore: doc updates
davidtraum Apr 14, 2026
fd09877
chore: remove instruction
davidtraum Apr 14, 2026
b2b0587
chore: update installation-apps
davidtraum Apr 14, 2026
31fd66b
chore: add description for clone behavior, remove semicolons, change …
davidtraum Apr 15, 2026
b31316f
chore: add SaaS mention to app advantages
davidtraum Apr 15, 2026
928651d
chore: Add title prop to notification
davidtraum Apr 16, 2026
42f9d59
Merge pull request #1109 from shopware/docs-changes-apr10
davidtraum Apr 21, 2026
f337219
Merge branch 'main' into docs-changes-mar12
davidtraum Apr 21, 2026
501d16d
Merge branch 'main' into docs-changes-mar12
gweiermann Apr 21, 2026
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
3 changes: 3 additions & 0 deletions docs/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Agent Guidelines

When renaming or moving documentation files under `docs/admin-sdk/`, add redirect entries to `docs/admin-sdk/docs.yml` mapping old `.html` paths to new ones so the developer portal preserves external links.
2 changes: 1 addition & 1 deletion docs/admin-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# admin-sdk-docs
# Changelog

## 1.0.0

Expand Down
31 changes: 0 additions & 31 deletions docs/admin-sdk/README.md

This file was deleted.

90 changes: 80 additions & 10 deletions docs/admin-sdk/api-reference/base-options.md
Comment thread
gweiermann marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,19 +1,89 @@
# Base options
There are options that exist for every message type in the SDK. You'll find a list with all of them below.
# Base Options

| Name | Required | Default | Availability | Description |
| :----------- | :------- | :------------- | :------------------ | :---------------------------------------------------------------------------------------------- |
| `privileges` | false | | >= Shopware 6.6.3.0 | The privileges that will be checked before executing the message in the Shopware Administration |
Base options are shared configuration options that can be passed to SDK methods which accept a single payload object. They are provided as additional properties alongside the method's own parameters.

## Example privileges
```typescript
import * as sw from '@shopware-ag/meteor-admin-sdk';
This applies to APIs such as `notification.dispatch()`, `toast.dispatch()`, many `ui.*` methods, `context.*`, `data.get()`, and `data.update()`.

// This notification will only be displayed if the user has `product:read` permissions.
sw.notification.dispatch({
Higher-level data helpers such as `data.repository.*` and `data.subscribe()` currently use narrower method signatures and do not expose base options on their public API.

More options may be added in the future. Currently, the following option is available:

| Name | Required | Default | Availability | Description |
| :----------- | :------- | :------ | :------------------ | :----------------------------------------------------------------------------------------- |
| `privileges` | false | | >= Shopware 6.6.3.0 | Check the current user's privileges before executing the action. See [Privileges](#privileges). |

#### Usage

In this example, the base options are passed on the same object as the method-specific fields:

```ts
import { notification } from '@shopware-ag/meteor-admin-sdk';

notification.dispatch({
title: 'Product report ready',
message: 'Your product report is ready',
/* ... base options ... */
});
```

## Privileges

The `privileges` option accepts an array of privilege strings. When provided, the SDK checks whether the current Administration user holds all listed privileges before executing the action. If any privilege is missing, the action is silently skipped.

:::warning Not a security feature
Privilege checks happen client-side in the browser. They prevent UI elements from appearing for users who lack the required permissions, but they do not enforce access control on the server. Server-side authorization is still required for any sensitive operation.
:::

#### Privilege string format

Each privilege string follows the pattern `action:entity`:

```
'product:read'
'order:update'
'category:create'
'customer:delete'
```

Available actions:

| Action | Description |
| :----------- | :----------------------------------- |
| `read` | Read access to the entity |
| `create` | Permission to create new entities |
| `update` | Permission to modify existing entities |
| `delete` | Permission to remove entities |
| `additional` | Custom additional privileges |

#### Usage

Pass the `privileges` array to any SDK method that supports base options:

```ts
import { notification, ui } from '@shopware-ag/meteor-admin-sdk';

notification.dispatch({
title: 'Product report ready',
message: 'Your product report is ready',
Comment thread
davidtraum marked this conversation as resolved.
privileges: [
'product:read',
],
});

ui.actionButton.add({
name: 'generate-report',
entity: 'product',
view: 'detail',
label: 'Generate Report',
privileges: [
'product:read',
'order:read',
],
});
```

#### Parameters

| Name | Type | Required | Description |
| :----------- | :--------- | :------- | :-------------------------------------------------------------------------- |
| `privileges` | `string[]` | false | Array of `action:entity` strings. All must match for the action to execute. |
12 changes: 11 additions & 1 deletion docs/admin-sdk/api-reference/cms/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
---
title: "CMS"
title: "Extending the CMS"
nav:
position: 300
---


# Extending the CMS

These CMS extension features allow extensions to register new CMS blocks and CMS elements for use in the Shopware Shopping Experiences editor.

Features in this section include:

- [Register CMS Block](./registerCmsBlock.md): Add custom CMS blocks that define layout structures in the Shopping Experiences editor.
- [Register CMS Element](./registerCmsElement.md): Create custom CMS elements that render content or functionality inside CMS blocks.
21 changes: 18 additions & 3 deletions docs/admin-sdk/api-reference/cms/registerCmsBlock.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: "Register CMS block"
sidebar_position: 20
---


# Register CMS block

> Available since Shopware v6.6.1.0
Expand All @@ -6,8 +12,13 @@ With `cms.registerCmsBlock` you can register CMS blocks to use in the Shopping E

![Register a CMS block in your Shopping Experiences Module via App](../assets/register-cms-block-example.png)

#### Usage:
## registerCmsBlock()

#### Usage

```ts
import { cms } from '@shopware-ag/meteor-admin-sdk';

cms.registerCmsBlock({
name: 'dailymotion-dual-block',
label: 'ex.cms.dailymotion.block.label',
Expand All @@ -25,6 +36,7 @@ cms.registerCmsBlock({
```

#### Parameters

| Name | Required | Description |
| :------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `name` | true | The name of the cms block - Should have vendor prefix. It can be used in the Storefront for overriding the default layout. |
Expand All @@ -34,12 +46,15 @@ cms.registerCmsBlock({
| `previewImage` | false | The URL of the preview image. This image is shown in the Shopping Experiences Module when selecting the CMS block. |
| `slotLayout` | false | The layout of the slots. This is used to define the grid layout of the slots. You can use the [CSS grid shorthand syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/grid) here. |

#### Return value

Returns a promise without data.

## Storefront usage

The CMS block will render automatically in the Storefront without any additional work. It renders the block as a CSS grid with the slots as grid items and the grid shorthand syntax you provided in the `slotLayout` property.

If you want you can override the default layout by creating a new template file in your app. The file should be named `cms-block-app-renderer.html.twig` and should be placed in the `<your-app>/Resources/views/storefront/block` directory of your app folder. More details on how to customize the Storefront in your App can be found in this documentation: https://developer.shopware.com/docs/guides/plugins/apps/storefront/customize-templates.html
If you want you can override the default layout by creating a new template file in your app. The file should be named `cms-block-app-renderer.html.twig` and should be placed in the `<your-app>/Resources/views/storefront/block` directory of your app folder. More details on how to customize the Storefront in your App can be found in the [Customize Templates](https://developer.shopware.com/docs/guides/plugins/apps/storefront/customize-templates.html) guide.

Inside this file you need to define the block layout and the slots. The block which needs to be created follows this naming pattern: `block_app_renderer_${yourBlockName}`. The `${yourBlockName}` is the name of the block you registered with `cms.registerCmsBlock` except that you need to replace the hyphens with underscores.

Expand All @@ -65,4 +80,4 @@ Example:
{% endfor %}
</div>
{% endblock %}
```
```
20 changes: 18 additions & 2 deletions docs/admin-sdk/api-reference/cms/registerCmsElement.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Register CMS element
---
title: "Register CMS Element"
sidebar_position: 30
---


# Register CMS Element

> Available since Shopware v6.4.17.0

Expand All @@ -7,8 +13,13 @@ More information on how to develop CMS elements can be found in these guides for

![Register a CMS element in your Shopping Experiences Module via App](../assets/register-cms-element-example.png)

#### Usage:
## registerCmsElement()

#### Usage

```ts
import { cms } from '@shopware-ag/meteor-admin-sdk';

void cms.registerCmsElement({
name: 'dailymotionElement',
label: 'Dailymotion Video',
Expand All @@ -22,8 +33,13 @@ void cms.registerCmsElement({
```

#### Parameters

| Name | Required | Description |
|:----------------|:---------|:---------------------------------------------------------------------------------------------------------|
| `name` | true | The name of the cms element, which will also be used to generate locationIds - Should have vendor prefix |
| `label` | true | The label, which is visible when selecting the cms element - Use snippet keys here! |
| `defaultConfig` | true | Object containing the defaultConfig; same like in plugin development. |

#### Return value

Returns a promise without data.
Empty file.
12 changes: 12 additions & 0 deletions docs/admin-sdk/api-reference/composables/index.md
Comment thread
gweiermann marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ title: "Vue Composables"
nav:
position: 400
---


# Vue Composables

Composable APIs provide reusable Vue Composables for working with the Shopware Administration data layer and shared state inside extensions.

They simplify common tasks such as accessing repositories or sharing reactive state between different parts of an extension.

Currently, the SDK exposes:

- [useRepository](./useRepository.md): Create a reactive repository instance for a given entity.
- [useSharedState](./useSharedState.md): Share reactive state between different extension components.
72 changes: 23 additions & 49 deletions docs/admin-sdk/api-reference/composables/useRepository.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,45 @@
---
title: "useRepository"
nav:
position: 20
---

# useRepository

The `composables.useRepository` function is a reactive wrapper around the `getRepository` function. It creates a repository instance that automatically updates when its dependencies change. This is particularly useful when you need a repository that responds to reactive data changes in your Vue components.
The `composables.useRepository` function creates a reactive repository instance that automatically updates when its dependencies change. This is particularly useful when you need a repository that responds to reactive data changes in your Vue components.

`useRepository` accepts reactive references (refs) or values as parameters and returns a computed repository that updates when those parameters change.

Unlike `getRepository`, which returns a static repository instance, `useRepository` accepts reactive references (refs) or values as parameters and returns a computed repository that updates when those parameters change.
## Usage

#### Usage:
```ts
// Inside a Vue component setup
import { ref } from 'vue';
import { composables } from '@shopware-ag/meteor-admin-sdk';
import { ref } from "vue";
import { composables } from "@shopware-ag/meteor-admin-sdk";
const { useRepository } = composables;

// With a reactive entity name
const entityName = ref('product');
const entityName = ref("product");
const productRepository = useRepository(entityName);

// The repository updates automatically if entityName changes
entityName.value = 'category';
entityName.value = "category";
// Now productRepository.value references a category repository

// With a reactive repository factory
const myFactory = ref(customRepositoryFactory);
const repository = useRepository('product', myFactory);
// With a custom repository factory
const repository = useRepository("product", myRepositoryFactory);

// Search for products
const products = await repository.value.search(criteria);
```

## Dynamic Repository Creation

The main advantage of `useRepository` is that it automatically recreates the repository when its inputs change:

1. If the entity name changes, a new repository for the different entity type is created
2. If the repository factory changes, a new repository using the different factory is created

This reactivity is implemented using Vue's computed properties, ensuring that the repository is only recreated when necessary.

#### Parameters
| Name | Required | Description |
|:--------------------|:---------|:----------------------------------------------------------------|
| `entityNameRef` | true | The name of the entity type as a ref or static value |
| `repositoryFactory` | false | Optional repository factory as a ref or static value |
## Parameters

#### Return Value
A computed ref containing a repository that updates when its dependencies change. The repository provides the same methods as described in the `getRepository` documentation, but you need to access them through the `.value` property of the computed ref.
| Name | Required | Description |
| :------------------ | :------- | :--------------------------------------------------- |
| `entityNameRef` | true | The name of the entity type as a ref or static value |
| `repositoryFactory` | false | Optional repository factory as a ref or static value |

## Relationship with getRepository

Under the hood, `useRepository` calls `getRepository` whenever its dependencies change. This means:

- It uses the same repository factory resolution logic as `getRepository`
- It provides the same repository interface and functionality
- It adds reactivity, automatically updating when inputs change

```ts
// Example implementation (simplified)
import { computed } from 'vue';
import { getRepository } from './getRepository';

export function useRepository(entityNameRef, factoryRef) {
return computed(() => {
const entityName = unref(entityNameRef);
const factory = unref(factoryRef);

return getRepository(entityName, factory);
});
}
```
## Return value

This pattern follows Vue's composition API conventions, where composables prefixed with "use" typically provide reactive wrappers around non-reactive functionality.
A computed ref containing a repository that updates when its dependencies change. Access the repository methods through the `.value` property of the computed ref.
Loading
Loading