@edirect/rate-limit-module 11.0.49 → 11.0.50

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/README.md CHANGED
@@ -1,164 +1,79 @@
1
- # @edirect/rate-limit-module
1
+ # 📈 Rate Limiting Module
2
2
 
3
- A flexible **rate-limiting system** where access to operations can be restricted based on dynamic **rule expressions** such as `count_quote( ) > 1`. If the condition evaluates to `true`, access is **blocked**.
3
+ This module provides a flexible **rate-limiting system** where access to operations can be restricted based on dynamic **rule expressions** such as `count_quote( ) > 1`. If the condition evaluates to `true`, access is **blocked**.
4
4
 
5
- ## Installation
5
+ ## ✨ Features
6
6
 
7
- ```sh
8
- pnpm add @edirect/rate-limit-module
9
- # or
10
- npm install @edirect/rate-limit-module
11
- ```
7
+ - Define rate-limiting rules with custom expressions.
12
8
 
13
- ---
9
+ - Dynamically inject context-aware functions for rule evaluation.
14
10
 
15
- ## 🚀 Quick Start
11
+ - Easily integrate with any resource via a decorator.
16
12
 
17
- ### 1. Create a Global Database Connection Module
13
+ - Built with extensibility and modularity in mind.
18
14
 
19
- **Important:** This module requires a MongoDB connection provider. Create a global module to provide it:
20
-
21
- ```ts
22
- // db-provider.module.ts
23
- import { Global, Module } from '@nestjs/common';
24
- import { Connection } from 'mongoose';
25
- import { MongoDBConnection } from './mongodb-connection';
26
-
27
- export const dbProvider = [
28
- {
29
- provide: 'DATABASE_CONNECTION',
30
- useFactory: async (): Promise<Connection> => {
31
- return new MongoDBConnection().connect();
32
- },
33
- },
34
- ];
15
+ ## 🧱 How It Works
35
16
 
36
- @Global()
37
- @Module({
38
- providers: [...dbProvider],
39
- exports: [...dbProvider],
40
- })
41
- export class DbProviderModule {}
42
- ```
17
+ 1. You define a rule using a simple expression (e.g., `count_quote( ) > 1`).
43
18
 
44
- ### 2. Import Database Module in Root Module
19
+ 2. The rule is evaluated in runtime using data injected from the request context.
45
20
 
46
- ```ts
47
- // app.module.ts
48
- import { Module } from '@nestjs/common';
49
- import { DbProviderModule } from './db-provider.module';
21
+ 3. If the expression is true, the action is blocked.
50
22
 
51
- @Module({
52
- imports: [
53
- DbProviderModule, // Must be imported first
54
- // ... other modules
55
- ],
56
- })
57
- export class AppModule {}
58
- ```
23
+ ## 🧩 Usage
59
24
 
60
- ### 3. Import RateLimitingModule in Feature Module
25
+ ### 1. Install the Module
61
26
 
62
27
  ```ts
63
- import {
64
- RateLimitingModule,
65
- RuleEngineModule,
66
- } from '@edirect/rate-limit-module';
67
-
68
28
  @Module({
69
29
  imports: [
70
- // Pass the token name of your existing MongoDB connection provider
71
- // Default is 'DATABASE_CONNECTION'
72
- RateLimitingModule.forRoot('DATABASE_CONNECTION'),
73
-
74
- // Or use a custom token
75
- RateLimitingModule.forRoot('MY_CUSTOM_DB_CONNECTION'),
30
+ RateLimitingModule,
76
31
 
77
- // Or omit to use default
78
- RateLimitingModule.forRoot(),
79
-
80
- // Configure custom functions for rule evaluation
81
32
  RuleEngineModule.forFeatureAsync({
82
- imports: [YourFunctionsModule],
83
- useFactory: async (useCase: YourInjectFunctionsUseCase) => {
84
- return await useCase.getFunctions();
33
+ useFactory: async (quoteService: QuoteService) => {
34
+ return await quoteService.countQuote();
85
35
  },
86
- inject: [YourInjectFunctionsUseCase],
36
+
37
+ inject: [QuoteService],
87
38
  }),
88
39
  ],
89
40
  })
90
41
  export class YourFeatureModule {}
91
42
  ```
92
43
 
93
- ### 2. Database Connection Requirement
44
+ ## 2. Decorate Your Handlers
94
45
 
95
- The module uses the global `DATABASE_CONNECTION` provider created in step 1. It references your connection using the token name, so it doesn't duplicate the connection.
96
-
97
- ### 3. Apply Rate Limiting to Routes
98
-
99
- Use the `@RateLimitingRuleMetadata` decorator and `@UseGuards(RateLimitingRuleGuard)` to protect your endpoints:
46
+ Use the `@RateLimitingRuleMetadata` decorator to attach metadata used during rule evaluation.
100
47
 
101
48
  ```ts
102
- import { RateLimitingRuleGuard, RateLimitingRuleMetadata } from '@edirect/rate-limit-module';
103
49
 
104
- @RateLimitingRuleMetadata({
105
- action: 'create_quote',
106
- partnerPath: 'partner.partnerId',
107
- providerPath: 'provider',
108
- productTypePath: 'productType',
109
- marketPath: 'market',
110
- })
111
- @UseGuards(RateLimitingRuleGuard)
112
- @Post('quotes')
113
- createQuote(@Body() body: CreateQuoteDto) {
114
- return this.quoteService.create(body);
115
- }
116
- ```
50
+ import { RateLimitingRuleMetadata } from 'path-to-rate-limiting-module';
117
51
 
118
- ## ✨ Features
119
52
 
120
- - Define rate-limiting rules with custom expressions
121
- - Dynamically inject context-aware functions for rule evaluation
122
- - Easily integrate with any resource via decorators
123
- - Uses existing MongoDB connection (no separate connection required)
124
- - Global module - configure once, use everywhere
125
- - Built with extensibility and modularity in mind
126
53
 
127
- ## 🧱 How It Works
54
+ @RateLimitingRuleMetadata({
128
55
 
129
- 1. You define a rule using a simple expression (e.g., `count_quote( ) > 1`)
130
- 2. The rule is evaluated at runtime using data injected from the request context
131
- 3. If the expression is true, the action is blocked
56
+ action: 'create_quote',
132
57
 
133
- ## 🛠 Architecture
58
+ partnerPath: 'partner.partnerId',
134
59
 
135
- The module is designed to:
60
+ providerPath: 'provider',
136
61
 
137
- - **Not create its own MongoDB connection** - it uses the application's existing connection
138
- - **Be a global module** - providers are available throughout the application
139
- - **Use custom model providers** - creates Mongoose models using the injected `DATABASE_CONNECTION`
140
- - **Export Reflector** - ensures guards have access to metadata
62
+ productTypePath: 'productType',
141
63
 
142
- ## 📝 Configuration Details
64
+ marketPath: 'market',
143
65
 
144
- ### Module Structure
66
+ })
145
67
 
146
- ```ts
147
- RateLimitingModule.forRoot(dbProvider) // Global module, accepts DATABASE_CONNECTION provider
148
- └─ RuleModule.register() // Provides RuleService and RuleRepository
149
- └─ Custom Model Provider // Uses DATABASE_CONNECTION to create Mongoose models
150
- ```
68
+ @Post('quotes')
151
69
 
152
- ### Required Providers
70
+ createQuote(@Body() body: CreateQuoteDto) {
153
71
 
154
- The module requires:
72
+ return this.quoteService.create(body);
155
73
 
156
- 1. **DATABASE_CONNECTION**: Mongoose connection instance
157
- 2. **Reflector**: For metadata reflection (provided by the module)
158
- 3. **RuleService**: For accessing rate limiting rules (exported by RuleModule)
74
+ }
159
75
 
160
- ````ts
161
- import { RateLimitingRuleMetadata } from 'path-to-rate-limiting-module';
76
+ ```
162
77
 
163
78
  - `action`: Name of the action to be controlled.
164
79
 
@@ -182,7 +97,7 @@ RuleEngineModule.forFeatureAsync({
182
97
 
183
98
  inject: [RateLimitingInjectFunctionsUseCase],
184
99
  });
185
- ````
100
+ ```
186
101
 
187
102
  ## 🧪 Example Rule
188
103
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edirect/rate-limit-module",
3
- "version": "11.0.48",
3
+ "version": "11.0.46",
4
4
  "main": "./dist/src/index.js",
5
5
  "types": "./dist/src/index.d.ts",
6
6
  "exports": {
@@ -16,21 +16,21 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@edirect/auth": "^11.0.48",
20
- "@edirect/logger": "^11.0.48",
19
+ "@edirect/auth": "^11.0.46",
20
+ "@edirect/logger": "^11.0.46",
21
21
  "@nestjs/cache-manager": "^3.1.0",
22
- "@nestjs/common": "^11.1.16",
23
- "@nestjs/config": "^4.0.3",
24
- "@nestjs/core": "^11.1.16",
22
+ "@nestjs/common": "^11.1.12",
23
+ "@nestjs/config": "^4.0.2",
24
+ "@nestjs/core": "^11.1.12",
25
25
  "@nestjs/mongoose": "^11.0.4",
26
- "@nestjs/swagger": "^11.2.6",
26
+ "@nestjs/swagger": "^11.2.5",
27
27
  "cache-manager-redis-store": "^3.0.1",
28
28
  "class-transformer": "^0.5.1",
29
- "class-validator": "^0.15.1",
29
+ "class-validator": "^0.14.3",
30
30
  "dayjs": "^1.11.19",
31
- "ioredis": "^5.10.0",
31
+ "ioredis": "^5.9.2",
32
32
  "jexl": "^2.3.0",
33
- "mongoose": "^9.3.0",
33
+ "mongoose": "^9.1.5",
34
34
  "tslib": "^2.8.1",
35
35
  "uuid": "^13.0.0"
36
36
  },
@@ -1,6 +1,3 @@
1
- import { DynamicModule } from '@nestjs/common';
2
- export declare const RATE_LIMIT_DB_CONNECTION = "RATE_LIMIT_DB_CONNECTION";
3
1
  export declare class RateLimitingModule {
4
- static forRoot(connectionToken?: string): DynamicModule;
5
2
  }
6
3
  //# sourceMappingURL=rate-limiting.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rate-limiting.module.d.ts","sourceRoot":"","sources":["../../src/rate-limiting.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAK/D,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAEnE,qBAEa,kBAAkB;IAC7B,MAAM,CAAC,OAAO,CACZ,eAAe,SAAwB,GACtC,aAAa;CASjB"}
1
+ {"version":3,"file":"rate-limiting.module.d.ts","sourceRoot":"","sources":["../../src/rate-limiting.module.ts"],"names":[],"mappings":"AAMA,qBAiBa,kBAAkB;CAAG"}
@@ -1,26 +1,31 @@
1
1
  "use strict";
2
- var RateLimitingModule_1;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.RateLimitingModule = exports.RATE_LIMIT_DB_CONNECTION = void 0;
3
+ exports.RateLimitingModule = void 0;
5
4
  const tslib_1 = require("tslib");
6
5
  const common_1 = require("@nestjs/common");
7
- const core_1 = require("@nestjs/core");
6
+ const config_1 = require("@nestjs/config");
7
+ const mongoose_1 = require("@nestjs/mongoose");
8
8
  const rule_module_1 = require("./rules/rule.module");
9
9
  const rule_constraint_1 = require("./validators/rule.constraint");
10
- exports.RATE_LIMIT_DB_CONNECTION = 'RATE_LIMIT_DB_CONNECTION';
11
- let RateLimitingModule = RateLimitingModule_1 = class RateLimitingModule {
12
- static forRoot(connectionToken = 'DATABASE_CONNECTION') {
13
- return {
14
- global: true,
15
- module: RateLimitingModule_1,
16
- imports: [rule_module_1.RuleModule.register(connectionToken)],
17
- providers: [core_1.Reflector, rule_constraint_1.IsValidExpressionConstraint],
18
- exports: [rule_module_1.RuleModule, core_1.Reflector],
19
- };
20
- }
10
+ let RateLimitingModule = class RateLimitingModule {
21
11
  };
22
12
  exports.RateLimitingModule = RateLimitingModule;
23
- exports.RateLimitingModule = RateLimitingModule = RateLimitingModule_1 = tslib_1.__decorate([
24
- (0, common_1.Global)(),
25
- (0, common_1.Module)({})
13
+ exports.RateLimitingModule = RateLimitingModule = tslib_1.__decorate([
14
+ (0, common_1.Module)({
15
+ imports: [
16
+ rule_module_1.RuleModule.register(),
17
+ config_1.ConfigModule.forRoot({
18
+ isGlobal: true,
19
+ }),
20
+ mongoose_1.MongooseModule.forRootAsync({
21
+ imports: [config_1.ConfigModule],
22
+ useFactory: async (config) => ({
23
+ uri: config.get('MONGO_URL'),
24
+ }),
25
+ inject: [config_1.ConfigService],
26
+ }),
27
+ ],
28
+ providers: [rule_constraint_1.IsValidExpressionConstraint],
29
+ exports: [rule_module_1.RuleModule],
30
+ })
26
31
  ], RateLimitingModule);
@@ -1,5 +1,5 @@
1
1
  import { DynamicModule } from '@nestjs/common';
2
2
  export declare class RuleModule {
3
- static register(connectionToken: string): DynamicModule;
3
+ static register(): DynamicModule;
4
4
  }
5
5
  //# sourceMappingURL=rule.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rule.module.d.ts","sourceRoot":"","sources":["../../../src/rules/rule.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AASvD,qBACa,UAAU;IACrB,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,aAAa;CAoBxD"}
1
+ {"version":3,"file":"rule.module.d.ts","sourceRoot":"","sources":["../../../src/rules/rule.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAQvD,qBACa,UAAU;IACrB,MAAM,CAAC,QAAQ,IAAI,aAAa;CAqBjC"}
@@ -12,20 +12,22 @@ const rule_repository_1 = require("./rule.repository");
12
12
  const rule_schema_1 = require("./rule.schema");
13
13
  const rule_service_1 = require("./rule.service");
14
14
  let RuleModule = RuleModule_1 = class RuleModule {
15
- static register(connectionToken) {
15
+ static register() {
16
16
  const enableController = process.env.ENABLE_RATE_LIMITING_RULE_CONTROLLER === 'true';
17
- const modelProvider = {
18
- provide: (0, mongoose_1.getModelToken)(rule_schema_1.RateLimitingRule.name),
19
- useFactory: (connection) => {
20
- return connection.model(rule_schema_1.RateLimitingRule.name, rule_schema_1.RateLimitingRuleSchema);
21
- },
22
- inject: [connectionToken],
23
- };
24
17
  return {
25
18
  module: RuleModule_1,
26
- imports: [logger_1.LoggerModule, shared_module_1.SharedModule],
19
+ imports: [
20
+ logger_1.LoggerModule,
21
+ shared_module_1.SharedModule,
22
+ mongoose_1.MongooseModule.forFeature([
23
+ {
24
+ name: rule_schema_1.RateLimitingRule.name,
25
+ schema: rule_schema_1.RateLimitingRuleSchema,
26
+ },
27
+ ]),
28
+ ],
27
29
  controllers: enableController ? [rule_controller_1.RuleController] : [],
28
- providers: [modelProvider, rule_service_1.RuleService, rule_repository_1.RuleRepository],
30
+ providers: [rule_service_1.RuleService, rule_repository_1.RuleRepository],
29
31
  exports: [rule_service_1.RuleService, rule_repository_1.RuleRepository],
30
32
  };
31
33
  }
@@ -30,7 +30,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
30
30
  __v: number;
31
31
  }), any, RateLimitingRule>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
32
32
  id: string;
33
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
33
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
34
34
  _id: import("mongoose").Types.ObjectId;
35
35
  } & {
36
36
  __v: number;
@@ -39,7 +39,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
39
39
  }, {
40
40
  ruleId?: import("mongoose").SchemaDefinitionProperty<string, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
41
41
  id: string;
42
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
42
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
43
43
  _id: import("mongoose").Types.ObjectId;
44
44
  } & {
45
45
  __v: number;
@@ -48,7 +48,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
48
48
  }> | undefined;
49
49
  name?: import("mongoose").SchemaDefinitionProperty<string, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
50
50
  id: string;
51
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
51
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
52
52
  _id: import("mongoose").Types.ObjectId;
53
53
  } & {
54
54
  __v: number;
@@ -57,7 +57,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
57
57
  }> | undefined;
58
58
  targetAction?: import("mongoose").SchemaDefinitionProperty<string | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
59
59
  id: string;
60
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
60
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
61
61
  _id: import("mongoose").Types.ObjectId;
62
62
  } & {
63
63
  __v: number;
@@ -66,7 +66,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
66
66
  }> | undefined;
67
67
  expression?: import("mongoose").SchemaDefinitionProperty<string, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
68
68
  id: string;
69
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
69
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
70
70
  _id: import("mongoose").Types.ObjectId;
71
71
  } & {
72
72
  __v: number;
@@ -75,7 +75,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
75
75
  }> | undefined;
76
76
  enabled?: import("mongoose").SchemaDefinitionProperty<boolean, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
77
77
  id: string;
78
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
78
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
79
79
  _id: import("mongoose").Types.ObjectId;
80
80
  } & {
81
81
  __v: number;
@@ -84,7 +84,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
84
84
  }> | undefined;
85
85
  market?: import("mongoose").SchemaDefinitionProperty<string, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
86
86
  id: string;
87
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
87
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
88
88
  _id: import("mongoose").Types.ObjectId;
89
89
  } & {
90
90
  __v: number;
@@ -93,7 +93,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
93
93
  }> | undefined;
94
94
  errorMessage?: import("mongoose").SchemaDefinitionProperty<string | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
95
95
  id: string;
96
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
96
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
97
97
  _id: import("mongoose").Types.ObjectId;
98
98
  } & {
99
99
  __v: number;
@@ -102,7 +102,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
102
102
  }> | undefined;
103
103
  partner?: import("mongoose").SchemaDefinitionProperty<string, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
104
104
  id: string;
105
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
105
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
106
106
  _id: import("mongoose").Types.ObjectId;
107
107
  } & {
108
108
  __v: number;
@@ -111,7 +111,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
111
111
  }> | undefined;
112
112
  provider?: import("mongoose").SchemaDefinitionProperty<string | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
113
113
  id: string;
114
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
114
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
115
115
  _id: import("mongoose").Types.ObjectId;
116
116
  } & {
117
117
  __v: number;
@@ -120,7 +120,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
120
120
  }> | undefined;
121
121
  productType?: import("mongoose").SchemaDefinitionProperty<string | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
122
122
  id: string;
123
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
123
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
124
124
  _id: import("mongoose").Types.ObjectId;
125
125
  } & {
126
126
  __v: number;
@@ -129,7 +129,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
129
129
  }> | undefined;
130
130
  variables?: import("mongoose").SchemaDefinitionProperty<Record<string, string> | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
131
131
  id: string;
132
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
132
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
133
133
  _id: import("mongoose").Types.ObjectId;
134
134
  } & {
135
135
  __v: number;
@@ -138,7 +138,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
138
138
  }> | undefined;
139
139
  variablesRequired?: import("mongoose").SchemaDefinitionProperty<boolean | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
140
140
  id: string;
141
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
141
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
142
142
  _id: import("mongoose").Types.ObjectId;
143
143
  } & {
144
144
  __v: number;
@@ -147,7 +147,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
147
147
  }> | undefined;
148
148
  deletedAt?: import("mongoose").SchemaDefinitionProperty<Date | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
149
149
  id: string;
150
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
150
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
151
151
  _id: import("mongoose").Types.ObjectId;
152
152
  } & {
153
153
  __v: number;
@@ -156,7 +156,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
156
156
  }> | undefined;
157
157
  createdAt?: import("mongoose").SchemaDefinitionProperty<Date | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
158
158
  id: string;
159
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
159
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
160
160
  _id: import("mongoose").Types.ObjectId;
161
161
  } & {
162
162
  __v: number;
@@ -165,7 +165,7 @@ export declare const RateLimitingRuleSchema: import("mongoose").Schema<RateLimit
165
165
  }> | undefined;
166
166
  updatedAt?: import("mongoose").SchemaDefinitionProperty<Date | undefined, RateLimitingRule, Document<unknown, {}, RateLimitingRule, {
167
167
  id: string;
168
- }, import("mongoose").DefaultSchemaOptions> & Omit<RateLimitingRule & {
168
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
169
169
  _id: import("mongoose").Types.ObjectId;
170
170
  } & {
171
171
  __v: number;
@@ -1 +1 @@
1
- {"version":3,"file":"dsl.service.d.ts","sourceRoot":"","sources":["../../../../src/shared/dsl/dsl.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,qBAAa,UAAU;;IACrB,MAAM,CAAC,WAAW,GAAI,OAAO,aAAa,EAAE,KAAG,SAAS,CAWtD;IAEF,MAAM,CAAC,YAAY,GAAI,QAAQ,SAAS,KAAG,WAAW,CAAC,aAAa,CAAC,CAqDnE;CAuBH"}
1
+ {"version":3,"file":"dsl.service.d.ts","sourceRoot":"","sources":["../../../../src/shared/dsl/dsl.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,qBAAa,UAAU;;IACrB,MAAM,CAAC,WAAW,GAAI,OAAO,aAAa,EAAE,KAAG,SAAS,CAWtD;IAEF,MAAM,CAAC,YAAY,GACjB,QAAQ,SAAS,KAChB,WAAW,CAAC,aAAa,CAAC,CAuD3B;CAuBH"}
@@ -1 +1 @@
1
- {"version":3,"file":"rule-engine.module.d.ts","sourceRoot":"","sources":["../../../../src/shared/rule-engine/rule-engine.module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,cAAc,EAEd,yBAAyB,EAE1B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,qBAEa,gBAAgB;IAC3B,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE;QAC9B,UAAU,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;QACzD,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,yBAAyB,CAAC,CAAC;QAC3D,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KACpC,GAAG,aAAa;IAuBjB,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,aAAa;CAkB7D"}
1
+ {"version":3,"file":"rule-engine.module.d.ts","sourceRoot":"","sources":["../../../../src/shared/rule-engine/rule-engine.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,cAAc,EAAU,yBAAyB,EAAY,MAAM,gBAAgB,CAAC;AAEpH,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,qBAEa,gBAAgB;IAC3B,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE;QAC9B,UAAU,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;QACzD,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,yBAAyB,CAAC,CAAC;QAC3D,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KACpC,GAAG,aAAa;IAuBjB,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,aAAa;CAkB7D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edirect/rate-limit-module",
3
- "version": "11.0.49",
3
+ "version": "11.0.50",
4
4
  "packageScope": "@edirect",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -26,14 +26,14 @@
26
26
  "cache-manager-redis-store": "^3.0.1",
27
27
  "class-transformer": "^0.5.1",
28
28
  "class-validator": "^0.15.1",
29
- "dayjs": "^1.11.19",
29
+ "dayjs": "^1.11.20",
30
30
  "ioredis": "^5.10.0",
31
31
  "jexl": "^2.3.0",
32
32
  "mongoose": "^9.3.0",
33
33
  "tslib": "^2.8.1",
34
34
  "uuid": "^13.0.0",
35
- "@edirect/auth": "11.0.49",
36
- "@edirect/logger": "11.0.49"
35
+ "@edirect/auth": "11.0.50",
36
+ "@edirect/logger": "11.0.50"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/jexl": "^2.3.4"