Skip to content

Commit 7f64b54

Browse files
its-mashMohammod Al Amin Ashik
andauthored
adds support for SiteContext query (#27)
Co-authored-by: Mohammod Al Amin Ashik <alamin.ashik@sitecore.com>
1 parent d385577 commit 7f64b54

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.changeset/giant-waves-rule.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sitecore-marketplace-sdk/client': patch
3+
---
4+
5+
Adds support for SiteContext query

packages/client/src/sdk-types.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,26 @@ interface PagesContextPageInfo {
186186
[key: string]: any;
187187
}
188188

189+
interface SiteContext {
190+
siteInfo: {
191+
siteId: string;
192+
name: string;
193+
displayName: string;
194+
url: string;
195+
hosts: {
196+
id: string;
197+
name: string;
198+
languageSettings: {
199+
defaultLanguage: string;
200+
[key: string]: any;
201+
};
202+
[key: string]: any;
203+
}[];
204+
[key: string]: any;
205+
} | null;
206+
[key: string]: any;
207+
}
208+
189209
// --- Static mappings for queries and mutations ---
190210

191211
export interface QueryMap {
@@ -211,6 +231,11 @@ export interface QueryMap {
211231
response: ApplicationContext;
212232
subscribe: false;
213233
};
234+
'site.context': {
235+
params: void;
236+
response: SiteContext;
237+
subscribe: false;
238+
};
214239
'host.route': {
215240
params: void;
216241
response: string;

0 commit comments

Comments
 (0)