@nomalism-com/types 0.34.17 → 0.34.19

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/dist/index.cjs CHANGED
@@ -3204,14 +3204,15 @@ var createBodyKeys35 = {
3204
3204
  };
3205
3205
  var createBody36 = joi49.object().keys(createBodyKeys35).messages(messages);
3206
3206
  var updateStoreOperatorQueryKeys = {
3207
- name: joi49.string().allow(null, "").optional(),
3208
- account: joi49.string().allow(null, "").optional(),
3209
- email: joi49.string().email({ tlds: { allow: false } }).allow(null, "").optional(),
3210
- internal_email: joi49.string().email({ tlds: { allow: false } }).allow(null, "").optional(),
3207
+ main_persona_name: joi49.string().allow(null, "").optional(),
3208
+ main_persona_email: joi49.string().email({ tlds: { allow: false } }).allow(null, "").optional(),
3209
+ user_account: joi49.string().allow(null, "").optional(),
3210
+ password: joi49.string().allow(null, "").optional(),
3211
3211
  inactive: joi49.boolean().optional()
3212
3212
  };
3213
3213
  var updateStoreOperatorQuery = joi49.object().keys(updateStoreOperatorQueryKeys).messages(messages);
3214
3214
  var findWithPaginationQueryKeys19 = {
3215
+ inactive: joi49.bool().optional(),
3215
3216
  per_page: joi49.number().integer().positive().default(10).optional(),
3216
3217
  current_page: joi49.number().integer().positive().default(1).optional()
3217
3218
  };
package/dist/index.js CHANGED
@@ -3204,14 +3204,15 @@ var createBodyKeys35 = {
3204
3204
  };
3205
3205
  var createBody36 = joi49.object().keys(createBodyKeys35).messages(messages);
3206
3206
  var updateStoreOperatorQueryKeys = {
3207
- name: joi49.string().allow(null, "").optional(),
3208
- account: joi49.string().allow(null, "").optional(),
3209
- email: joi49.string().email({ tlds: { allow: false } }).allow(null, "").optional(),
3210
- internal_email: joi49.string().email({ tlds: { allow: false } }).allow(null, "").optional(),
3207
+ main_persona_name: joi49.string().allow(null, "").optional(),
3208
+ main_persona_email: joi49.string().email({ tlds: { allow: false } }).allow(null, "").optional(),
3209
+ user_account: joi49.string().allow(null, "").optional(),
3210
+ password: joi49.string().allow(null, "").optional(),
3211
3211
  inactive: joi49.boolean().optional()
3212
3212
  };
3213
3213
  var updateStoreOperatorQuery = joi49.object().keys(updateStoreOperatorQueryKeys).messages(messages);
3214
3214
  var findWithPaginationQueryKeys19 = {
3215
+ inactive: joi49.bool().optional(),
3215
3216
  per_page: joi49.number().integer().positive().default(10).optional(),
3216
3217
  current_page: joi49.number().integer().positive().default(1).optional()
3217
3218
  };
@@ -7,7 +7,7 @@ export declare const LowerName: string;
7
7
  export type IFindPaginatedRequest = IShared.IPaginationRequest & Pick<Entity, 'inactive'>;
8
8
  export interface IFindResponse extends Pick<Entity, 'id'> {
9
9
  user: Pick<Users, 'id' | 'account'>;
10
- main_persona: Pick<Persona, 'name' | 'email'>;
10
+ main_persona: Pick<Persona, 'id' | 'name' | 'email'>;
11
11
  }
12
12
  export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
13
13
  export interface ICreateRequest {
@@ -15,10 +15,10 @@ export interface ICreateRequest {
15
15
  main_persona: ICreateMainPersona;
16
16
  }
17
17
  export interface IUpdateRequest {
18
- name: string | null;
19
- account: string | null;
20
- email: string | null;
21
- internal_email: string | null;
18
+ main_persona_name: string | null;
19
+ main_persona_email: string | null;
20
+ user_account: string | null;
21
+ password: string | null;
22
22
  inactive: boolean;
23
23
  }
24
24
  export interface IRepository {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.34.17",
12
+ "version": "0.34.19",
13
13
  "type": "module",
14
14
  "module": "./dist/index.js",
15
15
  "main": "./dist/index.cjs",
@@ -10,7 +10,7 @@ export type IFindPaginatedRequest = IShared.IPaginationRequest & Pick<Entity, 'i
10
10
 
11
11
  export interface IFindResponse extends Pick<Entity, 'id'> {
12
12
  user: Pick<Users, 'id' | 'account'>;
13
- main_persona: Pick<Persona, 'name' | 'email'>;
13
+ main_persona: Pick<Persona, 'id' | 'name' | 'email'>;
14
14
  }
15
15
 
16
16
  export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
@@ -21,10 +21,10 @@ export interface ICreateRequest {
21
21
  }
22
22
 
23
23
  export interface IUpdateRequest {
24
- name: string | null;
25
- account: string | null;
26
- email: string | null;
27
- internal_email: string | null;
24
+ main_persona_name: string | null;
25
+ main_persona_email: string | null;
26
+ user_account: string | null;
27
+ password: string | null;
28
28
  inactive: boolean;
29
29
  }
30
30
 
@@ -1,7 +1,12 @@
1
1
  import joi from 'joi';
2
2
  import { messages } from '../../../shared/messages';
3
3
  import type * as IShared from '../../../shared/interface';
4
- import type { ICreateRequest, ICreateMainPersona, IUpdateRequest } from './interface';
4
+ import type {
5
+ ICreateRequest,
6
+ ICreateMainPersona,
7
+ IUpdateRequest,
8
+ IFindPaginatedRequest,
9
+ } from './interface';
5
10
 
6
11
  const createMainPersonaKeys: IShared.IRouteRequest<ICreateMainPersona> = {
7
12
  name: joi.string().optional(),
@@ -23,18 +28,14 @@ export const createBody = joi.object().keys(createBodyKeys).messages(messages);
23
28
 
24
29
  // update store operator query validation
25
30
  const updateStoreOperatorQueryKeys: IShared.IRouteRequest<IUpdateRequest> = {
26
- name: joi.string().allow(null, '').optional(),
27
- account: joi.string().allow(null, '').optional(),
28
- email: joi
29
- .string()
30
- .email({ tlds: { allow: false } })
31
- .allow(null, '')
32
- .optional(),
33
- internal_email: joi
31
+ main_persona_name: joi.string().allow(null, '').optional(),
32
+ main_persona_email: joi
34
33
  .string()
35
34
  .email({ tlds: { allow: false } })
36
35
  .allow(null, '')
37
36
  .optional(),
37
+ user_account: joi.string().allow(null, '').optional(),
38
+ password: joi.string().allow(null, '').optional(),
38
39
  inactive: joi.boolean().optional(),
39
40
  };
40
41
  export const updateStoreOperatorQuery = joi
@@ -43,7 +44,8 @@ export const updateStoreOperatorQuery = joi
43
44
  .messages(messages);
44
45
 
45
46
  // find with pagination query validation
46
- const findWithPaginationQueryKeys: IShared.IRouteRequest<IShared.IPaginationRequest> = {
47
+ const findWithPaginationQueryKeys: IShared.IRouteRequest<IFindPaginatedRequest> = {
48
+ inactive: joi.bool().optional(),
47
49
  per_page: joi.number().integer().positive().default(10).optional(),
48
50
  current_page: joi.number().integer().positive().default(1).optional(),
49
51
  };