
# Service Library - `profile`

This document provides a complete reference of the custom code library for the `profile` service. It includes all library functions, edge functions with their REST endpoints, templates, and assets.


## Library Functions

Library functions are reusable modules available to all business APIs and other custom code within the service via `require("lib/<moduleName>")`.


### `checkNoProfileExistsForUser.js`

```js
module.exports = async function(userId) { const { Profile } = this.getModels(); const count = await Profile.count({ where: { userId: userId, isActive: true } }); return count === 0; }
```














---

*This document was generated from the service library configuration and should be kept in sync with design changes.*
