@amohamud23/notihub 1.1.55 → 1.1.56

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
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/index.ts
@@ -32,7 +22,6 @@ var index_exports = {};
32
22
  __export(index_exports, {
33
23
  DocumentNotFoundException: () => DocumentNotFoundException,
34
24
  ErrorCode: () => errorcodes_exports,
35
- MongooseClient: () => MongooseClient_default,
36
25
  TABLES: () => TABLES,
37
26
  addMonths: () => addMonths,
38
27
  formatResponse: () => formatResponse,
@@ -144,23 +133,6 @@ var formatResponse = (data, message = "Success", error, statusCode = 200) => {
144
133
  return response;
145
134
  };
146
135
 
147
- // src/client/MongooseClient.ts
148
- var import_mongoose = __toESM(require("mongoose"), 1);
149
- var conn = null;
150
- var connectionStr = process.env.DB_CONNECTION_STRING;
151
- var dbName = process.env.DB_NAME;
152
- var client = async function() {
153
- if (conn == null) {
154
- conn = import_mongoose.default.createConnection(connectionStr, {
155
- dbName,
156
- serverSelectionTimeoutMS: 5e3
157
- });
158
- await conn.asPromise();
159
- }
160
- return conn;
161
- };
162
- var MongooseClient_default = client;
163
-
164
136
  // src/exceptions.ts
165
137
  var DocumentNotFoundException = class _DocumentNotFoundException extends Error {
166
138
  constructor(msg) {
@@ -2069,7 +2041,6 @@ var InvalidDate = "4011";
2069
2041
  0 && (module.exports = {
2070
2042
  DocumentNotFoundException,
2071
2043
  ErrorCode,
2072
- MongooseClient,
2073
2044
  TABLES,
2074
2045
  addMonths,
2075
2046
  formatResponse,
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Response as Response$1 } from 'express';
2
- import mongoose from 'mongoose';
3
2
 
4
3
  type CreateNotiRequestBody = {
5
4
  customerId: string;
@@ -267,8 +266,6 @@ declare const formatResponse: (data: any, message?: string, error?: {
267
266
  error: string;
268
267
  }, statusCode?: number) => Response;
269
268
 
270
- declare const client: () => Promise<mongoose.Connection>;
271
-
272
269
  declare class DocumentNotFoundException extends Error {
273
270
  constructor(msg: string);
274
271
  }
@@ -819,4 +816,4 @@ declare namespace errorcodes {
819
816
  export { errorcodes_CustomerNotFound as CustomerNotFound, errorcodes_DocumentNotFound as DocumentNotFound, errorcodes_InvalidDate as InvalidDate, errorcodes_InvalidEmail as InvalidEmail, errorcodes_InvalidName as InvalidName, errorcodes_InvalidPassword as InvalidPassword, errorcodes_InvalidPhoneNumber as InvalidPhoneNumber, errorcodes_InvalidPushToken as InvalidPushToken, errorcodes_UserNotFound as UserNotFound };
820
817
  }
821
818
 
822
- export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, type DBMetaData, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMetadata, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubSubscriptionActivity, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, client as MongooseClient, type NotiHubTypes, type Response, TABLES, addMonths, formatResponse, getDate, getDateFormat, handleError, handleSuccess };
819
+ export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, type DBMetaData, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMetadata, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubSubscriptionActivity, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, type NotiHubTypes, type Response, TABLES, addMonths, formatResponse, getDate, getDateFormat, handleError, handleSuccess };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Response as Response$1 } from 'express';
2
- import mongoose from 'mongoose';
3
2
 
4
3
  type CreateNotiRequestBody = {
5
4
  customerId: string;
@@ -267,8 +266,6 @@ declare const formatResponse: (data: any, message?: string, error?: {
267
266
  error: string;
268
267
  }, statusCode?: number) => Response;
269
268
 
270
- declare const client: () => Promise<mongoose.Connection>;
271
-
272
269
  declare class DocumentNotFoundException extends Error {
273
270
  constructor(msg: string);
274
271
  }
@@ -819,4 +816,4 @@ declare namespace errorcodes {
819
816
  export { errorcodes_CustomerNotFound as CustomerNotFound, errorcodes_DocumentNotFound as DocumentNotFound, errorcodes_InvalidDate as InvalidDate, errorcodes_InvalidEmail as InvalidEmail, errorcodes_InvalidName as InvalidName, errorcodes_InvalidPassword as InvalidPassword, errorcodes_InvalidPhoneNumber as InvalidPhoneNumber, errorcodes_InvalidPushToken as InvalidPushToken, errorcodes_UserNotFound as UserNotFound };
820
817
  }
821
818
 
822
- export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, type DBMetaData, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMetadata, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubSubscriptionActivity, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, client as MongooseClient, type NotiHubTypes, type Response, TABLES, addMonths, formatResponse, getDate, getDateFormat, handleError, handleSuccess };
819
+ export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, type DBMetaData, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMetadata, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubSubscriptionActivity, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, type NotiHubTypes, type Response, TABLES, addMonths, formatResponse, getDate, getDateFormat, handleError, handleSuccess };
package/dist/index.js CHANGED
@@ -105,23 +105,6 @@ var formatResponse = (data, message = "Success", error, statusCode = 200) => {
105
105
  return response;
106
106
  };
107
107
 
108
- // src/client/MongooseClient.ts
109
- import mongoose from "mongoose";
110
- var conn = null;
111
- var connectionStr = process.env.DB_CONNECTION_STRING;
112
- var dbName = process.env.DB_NAME;
113
- var client = async function() {
114
- if (conn == null) {
115
- conn = mongoose.createConnection(connectionStr, {
116
- dbName,
117
- serverSelectionTimeoutMS: 5e3
118
- });
119
- await conn.asPromise();
120
- }
121
- return conn;
122
- };
123
- var MongooseClient_default = client;
124
-
125
108
  // src/exceptions.ts
126
109
  var DocumentNotFoundException = class _DocumentNotFoundException extends Error {
127
110
  constructor(msg) {
@@ -2103,7 +2086,6 @@ var InvalidDate = "4011";
2103
2086
  export {
2104
2087
  DocumentNotFoundException,
2105
2088
  errorcodes_exports as ErrorCode,
2106
- MongooseClient_default as MongooseClient,
2107
2089
  TABLES,
2108
2090
  addMonths,
2109
2091
  formatResponse,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amohamud23/notihub",
3
- "version": "1.1.55",
3
+ "version": "1.1.56",
4
4
  "description": "Notihub Package",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",
@@ -35,7 +35,6 @@
35
35
  "@aws-sdk/lib-dynamodb": "^3.821.0",
36
36
  "aws-sdk-client-mock": "^4.1.0",
37
37
  "date-fns": "^4.1.0",
38
- "mongoose": "^8.7.2",
39
38
  "ts-node": "^10.9.2",
40
39
  "uuid": "^11.0.2"
41
40
  }