@supernova-studio/client 0.47.0 → 0.47.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/dist/index.d.mts +753 -10
- package/dist/index.d.ts +753 -10
- package/dist/index.js +168 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2210 -2048
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/integrations/git.ts +34 -0
- package/src/api/conversion/integrations/index.ts +1 -0
- package/src/api/dto/index.ts +1 -0
- package/src/api/dto/users/index.ts +1 -0
- package/src/api/dto/users/profile/index.ts +1 -0
- package/src/api/dto/users/profile/update.ts +7 -0
- package/src/api/dto/workspaces/git.ts +29 -0
- package/src/api/dto/workspaces/index.ts +1 -0
- package/src/api/payloads/users/index.ts +1 -0
- package/src/api/payloads/users/profile/index.ts +1 -0
- package/src/api/payloads/users/profile/update.ts +4 -0
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GitBranch, GitOrganization, GitProject, GitRepository } from "@supernova-studio/model";
|
|
2
|
+
import { DTOGitBranch, DTOGitOrganization, DTOGitProject, DTOGitRepository } from "../../dto";
|
|
3
|
+
|
|
4
|
+
export function gitOrganizationToDto(org: GitOrganization): DTOGitOrganization {
|
|
5
|
+
return {
|
|
6
|
+
id: org.id,
|
|
7
|
+
name: org.name,
|
|
8
|
+
url: org.url,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function gitProjectToDto(project: GitProject): DTOGitProject {
|
|
13
|
+
return {
|
|
14
|
+
id: project.id,
|
|
15
|
+
name: project.name,
|
|
16
|
+
url: project.url,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function gitRepositoryToDto(repo: GitRepository): DTOGitRepository {
|
|
21
|
+
return {
|
|
22
|
+
id: repo.id,
|
|
23
|
+
name: repo.name,
|
|
24
|
+
url: repo.url,
|
|
25
|
+
defaultBranch: repo.defaultBranch,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function gitBranchToDto(branch: GitBranch): DTOGitBranch {
|
|
30
|
+
return {
|
|
31
|
+
name: branch.name,
|
|
32
|
+
lastCommitId: branch.lastCommitId,
|
|
33
|
+
};
|
|
34
|
+
}
|
package/src/api/dto/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./profile";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./update";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const DTOGitOrganization = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
name: z.string(),
|
|
6
|
+
url: z.string(),
|
|
7
|
+
});
|
|
8
|
+
export type DTOGitOrganization = z.infer<typeof DTOGitOrganization>;
|
|
9
|
+
|
|
10
|
+
export const DTOGitProject = z.object({
|
|
11
|
+
id: z.string(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
url: z.string(),
|
|
14
|
+
});
|
|
15
|
+
export type DTOGitProject = z.infer<typeof DTOGitProject>;
|
|
16
|
+
|
|
17
|
+
export const DTOGitRepository = z.object({
|
|
18
|
+
id: z.string(),
|
|
19
|
+
name: z.string(),
|
|
20
|
+
url: z.string(),
|
|
21
|
+
defaultBranch: z.string(),
|
|
22
|
+
});
|
|
23
|
+
export type DTOGitRepository = z.infer<typeof DTOGitRepository>;
|
|
24
|
+
|
|
25
|
+
export const DTOGitBranch = z.object({
|
|
26
|
+
name: z.string(),
|
|
27
|
+
lastCommitId: z.string(),
|
|
28
|
+
});
|
|
29
|
+
export type DTOGitBranch = z.infer<typeof DTOGitBranch>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./update";
|