@experts_hub/shared 1.0.30 → 1.0.31

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.d.mts CHANGED
@@ -23,6 +23,104 @@ declare class LogoutDto {
23
23
  refreshToken: string;
24
24
  }
25
25
 
26
+ declare const SUBADMIN_PATTERN: {
27
+ fetchSubAdmins: string;
28
+ fetchDeletedSubAdmins: string;
29
+ fetchSubAdminDropdown: string;
30
+ findSubAdminById: string;
31
+ createSubAdmin: string;
32
+ toggleSubAdminStatus: string;
33
+ updateSubAdmin: string;
34
+ deleteSubAdmin: string;
35
+ };
36
+
37
+ declare class SubAdminDto {
38
+ firstName: string;
39
+ lastName: string;
40
+ email: string;
41
+ mobile: string;
42
+ isActive: boolean;
43
+ }
44
+
45
+ declare class ToggleSubAdminVisibilityDto {
46
+ isActive: boolean;
47
+ }
48
+
49
+ declare class UpdateSubAdminDto {
50
+ firstName: string;
51
+ lastName: string;
52
+ email: string;
53
+ mobile: string;
54
+ isActive: boolean;
55
+ }
56
+
57
+ interface IFetchSubAdminQuery {
58
+ page_size?: number;
59
+ page: number;
60
+ searchText?: string;
61
+ subadmin: string;
62
+ right: string;
63
+ sortColumn?: string;
64
+ sortBy?: string;
65
+ }
66
+ interface IFetchSubAdminResponse {
67
+ statusCode: number;
68
+ status: boolean;
69
+ message: string;
70
+ data: any;
71
+ }
72
+ interface IFetchSubAdminByIdQuery {
73
+ permission?: string;
74
+ }
75
+ interface IFetchSubAdminByIdResponse {
76
+ statusCode: number;
77
+ status: boolean;
78
+ message: string;
79
+ data: any;
80
+ }
81
+ interface ICreateSubAdminPayload {
82
+ firstName: string;
83
+ lastName: string;
84
+ email: string;
85
+ mobile: string;
86
+ isActive: boolean;
87
+ }
88
+ interface ICreateSubAdminResponse {
89
+ statusCode: number;
90
+ status: boolean;
91
+ message: string;
92
+ }
93
+ interface IUpdateSubAdminPayload {
94
+ firstName: string;
95
+ lastName: string;
96
+ email: string;
97
+ mobile: string;
98
+ isActive: boolean;
99
+ }
100
+ interface IUpdateSubAdminResponse {
101
+ statusCode: number;
102
+ status: boolean;
103
+ message: string;
104
+ }
105
+ interface IToggleSubAdminVisibilityPayload {
106
+ isActive: boolean;
107
+ }
108
+ interface IToggleSubAdminVisibilityResponse {
109
+ statusCode: number;
110
+ status: boolean;
111
+ message: string;
112
+ }
113
+ interface IDeleteSubAdminResponse {
114
+ statusCode: number;
115
+ status: boolean;
116
+ message: string;
117
+ }
118
+ interface IAttachPermissionsToSubAdminResponse {
119
+ statusCode: number;
120
+ status: boolean;
121
+ message: string;
122
+ }
123
+
26
124
  declare const UserTCPAdapter: () => MicroserviceOptions;
27
125
 
28
126
  declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
@@ -83,4 +181,4 @@ declare class User extends BaseEntity {
83
181
  refreshTokens: RefreshToken[];
84
182
  }
85
183
 
86
- export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, LoginDto, LogoutDto, RefreshDto, RefreshToken, User, UserRMQAdapter, UserTCPAdapter };
184
+ export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IToggleSubAdminVisibilityPayload, type IToggleSubAdminVisibilityResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, LoginDto, LogoutDto, RefreshDto, RefreshToken, SUBADMIN_PATTERN, SubAdminDto, ToggleSubAdminVisibilityDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
package/dist/index.d.ts CHANGED
@@ -23,6 +23,104 @@ declare class LogoutDto {
23
23
  refreshToken: string;
24
24
  }
25
25
 
26
+ declare const SUBADMIN_PATTERN: {
27
+ fetchSubAdmins: string;
28
+ fetchDeletedSubAdmins: string;
29
+ fetchSubAdminDropdown: string;
30
+ findSubAdminById: string;
31
+ createSubAdmin: string;
32
+ toggleSubAdminStatus: string;
33
+ updateSubAdmin: string;
34
+ deleteSubAdmin: string;
35
+ };
36
+
37
+ declare class SubAdminDto {
38
+ firstName: string;
39
+ lastName: string;
40
+ email: string;
41
+ mobile: string;
42
+ isActive: boolean;
43
+ }
44
+
45
+ declare class ToggleSubAdminVisibilityDto {
46
+ isActive: boolean;
47
+ }
48
+
49
+ declare class UpdateSubAdminDto {
50
+ firstName: string;
51
+ lastName: string;
52
+ email: string;
53
+ mobile: string;
54
+ isActive: boolean;
55
+ }
56
+
57
+ interface IFetchSubAdminQuery {
58
+ page_size?: number;
59
+ page: number;
60
+ searchText?: string;
61
+ subadmin: string;
62
+ right: string;
63
+ sortColumn?: string;
64
+ sortBy?: string;
65
+ }
66
+ interface IFetchSubAdminResponse {
67
+ statusCode: number;
68
+ status: boolean;
69
+ message: string;
70
+ data: any;
71
+ }
72
+ interface IFetchSubAdminByIdQuery {
73
+ permission?: string;
74
+ }
75
+ interface IFetchSubAdminByIdResponse {
76
+ statusCode: number;
77
+ status: boolean;
78
+ message: string;
79
+ data: any;
80
+ }
81
+ interface ICreateSubAdminPayload {
82
+ firstName: string;
83
+ lastName: string;
84
+ email: string;
85
+ mobile: string;
86
+ isActive: boolean;
87
+ }
88
+ interface ICreateSubAdminResponse {
89
+ statusCode: number;
90
+ status: boolean;
91
+ message: string;
92
+ }
93
+ interface IUpdateSubAdminPayload {
94
+ firstName: string;
95
+ lastName: string;
96
+ email: string;
97
+ mobile: string;
98
+ isActive: boolean;
99
+ }
100
+ interface IUpdateSubAdminResponse {
101
+ statusCode: number;
102
+ status: boolean;
103
+ message: string;
104
+ }
105
+ interface IToggleSubAdminVisibilityPayload {
106
+ isActive: boolean;
107
+ }
108
+ interface IToggleSubAdminVisibilityResponse {
109
+ statusCode: number;
110
+ status: boolean;
111
+ message: string;
112
+ }
113
+ interface IDeleteSubAdminResponse {
114
+ statusCode: number;
115
+ status: boolean;
116
+ message: string;
117
+ }
118
+ interface IAttachPermissionsToSubAdminResponse {
119
+ statusCode: number;
120
+ status: boolean;
121
+ message: string;
122
+ }
123
+
26
124
  declare const UserTCPAdapter: () => MicroserviceOptions;
27
125
 
28
126
  declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
@@ -83,4 +181,4 @@ declare class User extends BaseEntity {
83
181
  refreshTokens: RefreshToken[];
84
182
  }
85
183
 
86
- export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, LoginDto, LogoutDto, RefreshDto, RefreshToken, User, UserRMQAdapter, UserTCPAdapter };
184
+ export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IToggleSubAdminVisibilityPayload, type IToggleSubAdminVisibilityResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, LoginDto, LogoutDto, RefreshDto, RefreshToken, SUBADMIN_PATTERN, SubAdminDto, ToggleSubAdminVisibilityDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
package/dist/index.js CHANGED
@@ -35,6 +35,10 @@ __export(index_exports, {
35
35
  LogoutDto: () => LogoutDto,
36
36
  RefreshDto: () => RefreshDto,
37
37
  RefreshToken: () => RefreshToken,
38
+ SUBADMIN_PATTERN: () => SUBADMIN_PATTERN,
39
+ SubAdminDto: () => SubAdminDto,
40
+ ToggleSubAdminVisibilityDto: () => ToggleSubAdminVisibilityDto,
41
+ UpdateSubAdminDto: () => UpdateSubAdminDto,
38
42
  User: () => User,
39
43
  UserRMQAdapter: () => UserRMQAdapter,
40
44
  UserTCPAdapter: () => UserTCPAdapter
@@ -79,6 +83,68 @@ __decorateClass([
79
83
  (0, import_class_validator3.IsNotEmpty)({ message: "Please provide refresh token." })
80
84
  ], LogoutDto.prototype, "refreshToken", 2);
81
85
 
86
+ // src/modules/user/subadmin/pattern/pattern.ts
87
+ var SUBADMIN_PATTERN = {
88
+ fetchSubAdmins: "fetch.subadmins",
89
+ fetchDeletedSubAdmins: "fetch.deleted.subadmins",
90
+ fetchSubAdminDropdown: "fetch.subadmin.dropdown",
91
+ findSubAdminById: "fetch.subadmin.by.id",
92
+ createSubAdmin: "create.subadmin",
93
+ toggleSubAdminStatus: "toggle.subadmin.status",
94
+ updateSubAdmin: "update.subadmin",
95
+ deleteSubAdmin: "delete.subadmin"
96
+ };
97
+
98
+ // src/modules/user/subadmin/dto/create-subadmin.dto.ts
99
+ var import_class_validator4 = require("class-validator");
100
+ var SubAdminDto = class {
101
+ };
102
+ __decorateClass([
103
+ (0, import_class_validator4.IsNotEmpty)({ message: "Please enter first name." })
104
+ ], SubAdminDto.prototype, "firstName", 2);
105
+ __decorateClass([
106
+ (0, import_class_validator4.IsNotEmpty)({ message: "Please enter last name." })
107
+ ], SubAdminDto.prototype, "lastName", 2);
108
+ __decorateClass([
109
+ (0, import_class_validator4.IsNotEmpty)({ message: "Please enter email." })
110
+ ], SubAdminDto.prototype, "email", 2);
111
+ __decorateClass([
112
+ (0, import_class_validator4.IsNotEmpty)({ message: "Please enter mobile number." })
113
+ ], SubAdminDto.prototype, "mobile", 2);
114
+ __decorateClass([
115
+ (0, import_class_validator4.IsOptional)(),
116
+ (0, import_class_validator4.IsBoolean)({ message: "Is active must be a boolean value" })
117
+ ], SubAdminDto.prototype, "isActive", 2);
118
+
119
+ // src/modules/user/subadmin/dto/toggle-subadmin-visibility.dto.ts
120
+ var import_class_validator5 = require("class-validator");
121
+ var ToggleSubAdminVisibilityDto = class {
122
+ };
123
+ __decorateClass([
124
+ (0, import_class_validator5.IsBoolean)()
125
+ ], ToggleSubAdminVisibilityDto.prototype, "isActive", 2);
126
+
127
+ // src/modules/user/subadmin/dto/update-subadmin.dto.ts
128
+ var import_class_validator6 = require("class-validator");
129
+ var UpdateSubAdminDto = class {
130
+ };
131
+ __decorateClass([
132
+ (0, import_class_validator6.IsNotEmpty)({ message: "Please enter first name." })
133
+ ], UpdateSubAdminDto.prototype, "firstName", 2);
134
+ __decorateClass([
135
+ (0, import_class_validator6.IsNotEmpty)({ message: "Please enter last name." })
136
+ ], UpdateSubAdminDto.prototype, "lastName", 2);
137
+ __decorateClass([
138
+ (0, import_class_validator6.IsNotEmpty)({ message: "Please enter email." })
139
+ ], UpdateSubAdminDto.prototype, "email", 2);
140
+ __decorateClass([
141
+ (0, import_class_validator6.IsNotEmpty)({ message: "Please enter mobile number." })
142
+ ], UpdateSubAdminDto.prototype, "mobile", 2);
143
+ __decorateClass([
144
+ (0, import_class_validator6.IsOptional)(),
145
+ (0, import_class_validator6.IsBoolean)({ message: "Is active must be a boolean value" })
146
+ ], UpdateSubAdminDto.prototype, "isActive", 2);
147
+
82
148
  // src/adapters/tcp/user.tcp.adapter.ts
83
149
  var import_dotenv = require("dotenv");
84
150
  var import_microservices = require("@nestjs/microservices");
@@ -318,6 +384,10 @@ User = __decorateClass([
318
384
  LogoutDto,
319
385
  RefreshDto,
320
386
  RefreshToken,
387
+ SUBADMIN_PATTERN,
388
+ SubAdminDto,
389
+ ToggleSubAdminVisibilityDto,
390
+ UpdateSubAdminDto,
321
391
  User,
322
392
  UserRMQAdapter,
323
393
  UserTCPAdapter
package/dist/index.mjs CHANGED
@@ -53,6 +53,72 @@ __decorateClass([
53
53
  IsNotEmpty3({ message: "Please provide refresh token." })
54
54
  ], LogoutDto.prototype, "refreshToken", 2);
55
55
 
56
+ // src/modules/user/subadmin/pattern/pattern.ts
57
+ var SUBADMIN_PATTERN = {
58
+ fetchSubAdmins: "fetch.subadmins",
59
+ fetchDeletedSubAdmins: "fetch.deleted.subadmins",
60
+ fetchSubAdminDropdown: "fetch.subadmin.dropdown",
61
+ findSubAdminById: "fetch.subadmin.by.id",
62
+ createSubAdmin: "create.subadmin",
63
+ toggleSubAdminStatus: "toggle.subadmin.status",
64
+ updateSubAdmin: "update.subadmin",
65
+ deleteSubAdmin: "delete.subadmin"
66
+ };
67
+
68
+ // src/modules/user/subadmin/dto/create-subadmin.dto.ts
69
+ import {
70
+ IsNotEmpty as IsNotEmpty4,
71
+ IsOptional,
72
+ IsBoolean
73
+ } from "class-validator";
74
+ var SubAdminDto = class {
75
+ };
76
+ __decorateClass([
77
+ IsNotEmpty4({ message: "Please enter first name." })
78
+ ], SubAdminDto.prototype, "firstName", 2);
79
+ __decorateClass([
80
+ IsNotEmpty4({ message: "Please enter last name." })
81
+ ], SubAdminDto.prototype, "lastName", 2);
82
+ __decorateClass([
83
+ IsNotEmpty4({ message: "Please enter email." })
84
+ ], SubAdminDto.prototype, "email", 2);
85
+ __decorateClass([
86
+ IsNotEmpty4({ message: "Please enter mobile number." })
87
+ ], SubAdminDto.prototype, "mobile", 2);
88
+ __decorateClass([
89
+ IsOptional(),
90
+ IsBoolean({ message: "Is active must be a boolean value" })
91
+ ], SubAdminDto.prototype, "isActive", 2);
92
+
93
+ // src/modules/user/subadmin/dto/toggle-subadmin-visibility.dto.ts
94
+ import { IsBoolean as IsBoolean2 } from "class-validator";
95
+ var ToggleSubAdminVisibilityDto = class {
96
+ };
97
+ __decorateClass([
98
+ IsBoolean2()
99
+ ], ToggleSubAdminVisibilityDto.prototype, "isActive", 2);
100
+
101
+ // src/modules/user/subadmin/dto/update-subadmin.dto.ts
102
+ import { IsBoolean as IsBoolean3, IsNotEmpty as IsNotEmpty5, IsOptional as IsOptional2 } from "class-validator";
103
+ var UpdateSubAdminDto = class {
104
+ };
105
+ __decorateClass([
106
+ IsNotEmpty5({ message: "Please enter first name." })
107
+ ], UpdateSubAdminDto.prototype, "firstName", 2);
108
+ __decorateClass([
109
+ IsNotEmpty5({ message: "Please enter last name." })
110
+ ], UpdateSubAdminDto.prototype, "lastName", 2);
111
+ __decorateClass([
112
+ IsNotEmpty5({ message: "Please enter email." })
113
+ ], UpdateSubAdminDto.prototype, "email", 2);
114
+ __decorateClass([
115
+ IsNotEmpty5({ message: "Please enter mobile number." })
116
+ ], UpdateSubAdminDto.prototype, "mobile", 2);
117
+ __decorateClass([
118
+ IsOptional2(),
119
+ IsBoolean3({ message: "Is active must be a boolean value" })
120
+ ], UpdateSubAdminDto.prototype, "isActive", 2);
121
+
56
122
  // src/adapters/tcp/user.tcp.adapter.ts
57
123
  import { config } from "dotenv";
58
124
  import { Transport } from "@nestjs/microservices";
@@ -306,6 +372,10 @@ export {
306
372
  LogoutDto,
307
373
  RefreshDto,
308
374
  RefreshToken,
375
+ SUBADMIN_PATTERN,
376
+ SubAdminDto,
377
+ ToggleSubAdminVisibilityDto,
378
+ UpdateSubAdminDto,
309
379
  User,
310
380
  UserRMQAdapter,
311
381
  UserTCPAdapter
@@ -1 +1,2 @@
1
1
  export * from './authentication';
2
+ export * from './user/subadmin';
@@ -0,0 +1,7 @@
1
+ export declare class SubAdminDto {
2
+ firstName: string;
3
+ lastName: string;
4
+ email: string;
5
+ mobile: string;
6
+ isActive: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ export * from '../dto/create-subadmin.dto';
2
+ export * from '../dto/toggle-subadmin-visibility.dto';
3
+ export * from '../dto/update-subadmin.dto';
@@ -0,0 +1,3 @@
1
+ export declare class ToggleSubAdminVisibilityDto {
2
+ isActive: boolean;
3
+ }
@@ -0,0 +1,7 @@
1
+ export declare class UpdateSubAdminDto {
2
+ firstName: string;
3
+ lastName: string;
4
+ email: string;
5
+ mobile: string;
6
+ isActive: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ export * from './pattern/pattern';
2
+ export * from './dto';
3
+ export * from './subadmin.interface';
@@ -0,0 +1,10 @@
1
+ export declare const SUBADMIN_PATTERN: {
2
+ fetchSubAdmins: string;
3
+ fetchDeletedSubAdmins: string;
4
+ fetchSubAdminDropdown: string;
5
+ findSubAdminById: string;
6
+ createSubAdmin: string;
7
+ toggleSubAdminStatus: string;
8
+ updateSubAdmin: string;
9
+ deleteSubAdmin: string;
10
+ };
@@ -0,0 +1,66 @@
1
+ export interface IFetchSubAdminQuery {
2
+ page_size?: number;
3
+ page: number;
4
+ searchText?: string;
5
+ subadmin: string;
6
+ right: string;
7
+ sortColumn?: string;
8
+ sortBy?: string;
9
+ }
10
+ export interface IFetchSubAdminResponse {
11
+ statusCode: number;
12
+ status: boolean;
13
+ message: string;
14
+ data: any;
15
+ }
16
+ export interface IFetchSubAdminByIdQuery {
17
+ permission?: string;
18
+ }
19
+ export interface IFetchSubAdminByIdResponse {
20
+ statusCode: number;
21
+ status: boolean;
22
+ message: string;
23
+ data: any;
24
+ }
25
+ export interface ICreateSubAdminPayload {
26
+ firstName: string;
27
+ lastName: string;
28
+ email: string;
29
+ mobile: string;
30
+ isActive: boolean;
31
+ }
32
+ export interface ICreateSubAdminResponse {
33
+ statusCode: number;
34
+ status: boolean;
35
+ message: string;
36
+ }
37
+ export interface IUpdateSubAdminPayload {
38
+ firstName: string;
39
+ lastName: string;
40
+ email: string;
41
+ mobile: string;
42
+ isActive: boolean;
43
+ }
44
+ export interface IUpdateSubAdminResponse {
45
+ statusCode: number;
46
+ status: boolean;
47
+ message: string;
48
+ }
49
+ export interface IToggleSubAdminVisibilityPayload {
50
+ isActive: boolean;
51
+ }
52
+ export interface IToggleSubAdminVisibilityResponse {
53
+ statusCode: number;
54
+ status: boolean;
55
+ message: string;
56
+ }
57
+ export interface IDeleteSubAdminResponse {
58
+ statusCode: number;
59
+ status: boolean;
60
+ message: string;
61
+ }
62
+ export interface IAttachPermissionsToSubAdminResponse {
63
+ statusCode: number;
64
+ status: boolean;
65
+ message: string;
66
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experts_hub/shared",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Shared DTOs, interfaces, and utilities for experts hub applications",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",