saleor-app

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Saleor 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应用。提供与框架无关的协议文档,并附带使用
@saleor/app-sdk
的Next.js示例。

When 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

按优先级划分的规则类别

PriorityCategoryImpactPrefix
1ProtocolCRITICAL
protocol-
2PermissionsCRITICAL
permissions-
3WebhooksHIGH
webhook-
4Data & SettingsHIGH
data-
5Dashboard UIMEDIUM
dashboard-
6DevelopmentMEDIUM
dev-
优先级类别影响程度前缀
1协议关键
protocol-
2权限关键
permissions-
3Webhooks
webhook-
4数据与设置
data-
5Dashboard UI
dashboard-
6开发
dev-

Quick Reference

快速参考

1. Protocol (CRITICAL)

1. 协议(关键)

  • protocol-manifest
    — App manifest, required endpoints, permissions, extensions
  • protocol-auth
    — Registration handshake, APL, token scopes, JWT/signature verification
  • protocol-manifest
    — 应用清单、必填端点、权限、扩展
  • protocol-auth
    — 注册握手、APL、令牌范围、JWT/签名验证

2. Permissions (CRITICAL)

2. 权限(关键)

  • permissions-access-scopes
    — User scope vs app scope, client-side permission checks, JWT middleware patterns
  • permissions-access-scopes
    — 用户范围vs应用范围、客户端权限检查、JWT中间件模式

3. Webhooks (HIGH)

3. Webhooks(高)

  • webhook-async
    — Async event handling, payload typing, retry policy, signature verification
  • webhook-sync
    — Sync event handling, response schemas, performance constraints
  • webhook-external
    — Receiving webhooks from external services, multi-tenant routing
  • webhook-async
    — 异步事件处理、负载类型定义、重试策略、签名验证
  • webhook-sync
    — 同步事件处理、响应 schema、性能约束
  • webhook-external
    — 接收来自外部服务的webhooks、多租户路由

4. Data & Settings (HIGH)

4. 数据与设置(高)

  • data-graphql
    — GraphQL from apps: client setup, auth headers, codegen, app vs user tokens
  • data-settings
    — MetadataManager, EncryptedMetadataManager, domain-scoped persistence
  • data-graphql
    — 应用中的GraphQL:客户端设置、认证头、代码生成、应用令牌vs用户令牌
  • data-settings
    — MetadataManager、EncryptedMetadataManager、域范围持久化

5. Dashboard UI (MEDIUM)

5. Dashboard UI(中)

  • dashboard-appbridge
    — AppBridge iframe protocol, actions, events, theme/locale sync
  • dashboard-appbridge
    — AppBridge iframe协议、操作、事件、主题/区域设置同步

6. Development (MEDIUM)

6. 开发(中)

  • dev-debug
    — Common errors, webhook dry runs, tunnel setup, debugging checklist
  • dev-debug
    — 常见错误、webhook试运行、隧道设置、调试清单