@friggframework/core 2.0.0-next.57 → 2.0.0-next.58

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/core",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0-next.57",
4
+ "version": "2.0.0-next.58",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -38,9 +38,9 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@friggframework/eslint-config": "2.0.0-next.57",
42
- "@friggframework/prettier-config": "2.0.0-next.57",
43
- "@friggframework/test": "2.0.0-next.57",
41
+ "@friggframework/eslint-config": "2.0.0-next.58",
42
+ "@friggframework/prettier-config": "2.0.0-next.58",
43
+ "@friggframework/test": "2.0.0-next.58",
44
44
  "@prisma/client": "^6.17.0",
45
45
  "@types/lodash": "4.17.15",
46
46
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "d09ee09decef14a8cdbf657494ac0dc9bf0b4014"
83
+ "gitHead": "bfd8911703e8d407435ba89556fd9b0fde5d22ac"
84
84
  }
@@ -238,17 +238,6 @@ class UserRepositoryDocumentDB extends UserRepositoryInterface {
238
238
  return this._mapUser(decrypted);
239
239
  }
240
240
 
241
- async findUserById(userId) {
242
- const doc = await findOne(this.prisma, 'User', {
243
- _id: toObjectId(userId),
244
- });
245
- const decrypted = await this.encryptionService.decryptFields(
246
- 'User',
247
- doc
248
- );
249
- return this._mapUser(decrypted);
250
- }
251
-
252
241
  async findIndividualUserByEmail(email) {
253
242
  const doc = await findOne(this.prisma, 'User', {
254
243
  type: 'INDIVIDUAL',
@@ -17,7 +17,8 @@ const databaseConfig = require('../../database/config');
17
17
  * Usage:
18
18
  * ```javascript
19
19
  * const repository = createUserRepository();
20
- * const user = await repository.findUserById(id); // ID is string
20
+ * const user = await repository.findIndividualUserById(id); // ID is string
21
+ * const orgUser = await repository.findOrganizationUserById(id); // ID is string
21
22
  * ```
22
23
  *
23
24
  * @returns {UserRepositoryInterface} Configured repository adapter
@@ -131,17 +131,6 @@ class UserRepositoryInterface {
131
131
  );
132
132
  }
133
133
 
134
- /**
135
- * Find user by ID (any type)
136
- *
137
- * @param {string|number} userId - User ID
138
- * @returns {Promise<Object|null>} User object or null
139
- * @abstract
140
- */
141
- async findUserById(userId) {
142
- throw new Error('Method findUserById must be implemented by subclass');
143
- }
144
-
145
134
  /**
146
135
  * Find individual user by email
147
136
  *
@@ -195,17 +195,6 @@ class UserRepositoryMongo extends UserRepositoryInterface {
195
195
  });
196
196
  }
197
197
 
198
- /**
199
- * Find user by ID (any type)
200
- * @param {string} userId - User ID
201
- * @returns {Promise<Object|null>} User object with string IDs or null
202
- */
203
- async findUserById(userId) {
204
- return await this.prisma.user.findUnique({
205
- where: { id: userId },
206
- });
207
- }
208
-
209
198
  /**
210
199
  * Find individual user by email
211
200
  * @param {string} email - Email to search for
@@ -237,19 +237,6 @@ class UserRepositoryPostgres extends UserRepositoryInterface {
237
237
  return this._convertUserIds(user);
238
238
  }
239
239
 
240
- /**
241
- * Find user by ID (any type)
242
- * @param {string} userId - User ID (string from application layer)
243
- * @returns {Promise<Object|null>} User object with string IDs or null
244
- */
245
- async findUserById(userId) {
246
- const intId = this._convertId(userId);
247
- const user = await this.prisma.user.findUnique({
248
- where: { id: intId },
249
- });
250
- return this._convertUserIds(user);
251
- }
252
-
253
240
  /**
254
241
  * Find individual user by email
255
242
  * @param {string} email - Email to search for