@supernova-studio/client 0.45.1 → 0.46.1

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
@@ -1493,7 +1493,8 @@ var FigmaFileStructure = DesignElementBase.extend({
1493
1493
  data: FigmaFileStructureData
1494
1494
  });
1495
1495
  var FigmaNodeReferenceOrigin = z74.object({
1496
- sourceId: z74.string()
1496
+ sourceId: z74.string(),
1497
+ parentName: z74.string().optional()
1497
1498
  });
1498
1499
  var FigmaNodeReference = DesignElementBase.extend({
1499
1500
  data: FigmaNodeReferenceData,
@@ -2562,6 +2563,15 @@ var DesignSystemVersion = z120.object({
2562
2563
  changeLog: z120.string(),
2563
2564
  parentId: z120.string().optional()
2564
2565
  });
2566
+ var VersionCreationJobStatus = z120.enum(["Success", "InProgress", "Error"]);
2567
+ var VersionCreationJob = z120.object({
2568
+ _id: z120.string().optional(),
2569
+ version: z120.string(),
2570
+ designSystemId: z120.string(),
2571
+ designSystemVersionId: nullishToOptional(z120.string()),
2572
+ status: VersionCreationJobStatus,
2573
+ errorMessage: nullishToOptional(z120.string())
2574
+ });
2565
2575
  var ExporterJobDestination = z121.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
2566
2576
  var ExporterJobStatus = z121.enum(["InProgress", "Success", "Failed", "Timeout"]);
2567
2577
  var ExporterJobLogEntryType = z121.enum(["success", "info", "warning", "error", "user"]);
@@ -4116,8 +4126,10 @@ var ObjectMeta2 = z149.object({
4116
4126
  description: z149.string().max(2e3).optional()
4117
4127
  });
4118
4128
  function validateSemver(version) {
4119
- const semverRegex = /^(\d+)(\.\d+)?(\.\d+)?$/;
4120
- return semverRegex.test(version);
4129
+ const semverRegex = /^(\d+)\.(\d+)(?:\.(\d+))?(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(?:\+([\da-z-]+(?:\.[\da-z-]+)*))?$/i;
4130
+ const semverRegexWithSingleDigit = /^(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(?:\+([\da-z-]+(?:\.[\da-z-]+)*))?$/i;
4131
+ const isValidSemver = semverRegex.test(version) || semverRegexWithSingleDigit.test(version);
4132
+ return isValidSemver;
4121
4133
  }
4122
4134
  var DTOCreateVersionInput = z149.object({
4123
4135
  meta: ObjectMeta2,
@@ -4216,12 +4228,19 @@ var DTODesignSystemVersionCreationResponse = z154.object({
4216
4228
  version: z154.string(),
4217
4229
  changeLog: z154.string(),
4218
4230
  isReadOnly: z154.boolean(),
4219
- designSystemId: z154.string()
4231
+ designSystemId: z154.string(),
4232
+ jobId: z154.string()
4220
4233
  });
4221
4234
  var VersionSQSPayload = z154.object({
4235
+ jobId: z154.string(),
4222
4236
  designSystemId: z154.string(),
4223
4237
  input: DTOCreateVersionInput
4224
4238
  });
4239
+ var DTODesignSystemVersionJobStatusResponse = z154.object({
4240
+ job: VersionCreationJob.omit({
4241
+ _id: true
4242
+ })
4243
+ });
4225
4244
 
4226
4245
  // src/api/dto/design-systems/view.ts
4227
4246
  import { z as z155 } from "zod";
@@ -4595,6 +4614,11 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
4595
4614
 
4596
4615
  // src/api/dto/elements/figma-nodes/figma-node.ts
4597
4616
  import { z as z167 } from "zod";
4617
+ var DTOFigmaNodeOrigin = z167.object({
4618
+ sourceId: z167.string(),
4619
+ fileId: z167.string().optional(),
4620
+ parentName: z167.string().optional()
4621
+ });
4598
4622
  var DTOFigmaNodeData = z167.object({
4599
4623
  // Id of the node in the Figma file
4600
4624
  figmaNodeId: z167.string(),
@@ -4609,9 +4633,11 @@ var DTOFigmaNodeData = z167.object({
4609
4633
  assetHeight: z167.number().optional()
4610
4634
  });
4611
4635
  var DTOFigmaNode = FigmaFileStructure.omit({
4612
- data: true
4636
+ data: true,
4637
+ origin: true
4613
4638
  }).extend({
4614
- data: DTOFigmaNodeData
4639
+ data: DTOFigmaNodeData,
4640
+ origin: DTOFigmaNodeOrigin
4615
4641
  });
4616
4642
  var DTOFigmaNodeRenderInput = z167.object({
4617
4643
  // Id of a design system's data source representing a linked Figma file
@@ -8576,6 +8602,7 @@ export {
8576
8602
  DTODesignSystemVersion,
8577
8603
  DTODesignSystemVersionCreationResponse,
8578
8604
  DTODesignSystemVersionGetResponse,
8605
+ DTODesignSystemVersionJobStatusResponse,
8579
8606
  DTODesignSystemVersionsListResponse,
8580
8607
  DTODocumentationGroupCreateActionInputV2,
8581
8608
  DTODocumentationGroupCreateActionOutputV2,
@@ -8640,6 +8667,7 @@ export {
8640
8667
  DTOExporterPropertyListResponse,
8641
8668
  DTOFigmaNode,
8642
8669
  DTOFigmaNodeData,
8670
+ DTOFigmaNodeOrigin,
8643
8671
  DTOFigmaNodeRenderActionInput,
8644
8672
  DTOFigmaNodeRenderActionOutput,
8645
8673
  DTOFigmaNodeRenderInput,