@supernova-studio/client 1.46.6 → 1.47.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.
package/dist/index.mjs CHANGED
@@ -182,8 +182,8 @@ import { z as z172 } from "zod";
182
182
  import { z as z171 } from "zod";
183
183
  import { z as z173 } from "zod";
184
184
  import { z as z176 } from "zod";
185
- import { z as z174 } from "zod";
186
- import z175 from "zod";
185
+ import z174 from "zod";
186
+ import { z as z175 } from "zod";
187
187
  import { z as z177 } from "zod";
188
188
  import { z as z178 } from "zod";
189
189
  import { z as z179 } from "zod";
@@ -5181,35 +5181,24 @@ var ForgeProjectArtifactContent = z173.object({
5181
5181
  updatedAt: z173.coerce.date(),
5182
5182
  data: ForgeProjectArtifactContentData
5183
5183
  });
5184
- var ForgeProjectSectionChildType = z174.enum(["Artifact", "Feature"]);
5185
- var SortOrder = z174.number().int();
5186
- var ForgeSection = z174.object({
5187
- id: Id,
5188
- projectId: z174.string(),
5189
- name: z174.string(),
5190
- sortOrder: SortOrder.default(0),
5191
- createdAt: z174.coerce.date(),
5192
- updatedAt: z174.coerce.date(),
5193
- childType: ForgeProjectSectionChildType
5184
+ var FileFigmaRenderMode = z174.enum(["Image", "HTML", "JSON"]);
5185
+ var FileSourceUpload = z174.object({
5186
+ type: z174.literal("UserUpload"),
5187
+ userId: z174.string()
5194
5188
  });
5195
- var FileFigmaRenderMode = z175.enum(["Image", "HTML", "JSON"]);
5196
- var FileSourceUpload = z175.object({
5197
- type: z175.literal("UserUpload"),
5198
- userId: z175.string()
5199
- });
5200
- var FileSourceFigma = z175.object({
5201
- type: z175.literal("Figma"),
5189
+ var FileSourceFigma = z174.object({
5190
+ type: z174.literal("Figma"),
5202
5191
  renderMode: FileFigmaRenderMode
5203
5192
  });
5204
- var FileSource = z175.discriminatedUnion("type", [FileSourceUpload, FileSourceFigma]);
5205
- var File = z175.object({
5206
- id: z175.string(),
5207
- name: z175.string(),
5208
- deduplicationKey: z175.string(),
5209
- pendingUpload: z175.boolean().optional(),
5210
- storagePath: z175.string(),
5211
- url: z175.string(),
5212
- size: z175.number(),
5193
+ var FileSource = z174.discriminatedUnion("type", [FileSourceUpload, FileSourceFigma]);
5194
+ var File = z174.object({
5195
+ id: z174.string(),
5196
+ name: z174.string(),
5197
+ deduplicationKey: z174.string(),
5198
+ pendingUpload: z174.boolean().optional(),
5199
+ storagePath: z174.string(),
5200
+ url: z174.string(),
5201
+ size: z174.number(),
5213
5202
  /**
5214
5203
  * Object describing where did the file come from. Undefined source indicates a file produced by the
5215
5204
  * system (e.g. thumbnails, etc)
@@ -5223,6 +5212,17 @@ var FileReference = File.pick({
5223
5212
  }).extend({
5224
5213
  name: File.shape.name.optional()
5225
5214
  });
5215
+ var ForgeProjectSectionChildType = z175.enum(["Artifact", "Feature"]);
5216
+ var SortOrder = z175.number().int();
5217
+ var ForgeSection = z175.object({
5218
+ id: Id,
5219
+ projectId: z175.string(),
5220
+ name: z175.string(),
5221
+ sortOrder: SortOrder.default(0),
5222
+ createdAt: z175.coerce.date(),
5223
+ updatedAt: z175.coerce.date(),
5224
+ childType: ForgeProjectSectionChildType
5225
+ });
5226
5226
  var ForgeProjectArtifact = z176.object({
5227
5227
  id: Id,
5228
5228
  projectId: z176.string(),
@@ -5235,7 +5235,10 @@ var ForgeProjectArtifact = z176.object({
5235
5235
  createdByUserId: z176.string(),
5236
5236
  sectionId: Id.optional(),
5237
5237
  threadId: z176.string().optional(),
5238
- thumbnail: FileReference.optional()
5238
+ thumbnail: FileReference.optional(),
5239
+ // Default value here is important for backward compatibility for parsing artifacts
5240
+ // from project rooms!
5241
+ isArchived: z176.boolean().default(false)
5239
5242
  });
5240
5243
  var ProjectFeatureStatus = z177.enum(["Draft", "ReadyForDevelopment"]);
5241
5244
  var ProjectFeature = z177.object({
@@ -5243,7 +5246,7 @@ var ProjectFeature = z177.object({
5243
5246
  createdByUserId: z177.string(),
5244
5247
  description: z177.string(),
5245
5248
  id: Id,
5246
- isArchived: z177.boolean().optional(),
5249
+ isArchived: z177.boolean(),
5247
5250
  name: z177.string(),
5248
5251
  projectId: z177.string(),
5249
5252
  sectionId: Id.optional(),
@@ -9932,7 +9935,8 @@ var DTOForgeSectionItemMoveInput = z319.object({
9932
9935
  var DTOForgeProjectArtifact = ForgeProjectArtifact;
9933
9936
  var DTOForgeProjectArtifactUpdateInput = z320.object({
9934
9937
  id: z320.string(),
9935
- title: z320.string().optional()
9938
+ title: z320.string().optional(),
9939
+ isArchived: z320.boolean().optional()
9936
9940
  });
9937
9941
  var DTOForgeProjectArtifactCreateInput = z320.object({
9938
9942
  id: z320.string(),
@@ -10442,7 +10446,7 @@ var DTOForgeProject = z331.object({
10442
10446
  tags: z331.array(z331.string()).default([]),
10443
10447
  accessMode: DTOForgeProjectAccessMode,
10444
10448
  defaultRole: DTOForgeProjectDefaultRole.default("Viewer"),
10445
- isArchived: z331.boolean().optional(),
10449
+ isArchived: z331.boolean(),
10446
10450
  emoji: z331.string().optional(),
10447
10451
  createdAt: z331.coerce.date(),
10448
10452
  createdByUserId: z331.string().optional(),
@@ -18929,7 +18933,8 @@ var LocalProjectActionExecutor = class {
18929
18933
  title: input.title,
18930
18934
  updatedAt: /* @__PURE__ */ new Date(),
18931
18935
  createdAt: /* @__PURE__ */ new Date(),
18932
- createdByUserId: this.userId
18936
+ createdByUserId: this.userId,
18937
+ isArchived: false
18933
18938
  });
18934
18939
  }
18935
18940
  //
@@ -18945,6 +18950,7 @@ var LocalProjectActionExecutor = class {
18945
18950
  const mergedArtifact = {
18946
18951
  ...existingArtifact,
18947
18952
  title: input.title ?? existingArtifact.title,
18953
+ isArchived: input.isArchived ?? existingArtifact.isArchived,
18948
18954
  updatedAt: /* @__PURE__ */ new Date()
18949
18955
  };
18950
18956
  this.artifacts.set(id, mergedArtifact);