hh-contracts 0.0.43 → 0.0.45

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.
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TRANSLATABLE_FIELD_VALUES = exports.TRANSLATABLE_FIELDS = void 0;
4
4
  exports.TRANSLATABLE_FIELDS = {
5
5
  name: 'name',
6
+ description: 'description',
6
7
  };
7
8
  exports.TRANSLATABLE_FIELD_VALUES = Object.values(exports.TRANSLATABLE_FIELDS);
@@ -12,9 +12,10 @@ exports.TranslationPersistedSchema = zod_1.z.object({
12
12
  field: zod_1.z.enum(translatable_field_constant_1.TRANSLATABLE_FIELD_VALUES),
13
13
  text: zod_1.z.string().min(1, { message: 'translationRequired' }),
14
14
  });
15
- exports.TranslationItemSchema = exports.TranslationPersistedSchema.transform(({ entityId, entityName, ...translationData }) => ({
16
- ...translationData,
17
- }));
15
+ exports.TranslationItemSchema = exports.TranslationPersistedSchema.omit({
16
+ entityId: true,
17
+ entityName: true,
18
+ });
18
19
  exports.TranslationsArraySchema = zod_1.z.array(exports.TranslationItemSchema);
19
20
  exports.TranslationsSchema = zod_1.z.object({
20
21
  translations: exports.TranslationsArraySchema,
@@ -1,5 +1,6 @@
1
1
  export const TRANSLATABLE_FIELDS = {
2
2
  name: 'name',
3
+ description: 'description',
3
4
  } as const;
4
5
 
5
6
  export type TTranslatableField = (typeof TRANSLATABLE_FIELDS)[keyof typeof TRANSLATABLE_FIELDS];
@@ -12,11 +12,10 @@ export const TranslationPersistedSchema = z.object({
12
12
  });
13
13
  export type TTranslationPersisted = z.infer<typeof TranslationPersistedSchema>;
14
14
 
15
- export const TranslationItemSchema = TranslationPersistedSchema.transform(
16
- ({ entityId, entityName, ...translationData }) => ({
17
- ...translationData,
18
- }),
19
- );
15
+ export const TranslationItemSchema = TranslationPersistedSchema.omit({
16
+ entityId: true,
17
+ entityName: true,
18
+ });
20
19
  export type TTranslationItem = z.infer<typeof TranslationItemSchema>;
21
20
 
22
21
  export const TranslationsArraySchema = z.array(TranslationItemSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-contracts",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {