Skip to content

Commit ac325b9

Browse files
committed
🏷️ add type property to user schemas
1 parent 743d621 commit ac325b9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/models/controller.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ export class Controller {
351351
providerConfig.apiKey,
352352
{ message: error.message, status: error.status },
353353
);
354+
return;
354355
}
355356

356357
errorLogger(
357358
'streamContacts',
358-
`[${orderingKey}] Could not publish contacts`,
359+
`[${orderingKey}] Could not publish contacts (${error})`,
359360
providerConfig.apiKey,
360-
error,
361361
);
362362
}
363363
};

src/schemas/contacts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { z } from 'zod';
2+
import { IntegrationEntityType } from '../models';
23

34
// export const contactsSchema: ValidationSchema = {
45
// title: 'Contacts',
@@ -81,6 +82,7 @@ export const contactSchema = z.object({
8182
phoneNumber: z.string(),
8283
}),
8384
),
85+
type: z.nativeEnum(IntegrationEntityType).optional(),
8486
});
8587

8688
export const contactsGetSchema = z.array(contactSchema);
@@ -99,4 +101,5 @@ export const contactCreateSchema = z.object({
99101
phoneNumber: z.string(),
100102
}),
101103
),
104+
type: z.nativeEnum(IntegrationEntityType).optional(),
102105
});

0 commit comments

Comments
 (0)