@supernova-studio/client 1.3.1 → 1.3.3

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.
package/dist/index.mjs CHANGED
@@ -307,7 +307,8 @@ var FeaturesSummary = z6.object({
307
307
  approvals: featureToggleSchema,
308
308
  selectivePublishing: featureToggleSchema,
309
309
  designSystemAccessModes: featureToggleSchema,
310
- designSystemRoles: featureToggleSchema
310
+ designSystemRoles: featureToggleSchema,
311
+ documentationPageRedirects: featureToggleSchema
311
312
  });
312
313
  var InvoiceSchema = z7.object({
313
314
  id: z7.string(),
@@ -13633,6 +13634,7 @@ var LocalDocsElementActionExecutor = class {
13633
13634
  case "DocumentationPageRestore":
13634
13635
  throw new Error(`Transaction type ${trx.type} is not yet implemented`);
13635
13636
  case "DocumentationTabCreate":
13637
+ return this.documentationTabCreate(trx);
13636
13638
  case "DocumentationTabGroupDelete":
13637
13639
  throw new Error(`Transaction type ${trx.type} is not yet implemented`);
13638
13640
  case "FigmaNodeRender":
@@ -13787,6 +13789,40 @@ var LocalDocsElementActionExecutor = class {
13787
13789
  }
13788
13790
  }
13789
13791
  //
13792
+ // Tabs
13793
+ //
13794
+ documentationTabCreate(trx) {
13795
+ const { input } = trx;
13796
+ const page = this.pages.get(input.fromItemPersistentId);
13797
+ if (!page) {
13798
+ throw new Error(`Cannot create tab: page id ${input.fromItemPersistentId} was not found`);
13799
+ }
13800
+ const tabGroup = {
13801
+ parentPersistentId: page.parentPersistentId,
13802
+ persistentId: input.persistentId,
13803
+ shortPersistentId: generateShortPersistentId(),
13804
+ slug: page.slug,
13805
+ meta: page.meta,
13806
+ createdAt: /* @__PURE__ */ new Date(),
13807
+ updatedAt: /* @__PURE__ */ new Date(),
13808
+ data: {
13809
+ behavior: "Tabs",
13810
+ configuration: page?.data.configuration
13811
+ },
13812
+ sortOrder: page.sortOrder,
13813
+ designSystemVersionId: this.designSystemVersionId
13814
+ };
13815
+ this.groups.set(input.persistentId, tabGroup);
13816
+ const newLocalPage = {
13817
+ ...page,
13818
+ userSlug: void 0,
13819
+ sortOrder: 0,
13820
+ parentPersistentId: input.persistentId,
13821
+ meta: { name: input.tabName }
13822
+ };
13823
+ this.pages.set(newLocalPage.persistentId, newLocalPage);
13824
+ }
13825
+ //
13790
13826
  // Approval states
13791
13827
  //
13792
13828
  documentationApprovalStateUpdate(trx) {