@shipfox/api-definitions-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 +28 -0
- package/LICENSE +21 -0
- package/dist/events.d.ts +61 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +30 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/dto.d.ts +148 -0
- package/dist/schemas/dto.d.ts.map +1 -0
- package/dist/schemas/dto.js +109 -0
- package/dist/schemas/dto.js.map +1 -0
- package/dist/schemas/index.d.ts +3 -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/trigger.d.ts +10 -0
- package/dist/schemas/trigger.d.ts.map +1 -0
- package/dist/schemas/trigger.js +10 -0
- package/dist/schemas/trigger.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -0
- package/package.json +53 -0
- package/src/events.ts +43 -0
- package/src/index.ts +30 -0
- package/src/schemas/dto.ts +115 -0
- package/src/schemas/index.ts +17 -0
- package/src/schemas/trigger.ts +10 -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 +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ shipfox-tsc-emit
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ shipfox-tsc-check
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @shipfox/api-definitions-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
|
+
## 0.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 59ba68b: Integrates workflow definitions with accepted workflow documents and normalized workflow models.
|
|
14
|
+
- 7fa8f0b: Fix VCS sync failing when a manual definition shares a config_path. The
|
|
15
|
+
`definitions_wd_project_id_config_path_unique` index was source-agnostic, so a
|
|
16
|
+
manual (or validated) definition and a ref/sha-keyed VCS definition at the same
|
|
17
|
+
`config_path` collided on an index that was not the VCS upsert's `ON CONFLICT`
|
|
18
|
+
arbiter, raising an unhandled unique violation and breaking sync. The index (and
|
|
19
|
+
the manual upsert predicate) is now scoped to manual rows so the two coexist.
|
|
20
|
+
|
|
21
|
+
A CHECK constraint and request validation now bind `source` to its git
|
|
22
|
+
coordinates (vcs rows carry a ref or sha; manual rows carry neither), so the
|
|
23
|
+
index predicate's correctness is enforced rather than incidental.
|
|
24
|
+
|
|
25
|
+
- 9a5aac4: Adds cron trigger schedule and timezone fields with source-specific document validation.
|
|
26
|
+
- 61de795: Adds canonical runner label validation and default runner label fallback for workflow definition parsing.
|
|
27
|
+
- 2933c33: Adds drain-boundary Zod validation for current outbox publisher event payloads.
|
|
28
|
+
- b8919da: Removes the unused workflow-spec, job, and step schemas now that `@shipfox/workflow-document` owns workflow document parsing, keeping only the still-used `TriggerDto` type.
|
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.
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DEFINITION_RESOLVED: "definitions.definition.resolved";
|
|
3
|
+
export declare const DEFINITION_DELETED: "definitions.definition.deleted";
|
|
4
|
+
export declare const DEFINITION_INVALID: "definitions.definition.invalid";
|
|
5
|
+
export declare const definitionResolvedEventSchema: z.ZodObject<{
|
|
6
|
+
definitionId: z.ZodString;
|
|
7
|
+
projectId: z.ZodString;
|
|
8
|
+
workspaceId: z.ZodString;
|
|
9
|
+
configPath: z.ZodNullable<z.ZodString>;
|
|
10
|
+
triggers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
11
|
+
source: z.ZodString;
|
|
12
|
+
event: z.ZodString;
|
|
13
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
15
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type DefinitionResolvedEvent = z.infer<typeof definitionResolvedEventSchema>;
|
|
19
|
+
export declare const definitionDeletedEventSchema: z.ZodObject<{
|
|
20
|
+
definitionId: z.ZodString;
|
|
21
|
+
projectId: z.ZodString;
|
|
22
|
+
workspaceId: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type DefinitionDeletedEvent = z.infer<typeof definitionDeletedEventSchema>;
|
|
25
|
+
export declare const definitionInvalidEventSchema: z.ZodObject<{
|
|
26
|
+
projectId: z.ZodString;
|
|
27
|
+
ref: z.ZodString;
|
|
28
|
+
errors: z.ZodArray<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type DefinitionInvalidEvent = z.infer<typeof definitionInvalidEventSchema>;
|
|
31
|
+
export interface DefinitionsEventMap {
|
|
32
|
+
[DEFINITION_RESOLVED]: DefinitionResolvedEvent;
|
|
33
|
+
[DEFINITION_DELETED]: DefinitionDeletedEvent;
|
|
34
|
+
[DEFINITION_INVALID]: DefinitionInvalidEvent;
|
|
35
|
+
}
|
|
36
|
+
export declare const definitionsEventSchemas: {
|
|
37
|
+
"definitions.definition.resolved": z.ZodObject<{
|
|
38
|
+
definitionId: z.ZodString;
|
|
39
|
+
projectId: z.ZodString;
|
|
40
|
+
workspaceId: z.ZodString;
|
|
41
|
+
configPath: z.ZodNullable<z.ZodString>;
|
|
42
|
+
triggers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
43
|
+
source: z.ZodString;
|
|
44
|
+
event: z.ZodString;
|
|
45
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
46
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
47
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
"definitions.definition.deleted": z.ZodObject<{
|
|
51
|
+
definitionId: z.ZodString;
|
|
52
|
+
projectId: z.ZodString;
|
|
53
|
+
workspaceId: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
"definitions.definition.invalid": z.ZodObject<{
|
|
56
|
+
projectId: z.ZodString;
|
|
57
|
+
ref: z.ZodString;
|
|
58
|
+
errors: z.ZodArray<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
};
|
|
61
|
+
//# 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;AAKtB,eAAO,MAAM,mBAAmB,EAAG,iCAA0C,CAAC;AAC9E,eAAO,MAAM,kBAAkB,EAAG,gCAAyC,CAAC;AAC5E,eAAO,MAAM,kBAAkB,EAAG,gCAAyC,CAAC;AAE5E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;iBAMxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,MAAM,WAAW,mBAAmB;IAClC,CAAC,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC/C,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IAC7C,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC9C;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;CAIoB,CAAC"}
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { triggerDtoSchema } from '#schemas/trigger.js';
|
|
3
|
+
const nonEmptyStringSchema = z.string().nonempty();
|
|
4
|
+
export const DEFINITION_RESOLVED = 'definitions.definition.resolved';
|
|
5
|
+
export const DEFINITION_DELETED = 'definitions.definition.deleted';
|
|
6
|
+
export const DEFINITION_INVALID = 'definitions.definition.invalid';
|
|
7
|
+
export const definitionResolvedEventSchema = z.object({
|
|
8
|
+
definitionId: nonEmptyStringSchema,
|
|
9
|
+
projectId: nonEmptyStringSchema,
|
|
10
|
+
workspaceId: nonEmptyStringSchema,
|
|
11
|
+
configPath: z.string().nullable(),
|
|
12
|
+
triggers: z.record(z.string(), triggerDtoSchema)
|
|
13
|
+
});
|
|
14
|
+
export const definitionDeletedEventSchema = z.object({
|
|
15
|
+
definitionId: nonEmptyStringSchema,
|
|
16
|
+
projectId: nonEmptyStringSchema,
|
|
17
|
+
workspaceId: nonEmptyStringSchema
|
|
18
|
+
});
|
|
19
|
+
export const definitionInvalidEventSchema = z.object({
|
|
20
|
+
projectId: nonEmptyStringSchema,
|
|
21
|
+
ref: nonEmptyStringSchema,
|
|
22
|
+
errors: z.array(z.string())
|
|
23
|
+
});
|
|
24
|
+
export const definitionsEventSchemas = {
|
|
25
|
+
[DEFINITION_RESOLVED]: definitionResolvedEventSchema,
|
|
26
|
+
[DEFINITION_DELETED]: definitionDeletedEventSchema,
|
|
27
|
+
[DEFINITION_INVALID]: definitionInvalidEventSchema
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/events.ts"],"sourcesContent":["import {z} from 'zod';\nimport {triggerDtoSchema} from '#schemas/trigger.js';\n\nconst nonEmptyStringSchema = z.string().nonempty();\n\nexport const DEFINITION_RESOLVED = 'definitions.definition.resolved' as const;\nexport const DEFINITION_DELETED = 'definitions.definition.deleted' as const;\nexport const DEFINITION_INVALID = 'definitions.definition.invalid' as const;\n\nexport const definitionResolvedEventSchema = z.object({\n definitionId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n configPath: z.string().nullable(),\n triggers: z.record(z.string(), triggerDtoSchema),\n});\nexport type DefinitionResolvedEvent = z.infer<typeof definitionResolvedEventSchema>;\n\nexport const definitionDeletedEventSchema = z.object({\n definitionId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n});\nexport type DefinitionDeletedEvent = z.infer<typeof definitionDeletedEventSchema>;\n\nexport const definitionInvalidEventSchema = z.object({\n projectId: nonEmptyStringSchema,\n ref: nonEmptyStringSchema,\n errors: z.array(z.string()),\n});\nexport type DefinitionInvalidEvent = z.infer<typeof definitionInvalidEventSchema>;\n\nexport interface DefinitionsEventMap {\n [DEFINITION_RESOLVED]: DefinitionResolvedEvent;\n [DEFINITION_DELETED]: DefinitionDeletedEvent;\n [DEFINITION_INVALID]: DefinitionInvalidEvent;\n}\n\nexport const definitionsEventSchemas = {\n [DEFINITION_RESOLVED]: definitionResolvedEventSchema,\n [DEFINITION_DELETED]: definitionDeletedEventSchema,\n [DEFINITION_INVALID]: definitionInvalidEventSchema,\n} satisfies Record<keyof DefinitionsEventMap, z.ZodType>;\n"],"names":["z","triggerDtoSchema","nonEmptyStringSchema","string","nonempty","DEFINITION_RESOLVED","DEFINITION_DELETED","DEFINITION_INVALID","definitionResolvedEventSchema","object","definitionId","projectId","workspaceId","configPath","nullable","triggers","record","definitionDeletedEventSchema","definitionInvalidEventSchema","ref","errors","array","definitionsEventSchemas"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,gBAAgB,QAAO,sBAAsB;AAErD,MAAMC,uBAAuBF,EAAEG,MAAM,GAAGC,QAAQ;AAEhD,OAAO,MAAMC,sBAAsB,kCAA2C;AAC9E,OAAO,MAAMC,qBAAqB,iCAA0C;AAC5E,OAAO,MAAMC,qBAAqB,iCAA0C;AAE5E,OAAO,MAAMC,gCAAgCR,EAAES,MAAM,CAAC;IACpDC,cAAcR;IACdS,WAAWT;IACXU,aAAaV;IACbW,YAAYb,EAAEG,MAAM,GAAGW,QAAQ;IAC/BC,UAAUf,EAAEgB,MAAM,CAAChB,EAAEG,MAAM,IAAIF;AACjC,GAAG;AAGH,OAAO,MAAMgB,+BAA+BjB,EAAES,MAAM,CAAC;IACnDC,cAAcR;IACdS,WAAWT;IACXU,aAAaV;AACf,GAAG;AAGH,OAAO,MAAMgB,+BAA+BlB,EAAES,MAAM,CAAC;IACnDE,WAAWT;IACXiB,KAAKjB;IACLkB,QAAQpB,EAAEqB,KAAK,CAACrB,EAAEG,MAAM;AAC1B,GAAG;AASH,OAAO,MAAMmB,0BAA0B;IACrC,CAACjB,oBAAoB,EAAEG;IACvB,CAACF,mBAAmB,EAAEW;IACtB,CAACV,mBAAmB,EAAEW;AACxB,EAAyD"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { type CreateDefinitionBodyDto, createDefinitionBodySchema, type DefinitionDto, type DefinitionListQueryDto, type DefinitionListResponseDto, type DefinitionResponseDto, type DefinitionSyncSummaryDto, type DefinitionValidationErrorDto, definitionDtoSchema, definitionListQuerySchema, definitionListResponseSchema, definitionResponseSchema, definitionSyncSummarySchema, definitionValidationErrorSchema, type TriggerDto, } from '#schemas/index.js';
|
|
2
|
+
export { DEFINITION_DELETED, DEFINITION_INVALID, DEFINITION_RESOLVED, type DefinitionDeletedEvent, type DefinitionInvalidEvent, type DefinitionResolvedEvent, type DefinitionsEventMap, definitionDeletedEventSchema, definitionInvalidEventSchema, definitionResolvedEventSchema, definitionsEventSchemas, } from './events.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,mBAAmB,EACnB,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,EAC/B,KAAK,UAAU,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createDefinitionBodySchema, definitionDtoSchema, definitionListQuerySchema, definitionListResponseSchema, definitionResponseSchema, definitionSyncSummarySchema, definitionValidationErrorSchema } from '#schemas/index.js';
|
|
2
|
+
export { DEFINITION_DELETED, DEFINITION_INVALID, DEFINITION_RESOLVED, definitionDeletedEventSchema, definitionInvalidEventSchema, definitionResolvedEventSchema, definitionsEventSchemas } from './events.js';
|
|
3
|
+
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n type CreateDefinitionBodyDto,\n createDefinitionBodySchema,\n type DefinitionDto,\n type DefinitionListQueryDto,\n type DefinitionListResponseDto,\n type DefinitionResponseDto,\n type DefinitionSyncSummaryDto,\n type DefinitionValidationErrorDto,\n definitionDtoSchema,\n definitionListQuerySchema,\n definitionListResponseSchema,\n definitionResponseSchema,\n definitionSyncSummarySchema,\n definitionValidationErrorSchema,\n type TriggerDto,\n} from '#schemas/index.js';\nexport {\n DEFINITION_DELETED,\n DEFINITION_INVALID,\n DEFINITION_RESOLVED,\n type DefinitionDeletedEvent,\n type DefinitionInvalidEvent,\n type DefinitionResolvedEvent,\n type DefinitionsEventMap,\n definitionDeletedEventSchema,\n definitionInvalidEventSchema,\n definitionResolvedEventSchema,\n definitionsEventSchemas,\n} from './events.js';\n"],"names":["createDefinitionBodySchema","definitionDtoSchema","definitionListQuerySchema","definitionListResponseSchema","definitionResponseSchema","definitionSyncSummarySchema","definitionValidationErrorSchema","DEFINITION_DELETED","DEFINITION_INVALID","DEFINITION_RESOLVED","definitionDeletedEventSchema","definitionInvalidEventSchema","definitionResolvedEventSchema","definitionsEventSchemas"],"mappings":"AAAA,SAEEA,0BAA0B,EAO1BC,mBAAmB,EACnBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,wBAAwB,EACxBC,2BAA2B,EAC3BC,+BAA+B,QAE1B,oBAAoB;AAC3B,SACEC,kBAAkB,EAClBC,kBAAkB,EAClBC,mBAAmB,EAKnBC,4BAA4B,EAC5BC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,uBAAuB,QAClB,cAAc"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createDefinitionBodySchema: z.ZodObject<{
|
|
3
|
+
project_id: z.ZodString;
|
|
4
|
+
config_path: z.ZodOptional<z.ZodString>;
|
|
5
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
manual: "manual";
|
|
7
|
+
vcs: "vcs";
|
|
8
|
+
}>>;
|
|
9
|
+
yaml: z.ZodString;
|
|
10
|
+
sha: z.ZodOptional<z.ZodString>;
|
|
11
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type CreateDefinitionBodyDto = z.infer<typeof createDefinitionBodySchema>;
|
|
14
|
+
export declare const definitionDtoSchema: z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
project_id: z.ZodString;
|
|
17
|
+
config_path: z.ZodNullable<z.ZodString>;
|
|
18
|
+
source: z.ZodEnum<{
|
|
19
|
+
manual: "manual";
|
|
20
|
+
vcs: "vcs";
|
|
21
|
+
}>;
|
|
22
|
+
sha: z.ZodNullable<z.ZodString>;
|
|
23
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
workflow_document: z.ZodUnknown;
|
|
26
|
+
workflow_model: z.ZodUnknown;
|
|
27
|
+
manual_trigger: z.ZodNullable<z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
fetched_at: z.ZodString;
|
|
31
|
+
created_at: z.ZodString;
|
|
32
|
+
updated_at: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type DefinitionDto = z.infer<typeof definitionDtoSchema>;
|
|
35
|
+
export declare const definitionResponseSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
project_id: z.ZodString;
|
|
38
|
+
config_path: z.ZodNullable<z.ZodString>;
|
|
39
|
+
source: z.ZodEnum<{
|
|
40
|
+
manual: "manual";
|
|
41
|
+
vcs: "vcs";
|
|
42
|
+
}>;
|
|
43
|
+
sha: z.ZodNullable<z.ZodString>;
|
|
44
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
workflow_document: z.ZodUnknown;
|
|
47
|
+
workflow_model: z.ZodUnknown;
|
|
48
|
+
manual_trigger: z.ZodNullable<z.ZodObject<{
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
fetched_at: z.ZodString;
|
|
52
|
+
created_at: z.ZodString;
|
|
53
|
+
updated_at: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type DefinitionResponseDto = z.infer<typeof definitionResponseSchema>;
|
|
56
|
+
export declare const definitionValidationErrorSchema: z.ZodObject<{
|
|
57
|
+
message: z.ZodString;
|
|
58
|
+
path: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type DefinitionValidationErrorDto = z.infer<typeof definitionValidationErrorSchema>;
|
|
61
|
+
export declare const definitionListQuerySchema: z.ZodObject<{
|
|
62
|
+
project_id: z.ZodString;
|
|
63
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
64
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type DefinitionListQueryDto = z.infer<typeof definitionListQuerySchema>;
|
|
67
|
+
export declare const definitionSyncSummarySchema: z.ZodObject<{
|
|
68
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
69
|
+
status: z.ZodEnum<{
|
|
70
|
+
pending: "pending";
|
|
71
|
+
syncing: "syncing";
|
|
72
|
+
succeeded: "succeeded";
|
|
73
|
+
failed: "failed";
|
|
74
|
+
}>;
|
|
75
|
+
last_sync_at: z.ZodString;
|
|
76
|
+
started_at: z.ZodNullable<z.ZodString>;
|
|
77
|
+
finished_at: z.ZodNullable<z.ZodString>;
|
|
78
|
+
last_error_code: z.ZodNullable<z.ZodEnum<{
|
|
79
|
+
unknown: "unknown";
|
|
80
|
+
"no-workflow-files": "no-workflow-files";
|
|
81
|
+
"invalid-definition": "invalid-definition";
|
|
82
|
+
"provider-repository-not-found": "provider-repository-not-found";
|
|
83
|
+
"provider-file-not-found": "provider-file-not-found";
|
|
84
|
+
"provider-access-denied": "provider-access-denied";
|
|
85
|
+
"provider-rate-limited": "provider-rate-limited";
|
|
86
|
+
"provider-timeout": "provider-timeout";
|
|
87
|
+
"provider-unavailable": "provider-unavailable";
|
|
88
|
+
"provider-malformed-response": "provider-malformed-response";
|
|
89
|
+
"content-too-large": "content-too-large";
|
|
90
|
+
"too-many-files": "too-many-files";
|
|
91
|
+
"connection-unavailable": "connection-unavailable";
|
|
92
|
+
}>>;
|
|
93
|
+
last_error_message: z.ZodNullable<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type DefinitionSyncSummaryDto = z.infer<typeof definitionSyncSummarySchema>;
|
|
96
|
+
export declare const definitionListResponseSchema: z.ZodObject<{
|
|
97
|
+
definitions: z.ZodArray<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
project_id: z.ZodString;
|
|
100
|
+
config_path: z.ZodNullable<z.ZodString>;
|
|
101
|
+
source: z.ZodEnum<{
|
|
102
|
+
manual: "manual";
|
|
103
|
+
vcs: "vcs";
|
|
104
|
+
}>;
|
|
105
|
+
sha: z.ZodNullable<z.ZodString>;
|
|
106
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
workflow_document: z.ZodUnknown;
|
|
109
|
+
workflow_model: z.ZodUnknown;
|
|
110
|
+
manual_trigger: z.ZodNullable<z.ZodObject<{
|
|
111
|
+
name: z.ZodString;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
fetched_at: z.ZodString;
|
|
114
|
+
created_at: z.ZodString;
|
|
115
|
+
updated_at: z.ZodString;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
sync: z.ZodNullable<z.ZodObject<{
|
|
118
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
119
|
+
status: z.ZodEnum<{
|
|
120
|
+
pending: "pending";
|
|
121
|
+
syncing: "syncing";
|
|
122
|
+
succeeded: "succeeded";
|
|
123
|
+
failed: "failed";
|
|
124
|
+
}>;
|
|
125
|
+
last_sync_at: z.ZodString;
|
|
126
|
+
started_at: z.ZodNullable<z.ZodString>;
|
|
127
|
+
finished_at: z.ZodNullable<z.ZodString>;
|
|
128
|
+
last_error_code: z.ZodNullable<z.ZodEnum<{
|
|
129
|
+
unknown: "unknown";
|
|
130
|
+
"no-workflow-files": "no-workflow-files";
|
|
131
|
+
"invalid-definition": "invalid-definition";
|
|
132
|
+
"provider-repository-not-found": "provider-repository-not-found";
|
|
133
|
+
"provider-file-not-found": "provider-file-not-found";
|
|
134
|
+
"provider-access-denied": "provider-access-denied";
|
|
135
|
+
"provider-rate-limited": "provider-rate-limited";
|
|
136
|
+
"provider-timeout": "provider-timeout";
|
|
137
|
+
"provider-unavailable": "provider-unavailable";
|
|
138
|
+
"provider-malformed-response": "provider-malformed-response";
|
|
139
|
+
"content-too-large": "content-too-large";
|
|
140
|
+
"too-many-files": "too-many-files";
|
|
141
|
+
"connection-unavailable": "connection-unavailable";
|
|
142
|
+
}>>;
|
|
143
|
+
last_error_message: z.ZodNullable<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type DefinitionListResponseDto = z.infer<typeof definitionListResponseSchema>;
|
|
148
|
+
//# sourceMappingURL=dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../src/schemas/dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,0BAA0B;;;;;;;;;;iBAiCnC,CAAC;AAEL,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;iBAkB9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;iBAAsB,CAAC;AAE5D,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,eAAO,MAAM,+BAA+B;;;iBAG1C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE3F,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBtC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEnF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIvC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const createDefinitionBodySchema = z.object({
|
|
3
|
+
project_id: z.string().uuid(),
|
|
4
|
+
config_path: z.string().min(1).optional(),
|
|
5
|
+
source: z.enum([
|
|
6
|
+
'manual',
|
|
7
|
+
'vcs'
|
|
8
|
+
]).optional(),
|
|
9
|
+
yaml: z.string().min(1).max(1_000_000),
|
|
10
|
+
sha: z.string().optional(),
|
|
11
|
+
ref: z.string().optional()
|
|
12
|
+
}).superRefine((value, ctx)=>{
|
|
13
|
+
const source = value.source ?? 'manual';
|
|
14
|
+
if (source === 'vcs' && !value.config_path) {
|
|
15
|
+
ctx.addIssue({
|
|
16
|
+
code: 'custom',
|
|
17
|
+
message: 'config_path is required for VCS definitions',
|
|
18
|
+
path: [
|
|
19
|
+
'config_path'
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const hasRefOrSha = value.ref != null || value.sha != null;
|
|
24
|
+
if (source === 'vcs' && !hasRefOrSha) {
|
|
25
|
+
ctx.addIssue({
|
|
26
|
+
code: 'custom',
|
|
27
|
+
message: 'VCS definitions require a ref or sha',
|
|
28
|
+
path: [
|
|
29
|
+
'ref'
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (source === 'manual' && hasRefOrSha) {
|
|
34
|
+
ctx.addIssue({
|
|
35
|
+
code: 'custom',
|
|
36
|
+
message: 'manual definitions must not set ref or sha',
|
|
37
|
+
path: value.ref != null ? [
|
|
38
|
+
'ref'
|
|
39
|
+
] : [
|
|
40
|
+
'sha'
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export const definitionDtoSchema = z.object({
|
|
46
|
+
id: z.string().uuid(),
|
|
47
|
+
project_id: z.string().uuid(),
|
|
48
|
+
config_path: z.string().nullable(),
|
|
49
|
+
source: z.enum([
|
|
50
|
+
'manual',
|
|
51
|
+
'vcs'
|
|
52
|
+
]),
|
|
53
|
+
sha: z.string().nullable(),
|
|
54
|
+
ref: z.string().nullable(),
|
|
55
|
+
name: z.string(),
|
|
56
|
+
workflow_document: z.unknown(),
|
|
57
|
+
workflow_model: z.unknown(),
|
|
58
|
+
manual_trigger: z.object({
|
|
59
|
+
name: z.string()
|
|
60
|
+
}).nullable(),
|
|
61
|
+
fetched_at: z.string(),
|
|
62
|
+
created_at: z.string(),
|
|
63
|
+
updated_at: z.string()
|
|
64
|
+
});
|
|
65
|
+
export const definitionResponseSchema = definitionDtoSchema;
|
|
66
|
+
export const definitionValidationErrorSchema = z.object({
|
|
67
|
+
message: z.string(),
|
|
68
|
+
path: z.string().optional()
|
|
69
|
+
});
|
|
70
|
+
export const definitionListQuerySchema = z.object({
|
|
71
|
+
project_id: z.string().uuid(),
|
|
72
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
73
|
+
cursor: z.string().optional()
|
|
74
|
+
});
|
|
75
|
+
export const definitionSyncSummarySchema = z.object({
|
|
76
|
+
ref: z.string().nullable(),
|
|
77
|
+
status: z.enum([
|
|
78
|
+
'pending',
|
|
79
|
+
'syncing',
|
|
80
|
+
'succeeded',
|
|
81
|
+
'failed'
|
|
82
|
+
]),
|
|
83
|
+
last_sync_at: z.string(),
|
|
84
|
+
started_at: z.string().nullable(),
|
|
85
|
+
finished_at: z.string().nullable(),
|
|
86
|
+
last_error_code: z.enum([
|
|
87
|
+
'no-workflow-files',
|
|
88
|
+
'invalid-definition',
|
|
89
|
+
'provider-repository-not-found',
|
|
90
|
+
'provider-file-not-found',
|
|
91
|
+
'provider-access-denied',
|
|
92
|
+
'provider-rate-limited',
|
|
93
|
+
'provider-timeout',
|
|
94
|
+
'provider-unavailable',
|
|
95
|
+
'provider-malformed-response',
|
|
96
|
+
'content-too-large',
|
|
97
|
+
'too-many-files',
|
|
98
|
+
'connection-unavailable',
|
|
99
|
+
'unknown'
|
|
100
|
+
]).nullable(),
|
|
101
|
+
last_error_message: z.string().nullable()
|
|
102
|
+
});
|
|
103
|
+
export const definitionListResponseSchema = z.object({
|
|
104
|
+
definitions: z.array(definitionResponseSchema),
|
|
105
|
+
sync: definitionSyncSummarySchema.nullable(),
|
|
106
|
+
next_cursor: z.string().nullable()
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
//# sourceMappingURL=dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/dto.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const createDefinitionBodySchema = z\n .object({\n project_id: z.string().uuid(),\n config_path: z.string().min(1).optional(),\n source: z.enum(['manual', 'vcs']).optional(),\n yaml: z.string().min(1).max(1_000_000),\n sha: z.string().optional(),\n ref: z.string().optional(),\n })\n .superRefine((value, ctx) => {\n const source = value.source ?? 'manual';\n if (source === 'vcs' && !value.config_path) {\n ctx.addIssue({\n code: 'custom',\n message: 'config_path is required for VCS definitions',\n path: ['config_path'],\n });\n }\n const hasRefOrSha = value.ref != null || value.sha != null;\n if (source === 'vcs' && !hasRefOrSha) {\n ctx.addIssue({\n code: 'custom',\n message: 'VCS definitions require a ref or sha',\n path: ['ref'],\n });\n }\n if (source === 'manual' && hasRefOrSha) {\n ctx.addIssue({\n code: 'custom',\n message: 'manual definitions must not set ref or sha',\n path: value.ref != null ? ['ref'] : ['sha'],\n });\n }\n });\n\nexport type CreateDefinitionBodyDto = z.infer<typeof createDefinitionBodySchema>;\n\nexport const definitionDtoSchema = z.object({\n id: z.string().uuid(),\n project_id: z.string().uuid(),\n config_path: z.string().nullable(),\n source: z.enum(['manual', 'vcs']),\n sha: z.string().nullable(),\n ref: z.string().nullable(),\n name: z.string(),\n workflow_document: z.unknown(),\n workflow_model: z.unknown(),\n manual_trigger: z\n .object({\n name: z.string(),\n })\n .nullable(),\n fetched_at: z.string(),\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type DefinitionDto = z.infer<typeof definitionDtoSchema>;\n\nexport const definitionResponseSchema = definitionDtoSchema;\n\nexport type DefinitionResponseDto = z.infer<typeof definitionResponseSchema>;\n\nexport const definitionValidationErrorSchema = z.object({\n message: z.string(),\n path: z.string().optional(),\n});\n\nexport type DefinitionValidationErrorDto = z.infer<typeof definitionValidationErrorSchema>;\n\nexport const definitionListQuerySchema = z.object({\n project_id: z.string().uuid(),\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n});\n\nexport type DefinitionListQueryDto = z.infer<typeof definitionListQuerySchema>;\n\nexport const definitionSyncSummarySchema = z.object({\n ref: z.string().nullable(),\n status: z.enum(['pending', 'syncing', 'succeeded', 'failed']),\n last_sync_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n last_error_code: z\n .enum([\n 'no-workflow-files',\n 'invalid-definition',\n 'provider-repository-not-found',\n 'provider-file-not-found',\n 'provider-access-denied',\n 'provider-rate-limited',\n 'provider-timeout',\n 'provider-unavailable',\n 'provider-malformed-response',\n 'content-too-large',\n 'too-many-files',\n 'connection-unavailable',\n 'unknown',\n ])\n .nullable(),\n last_error_message: z.string().nullable(),\n});\n\nexport type DefinitionSyncSummaryDto = z.infer<typeof definitionSyncSummarySchema>;\n\nexport const definitionListResponseSchema = z.object({\n definitions: z.array(definitionResponseSchema),\n sync: definitionSyncSummarySchema.nullable(),\n next_cursor: z.string().nullable(),\n});\n\nexport type DefinitionListResponseDto = z.infer<typeof definitionListResponseSchema>;\n"],"names":["z","createDefinitionBodySchema","object","project_id","string","uuid","config_path","min","optional","source","enum","yaml","max","sha","ref","superRefine","value","ctx","addIssue","code","message","path","hasRefOrSha","definitionDtoSchema","id","nullable","name","workflow_document","unknown","workflow_model","manual_trigger","fetched_at","created_at","updated_at","definitionResponseSchema","definitionValidationErrorSchema","definitionListQuerySchema","limit","coerce","number","int","default","cursor","definitionSyncSummarySchema","status","last_sync_at","started_at","finished_at","last_error_code","last_error_message","definitionListResponseSchema","definitions","array","sync","next_cursor"],"mappings":"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"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { type CreateDefinitionBodyDto, createDefinitionBodySchema, type DefinitionDto, type DefinitionListQueryDto, type DefinitionListResponseDto, type DefinitionResponseDto, type DefinitionSyncSummaryDto, type DefinitionValidationErrorDto, definitionDtoSchema, definitionListQuerySchema, definitionListResponseSchema, definitionResponseSchema, definitionSyncSummarySchema, definitionValidationErrorSchema, } from './dto.js';
|
|
2
|
+
export type { TriggerDto } from './trigger.js';
|
|
3
|
+
//# 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,uBAAuB,EAC5B,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,mBAAmB,EACnB,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,UAAU,CAAC;AAClB,YAAY,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export {\n type CreateDefinitionBodyDto,\n createDefinitionBodySchema,\n type DefinitionDto,\n type DefinitionListQueryDto,\n type DefinitionListResponseDto,\n type DefinitionResponseDto,\n type DefinitionSyncSummaryDto,\n type DefinitionValidationErrorDto,\n definitionDtoSchema,\n definitionListQuerySchema,\n definitionListResponseSchema,\n definitionResponseSchema,\n definitionSyncSummarySchema,\n definitionValidationErrorSchema,\n} from './dto.js';\nexport type {TriggerDto} from './trigger.js';\n"],"names":["createDefinitionBodySchema","definitionDtoSchema","definitionListQuerySchema","definitionListResponseSchema","definitionResponseSchema","definitionSyncSummarySchema","definitionValidationErrorSchema"],"mappings":"AAAA,SAEEA,0BAA0B,EAO1BC,mBAAmB,EACnBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,wBAAwB,EACxBC,2BAA2B,EAC3BC,+BAA+B,QAC1B,WAAW"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const triggerDtoSchema: z.ZodObject<{
|
|
3
|
+
source: z.ZodString;
|
|
4
|
+
event: z.ZodString;
|
|
5
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
7
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type TriggerDto = z.infer<typeof triggerDtoSchema>;
|
|
10
|
+
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../src/schemas/trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,gBAAgB;;;;;;iBAM3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const triggerDtoSchema = z.object({
|
|
3
|
+
source: z.string(),
|
|
4
|
+
event: z.string(),
|
|
5
|
+
with: z.record(z.string(), z.unknown()).optional(),
|
|
6
|
+
filter: z.string().optional(),
|
|
7
|
+
config: z.record(z.string(), z.unknown()).optional()
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/trigger.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const triggerDtoSchema = z.object({\n source: z.string(),\n event: z.string(),\n with: z.record(z.string(), z.unknown()).optional(),\n filter: z.string().optional(),\n config: z.record(z.string(), z.unknown()).optional(),\n});\nexport type TriggerDto = z.infer<typeof triggerDtoSchema>;\n"],"names":["z","triggerDtoSchema","object","source","string","event","with","record","unknown","optional","filter","config"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,mBAAmBD,EAAEE,MAAM,CAAC;IACvCC,QAAQH,EAAEI,MAAM;IAChBC,OAAOL,EAAEI,MAAM;IACfE,MAAMN,EAAEO,MAAM,CAACP,EAAEI,MAAM,IAAIJ,EAAEQ,OAAO,IAAIC,QAAQ;IAChDC,QAAQV,EAAEI,MAAM,GAAGK,QAAQ;IAC3BE,QAAQX,EAAEO,MAAM,CAACP,EAAEI,MAAM,IAAIJ,EAAEQ,OAAO,IAAIC,QAAQ;AACpD,GAAG"}
|