@nomalism-com/types 0.39.28 → 0.39.30

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
@@ -3152,6 +3152,7 @@ var route_schema_exports47 = {};
3152
3152
  __export(route_schema_exports47, {
3153
3153
  createBody: () => createBody35,
3154
3154
  findWithPaginationQuery: () => findWithPaginationQuery19,
3155
+ updatePasswordBody: () => updatePasswordBody,
3155
3156
  updateStoreOperatorQuery: () => updateStoreOperatorQuery
3156
3157
  });
3157
3158
  import joi48 from "joi";
@@ -3181,6 +3182,11 @@ var findWithPaginationQueryKeys19 = {
3181
3182
  current_page: joi48.number().integer().positive().default(1).optional()
3182
3183
  };
3183
3184
  var findWithPaginationQuery19 = joi48.object().keys(findWithPaginationQueryKeys19).messages(messages);
3185
+ var updatePasswordBodyKeys = {
3186
+ password: joi48.string().required(),
3187
+ oldPassword: joi48.string().required()
3188
+ };
3189
+ var updatePasswordBody = joi48.object().keys(updatePasswordBodyKeys).messages(messages);
3184
3190
 
3185
3191
  // src/modules/user/swift/interface.ts
3186
3192
  var interface_exports29 = {};
package/dist/index.js CHANGED
@@ -3152,6 +3152,7 @@ var route_schema_exports47 = {};
3152
3152
  __export(route_schema_exports47, {
3153
3153
  createBody: () => createBody35,
3154
3154
  findWithPaginationQuery: () => findWithPaginationQuery19,
3155
+ updatePasswordBody: () => updatePasswordBody,
3155
3156
  updateStoreOperatorQuery: () => updateStoreOperatorQuery
3156
3157
  });
3157
3158
  import joi48 from "joi";
@@ -3181,6 +3182,11 @@ var findWithPaginationQueryKeys19 = {
3181
3182
  current_page: joi48.number().integer().positive().default(1).optional()
3182
3183
  };
3183
3184
  var findWithPaginationQuery19 = joi48.object().keys(findWithPaginationQueryKeys19).messages(messages);
3185
+ var updatePasswordBodyKeys = {
3186
+ password: joi48.string().required(),
3187
+ oldPassword: joi48.string().required()
3188
+ };
3189
+ var updatePasswordBody = joi48.object().keys(updatePasswordBodyKeys).messages(messages);
3184
3190
 
3185
3191
  // src/modules/user/swift/interface.ts
3186
3192
  var interface_exports29 = {};
@@ -9,17 +9,23 @@ export interface ICreateOrUpdateRequest {
9
9
  document_header_id: string;
10
10
  personas_ids: string[];
11
11
  }
12
- export type IFindByIdResponse = {
12
+ export interface IFindRequest {
13
+ owner_id: string;
14
+ document_header_id?: string;
15
+ }
16
+ export type IFindResponse = {
13
17
  persona_id: string;
14
18
  name: string;
15
19
  email: string;
16
20
  phone_number: string | null;
17
21
  }[];
22
+ export type IFindByIdResponse = IFindResponse;
18
23
  export interface IRepository {
19
24
  createOrUpdate(data: ICreateOrUpdateRequest): Promise<Entity[]>;
25
+ find(selector: IFindRequest): Promise<IFindByIdResponse>;
26
+ deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
20
27
  findByOwnerId(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
21
28
  findByDocumentHeaderId(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
22
29
  findByPersonaId(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
23
- deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
24
30
  }
25
31
  export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -27,6 +27,10 @@ export interface IUpdateRequest {
27
27
  superuser?: boolean;
28
28
  default_theme?: boolean;
29
29
  }
30
+ export interface IUpdatePasswordRequest {
31
+ password: string;
32
+ oldPassword: string;
33
+ }
30
34
  export interface IRepository {
31
35
  findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
32
36
  find(): Promise<IFindResponse[]>;
@@ -34,5 +38,6 @@ export interface IRepository {
34
38
  create(data: ICreateRequest): Promise<string>;
35
39
  update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
36
40
  deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
41
+ updatePassword(selector: IShared.IFindByIdRequest, data: IUpdatePasswordRequest): Promise<void>;
37
42
  }
38
43
  export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -2,3 +2,4 @@ import joi from 'joi';
2
2
  export declare const createBody: joi.ObjectSchema<any>;
3
3
  export declare const updateStoreOperatorQuery: joi.ObjectSchema<any>;
4
4
  export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
5
+ export declare const updatePasswordBody: joi.ObjectSchema<any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/types",
3
3
  "description": "A nomalism package with all necessary types and validations for developing APIs",
4
- "version": "0.39.28",
4
+ "version": "0.39.30",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",