@remit/api-zod-schemas 0.0.83 → 0.0.84
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/middleware.d.ts.map +1 -1
- package/middleware.js +2 -2
- package/middleware.js.map +1 -1
- package/middleware.ts +2 -5
- package/package.json +1 -1
- package/schemas.d.ts +151 -13
- package/schemas.d.ts.map +1 -1
- package/schemas.js +29 -15
- package/schemas.js.map +1 -1
- package/schemas.ts +29 -15
package/schemas.ts
CHANGED
|
@@ -828,14 +828,14 @@ export type FilterAllOfTest = { test: "allof"; tests: Array<FilterAllOfTest | Fi
|
|
|
828
828
|
|
|
829
829
|
export const FilterAllOfTestSchema: z.ZodType<FilterAllOfTest> = z.object({
|
|
830
830
|
test: z.literal("allof"),
|
|
831
|
-
tests: z.array(z.union([z.lazy(() => FilterAllOfTestSchema), z.lazy(() => FilterAnyOfTestSchema), z.lazy(() => FilterNotTestSchema), FilterHeaderTestSchema, FilterAddressTestSchema, FilterHasWordsTestSchema]))
|
|
831
|
+
tests: z.array(z.union([z.lazy(() => FilterAllOfTestSchema), z.lazy(() => FilterAnyOfTestSchema), z.lazy(() => FilterNotTestSchema), FilterHeaderTestSchema, FilterAddressTestSchema, FilterHasWordsTestSchema])).min(1).max(50)
|
|
832
832
|
});
|
|
833
833
|
|
|
834
834
|
export type FilterAnyOfTest = { test: "anyof"; tests: Array<FilterAllOfTest | FilterAnyOfTest | FilterNotTest | z.infer<typeof FilterHeaderTestSchema> | z.infer<typeof FilterAddressTestSchema> | z.infer<typeof FilterHasWordsTestSchema>> };
|
|
835
835
|
|
|
836
836
|
export const FilterAnyOfTestSchema: z.ZodType<FilterAnyOfTest> = z.object({
|
|
837
837
|
test: z.literal("anyof"),
|
|
838
|
-
tests: z.array(z.union([FilterAllOfTestSchema, z.lazy(() => FilterAnyOfTestSchema), z.lazy(() => FilterNotTestSchema), FilterHeaderTestSchema, FilterAddressTestSchema, FilterHasWordsTestSchema]))
|
|
838
|
+
tests: z.array(z.union([FilterAllOfTestSchema, z.lazy(() => FilterAnyOfTestSchema), z.lazy(() => FilterNotTestSchema), FilterHeaderTestSchema, FilterAddressTestSchema, FilterHasWordsTestSchema])).min(1).max(50)
|
|
839
839
|
});
|
|
840
840
|
|
|
841
841
|
export type FilterNotTest = { test: "not"; operand: FilterAllOfTest | FilterAnyOfTest | FilterNotTest | z.infer<typeof FilterHeaderTestSchema> | z.infer<typeof FilterAddressTestSchema> | z.infer<typeof FilterHasWordsTestSchema> };
|
|
@@ -862,8 +862,10 @@ export const FilterSchema = z.object({
|
|
|
862
862
|
ruleChangedAt: z.number(),
|
|
863
863
|
actionChangedAt: z.number(),
|
|
864
864
|
matchOperator: FilterMatchOperatorSchema,
|
|
865
|
-
literalClauses: z.array(FilterClauseSchema)
|
|
865
|
+
literalClauses: z.array(FilterClauseSchema),
|
|
866
866
|
rule: z.union([FilterRuleV0Schema, FilterRuleV1Schema]),
|
|
867
|
+
priority: z.number(),
|
|
868
|
+
stop: z.boolean(),
|
|
867
869
|
actionLabelId: z.string(),
|
|
868
870
|
actionMailboxId: z.string(),
|
|
869
871
|
createdAt: z.number(),
|
|
@@ -881,11 +883,14 @@ export const FilterResponseSchema = z.object({
|
|
|
881
883
|
ruleChangedAt: z.number(),
|
|
882
884
|
actionChangedAt: z.number(),
|
|
883
885
|
matchOperator: FilterMatchOperatorSchema,
|
|
884
|
-
literalClauses: z.array(FilterClauseSchema)
|
|
886
|
+
literalClauses: z.array(FilterClauseSchema),
|
|
887
|
+
priority: z.number(),
|
|
888
|
+
stop: z.boolean(),
|
|
885
889
|
actionLabelId: z.string(),
|
|
886
890
|
actionMailboxId: z.string(),
|
|
887
891
|
createdAt: z.number(),
|
|
888
|
-
updatedAt: z.number()
|
|
892
|
+
updatedAt: z.number(),
|
|
893
|
+
rule: FilterRuleV1Schema
|
|
889
894
|
});
|
|
890
895
|
|
|
891
896
|
export const CreateFilterInputSchema = z.object({
|
|
@@ -893,9 +898,12 @@ export const CreateFilterInputSchema = z.object({
|
|
|
893
898
|
scope: FilterScopeSchema,
|
|
894
899
|
expiresAt: z.string().optional(),
|
|
895
900
|
matchOperator: FilterMatchOperatorSchema,
|
|
896
|
-
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
897
901
|
actionLabelId: z.string(),
|
|
898
|
-
actionMailboxId: z.string()
|
|
902
|
+
actionMailboxId: z.string(),
|
|
903
|
+
priority: z.number().optional(),
|
|
904
|
+
stop: z.boolean().optional(),
|
|
905
|
+
literalClauses: z.array(FilterClauseSchema).optional(),
|
|
906
|
+
rule: FilterRuleV1Schema.optional()
|
|
899
907
|
});
|
|
900
908
|
|
|
901
909
|
export const CreateFilterResponseSchema = z.object({
|
|
@@ -909,23 +917,29 @@ export const CreateFilterResponseSchema = z.object({
|
|
|
909
917
|
ruleChangedAt: z.number(),
|
|
910
918
|
actionChangedAt: z.number(),
|
|
911
919
|
matchOperator: FilterMatchOperatorSchema,
|
|
912
|
-
literalClauses: z.array(FilterClauseSchema)
|
|
920
|
+
literalClauses: z.array(FilterClauseSchema),
|
|
921
|
+
priority: z.number(),
|
|
922
|
+
stop: z.boolean(),
|
|
913
923
|
actionLabelId: z.string(),
|
|
914
924
|
actionMailboxId: z.string(),
|
|
915
925
|
createdAt: z.number(),
|
|
916
926
|
updatedAt: z.number(),
|
|
927
|
+
rule: FilterRuleV1Schema,
|
|
917
928
|
organizeJobId: z.string()
|
|
918
929
|
});
|
|
919
930
|
|
|
920
931
|
export const UpdateFilterInputSchema = z.object({
|
|
921
|
-
name: z.string().max(256),
|
|
922
|
-
scope: FilterScopeSchema,
|
|
932
|
+
name: z.string().max(256).optional(),
|
|
933
|
+
scope: FilterScopeSchema.optional(),
|
|
923
934
|
expiresAt: z.string().optional(),
|
|
924
|
-
state: FilterStateSchema,
|
|
925
|
-
matchOperator: FilterMatchOperatorSchema,
|
|
926
|
-
literalClauses: z.array(FilterClauseSchema).
|
|
927
|
-
|
|
928
|
-
|
|
935
|
+
state: FilterStateSchema.optional(),
|
|
936
|
+
matchOperator: FilterMatchOperatorSchema.optional(),
|
|
937
|
+
literalClauses: z.array(FilterClauseSchema).optional(),
|
|
938
|
+
priority: z.number().optional(),
|
|
939
|
+
stop: z.boolean().optional(),
|
|
940
|
+
actionLabelId: z.string().optional(),
|
|
941
|
+
actionMailboxId: z.string().optional(),
|
|
942
|
+
rule: FilterRuleV1Schema.optional()
|
|
929
943
|
});
|
|
930
944
|
|
|
931
945
|
export const LabelSchema = z.object({
|