@viardex/viardex-libs 1.0.9 → 1.0.11

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.
@@ -0,0 +1,5 @@
1
+ import { ArgumentsHost, ExceptionFilter } from '@nestjs/common';
2
+ export declare class HttpOnlyExceptionFilter implements ExceptionFilter {
3
+ private readonly httpExceptionFilter;
4
+ catch(exception: unknown, host: ArgumentsHost): void;
5
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.HttpOnlyExceptionFilter = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const http_exception_filter_1 = require("./http-exception.filter");
12
+ let HttpOnlyExceptionFilter = class HttpOnlyExceptionFilter {
13
+ httpExceptionFilter = new http_exception_filter_1.HttpExceptionFilter();
14
+ catch(exception, host) {
15
+ if (host.getType() !== 'http') {
16
+ throw exception;
17
+ }
18
+ this.httpExceptionFilter.catch(exception, host);
19
+ }
20
+ };
21
+ exports.HttpOnlyExceptionFilter = HttpOnlyExceptionFilter;
22
+ exports.HttpOnlyExceptionFilter = HttpOnlyExceptionFilter = __decorate([
23
+ (0, common_1.Catch)()
24
+ ], HttpOnlyExceptionFilter);
@@ -1,3 +1,4 @@
1
1
  export * from './http-exception.filter';
2
+ export * from './http-only-exception.filter';
2
3
  export * from './response.interceptor';
3
4
  export * from './response.utils';
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./http-exception.filter"), exports);
18
+ __exportStar(require("./http-only-exception.filter"), exports);
18
19
  __exportStar(require("./response.interceptor"), exports);
19
20
  __exportStar(require("./response.utils"), exports);
@@ -7,5 +7,151 @@ export declare const DEFAULT_NATS_CONFIG: {
7
7
  reconnectTimeWait: number;
8
8
  maxReconnectAttempts: number;
9
9
  };
10
- export declare enum NatsSubjects {
11
- }
10
+ export declare const NotificationSubjects: {
11
+ readonly CREATE_IN_APP_NOTIFICATION: "notification.create-in-app";
12
+ readonly SEND_TEMPLATE_EMAIL: "notification.email.send-template";
13
+ readonly SEND_TEXT_MESSAGE: "notification.text.send";
14
+ readonly SEND_WHATSAPP_MESSAGE: "notification.whatsapp.send";
15
+ readonly SEND_VOICE_MESSAGE: "notification.voice.send";
16
+ readonly SEND_PUSH_NOTIFICATION: "notification.push.send";
17
+ };
18
+ export declare const UserServiceSubjects: {
19
+ readonly RESOLVE_MARKETING_USERS: "user.marketing.users.resolve";
20
+ };
21
+ export declare const SignupSubjects: {
22
+ readonly SIGNUP_INITIATED: "signup.initiated";
23
+ readonly SIGNUP_COMPLETED: "signup.completed";
24
+ readonly SIGNUP_VERIFICATION_REQUESTED: "signup.verification.requested";
25
+ };
26
+ export declare const SigninSubjects: {
27
+ readonly SIGNIN_INITIATED: "signin.initiated";
28
+ readonly SIGNIN_COMPLETED: "signin.completed";
29
+ readonly DEVICE_VERIFICATION_REQUESTED: "signin.device-verification.requested";
30
+ readonly SIGNIN_FAILED: "signin.failed";
31
+ };
32
+ export declare const PasswordSubjects: {
33
+ readonly PASSWORD_RESET_REQUESTED: "password.reset.requested";
34
+ readonly PASSWORD_RESET_COMPLETED: "password.reset.completed";
35
+ readonly PASSWORD_CHANGED: "password.changed";
36
+ };
37
+ export declare const PinSubjects: {
38
+ readonly PIN_RESET_REQUESTED: "pin.reset.requested";
39
+ readonly PIN_RESET_COMPLETED: "pin.reset.completed";
40
+ readonly PIN_CHANGED: "pin.changed";
41
+ readonly PIN_LOCKED: "pin.locked";
42
+ };
43
+ export declare const PreferencesSubjects: {
44
+ readonly USER_PREFERENCES_PROVISION_REQUESTED: "preferences.user.provision.requested";
45
+ readonly USER_PREFERENCES_UPDATED: "preferences.user.updated";
46
+ readonly STAFF_PREFERENCES_PROVISION_REQUESTED: "preferences.staff.provision.requested";
47
+ readonly STAFF_PREFERENCES_UPDATED: "preferences.staff.updated";
48
+ };
49
+ export declare const ReferralSubjects: {
50
+ readonly REFERRAL_CODE_PROVISION_REQUESTED: "referral.code.provision.requested";
51
+ readonly REFERRAL_LINKED: "referral.linked";
52
+ readonly REFERRAL_COMPLETED: "referral.completed";
53
+ readonly REFERRAL_REWARD_PROCESSING_REQUESTED: "referral.reward.processing.requested";
54
+ };
55
+ export declare const TicketSubjects: {
56
+ readonly TICKET_CREATED: "ticket.created";
57
+ readonly TICKET_UPDATED: "ticket.updated";
58
+ readonly TICKET_RESOLVED: "ticket.resolved";
59
+ };
60
+ export declare const DeviceSubjects: {
61
+ readonly DEVICE_TRUSTED: "device.trusted";
62
+ readonly DEVICE_REVOKED: "device.revoked";
63
+ readonly DEVICE_DEACTIVATED: "device.deactivated";
64
+ readonly DEVICE_ACTIVATED: "device.activated";
65
+ };
66
+ export declare const CountrySubjects: {
67
+ readonly COUNTRIES_SYNC_REQUESTED: "country.sync.requested";
68
+ };
69
+ export declare const StaffSubjects: {
70
+ readonly STAFF_CREATED: "staff.created";
71
+ readonly STAFF_UPDATED: "staff.updated";
72
+ readonly STAFF_PASSWORD_CHANGED: "staff.password.changed";
73
+ readonly STAFF_SIGNIN_COMPLETED: "staff.signin.completed";
74
+ };
75
+ export declare const RoleSubjects: {
76
+ readonly ROLE_CREATED: "role.created";
77
+ readonly ROLE_UPDATED: "role.updated";
78
+ readonly ROLE_PERMISSIONS_UPDATED: "role.permissions.updated";
79
+ };
80
+ export declare const AuditSubjects: {
81
+ readonly AUDIT_LOG_RECORDED: "audit.log.recorded";
82
+ };
83
+ export declare const NatsSubjects: {
84
+ readonly notification: {
85
+ readonly CREATE_IN_APP_NOTIFICATION: "notification.create-in-app";
86
+ readonly SEND_TEMPLATE_EMAIL: "notification.email.send-template";
87
+ readonly SEND_TEXT_MESSAGE: "notification.text.send";
88
+ readonly SEND_WHATSAPP_MESSAGE: "notification.whatsapp.send";
89
+ readonly SEND_VOICE_MESSAGE: "notification.voice.send";
90
+ readonly SEND_PUSH_NOTIFICATION: "notification.push.send";
91
+ };
92
+ readonly userService: {
93
+ readonly RESOLVE_MARKETING_USERS: "user.marketing.users.resolve";
94
+ };
95
+ readonly signup: {
96
+ readonly SIGNUP_INITIATED: "signup.initiated";
97
+ readonly SIGNUP_COMPLETED: "signup.completed";
98
+ readonly SIGNUP_VERIFICATION_REQUESTED: "signup.verification.requested";
99
+ };
100
+ readonly signin: {
101
+ readonly SIGNIN_INITIATED: "signin.initiated";
102
+ readonly SIGNIN_COMPLETED: "signin.completed";
103
+ readonly DEVICE_VERIFICATION_REQUESTED: "signin.device-verification.requested";
104
+ readonly SIGNIN_FAILED: "signin.failed";
105
+ };
106
+ readonly password: {
107
+ readonly PASSWORD_RESET_REQUESTED: "password.reset.requested";
108
+ readonly PASSWORD_RESET_COMPLETED: "password.reset.completed";
109
+ readonly PASSWORD_CHANGED: "password.changed";
110
+ };
111
+ readonly pin: {
112
+ readonly PIN_RESET_REQUESTED: "pin.reset.requested";
113
+ readonly PIN_RESET_COMPLETED: "pin.reset.completed";
114
+ readonly PIN_CHANGED: "pin.changed";
115
+ readonly PIN_LOCKED: "pin.locked";
116
+ };
117
+ readonly preferences: {
118
+ readonly USER_PREFERENCES_PROVISION_REQUESTED: "preferences.user.provision.requested";
119
+ readonly USER_PREFERENCES_UPDATED: "preferences.user.updated";
120
+ readonly STAFF_PREFERENCES_PROVISION_REQUESTED: "preferences.staff.provision.requested";
121
+ readonly STAFF_PREFERENCES_UPDATED: "preferences.staff.updated";
122
+ };
123
+ readonly referrals: {
124
+ readonly REFERRAL_CODE_PROVISION_REQUESTED: "referral.code.provision.requested";
125
+ readonly REFERRAL_LINKED: "referral.linked";
126
+ readonly REFERRAL_COMPLETED: "referral.completed";
127
+ readonly REFERRAL_REWARD_PROCESSING_REQUESTED: "referral.reward.processing.requested";
128
+ };
129
+ readonly tickets: {
130
+ readonly TICKET_CREATED: "ticket.created";
131
+ readonly TICKET_UPDATED: "ticket.updated";
132
+ readonly TICKET_RESOLVED: "ticket.resolved";
133
+ };
134
+ readonly devices: {
135
+ readonly DEVICE_TRUSTED: "device.trusted";
136
+ readonly DEVICE_REVOKED: "device.revoked";
137
+ readonly DEVICE_DEACTIVATED: "device.deactivated";
138
+ readonly DEVICE_ACTIVATED: "device.activated";
139
+ };
140
+ readonly countries: {
141
+ readonly COUNTRIES_SYNC_REQUESTED: "country.sync.requested";
142
+ };
143
+ readonly staff: {
144
+ readonly STAFF_CREATED: "staff.created";
145
+ readonly STAFF_UPDATED: "staff.updated";
146
+ readonly STAFF_PASSWORD_CHANGED: "staff.password.changed";
147
+ readonly STAFF_SIGNIN_COMPLETED: "staff.signin.completed";
148
+ };
149
+ readonly roles: {
150
+ readonly ROLE_CREATED: "role.created";
151
+ readonly ROLE_UPDATED: "role.updated";
152
+ readonly ROLE_PERMISSIONS_UPDATED: "role.permissions.updated";
153
+ };
154
+ readonly audit: {
155
+ readonly AUDIT_LOG_RECORDED: "audit.log.recorded";
156
+ };
157
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NatsSubjects = exports.DEFAULT_NATS_CONFIG = exports.NATS_CLIENT = exports.NATS_OPTIONS = void 0;
3
+ exports.NatsSubjects = exports.AuditSubjects = exports.RoleSubjects = exports.StaffSubjects = exports.CountrySubjects = exports.DeviceSubjects = exports.TicketSubjects = exports.ReferralSubjects = exports.PreferencesSubjects = exports.PinSubjects = exports.PasswordSubjects = exports.SigninSubjects = exports.SignupSubjects = exports.UserServiceSubjects = exports.NotificationSubjects = exports.DEFAULT_NATS_CONFIG = exports.NATS_CLIENT = exports.NATS_OPTIONS = void 0;
4
4
  exports.NATS_OPTIONS = 'NATS_OPTIONS';
5
5
  exports.NATS_CLIENT = 'NATS_CLIENT';
6
6
  exports.DEFAULT_NATS_CONFIG = {
@@ -10,6 +10,92 @@ exports.DEFAULT_NATS_CONFIG = {
10
10
  reconnectTimeWait: 2000,
11
11
  maxReconnectAttempts: 10,
12
12
  };
13
- var NatsSubjects;
14
- (function (NatsSubjects) {
15
- })(NatsSubjects || (exports.NatsSubjects = NatsSubjects = {}));
13
+ exports.NotificationSubjects = {
14
+ CREATE_IN_APP_NOTIFICATION: 'notification.create-in-app',
15
+ SEND_TEMPLATE_EMAIL: 'notification.email.send-template',
16
+ SEND_TEXT_MESSAGE: 'notification.text.send',
17
+ SEND_WHATSAPP_MESSAGE: 'notification.whatsapp.send',
18
+ SEND_VOICE_MESSAGE: 'notification.voice.send',
19
+ SEND_PUSH_NOTIFICATION: 'notification.push.send',
20
+ };
21
+ exports.UserServiceSubjects = {
22
+ RESOLVE_MARKETING_USERS: 'user.marketing.users.resolve',
23
+ };
24
+ exports.SignupSubjects = {
25
+ SIGNUP_INITIATED: 'signup.initiated',
26
+ SIGNUP_COMPLETED: 'signup.completed',
27
+ SIGNUP_VERIFICATION_REQUESTED: 'signup.verification.requested',
28
+ };
29
+ exports.SigninSubjects = {
30
+ SIGNIN_INITIATED: 'signin.initiated',
31
+ SIGNIN_COMPLETED: 'signin.completed',
32
+ DEVICE_VERIFICATION_REQUESTED: 'signin.device-verification.requested',
33
+ SIGNIN_FAILED: 'signin.failed',
34
+ };
35
+ exports.PasswordSubjects = {
36
+ PASSWORD_RESET_REQUESTED: 'password.reset.requested',
37
+ PASSWORD_RESET_COMPLETED: 'password.reset.completed',
38
+ PASSWORD_CHANGED: 'password.changed',
39
+ };
40
+ exports.PinSubjects = {
41
+ PIN_RESET_REQUESTED: 'pin.reset.requested',
42
+ PIN_RESET_COMPLETED: 'pin.reset.completed',
43
+ PIN_CHANGED: 'pin.changed',
44
+ PIN_LOCKED: 'pin.locked',
45
+ };
46
+ exports.PreferencesSubjects = {
47
+ USER_PREFERENCES_PROVISION_REQUESTED: 'preferences.user.provision.requested',
48
+ USER_PREFERENCES_UPDATED: 'preferences.user.updated',
49
+ STAFF_PREFERENCES_PROVISION_REQUESTED: 'preferences.staff.provision.requested',
50
+ STAFF_PREFERENCES_UPDATED: 'preferences.staff.updated',
51
+ };
52
+ exports.ReferralSubjects = {
53
+ REFERRAL_CODE_PROVISION_REQUESTED: 'referral.code.provision.requested',
54
+ REFERRAL_LINKED: 'referral.linked',
55
+ REFERRAL_COMPLETED: 'referral.completed',
56
+ REFERRAL_REWARD_PROCESSING_REQUESTED: 'referral.reward.processing.requested',
57
+ };
58
+ exports.TicketSubjects = {
59
+ TICKET_CREATED: 'ticket.created',
60
+ TICKET_UPDATED: 'ticket.updated',
61
+ TICKET_RESOLVED: 'ticket.resolved',
62
+ };
63
+ exports.DeviceSubjects = {
64
+ DEVICE_TRUSTED: 'device.trusted',
65
+ DEVICE_REVOKED: 'device.revoked',
66
+ DEVICE_DEACTIVATED: 'device.deactivated',
67
+ DEVICE_ACTIVATED: 'device.activated',
68
+ };
69
+ exports.CountrySubjects = {
70
+ COUNTRIES_SYNC_REQUESTED: 'country.sync.requested',
71
+ };
72
+ exports.StaffSubjects = {
73
+ STAFF_CREATED: 'staff.created',
74
+ STAFF_UPDATED: 'staff.updated',
75
+ STAFF_PASSWORD_CHANGED: 'staff.password.changed',
76
+ STAFF_SIGNIN_COMPLETED: 'staff.signin.completed',
77
+ };
78
+ exports.RoleSubjects = {
79
+ ROLE_CREATED: 'role.created',
80
+ ROLE_UPDATED: 'role.updated',
81
+ ROLE_PERMISSIONS_UPDATED: 'role.permissions.updated',
82
+ };
83
+ exports.AuditSubjects = {
84
+ AUDIT_LOG_RECORDED: 'audit.log.recorded',
85
+ };
86
+ exports.NatsSubjects = {
87
+ notification: exports.NotificationSubjects,
88
+ userService: exports.UserServiceSubjects,
89
+ signup: exports.SignupSubjects,
90
+ signin: exports.SigninSubjects,
91
+ password: exports.PasswordSubjects,
92
+ pin: exports.PinSubjects,
93
+ preferences: exports.PreferencesSubjects,
94
+ referrals: exports.ReferralSubjects,
95
+ tickets: exports.TicketSubjects,
96
+ devices: exports.DeviceSubjects,
97
+ countries: exports.CountrySubjects,
98
+ staff: exports.StaffSubjects,
99
+ roles: exports.RoleSubjects,
100
+ audit: exports.AuditSubjects,
101
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viardex/viardex-libs",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Viardex shared libraries",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -117,6 +117,5 @@
117
117
  "types": "./dist/storage/index.d.ts",
118
118
  "default": "./dist/storage/index.js"
119
119
  }
120
- },
121
- "packageManager": "pnpm@11.1.2"
120
+ }
122
121
  }