@shipfox/api-projects-dto 2.0.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/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-type$colon$emit.log +1 -0
- package/.turbo/turbo-type.log +1 -0
- package/CHANGELOG.md +25 -0
- package/LICENSE +21 -0
- package/dist/e2e/index.d.ts +2 -0
- package/dist/e2e/index.d.ts.map +1 -0
- package/dist/e2e/index.js +3 -0
- package/dist/e2e/index.js.map +1 -0
- package/dist/e2e/project.d.ts +21 -0
- package/dist/e2e/project.d.ts.map +1 -0
- package/dist/e2e/project.js +12 -0
- package/dist/e2e/project.js.map +1 -0
- package/dist/events.d.ts +63 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +36 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/project.d.ts +62 -0
- package/dist/schemas/project.d.ts.map +1 -0
- package/dist/schemas/project.js +35 -0
- package/dist/schemas/project.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -0
- package/package.json +54 -0
- package/src/e2e/index.ts +6 -0
- package/src/e2e/project.ts +16 -0
- package/src/events.ts +51 -0
- package/src/index.ts +3 -0
- package/src/schemas/index.ts +14 -0
- package/src/schemas/project.ts +50 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +3 -0
- package/tsconfig.test.json +8 -0
- package/vitest.config.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ shipfox-tsc-emit
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ shipfox-tsc-check
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @shipfox/api-projects-dto
|
|
2
|
+
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1b0d344: Publishes the complete API runtime closure with packed-consumer-safe internal imports and records its exact package set in application releases.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [1b0d344]
|
|
12
|
+
- @shipfox/api-common-dto@2.0.0
|
|
13
|
+
|
|
14
|
+
## 0.1.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- 43fd0c1: Adds HTTP-first E2E project setup contracts and routes for creating synthetic projects without source-control setup.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 27770eb: Tightens signup, workspace, and project display-name validation with shared trimming, control and format-character rejection, length limits, and contextual client form errors.
|
|
23
|
+
- 2933c33: Adds drain-boundary Zod validation for current outbox publisher event payloads.
|
|
24
|
+
- Updated dependencies [27770eb]
|
|
25
|
+
- @shipfox/api-common-dto@0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shipfox
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/e2e/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/e2e/index.ts"],"sourcesContent":["export {\n type E2eCreateProjectBodyDto,\n type E2eCreateProjectResponseDto,\n e2eCreateProjectBodySchema,\n e2eCreateProjectResponseSchema,\n} from './project.js';\n"],"names":["e2eCreateProjectBodySchema","e2eCreateProjectResponseSchema"],"mappings":"AAAA,SAGEA,0BAA0B,EAC1BC,8BAA8B,QACzB,eAAe"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const e2eCreateProjectBodySchema: z.ZodObject<{
|
|
3
|
+
workspace_id: z.ZodString;
|
|
4
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
5
|
+
source_connection_id: z.ZodOptional<z.ZodString>;
|
|
6
|
+
source_external_repository_id: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type E2eCreateProjectBodyDto = z.infer<typeof e2eCreateProjectBodySchema>;
|
|
9
|
+
export declare const e2eCreateProjectResponseSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
workspace_id: z.ZodString;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
source: z.ZodObject<{
|
|
14
|
+
connection_id: z.ZodString;
|
|
15
|
+
external_repository_id: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
created_at: z.ZodString;
|
|
18
|
+
updated_at: z.ZodString;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type E2eCreateProjectResponseDto = z.infer<typeof e2eCreateProjectResponseSchema>;
|
|
21
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/e2e/project.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,0BAA0B;;;;;iBAKrC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,8BAA8B;;;;;;;;;;iBAAwB,CAAC;AAEpE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { displayNameSchema } from '@shipfox/api-common-dto';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { projectResponseSchema } from '../schemas/project.js';
|
|
4
|
+
export const e2eCreateProjectBodySchema = z.object({
|
|
5
|
+
workspace_id: z.string().uuid(),
|
|
6
|
+
name: displayNameSchema,
|
|
7
|
+
source_connection_id: z.string().uuid().optional(),
|
|
8
|
+
source_external_repository_id: z.string().min(1).max(255).optional()
|
|
9
|
+
});
|
|
10
|
+
export const e2eCreateProjectResponseSchema = projectResponseSchema;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/e2e/project.ts"],"sourcesContent":["import {displayNameSchema} from '@shipfox/api-common-dto';\nimport {z} from 'zod';\nimport {projectResponseSchema} from '../schemas/project.js';\n\nexport const e2eCreateProjectBodySchema = z.object({\n workspace_id: z.string().uuid(),\n name: displayNameSchema,\n source_connection_id: z.string().uuid().optional(),\n source_external_repository_id: z.string().min(1).max(255).optional(),\n});\n\nexport type E2eCreateProjectBodyDto = z.infer<typeof e2eCreateProjectBodySchema>;\n\nexport const e2eCreateProjectResponseSchema = projectResponseSchema;\n\nexport type E2eCreateProjectResponseDto = z.infer<typeof e2eCreateProjectResponseSchema>;\n"],"names":["displayNameSchema","z","projectResponseSchema","e2eCreateProjectBodySchema","object","workspace_id","string","uuid","name","source_connection_id","optional","source_external_repository_id","min","max","e2eCreateProjectResponseSchema"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,0BAA0B;AAC1D,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,qBAAqB,QAAO,wBAAwB;AAE5D,OAAO,MAAMC,6BAA6BF,EAAEG,MAAM,CAAC;IACjDC,cAAcJ,EAAEK,MAAM,GAAGC,IAAI;IAC7BC,MAAMR;IACNS,sBAAsBR,EAAEK,MAAM,GAAGC,IAAI,GAAGG,QAAQ;IAChDC,+BAA+BV,EAAEK,MAAM,GAAGM,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKH,QAAQ;AACpE,GAAG;AAIH,OAAO,MAAMI,iCAAiCZ,sBAAsB"}
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PROJECT_CREATED: "projects.project.created";
|
|
3
|
+
export declare const PROJECT_SOURCE_BOUND: "projects.project.source_bound";
|
|
4
|
+
export declare const PROJECT_SOURCE_COMMIT_OBSERVED: "projects.project.source_commit_observed";
|
|
5
|
+
export declare const projectCreatedEventSchema: z.ZodObject<{
|
|
6
|
+
actorId: z.ZodString;
|
|
7
|
+
workspaceId: z.ZodString;
|
|
8
|
+
projectId: z.ZodString;
|
|
9
|
+
sourceConnectionId: z.ZodString;
|
|
10
|
+
sourceExternalRepositoryId: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type ProjectCreatedEvent = z.infer<typeof projectCreatedEventSchema>;
|
|
13
|
+
export declare const projectSourceBoundEventSchema: z.ZodObject<{
|
|
14
|
+
actorId: z.ZodString;
|
|
15
|
+
workspaceId: z.ZodString;
|
|
16
|
+
projectId: z.ZodString;
|
|
17
|
+
sourceConnectionId: z.ZodString;
|
|
18
|
+
provider: z.ZodString;
|
|
19
|
+
externalRepositoryId: z.ZodString;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type ProjectSourceBoundEvent = z.infer<typeof projectSourceBoundEventSchema>;
|
|
22
|
+
export declare const projectSourceCommitObservedEventSchema: z.ZodObject<{
|
|
23
|
+
workspaceId: z.ZodString;
|
|
24
|
+
projectId: z.ZodString;
|
|
25
|
+
sourceConnectionId: z.ZodString;
|
|
26
|
+
provider: z.ZodString;
|
|
27
|
+
externalRepositoryId: z.ZodString;
|
|
28
|
+
ref: z.ZodString;
|
|
29
|
+
headCommitSha: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type ProjectSourceCommitObservedEvent = z.infer<typeof projectSourceCommitObservedEventSchema>;
|
|
32
|
+
export interface ProjectsEventMap {
|
|
33
|
+
[PROJECT_CREATED]: ProjectCreatedEvent;
|
|
34
|
+
[PROJECT_SOURCE_BOUND]: ProjectSourceBoundEvent;
|
|
35
|
+
[PROJECT_SOURCE_COMMIT_OBSERVED]: ProjectSourceCommitObservedEvent;
|
|
36
|
+
}
|
|
37
|
+
export declare const projectsEventSchemas: {
|
|
38
|
+
"projects.project.created": z.ZodObject<{
|
|
39
|
+
actorId: z.ZodString;
|
|
40
|
+
workspaceId: z.ZodString;
|
|
41
|
+
projectId: z.ZodString;
|
|
42
|
+
sourceConnectionId: z.ZodString;
|
|
43
|
+
sourceExternalRepositoryId: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
"projects.project.source_bound": z.ZodObject<{
|
|
46
|
+
actorId: z.ZodString;
|
|
47
|
+
workspaceId: z.ZodString;
|
|
48
|
+
projectId: z.ZodString;
|
|
49
|
+
sourceConnectionId: z.ZodString;
|
|
50
|
+
provider: z.ZodString;
|
|
51
|
+
externalRepositoryId: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
"projects.project.source_commit_observed": z.ZodObject<{
|
|
54
|
+
workspaceId: z.ZodString;
|
|
55
|
+
projectId: z.ZodString;
|
|
56
|
+
sourceConnectionId: z.ZodString;
|
|
57
|
+
provider: z.ZodString;
|
|
58
|
+
externalRepositoryId: z.ZodString;
|
|
59
|
+
ref: z.ZodString;
|
|
60
|
+
headCommitSha: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,eAAe,EAAG,0BAAmC,CAAC;AACnE,eAAO,MAAM,oBAAoB,EAAG,+BAAwC,CAAC;AAC7E,eAAO,MAAM,8BAA8B,EAAG,yCAAkD,CAAC;AAEjG,eAAO,MAAM,yBAAyB;;;;;;iBAMpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,6BAA6B;;;;;;;iBAOxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,sCAAsC;;;;;;;;iBAQjD,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACvC,CAAC,oBAAoB,CAAC,EAAE,uBAAuB,CAAC;IAChD,CAAC,8BAA8B,CAAC,EAAE,gCAAgC,CAAC;CACpE;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;CAIoB,CAAC"}
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const nonEmptyStringSchema = z.string().nonempty();
|
|
3
|
+
export const PROJECT_CREATED = 'projects.project.created';
|
|
4
|
+
export const PROJECT_SOURCE_BOUND = 'projects.project.source_bound';
|
|
5
|
+
export const PROJECT_SOURCE_COMMIT_OBSERVED = 'projects.project.source_commit_observed';
|
|
6
|
+
export const projectCreatedEventSchema = z.object({
|
|
7
|
+
actorId: nonEmptyStringSchema,
|
|
8
|
+
workspaceId: nonEmptyStringSchema,
|
|
9
|
+
projectId: nonEmptyStringSchema,
|
|
10
|
+
sourceConnectionId: nonEmptyStringSchema,
|
|
11
|
+
sourceExternalRepositoryId: nonEmptyStringSchema
|
|
12
|
+
});
|
|
13
|
+
export const projectSourceBoundEventSchema = z.object({
|
|
14
|
+
actorId: nonEmptyStringSchema,
|
|
15
|
+
workspaceId: nonEmptyStringSchema,
|
|
16
|
+
projectId: nonEmptyStringSchema,
|
|
17
|
+
sourceConnectionId: nonEmptyStringSchema,
|
|
18
|
+
provider: nonEmptyStringSchema,
|
|
19
|
+
externalRepositoryId: nonEmptyStringSchema
|
|
20
|
+
});
|
|
21
|
+
export const projectSourceCommitObservedEventSchema = z.object({
|
|
22
|
+
workspaceId: nonEmptyStringSchema,
|
|
23
|
+
projectId: nonEmptyStringSchema,
|
|
24
|
+
sourceConnectionId: nonEmptyStringSchema,
|
|
25
|
+
provider: nonEmptyStringSchema,
|
|
26
|
+
externalRepositoryId: nonEmptyStringSchema,
|
|
27
|
+
ref: nonEmptyStringSchema,
|
|
28
|
+
headCommitSha: nonEmptyStringSchema
|
|
29
|
+
});
|
|
30
|
+
export const projectsEventSchemas = {
|
|
31
|
+
[PROJECT_CREATED]: projectCreatedEventSchema,
|
|
32
|
+
[PROJECT_SOURCE_BOUND]: projectSourceBoundEventSchema,
|
|
33
|
+
[PROJECT_SOURCE_COMMIT_OBSERVED]: projectSourceCommitObservedEventSchema
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/events.ts"],"sourcesContent":["import {z} from 'zod';\n\nconst nonEmptyStringSchema = z.string().nonempty();\n\nexport const PROJECT_CREATED = 'projects.project.created' as const;\nexport const PROJECT_SOURCE_BOUND = 'projects.project.source_bound' as const;\nexport const PROJECT_SOURCE_COMMIT_OBSERVED = 'projects.project.source_commit_observed' as const;\n\nexport const projectCreatedEventSchema = z.object({\n actorId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n sourceConnectionId: nonEmptyStringSchema,\n sourceExternalRepositoryId: nonEmptyStringSchema,\n});\nexport type ProjectCreatedEvent = z.infer<typeof projectCreatedEventSchema>;\n\nexport const projectSourceBoundEventSchema = z.object({\n actorId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n sourceConnectionId: nonEmptyStringSchema,\n provider: nonEmptyStringSchema,\n externalRepositoryId: nonEmptyStringSchema,\n});\nexport type ProjectSourceBoundEvent = z.infer<typeof projectSourceBoundEventSchema>;\n\nexport const projectSourceCommitObservedEventSchema = z.object({\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n sourceConnectionId: nonEmptyStringSchema,\n provider: nonEmptyStringSchema,\n externalRepositoryId: nonEmptyStringSchema,\n ref: nonEmptyStringSchema,\n headCommitSha: nonEmptyStringSchema,\n});\nexport type ProjectSourceCommitObservedEvent = z.infer<\n typeof projectSourceCommitObservedEventSchema\n>;\n\nexport interface ProjectsEventMap {\n [PROJECT_CREATED]: ProjectCreatedEvent;\n [PROJECT_SOURCE_BOUND]: ProjectSourceBoundEvent;\n [PROJECT_SOURCE_COMMIT_OBSERVED]: ProjectSourceCommitObservedEvent;\n}\n\nexport const projectsEventSchemas = {\n [PROJECT_CREATED]: projectCreatedEventSchema,\n [PROJECT_SOURCE_BOUND]: projectSourceBoundEventSchema,\n [PROJECT_SOURCE_COMMIT_OBSERVED]: projectSourceCommitObservedEventSchema,\n} satisfies Record<keyof ProjectsEventMap, z.ZodType>;\n"],"names":["z","nonEmptyStringSchema","string","nonempty","PROJECT_CREATED","PROJECT_SOURCE_BOUND","PROJECT_SOURCE_COMMIT_OBSERVED","projectCreatedEventSchema","object","actorId","workspaceId","projectId","sourceConnectionId","sourceExternalRepositoryId","projectSourceBoundEventSchema","provider","externalRepositoryId","projectSourceCommitObservedEventSchema","ref","headCommitSha","projectsEventSchemas"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,MAAMC,uBAAuBD,EAAEE,MAAM,GAAGC,QAAQ;AAEhD,OAAO,MAAMC,kBAAkB,2BAAoC;AACnE,OAAO,MAAMC,uBAAuB,gCAAyC;AAC7E,OAAO,MAAMC,iCAAiC,0CAAmD;AAEjG,OAAO,MAAMC,4BAA4BP,EAAEQ,MAAM,CAAC;IAChDC,SAASR;IACTS,aAAaT;IACbU,WAAWV;IACXW,oBAAoBX;IACpBY,4BAA4BZ;AAC9B,GAAG;AAGH,OAAO,MAAMa,gCAAgCd,EAAEQ,MAAM,CAAC;IACpDC,SAASR;IACTS,aAAaT;IACbU,WAAWV;IACXW,oBAAoBX;IACpBc,UAAUd;IACVe,sBAAsBf;AACxB,GAAG;AAGH,OAAO,MAAMgB,yCAAyCjB,EAAEQ,MAAM,CAAC;IAC7DE,aAAaT;IACbU,WAAWV;IACXW,oBAAoBX;IACpBc,UAAUd;IACVe,sBAAsBf;IACtBiB,KAAKjB;IACLkB,eAAelB;AACjB,GAAG;AAWH,OAAO,MAAMmB,uBAAuB;IAClC,CAAChB,gBAAgB,EAAEG;IACnB,CAACF,qBAAqB,EAAES;IACxB,CAACR,+BAA+B,EAAEW;AACpC,EAAsD"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './e2e/index.js';\nexport * from './events.js';\nexport * from './schemas/index.js';\n"],"names":[],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,cAAc;AAC5B,cAAc,qBAAqB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { type CreateProjectBodyDto, createProjectBodySchema, type ListProjectsQueryDto, type ListProjectsResponseDto, listProjectsQuerySchema, listProjectsResponseSchema, type ProjectDto, type ProjectResponseDto, type ProjectSourceDto, projectDtoSchema, projectResponseSchema, projectSourceDtoSchema, } from './project.js';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export {\n type CreateProjectBodyDto,\n createProjectBodySchema,\n type ListProjectsQueryDto,\n type ListProjectsResponseDto,\n listProjectsQuerySchema,\n listProjectsResponseSchema,\n type ProjectDto,\n type ProjectResponseDto,\n type ProjectSourceDto,\n projectDtoSchema,\n projectResponseSchema,\n projectSourceDtoSchema,\n} from './project.js';\n"],"names":["createProjectBodySchema","listProjectsQuerySchema","listProjectsResponseSchema","projectDtoSchema","projectResponseSchema","projectSourceDtoSchema"],"mappings":"AAAA,SAEEA,uBAAuB,EAGvBC,uBAAuB,EACvBC,0BAA0B,EAI1BC,gBAAgB,EAChBC,qBAAqB,EACrBC,sBAAsB,QACjB,eAAe"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const projectSourceDtoSchema: z.ZodObject<{
|
|
3
|
+
connection_id: z.ZodString;
|
|
4
|
+
external_repository_id: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type ProjectSourceDto = z.infer<typeof projectSourceDtoSchema>;
|
|
7
|
+
export declare const createProjectBodySchema: z.ZodObject<{
|
|
8
|
+
workspace_id: z.ZodString;
|
|
9
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
10
|
+
source: z.ZodObject<{
|
|
11
|
+
connection_id: z.ZodString;
|
|
12
|
+
external_repository_id: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type CreateProjectBodyDto = z.infer<typeof createProjectBodySchema>;
|
|
16
|
+
export declare const projectDtoSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
workspace_id: z.ZodString;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
source: z.ZodObject<{
|
|
21
|
+
connection_id: z.ZodString;
|
|
22
|
+
external_repository_id: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
created_at: z.ZodString;
|
|
25
|
+
updated_at: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type ProjectDto = z.infer<typeof projectDtoSchema>;
|
|
28
|
+
export declare const projectResponseSchema: z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
workspace_id: z.ZodString;
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
source: z.ZodObject<{
|
|
33
|
+
connection_id: z.ZodString;
|
|
34
|
+
external_repository_id: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
created_at: z.ZodString;
|
|
37
|
+
updated_at: z.ZodString;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type ProjectResponseDto = z.infer<typeof projectResponseSchema>;
|
|
40
|
+
export declare const listProjectsQuerySchema: z.ZodObject<{
|
|
41
|
+
workspace_id: z.ZodString;
|
|
42
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
43
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
44
|
+
search: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type ListProjectsQueryDto = z.infer<typeof listProjectsQuerySchema>;
|
|
47
|
+
export declare const listProjectsResponseSchema: z.ZodObject<{
|
|
48
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
workspace_id: z.ZodString;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
source: z.ZodObject<{
|
|
53
|
+
connection_id: z.ZodString;
|
|
54
|
+
external_repository_id: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
created_at: z.ZodString;
|
|
57
|
+
updated_at: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type ListProjectsResponseDto = z.infer<typeof listProjectsResponseSchema>;
|
|
62
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/schemas/project.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,uBAAuB;;;;;;;iBAOlC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAO3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,qBAAqB;;;;;;;;;;iBAAmB,CAAC;AAEtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEvE,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;iBAGrC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { displayNameSchema } from '@shipfox/api-common-dto';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const projectSourceDtoSchema = z.object({
|
|
4
|
+
connection_id: z.string().uuid(),
|
|
5
|
+
external_repository_id: z.string()
|
|
6
|
+
});
|
|
7
|
+
export const createProjectBodySchema = z.object({
|
|
8
|
+
workspace_id: z.string().uuid(),
|
|
9
|
+
name: displayNameSchema,
|
|
10
|
+
source: z.object({
|
|
11
|
+
connection_id: z.string().uuid(),
|
|
12
|
+
external_repository_id: z.string().min(1).max(255)
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
export const projectDtoSchema = z.object({
|
|
16
|
+
id: z.string().uuid(),
|
|
17
|
+
workspace_id: z.string().uuid(),
|
|
18
|
+
name: z.string(),
|
|
19
|
+
source: projectSourceDtoSchema,
|
|
20
|
+
created_at: z.string(),
|
|
21
|
+
updated_at: z.string()
|
|
22
|
+
});
|
|
23
|
+
export const projectResponseSchema = projectDtoSchema;
|
|
24
|
+
export const listProjectsQuerySchema = z.object({
|
|
25
|
+
workspace_id: z.string().uuid(),
|
|
26
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
27
|
+
cursor: z.string().optional(),
|
|
28
|
+
search: z.string().min(1).max(100).optional()
|
|
29
|
+
});
|
|
30
|
+
export const listProjectsResponseSchema = z.object({
|
|
31
|
+
projects: z.array(projectDtoSchema),
|
|
32
|
+
next_cursor: z.string().nullable()
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/project.ts"],"sourcesContent":["import {displayNameSchema} from '@shipfox/api-common-dto';\nimport {z} from 'zod';\n\nexport const projectSourceDtoSchema = z.object({\n connection_id: z.string().uuid(),\n external_repository_id: z.string(),\n});\nexport type ProjectSourceDto = z.infer<typeof projectSourceDtoSchema>;\n\nexport const createProjectBodySchema = z.object({\n workspace_id: z.string().uuid(),\n name: displayNameSchema,\n source: z.object({\n connection_id: z.string().uuid(),\n external_repository_id: z.string().min(1).max(255),\n }),\n});\n\nexport type CreateProjectBodyDto = z.infer<typeof createProjectBodySchema>;\n\nexport const projectDtoSchema = z.object({\n id: z.string().uuid(),\n workspace_id: z.string().uuid(),\n name: z.string(),\n source: projectSourceDtoSchema,\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type ProjectDto = z.infer<typeof projectDtoSchema>;\n\nexport const projectResponseSchema = projectDtoSchema;\n\nexport type ProjectResponseDto = z.infer<typeof projectResponseSchema>;\n\nexport const listProjectsQuerySchema = z.object({\n workspace_id: z.string().uuid(),\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n search: z.string().min(1).max(100).optional(),\n});\n\nexport type ListProjectsQueryDto = z.infer<typeof listProjectsQuerySchema>;\n\nexport const listProjectsResponseSchema = z.object({\n projects: z.array(projectDtoSchema),\n next_cursor: z.string().nullable(),\n});\n\nexport type ListProjectsResponseDto = z.infer<typeof listProjectsResponseSchema>;\n"],"names":["displayNameSchema","z","projectSourceDtoSchema","object","connection_id","string","uuid","external_repository_id","createProjectBodySchema","workspace_id","name","source","min","max","projectDtoSchema","id","created_at","updated_at","projectResponseSchema","listProjectsQuerySchema","limit","coerce","number","int","default","cursor","optional","search","listProjectsResponseSchema","projects","array","next_cursor","nullable"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,0BAA0B;AAC1D,SAAQC,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,yBAAyBD,EAAEE,MAAM,CAAC;IAC7CC,eAAeH,EAAEI,MAAM,GAAGC,IAAI;IAC9BC,wBAAwBN,EAAEI,MAAM;AAClC,GAAG;AAGH,OAAO,MAAMG,0BAA0BP,EAAEE,MAAM,CAAC;IAC9CM,cAAcR,EAAEI,MAAM,GAAGC,IAAI;IAC7BI,MAAMV;IACNW,QAAQV,EAAEE,MAAM,CAAC;QACfC,eAAeH,EAAEI,MAAM,GAAGC,IAAI;QAC9BC,wBAAwBN,EAAEI,MAAM,GAAGO,GAAG,CAAC,GAAGC,GAAG,CAAC;IAChD;AACF,GAAG;AAIH,OAAO,MAAMC,mBAAmBb,EAAEE,MAAM,CAAC;IACvCY,IAAId,EAAEI,MAAM,GAAGC,IAAI;IACnBG,cAAcR,EAAEI,MAAM,GAAGC,IAAI;IAC7BI,MAAMT,EAAEI,MAAM;IACdM,QAAQT;IACRc,YAAYf,EAAEI,MAAM;IACpBY,YAAYhB,EAAEI,MAAM;AACtB,GAAG;AAIH,OAAO,MAAMa,wBAAwBJ,iBAAiB;AAItD,OAAO,MAAMK,0BAA0BlB,EAAEE,MAAM,CAAC;IAC9CM,cAAcR,EAAEI,MAAM,GAAGC,IAAI;IAC7Bc,OAAOnB,EAAEoB,MAAM,CAACC,MAAM,GAAGC,GAAG,GAAGX,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKW,OAAO,CAAC;IACvDC,QAAQxB,EAAEI,MAAM,GAAGqB,QAAQ;IAC3BC,QAAQ1B,EAAEI,MAAM,GAAGO,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKa,QAAQ;AAC7C,GAAG;AAIH,OAAO,MAAME,6BAA6B3B,EAAEE,MAAM,CAAC;IACjD0B,UAAU5B,EAAE6B,KAAK,CAAChB;IAClBiB,aAAa9B,EAAEI,MAAM,GAAG2B,QAAQ;AAClC,GAAG"}
|