@supernova-studio/client 0.46.1 → 0.46.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.46.1",
3
+ "version": "0.46.4",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -25,7 +25,6 @@
25
25
  "scripts": {
26
26
  "build": "tsup",
27
27
  "typecheck": "tsc --noEmit",
28
- "publish": "npm run build && npm publish",
29
28
  "test:unit": "vitest run",
30
29
  "index": "node ./create-indexes.js"
31
30
  },
@@ -1,12 +1,13 @@
1
- import { Integration } from "@supernova-studio/model";
1
+ import { ExtendedIntegration } from "@supernova-studio/model";
2
2
  import { DTOIntegration } from "../../dto";
3
3
 
4
- export function integrationToDto(integration: Integration): DTOIntegration {
4
+ export function integrationToDto(integration: ExtendedIntegration): DTOIntegration {
5
5
  return {
6
6
  id: integration.id,
7
7
  workspaceId: integration.workspaceId,
8
8
  type: integration.type,
9
9
  createdAt: integration.createdAt,
10
10
  integrationCredentials: integration.integrationCredentials ?? undefined,
11
+ integrationDesignSystems: integration.integrationDesignSystems ?? undefined,
11
12
  };
12
13
  }
@@ -43,11 +43,15 @@ export type DTODesignSystemVersionsListResponse = z.infer<typeof DTODesignSystem
43
43
  export type DTODesignSystemVersionGetResponse = z.infer<typeof DTODesignSystemVersionGetResponse>;
44
44
 
45
45
 
46
+ export const DTODesignSystemVersionJobsResponse = z.object({
47
+ jobs: z.array(VersionCreationJob)
48
+ })
49
+
50
+ export type DTODesignSystemVersionJobsResponse = z.infer<typeof DTODesignSystemVersionJobsResponse>;
51
+
46
52
  // Creation job status response
47
53
  export const DTODesignSystemVersionJobStatusResponse = z.object({
48
- job: VersionCreationJob.omit({
49
- _id: true,
50
- })
54
+ job: VersionCreationJob
51
55
  });
52
56
 
53
57
  export type DTODesignSystemVersionJobStatusResponse = z.infer<typeof DTODesignSystemVersionJobStatusResponse>;
@@ -1,12 +1,13 @@
1
- import { IntegrationCredentials, IntegrationType } from "@supernova-studio/model";
1
+ import { IntegrationCredentials, IntegrationDesignSystem, ExtendedIntegrationType } from "@supernova-studio/model";
2
2
  import { z } from "zod";
3
3
 
4
4
  export const DTOIntegration = z.object({
5
5
  id: z.string(),
6
6
  workspaceId: z.string(),
7
- type: IntegrationType,
7
+ type: ExtendedIntegrationType,
8
8
  createdAt: z.coerce.date(),
9
9
  integrationCredentials: z.array(IntegrationCredentials).optional(),
10
+ integrationDesignSystems: z.array(IntegrationDesignSystem).optional(),
10
11
  });
11
12
 
12
13
  export const DTOIntegrationOAuthGetResponse = z.object({
@@ -5,16 +5,14 @@ export const ObjectMeta = z.object({
5
5
  description: z.string().max(2000).optional(),
6
6
  });
7
7
 
8
- export function validateSemver(version: string) {
9
- const semverRegex = /^(\d+)\.(\d+)(?:\.(\d+))?(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(?:\+([\da-z-]+(?:\.[\da-z-]+)*))?$/i;
10
- const semverRegexWithSingleDigit = /^(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(?:\+([\da-z-]+(?:\.[\da-z-]+)*))?$/i;
11
- const isValidSemver = semverRegex.test(version) || semverRegexWithSingleDigit.test(version);
12
- return isValidSemver;
8
+ export function validateDesignSystemVersion(version: string) {
9
+ const urlCompliantRegex = /^[a-zA-Z0-9+.-]+$/;
10
+ return urlCompliantRegex.test(version);
13
11
  }
14
12
 
15
13
  export const DTOCreateVersionInput = z.object({
16
14
  meta: ObjectMeta,
17
- version: z.string().refine(validateSemver, {
15
+ version: z.string().refine(validateDesignSystemVersion, {
18
16
  message: "Invalid semantic versioning format",
19
17
  }),
20
18
  changeLog: z.string().max(2000).optional()
@@ -1,3 +1,2 @@
1
1
  export * from "./documentation-hierarchy";
2
2
  export * from "./item-configuration";
3
- export * from "./item-title";
File without changes