@supernova-studio/model 0.46.3 → 0.46.5

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/model",
3
- "version": "0.46.3",
3
+ "version": "0.46.5",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,6 @@
24
24
  "scripts": {
25
25
  "build": "tsup",
26
26
  "typecheck": "tsc --noEmit",
27
- "publish": "npm run build && npm publish",
28
27
  "test:unit": "vitest run",
29
28
  "index": "node ./create-indexes.js"
30
29
  },
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
-
2
+ import { UserMinified } from "../users/user-minified";
3
3
  export const IntegrationDesignSystem = z.object({
4
4
  designSystemId: z.string(),
5
5
  brandId: z.string(),
@@ -34,6 +34,7 @@ export const IntegrationCredentials = z.object({
34
34
  expiresAt: z.coerce.date().optional(),
35
35
  profile: IntegrationCredentialsProfile.optional(),
36
36
  customUrl: z.string().optional(),
37
+ user: UserMinified.optional(),
37
38
  });
38
39
 
39
40
  export type IntegrationCredentials = z.infer<typeof IntegrationCredentials>;
@@ -67,7 +68,6 @@ export type ExtendedIntegration = Omit<Integration, "type"> & {
67
68
 
68
69
  // Custom URL validation
69
70
  const forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
70
-
71
71
  // Will be renamed to IntegrationToken in the future as there is already a type named IntegrationToken
72
72
  export const IntegrationTokenResponse = z
73
73
  .object({
@@ -1,6 +1,7 @@
1
1
  export * from "./linked-integrations";
2
2
  export * from "./user-create";
3
3
  export * from "./user-identity";
4
+ export * from "./user-minified";
4
5
  export * from "./user-profile";
5
6
  export * from "./user-test";
6
7
  export * from "./user-with-pat";
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+
3
+ export const UserMinified = z.object({
4
+ id: z.string(),
5
+ name: z.string(),
6
+ email: z.string(),
7
+ avatar: z.string().optional(),
8
+ });
9
+
10
+ export type UserMinified = z.infer<typeof UserMinified>;
package/src/users/user.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import { z } from "zod";
1
2
  import { UserLinkedIntegrations } from "./linked-integrations";
2
3
  import { UserProfile } from "./user-profile";
3
- import { z } from "zod";
4
4
 
5
5
  export const User = z.object({
6
6
  id: z.string(),