@webitel/api-services 26.12.25 → 26.12.26
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 +1 -1
- package/src/validations/changelog/changelog.validations.ts +1 -2
- package/src/validations/emailProfile/emailProfile.validations.ts +1 -2
- package/src/validations/importTemplate/importTemplate.validations.ts +1 -1
- package/src/validations/trigger/__tests__/trigger.validations.spec.ts +7 -0
- package/src/validations/trigger/trigger.validations.ts +1 -2
- package/types/.tsbuildinfo +1 -1
- package/types/validations/importTemplate/importTemplate.validations.d.ts +1 -1
- package/types/validations/trigger/trigger.validations.d.ts +1 -1
package/package.json
CHANGED
|
@@ -12,8 +12,7 @@ export type ChangelogCard = LoggerConfig;
|
|
|
12
12
|
/** [Claude] Changelog card schema: which object is logged, where the logs go and for how long. */
|
|
13
13
|
export const changelogSchema = z.object<ZodShape<LoggerConfig>>({
|
|
14
14
|
id: z.number().optional(),
|
|
15
|
-
|
|
16
|
-
object: filledLookupSchema.prefault({}),
|
|
15
|
+
object: filledLookupSchema.default({}),
|
|
17
16
|
storage: flexibleLookupSchema.optional().default({}),
|
|
18
17
|
daysToStore: z.number().min(1).default(7),
|
|
19
18
|
period: z.number().default(7),
|
|
@@ -46,8 +46,7 @@ export const emailProfileSchema = z
|
|
|
46
46
|
imapPort: clearableNumberSchema.default(993),
|
|
47
47
|
smtpHost: z.string().min(1).default(''),
|
|
48
48
|
smtpPort: clearableNumberSchema.default(587),
|
|
49
|
-
|
|
50
|
-
schema: filledLookupSchema.prefault({}),
|
|
49
|
+
schema: filledLookupSchema.default({}),
|
|
51
50
|
fetchInterval: clearableNumberSchema.default(60),
|
|
52
51
|
listen: z.boolean().default(false),
|
|
53
52
|
logged: z.boolean().default(false),
|
|
@@ -50,7 +50,7 @@ export const importTemplateSchema = z.object({
|
|
|
50
50
|
id: z.number().optional(),
|
|
51
51
|
name: z.string().min(1).default(''),
|
|
52
52
|
description: z.string().optional().default(''),
|
|
53
|
-
source: filledLookupSchema.
|
|
53
|
+
source: filledLookupSchema.default({}),
|
|
54
54
|
sourceType: z.string().default(StorageImportSourceType.Dialer),
|
|
55
55
|
parameters: importTemplateParametersSchema.prefault({}),
|
|
56
56
|
});
|
|
@@ -34,6 +34,13 @@ describe('triggerSchema', () => {
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
+
// [Claude] an empty lookup, not `undefined`: regle only shows the required `schema.id` error on an object
|
|
38
|
+
it('seeds the flow as an empty lookup', () => {
|
|
39
|
+
expect(defaults()).toMatchObject({
|
|
40
|
+
schema: {},
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
37
44
|
it('requires name, flow and the timezone of a cron trigger', () => {
|
|
38
45
|
expect(issuePaths(triggerSchema.safeParse(defaults()))).toEqual(
|
|
39
46
|
expect.arrayContaining([
|
|
@@ -41,8 +41,7 @@ export const triggerSchema = z
|
|
|
41
41
|
description: z.string().optional().default(''),
|
|
42
42
|
enabled: z.boolean().default(true),
|
|
43
43
|
type: z.string().min(1).default(EngineTriggerType.Cron),
|
|
44
|
-
|
|
45
|
-
schema: filledLookupSchema.prefault({}),
|
|
44
|
+
schema: filledLookupSchema.default({}),
|
|
46
45
|
// [Claude] an emptied number input gives `null`, which is allowed here
|
|
47
46
|
timeout: z.number().min(0).nullable().optional().default(60),
|
|
48
47
|
variables: z.array(variablePairSchema).default([]),
|