@amohamud23/notihub 1.1.5 → 1.1.6
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.cjs +8 -8
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -299,18 +299,18 @@ var User = class _User {
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
/**
|
|
302
|
-
* Searches for users by
|
|
303
|
-
* @param
|
|
302
|
+
* Searches for users by email and customerId
|
|
303
|
+
* @param email - The email to search for.
|
|
304
304
|
* @param customerId - The customer ID to filter by.
|
|
305
305
|
* @returns A promise that resolves to an array of user objects.
|
|
306
306
|
*/
|
|
307
|
-
static async
|
|
307
|
+
static async searchUsersByEmailAndCustomerId(email, customerId) {
|
|
308
308
|
const command = new import_lib_dynamodb2.QueryCommand({
|
|
309
309
|
TableName: _User.TABLE_NAME,
|
|
310
|
-
IndexName: "
|
|
311
|
-
KeyConditionExpression: "begins_with(
|
|
310
|
+
IndexName: "EmailCustomerIndex",
|
|
311
|
+
KeyConditionExpression: "begins_with(email, :email) and customerId = :customerId",
|
|
312
312
|
ExpressionAttributeValues: {
|
|
313
|
-
":
|
|
313
|
+
":email": email,
|
|
314
314
|
":customerId": customerId
|
|
315
315
|
}
|
|
316
316
|
});
|
|
@@ -318,8 +318,8 @@ var User = class _User {
|
|
|
318
318
|
const result = await ddbDocClient.send(command);
|
|
319
319
|
return result.Items || [];
|
|
320
320
|
} catch (error) {
|
|
321
|
-
console.error("Error searching users by
|
|
322
|
-
throw new Error("Could not search users by
|
|
321
|
+
console.error("Error searching users by email and customerId:", error);
|
|
322
|
+
throw new Error("Could not search users by email and customerId");
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -297,12 +297,12 @@ declare class User {
|
|
|
297
297
|
*/
|
|
298
298
|
static deleteUser(id: string): Promise<void>;
|
|
299
299
|
/**
|
|
300
|
-
* Searches for users by
|
|
301
|
-
* @param
|
|
300
|
+
* Searches for users by email and customerId
|
|
301
|
+
* @param email - The email to search for.
|
|
302
302
|
* @param customerId - The customer ID to filter by.
|
|
303
303
|
* @returns A promise that resolves to an array of user objects.
|
|
304
304
|
*/
|
|
305
|
-
static
|
|
305
|
+
static searchUsersByEmailAndCustomerId(email: string, customerId: string): Promise<INotiHubUser[]>;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
declare class Customer {
|
package/dist/index.d.ts
CHANGED
|
@@ -297,12 +297,12 @@ declare class User {
|
|
|
297
297
|
*/
|
|
298
298
|
static deleteUser(id: string): Promise<void>;
|
|
299
299
|
/**
|
|
300
|
-
* Searches for users by
|
|
301
|
-
* @param
|
|
300
|
+
* Searches for users by email and customerId
|
|
301
|
+
* @param email - The email to search for.
|
|
302
302
|
* @param customerId - The customer ID to filter by.
|
|
303
303
|
* @returns A promise that resolves to an array of user objects.
|
|
304
304
|
*/
|
|
305
|
-
static
|
|
305
|
+
static searchUsersByEmailAndCustomerId(email: string, customerId: string): Promise<INotiHubUser[]>;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
declare class Customer {
|
package/dist/index.js
CHANGED
|
@@ -266,18 +266,18 @@ var User = class _User {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
269
|
-
* Searches for users by
|
|
270
|
-
* @param
|
|
269
|
+
* Searches for users by email and customerId
|
|
270
|
+
* @param email - The email to search for.
|
|
271
271
|
* @param customerId - The customer ID to filter by.
|
|
272
272
|
* @returns A promise that resolves to an array of user objects.
|
|
273
273
|
*/
|
|
274
|
-
static async
|
|
274
|
+
static async searchUsersByEmailAndCustomerId(email, customerId) {
|
|
275
275
|
const command = new QueryCommand({
|
|
276
276
|
TableName: _User.TABLE_NAME,
|
|
277
|
-
IndexName: "
|
|
278
|
-
KeyConditionExpression: "begins_with(
|
|
277
|
+
IndexName: "EmailCustomerIndex",
|
|
278
|
+
KeyConditionExpression: "begins_with(email, :email) and customerId = :customerId",
|
|
279
279
|
ExpressionAttributeValues: {
|
|
280
|
-
":
|
|
280
|
+
":email": email,
|
|
281
281
|
":customerId": customerId
|
|
282
282
|
}
|
|
283
283
|
});
|
|
@@ -285,8 +285,8 @@ var User = class _User {
|
|
|
285
285
|
const result = await ddbDocClient.send(command);
|
|
286
286
|
return result.Items || [];
|
|
287
287
|
} catch (error) {
|
|
288
|
-
console.error("Error searching users by
|
|
289
|
-
throw new Error("Could not search users by
|
|
288
|
+
console.error("Error searching users by email and customerId:", error);
|
|
289
|
+
throw new Error("Could not search users by email and customerId");
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
};
|