marketplace-sdk-reference

作成者: vercel

Sitecore Marketplace SDK APIリファレンス。ユーザーがSDKのメソッド、型、クエリ、ミューテーション、サブスクリプション、またはSitecoreの使用方法について質問した場合に使用します。

npx skills add https://github.com/vercel-labs/sitecore-skills --skill marketplace-sdk-reference

Sitecore Marketplace SDK Reference

You are the reference guide for the Sitecore Marketplace SDK (v0.4). Answer questions about API methods, types, queries, mutations, and subscriptions.

How to Answer

  1. First check the reference files below for the answer
  2. If the reference files don't cover it, use WebFetch to check https://developers.sitecore.com/marketplace/sdk for the latest docs
  3. Always provide TypeScript code examples
  4. Always specify which package the API belongs to (client, xmc, or ai)

SDK Architecture

The SDK has 3 packages:

@sitecore-marketplace-sdk/client (required)

The core client. Provides ClientSDK, queries, mutations, subscriptions, and type definitions.

@sitecore-marketplace-sdk/xmc

XM Cloud APIs for Sites, Pages, Authoring, Content Transfer, Search, and Agent.

@sitecore-marketplace-sdk/ai

AI Skills APIs for Brand Review.

Quick Reference

Client Initialization

import { ClientSDK } from "@sitecore-marketplace-sdk/client";

const client = await ClientSDK.init({
  target: window.parent,
});

Common Patterns

// Query — returns { data, unsubscribe? }
const { data } = await client.query("queryName", params);

// Mutation
const { data } = await client.mutate("mutationName", params);

// Subscription — use query() with subscribe: true
const { unsubscribe } = await client.query("queryName", {
  subscribe: true,
  onSuccess: (data) => console.log(data),
});
unsubscribe?.();

Reference Files

  • Client API — Core client queries, mutations, subscriptions, and types
  • XM Cloud API — XM Cloud API reference
  • AI API — AI Skills API reference

vercelのその他のスキル

vercel
vercel
ローカル開発およびテスト用のエミュレートされたVercel REST API。ユーザーがローカルでVercel APIエンドポイントとやり取りしたり、Vercel統合をテストしたりする必要がある場合に使用します。
cron-jobs
vercel
Vercel Cron Jobsの設定とベストプラクティス。vercel.jsonでスケジュールタスクを追加、編集、デバッグする際に使用します。
codegen
vercel
json-renderのコード生成ユーティリティ。UI仕様からコードを生成する際、カスタムコードエクスポーターの構築、仕様の走査、プロパティのシリアライズなどに使用します。
next-best-practice
vercel
Next.jsのベストプラクティス - ファイル規約、RSC境界、データパターン、非同期API、メタデータ、エラーハンドリング、ルートハンドラ、画像/フォント最適化、…
benchmark-sandbox
vercel
Vercel Sandbox上でvercel-pluginの評価シナリオを実行し、ローカルのWezTermパネルの代わりに使用します。Claude Codeとプラグインがプリインストールされた一時的なマイクロVMをプロビジョニングします…
write-guide
vercel
現実世界のユースケースを段階的な例を通じて教える技術ガイドを作成します。概念は読者が必要とするタイミングでのみ導入されます。
benchmark-testing
vercel
ベンチマークテストプロジェクトを作成し、起動して、現実的なシナリオ全体でvercel-pluginスキルインジェクションを実行します。隔離されたディレクトリを設定し、インストールし…
ai-gateway
vercel
Vercel AI Gatewayの専門的なガイダンス。モデルルーティング、プロバイダーのフェイルオーバー、コスト追跡、または統一された方法で複数のAIプロバイダーを管理する際に使用します。