@supernova-studio/client 1.46.5 → 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";
@@ -348,7 +348,8 @@ var FeaturesSummary = z7.object({
348
348
  forgeProjectFileSize: featureLimitedSchema,
349
349
  forgeActiveFeaturesPerProject: featureLimitedSchema,
350
350
  forgeActiveDocumentsPerProject: featureLimitedSchema,
351
- forgePrivateProjects: featureToggleSchema
351
+ forgePrivateProjects: featureToggleSchema,
352
+ forgeActiveProjectContexts: featureLimitedSchema
352
353
  });
353
354
  var InvoiceSchema = z8.object({
354
355
  id: z8.string(),
@@ -5180,35 +5181,24 @@ var ForgeProjectArtifactContent = z173.object({
5180
5181
  updatedAt: z173.coerce.date(),
5181
5182
  data: ForgeProjectArtifactContentData
5182
5183
  });
5183
- var ForgeProjectSectionChildType = z174.enum(["Artifact", "Feature"]);
5184
- var SortOrder = z174.number().int();
5185
- var ForgeSection = z174.object({
5186
- id: Id,
5187
- projectId: z174.string(),
5188
- name: z174.string(),
5189
- sortOrder: SortOrder.default(0),
5190
- createdAt: z174.coerce.date(),
5191
- updatedAt: z174.coerce.date(),
5192
- childType: ForgeProjectSectionChildType
5184
+ var FileFigmaRenderMode = z174.enum(["Image", "HTML", "JSON"]);
5185
+ var FileSourceUpload = z174.object({
5186
+ type: z174.literal("UserUpload"),
5187
+ userId: z174.string()
5193
5188
  });
5194
- var FileFigmaRenderMode = z175.enum(["Image", "HTML", "JSON"]);
5195
- var FileSourceUpload = z175.object({
5196
- type: z175.literal("UserUpload"),
5197
- userId: z175.string()
5198
- });
5199
- var FileSourceFigma = z175.object({
5200
- type: z175.literal("Figma"),
5189
+ var FileSourceFigma = z174.object({
5190
+ type: z174.literal("Figma"),
5201
5191
  renderMode: FileFigmaRenderMode
5202
5192
  });
5203
- var FileSource = z175.discriminatedUnion("type", [FileSourceUpload, FileSourceFigma]);
5204
- var File = z175.object({
5205
- id: z175.string(),
5206
- name: z175.string(),
5207
- deduplicationKey: z175.string(),
5208
- pendingUpload: z175.boolean().optional(),
5209
- storagePath: z175.string(),
5210
- url: z175.string(),
5211
- 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(),
5212
5202
  /**
5213
5203
  * Object describing where did the file come from. Undefined source indicates a file produced by the
5214
5204
  * system (e.g. thumbnails, etc)
@@ -5222,6 +5212,17 @@ var FileReference = File.pick({
5222
5212
  }).extend({
5223
5213
  name: File.shape.name.optional()
5224
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
+ });
5225
5226
  var ForgeProjectArtifact = z176.object({
5226
5227
  id: Id,
5227
5228
  projectId: z176.string(),
@@ -5234,7 +5235,10 @@ var ForgeProjectArtifact = z176.object({
5234
5235
  createdByUserId: z176.string(),
5235
5236
  sectionId: Id.optional(),
5236
5237
  threadId: z176.string().optional(),
5237
- 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)
5238
5242
  });
5239
5243
  var ProjectFeatureStatus = z177.enum(["Draft", "ReadyForDevelopment"]);
5240
5244
  var ProjectFeature = z177.object({
@@ -5242,7 +5246,7 @@ var ProjectFeature = z177.object({
5242
5246
  createdByUserId: z177.string(),
5243
5247
  description: z177.string(),
5244
5248
  id: Id,
5245
- isArchived: z177.boolean().optional(),
5249
+ isArchived: z177.boolean(),
5246
5250
  name: z177.string(),
5247
5251
  projectId: z177.string(),
5248
5252
  sectionId: Id.optional(),
@@ -9931,7 +9935,8 @@ var DTOForgeSectionItemMoveInput = z319.object({
9931
9935
  var DTOForgeProjectArtifact = ForgeProjectArtifact;
9932
9936
  var DTOForgeProjectArtifactUpdateInput = z320.object({
9933
9937
  id: z320.string(),
9934
- title: z320.string().optional()
9938
+ title: z320.string().optional(),
9939
+ isArchived: z320.boolean().optional()
9935
9940
  });
9936
9941
  var DTOForgeProjectArtifactCreateInput = z320.object({
9937
9942
  id: z320.string(),
@@ -10441,7 +10446,7 @@ var DTOForgeProject = z331.object({
10441
10446
  tags: z331.array(z331.string()).default([]),
10442
10447
  accessMode: DTOForgeProjectAccessMode,
10443
10448
  defaultRole: DTOForgeProjectDefaultRole.default("Viewer"),
10444
- isArchived: z331.boolean().optional(),
10449
+ isArchived: z331.boolean(),
10445
10450
  emoji: z331.string().optional(),
10446
10451
  createdAt: z331.coerce.date(),
10447
10452
  createdByUserId: z331.string().optional(),
@@ -18928,7 +18933,8 @@ var LocalProjectActionExecutor = class {
18928
18933
  title: input.title,
18929
18934
  updatedAt: /* @__PURE__ */ new Date(),
18930
18935
  createdAt: /* @__PURE__ */ new Date(),
18931
- createdByUserId: this.userId
18936
+ createdByUserId: this.userId,
18937
+ isArchived: false
18932
18938
  });
18933
18939
  }
18934
18940
  //
@@ -18944,6 +18950,7 @@ var LocalProjectActionExecutor = class {
18944
18950
  const mergedArtifact = {
18945
18951
  ...existingArtifact,
18946
18952
  title: input.title ?? existingArtifact.title,
18953
+ isArchived: input.isArchived ?? existingArtifact.isArchived,
18947
18954
  updatedAt: /* @__PURE__ */ new Date()
18948
18955
  };
18949
18956
  this.artifacts.set(id, mergedArtifact);