@edirect/rate-limit-module 11.0.50 → 11.0.51

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,79 +1,164 @@
1
- # 📈 Rate Limiting Module
1
+ # @edirect/rate-limit-module
2
2
 
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**.
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**.
4
4
 
5
- ## ✨ Features
5
+ ## Installation
6
6
 
7
- - Define rate-limiting rules with custom expressions.
7
+ ```sh
8
+ pnpm add @edirect/rate-limit-module
9
+ # or
10
+ npm install @edirect/rate-limit-module
11
+ ```
8
12
 
9
- - Dynamically inject context-aware functions for rule evaluation.
13
+ ---
10
14
 
11
- - Easily integrate with any resource via a decorator.
15
+ ## 🚀 Quick Start
12
16
 
13
- - Built with extensibility and modularity in mind.
17
+ ### 1. Create a Global Database Connection Module
14
18
 
15
- ## 🧱 How It Works
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
+ ];
16
35
 
17
- 1. You define a rule using a simple expression (e.g., `count_quote( ) > 1`).
36
+ @Global()
37
+ @Module({
38
+ providers: [...dbProvider],
39
+ exports: [...dbProvider],
40
+ })
41
+ export class DbProviderModule {}
42
+ ```
18
43
 
19
- 2. The rule is evaluated in runtime using data injected from the request context.
44
+ ### 2. Import Database Module in Root Module
20
45
 
21
- 3. If the expression is true, the action is blocked.
46
+ ```ts
47
+ // app.module.ts
48
+ import { Module } from '@nestjs/common';
49
+ import { DbProviderModule } from './db-provider.module';
22
50
 
23
- ## 🧩 Usage
51
+ @Module({
52
+ imports: [
53
+ DbProviderModule, // Must be imported first
54
+ // ... other modules
55
+ ],
56
+ })
57
+ export class AppModule {}
58
+ ```
24
59
 
25
- ### 1. Install the Module
60
+ ### 3. Import RateLimitingModule in Feature Module
26
61
 
27
62
  ```ts
63
+ import {
64
+ RateLimitingModule,
65
+ RuleEngineModule,
66
+ } from '@edirect/rate-limit-module';
67
+
28
68
  @Module({
29
69
  imports: [
30
- RateLimitingModule,
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'),
31
76
 
77
+ // Or omit to use default
78
+ RateLimitingModule.forRoot(),
79
+
80
+ // Configure custom functions for rule evaluation
32
81
  RuleEngineModule.forFeatureAsync({
33
- useFactory: async (quoteService: QuoteService) => {
34
- return await quoteService.countQuote();
82
+ imports: [YourFunctionsModule],
83
+ useFactory: async (useCase: YourInjectFunctionsUseCase) => {
84
+ return await useCase.getFunctions();
35
85
  },
36
-
37
- inject: [QuoteService],
86
+ inject: [YourInjectFunctionsUseCase],
38
87
  }),
39
88
  ],
40
89
  })
41
90
  export class YourFeatureModule {}
42
91
  ```
43
92
 
44
- ## 2. Decorate Your Handlers
93
+ ### 2. Database Connection Requirement
45
94
 
46
- Use the `@RateLimitingRuleMetadata` decorator to attach metadata used during rule evaluation.
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:
47
100
 
48
101
  ```ts
102
+ import { RateLimitingRuleGuard, RateLimitingRuleMetadata } from '@edirect/rate-limit-module';
49
103
 
50
- import { RateLimitingRuleMetadata } from 'path-to-rate-limiting-module';
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
+ ```
51
117
 
118
+ ## ✨ Features
52
119
 
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
53
126
 
54
- @RateLimitingRuleMetadata({
127
+ ## 🧱 How It Works
55
128
 
56
- action: 'create_quote',
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
57
132
 
58
- partnerPath: 'partner.partnerId',
133
+ ## 🛠 Architecture
59
134
 
60
- providerPath: 'provider',
135
+ The module is designed to:
61
136
 
62
- productTypePath: 'productType',
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
63
141
 
64
- marketPath: 'market',
142
+ ## 📝 Configuration Details
65
143
 
66
- })
144
+ ### Module Structure
67
145
 
68
- @Post('quotes')
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
+ ```
69
151
 
70
- createQuote(@Body() body: CreateQuoteDto) {
152
+ ### Required Providers
71
153
 
72
- return this.quoteService.create(body);
154
+ The module requires:
73
155
 
74
- }
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)
75
159
 
76
- ```
160
+ ````ts
161
+ import { RateLimitingRuleMetadata } from 'path-to-rate-limiting-module';
77
162
 
78
163
  - `action`: Name of the action to be controlled.
79
164
 
@@ -97,7 +182,7 @@ RuleEngineModule.forFeatureAsync({
97
182
 
98
183
  inject: [RateLimitingInjectFunctionsUseCase],
99
184
  });
100
- ```
185
+ ````
101
186
 
102
187
  ## 🧪 Example Rule
103
188
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edirect/rate-limit-module",
3
- "version": "11.0.46",
3
+ "version": "11.0.51",
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.46",
20
- "@edirect/logger": "^11.0.46",
19
+ "@edirect/auth": "^11.0.51",
20
+ "@edirect/logger": "^11.0.51",
21
21
  "@nestjs/cache-manager": "^3.1.0",
22
- "@nestjs/common": "^11.1.12",
23
- "@nestjs/config": "^4.0.2",
24
- "@nestjs/core": "^11.1.12",
22
+ "@nestjs/common": "^11.1.17",
23
+ "@nestjs/config": "^4.0.3",
24
+ "@nestjs/core": "^11.1.17",
25
25
  "@nestjs/mongoose": "^11.0.4",
26
- "@nestjs/swagger": "^11.2.5",
26
+ "@nestjs/swagger": "^11.2.6",
27
27
  "cache-manager-redis-store": "^3.0.1",
28
28
  "class-transformer": "^0.5.1",
29
- "class-validator": "^0.14.3",
30
- "dayjs": "^1.11.19",
31
- "ioredis": "^5.9.2",
29
+ "class-validator": "^0.15.1",
30
+ "dayjs": "^1.11.20",
31
+ "ioredis": "^5.10.0",
32
32
  "jexl": "^2.3.0",
33
- "mongoose": "^9.1.5",
33
+ "mongoose": "^9.3.0",
34
34
  "tslib": "^2.8.1",
35
35
  "uuid": "^13.0.0"
36
36
  },
@@ -1,3 +1,6 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ export declare const RATE_LIMIT_DB_CONNECTION = "RATE_LIMIT_DB_CONNECTION";
1
3
  export declare class RateLimitingModule {
4
+ static forRoot(connectionToken?: string): DynamicModule;
2
5
  }
3
6
  //# 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":"AAMA,qBAiBa,kBAAkB;CAAG"}
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,31 +1,26 @@
1
1
  "use strict";
2
+ var RateLimitingModule_1;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RateLimitingModule = void 0;
4
+ exports.RateLimitingModule = exports.RATE_LIMIT_DB_CONNECTION = void 0;
4
5
  const tslib_1 = require("tslib");
5
6
  const common_1 = require("@nestjs/common");
6
- const config_1 = require("@nestjs/config");
7
- const mongoose_1 = require("@nestjs/mongoose");
7
+ const core_1 = require("@nestjs/core");
8
8
  const rule_module_1 = require("./rules/rule.module");
9
9
  const rule_constraint_1 = require("./validators/rule.constraint");
10
- let RateLimitingModule = class RateLimitingModule {
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
+ }
11
21
  };
12
22
  exports.RateLimitingModule = RateLimitingModule;
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
- })
23
+ exports.RateLimitingModule = RateLimitingModule = RateLimitingModule_1 = tslib_1.__decorate([
24
+ (0, common_1.Global)(),
25
+ (0, common_1.Module)({})
31
26
  ], RateLimitingModule);
@@ -1,5 +1,5 @@
1
1
  import { DynamicModule } from '@nestjs/common';
2
2
  export declare class RuleModule {
3
- static register(): DynamicModule;
3
+ static register(connectionToken: string): 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;AAQvD,qBACa,UAAU;IACrB,MAAM,CAAC,QAAQ,IAAI,aAAa;CAqBjC"}
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"}
@@ -12,22 +12,20 @@ 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() {
15
+ static register(connectionToken) {
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
+ };
17
24
  return {
18
25
  module: RuleModule_1,
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
- ],
26
+ imports: [logger_1.LoggerModule, shared_module_1.SharedModule],
29
27
  controllers: enableController ? [rule_controller_1.RuleController] : [],
30
- providers: [rule_service_1.RuleService, rule_repository_1.RuleRepository],
28
+ providers: [modelProvider, rule_service_1.RuleService, rule_repository_1.RuleRepository],
31
29
  exports: [rule_service_1.RuleService, rule_repository_1.RuleRepository],
32
30
  };
33
31
  }
@@ -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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
33
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
42
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
51
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
60
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
69
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
78
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
87
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
96
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
105
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
114
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
123
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
132
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
141
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
150
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
159
+ }, 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").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<RateLimitingRule & {
168
+ }, 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,GACjB,QAAQ,SAAS,KAChB,WAAW,CAAC,aAAa,CAAC,CAuD3B;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,GAAI,QAAQ,SAAS,KAAG,WAAW,CAAC,aAAa,CAAC,CAqDnE;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,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"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edirect/rate-limit-module",
3
- "version": "11.0.50",
3
+ "version": "11.0.51",
4
4
  "packageScope": "@edirect",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -18,9 +18,9 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@nestjs/cache-manager": "^3.1.0",
21
- "@nestjs/common": "^11.1.16",
21
+ "@nestjs/common": "^11.1.17",
22
22
  "@nestjs/config": "^4.0.3",
23
- "@nestjs/core": "^11.1.16",
23
+ "@nestjs/core": "^11.1.17",
24
24
  "@nestjs/mongoose": "^11.0.4",
25
25
  "@nestjs/swagger": "^11.2.6",
26
26
  "cache-manager-redis-store": "^3.0.1",
@@ -32,8 +32,8 @@
32
32
  "mongoose": "^9.3.0",
33
33
  "tslib": "^2.8.1",
34
34
  "uuid": "^13.0.0",
35
- "@edirect/auth": "11.0.50",
36
- "@edirect/logger": "11.0.50"
35
+ "@edirect/auth": "11.0.51",
36
+ "@edirect/logger": "11.0.51"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/jexl": "^2.3.4"