saleor-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSaleor App
Saleor应用
Guide for building apps that extend Saleor via webhooks and the GraphQL API.
Framework-agnostic protocol documentation with Next.js examples using .
@saleor/app-sdk本指南介绍如何通过webhooks和GraphQL API扩展Saleor应用。提供与框架无关的协议文档,并附带使用的Next.js示例。
@saleor/app-sdkWhen to Apply
适用场景
- Defining an app manifest or registering webhooks
- Handling async/sync webhook events from Saleor
- Authenticating requests (registration handshake, JWT, signature verification)
- Storing app settings in Saleor metadata
- Building Dashboard UI inside the iframe
- Making GraphQL calls with app tokens
- Debugging webhook failures, auth errors, or permission issues
- Deciding who can view the app and what they should see (user vs app scope)
- 定义应用清单或注册webhooks
- 处理来自Saleor的异步/同步webhook事件
- 处理请求认证(注册握手、JWT、签名验证)
- 在Saleor元数据中存储应用设置
- 在iframe内构建Dashboard UI
- 使用应用令牌发起GraphQL调用
- 调试webhook失败、认证错误或权限问题
- 确定应用的可见范围及展示内容(用户范围vs应用范围)
Rule Categories by Priority
按优先级划分的规则类别
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Protocol | CRITICAL | |
| 2 | Permissions | CRITICAL | |
| 3 | Webhooks | HIGH | |
| 4 | Data & Settings | HIGH | |
| 5 | Dashboard UI | MEDIUM | |
| 6 | Development | MEDIUM | |
| 优先级 | 类别 | 影响程度 | 前缀 |
|---|---|---|---|
| 1 | 协议 | 关键 | |
| 2 | 权限 | 关键 | |
| 3 | Webhooks | 高 | |
| 4 | 数据与设置 | 高 | |
| 5 | Dashboard UI | 中 | |
| 6 | 开发 | 中 | |
Quick Reference
快速参考
1. Protocol (CRITICAL)
1. 协议(关键)
- — App manifest, required endpoints, permissions, extensions
protocol-manifest - — Registration handshake, APL, token scopes, JWT/signature verification
protocol-auth
- — 应用清单、必填端点、权限、扩展
protocol-manifest - — 注册握手、APL、令牌范围、JWT/签名验证
protocol-auth
2. Permissions (CRITICAL)
2. 权限(关键)
- — User scope vs app scope, client-side permission checks, JWT middleware patterns
permissions-access-scopes
- — 用户范围vs应用范围、客户端权限检查、JWT中间件模式
permissions-access-scopes
3. Webhooks (HIGH)
3. Webhooks(高)
- — Async event handling, payload typing, retry policy, signature verification
webhook-async - — Sync event handling, response schemas, performance constraints
webhook-sync - — Receiving webhooks from external services, multi-tenant routing
webhook-external
- — 异步事件处理、负载类型定义、重试策略、签名验证
webhook-async - — 同步事件处理、响应 schema、性能约束
webhook-sync - — 接收来自外部服务的webhooks、多租户路由
webhook-external
4. Data & Settings (HIGH)
4. 数据与设置(高)
- — GraphQL from apps: client setup, auth headers, codegen, app vs user tokens
data-graphql - — MetadataManager, EncryptedMetadataManager, domain-scoped persistence
data-settings
- — 应用中的GraphQL:客户端设置、认证头、代码生成、应用令牌vs用户令牌
data-graphql - — MetadataManager、EncryptedMetadataManager、域范围持久化
data-settings
5. Dashboard UI (MEDIUM)
5. Dashboard UI(中)
- — AppBridge iframe protocol, actions, events, theme/locale sync
dashboard-appbridge
- — AppBridge iframe协议、操作、事件、主题/区域设置同步
dashboard-appbridge
6. Development (MEDIUM)
6. 开发(中)
- — Common errors, webhook dry runs, tunnel setup, debugging checklist
dev-debug
- — 常见错误、webhook试运行、隧道设置、调试清单
dev-debug