@iamnnort/nestjs-serializer 2.1.2 → 2.2.0

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
@@ -27,6 +27,7 @@ type SerializerFieldConfig = {
27
27
  type SerializerConfig = {
28
28
  globalEntityNames?: string[];
29
29
  globalLimitedScopes?: string[];
30
+ globalSecretScopes?: string[];
30
31
  };
31
32
 
32
33
  declare class SerializerService {
@@ -49,6 +50,7 @@ declare const SerializerInterceptor: (config: {
49
50
  scopes?: string[];
50
51
  extendedScopes?: string[];
51
52
  limitedScopes?: string[];
53
+ secretScopes?: string[];
52
54
  fields?: string[];
53
55
  }) => {
54
56
  new (serializerService: SerializerService): {
package/dist/index.d.ts CHANGED
@@ -27,6 +27,7 @@ type SerializerFieldConfig = {
27
27
  type SerializerConfig = {
28
28
  globalEntityNames?: string[];
29
29
  globalLimitedScopes?: string[];
30
+ globalSecretScopes?: string[];
30
31
  };
31
32
 
32
33
  declare class SerializerService {
@@ -49,6 +50,7 @@ declare const SerializerInterceptor: (config: {
49
50
  scopes?: string[];
50
51
  extendedScopes?: string[];
51
52
  limitedScopes?: string[];
53
+ secretScopes?: string[];
52
54
  fields?: string[];
53
55
  }) => {
54
56
  new (serializerService: SerializerService): {
package/dist/index.js CHANGED
@@ -9240,6 +9240,9 @@ var SerializerInterceptor = /* @__PURE__ */ __name((config) => {
9240
9240
  if (request.query.limited) {
9241
9241
  return config.limitedScopes || this.serializerService.config.globalLimitedScopes || config.scopes;
9242
9242
  }
9243
+ if (request.query.secret) {
9244
+ return config.secretScopes || this.serializerService.config.globalSecretScopes || config.scopes;
9245
+ }
9243
9246
  return config.scopes;
9244
9247
  }
9245
9248
  };