@cntrl-site/sdk 1.26.1 → 1.26.3-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ export declare class Client {
14
14
  getLayouts(): Promise<Layout[]>;
15
15
  fetchCustomComponents(buildMode?: 'default' | 'self-hosted'): Promise<CustomComponentMeta[]>;
16
16
  fetchCustomComponentBundle(componentId: string, buildMode?: 'default' | 'self-hosted'): Promise<string>;
17
+ getHostname(): string;
17
18
  private fetchProject;
18
19
  private fetchArticle;
19
20
  private findArticleIdByPageSlug;
@@ -111,6 +111,9 @@ class Client {
111
111
  return response.text();
112
112
  });
113
113
  }
114
+ getHostname() {
115
+ return this.url.origin;
116
+ }
114
117
  fetchProject() {
115
118
  return __awaiter(this, arguments, void 0, function* (buildMode = 'default') {
116
119
  const { username: projectId, password: apiKey, origin } = this.url;
@@ -30,7 +30,8 @@ const FXParams = zod_1.z.object({
30
30
  url: zod_1.z.string().min(1),
31
31
  hasGLEffect: zod_1.z.boolean().optional(),
32
32
  fragmentShader: zod_1.z.string().nullable(),
33
- FXControls: zod_1.z.array(exports.FXControlSchema).optional()
33
+ FXControls: zod_1.z.array(exports.FXControlSchema).optional(),
34
+ FXPatterns: zod_1.z.array(zod_1.z.string()).optional()
34
35
  });
35
36
  const ImageItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
36
37
  type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Image),
@@ -52,6 +52,7 @@ interface MediaCommonParams extends CommonParamsBase {
52
52
  hasGLEffect?: boolean;
53
53
  fragmentShader: string | null;
54
54
  FXControls?: FXControlAny[];
55
+ FXPatterns?: string[];
55
56
  }
56
57
  interface VideoCommonParams extends MediaCommonParams {
57
58
  coverUrl: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.26.1",
3
+ "version": "1.26.3-0",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",