Skip to content

Commit

Permalink
🏷️ add type property to user schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonaOna committed Sep 20, 2024
1 parent 743d621 commit ac325b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/controller.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,13 @@ export class Controller {
providerConfig.apiKey,
{ message: error.message, status: error.status },
);
return;
}

errorLogger(
'streamContacts',
`[${orderingKey}] Could not publish contacts`,
`[${orderingKey}] Could not publish contacts (${error})`,
providerConfig.apiKey,
error,
);
}
};
Expand Down
3 changes: 3 additions & 0 deletions src/schemas/contacts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { z } from 'zod';
import { IntegrationEntityType } from '../models';

// export const contactsSchema: ValidationSchema = {
// title: 'Contacts',
Expand Down Expand Up @@ -81,6 +82,7 @@ export const contactSchema = z.object({
phoneNumber: z.string(),
}),
),
type: z.nativeEnum(IntegrationEntityType).optional(),
});

export const contactsGetSchema = z.array(contactSchema);
Expand All @@ -99,4 +101,5 @@ export const contactCreateSchema = z.object({
phoneNumber: z.string(),
}),
),
type: z.nativeEnum(IntegrationEntityType).optional(),
});

0 comments on commit ac325b9

Please sign in to comment.