1 {"slug":"/references/settings/models/UserPreference","title":"UserPreference - Settings Module Data Models Reference","frontmatter":{"displayed_sidebar":"settingsModelReference","slug":"/references/settings/models/UserPreference","sidebar_label":"UserPreference"},"toc":[],"blocks":[{"kind":"markdown","html":"This documentation provides a reference to the UserPreference data model. It belongs to the Settings Module."},{"kind":"sourceCodeLink","link":"https://github.com/medusajs/medusa/blob/020565398e436a2bc65777a3b1ad347b4735d6df/packages/modules/settings/src/models/user-preference.ts#L3"},{"kind":"typeList","sectionTitle":"UserPreference","types":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the user preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_id","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The user id of the user preference","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record&#60;string, unknown&#62;>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"key","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The key of the user preference","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record&#60;string, unknown&#62;>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"value","type":"JSONProperty&#60;NoInfer&#60;Record&#60;string, unknown&#62;&#62;&#62;","description":"The value of the user preference","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}