@webitel/api-services 26.12.25 → 26.12.27

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "26.12.25",
3
+ "version": "26.12.27",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -87,7 +87,7 @@ const getLogsByConfigList = async ({ parentId, ...params }: ApiParams) => {
87
87
  const requestParams = toLogsListParams(
88
88
  {
89
89
  ...params,
90
- userId: params.user,
90
+ userId: params.modifiedBy ?? params.user,
91
91
  },
92
92
  getShallowFieldsToSendFromZodSchema(
93
93
  LoggerServiceSearchLogByConfigIdQueryParams,
@@ -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
- // [Claude] `.prefault`, not `.default`: zod 4's `.default({})` would skip the required check
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
- // [Claude] `.prefault`, not `.default`: zod 4's `.default({})` would skip the required check
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.prefault({}),
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
- // [Claude] `.prefault`, not `.default`: zod 4's `.default({})` would skip the required check
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([]),