@appxdigital/appx-core 0.1.76 → 0.1.77

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.
@@ -1 +1 @@
1
- {"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/auth.service.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAGvC,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAEpC,qBACa,WAAW;IAIhB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,aAAa;IANzB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;gBAGtB,WAAW,EAAE,WAAW,EACjC,MAAM,EAAE,aAAa,EACZ,UAAU,EAAE,UAAU,EAC/B,aAAa,EAAE,aAAa;IAKlC,QAAQ,CAAC,WAAW,EAAE,WAAW;;cAaE,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;;IAWzD,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAC,CAAC;IA8B1D,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBlD,YAAY,CACd,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MA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AM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAC,CAAC;IAUnG,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAUlE"}
@@ -220,6 +220,10 @@ let AuthService = class AuthService {
220
220
  userId: user.id,
221
221
  expiresAt: expiresAt,
222
222
  },
223
+ },
224
+ // @ts-ignore
225
+ {
226
+ BYPASS_FILTERING: true,
223
227
  });
224
228
  return { access_token: accessToken, refresh_token: refreshTokenString };
225
229
  }
@@ -231,6 +235,10 @@ let AuthService = class AuthService {
231
235
  await this.prisma.userRefreshToken.update({
232
236
  where: { id: currentTokenId },
233
237
  data: { revokedAt: new Date() },
238
+ },
239
+ // @ts-ignore
240
+ {
241
+ BYPASS_FILTERING: true,
234
242
  });
235
243
  const user = await this.userService.findByField("id", userId);
236
244
  if (!user) {
@@ -262,6 +270,10 @@ let AuthService = class AuthService {
262
270
  await this.prisma.userRefreshToken.updateMany({
263
271
  where: { userId: userId, revokedAt: null },
264
272
  data: { revokedAt: new Date() },
273
+ },
274
+ // @ts-ignore
275
+ {
276
+ BYPASS_FILTERING: true,
265
277
  });
266
278
  }
267
279
  };
@@ -78,7 +78,7 @@ let PrismaService = class PrismaService {
78
78
  const contextModel = nestjs_request_context_1.RequestContext.currentContext?.req.prisma?.[propKey] || model;
79
79
  return async (params, options) => {
80
80
  // delete, deleteMany, update and updateMany methods should not apply field omission because they are not selecting fields
81
- if (!options?.BYPASS_OMISSION && !['delete', 'deleteMany', 'update', 'updateMany'].includes(methodKey.toString()))
81
+ if (!options?.BYPASS_OMISSION && !['delete', 'deleteMany', 'update', 'updateMany', 'create'].includes(methodKey.toString()))
82
82
  params = this.applyFieldOmission(String(propKey), userRole, params);
83
83
  if (!options?.BYPASS_FILTERING) {
84
84
  params = this.applyWhereConditions(String(propKey), userRole, params, user, methodKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appxdigital/appx-core",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "description": "Appx Core is a library that provides a set of tools to help you build your application faster.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",