@nuxt-customer-portal/core 0.8.9 → 0.9.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @nuxt-customer-portal/core
2
2
 
3
+ ## 0.9.1
4
+
5
+ ## 0.9.0
6
+
7
+ ### Patch Changes
8
+
9
+ - Avoid generated API route type-inference limits when updating organizations.
10
+
11
+ - 936f0a2: Add an authenticated store media library with Studio-style image editing, batch review, independent thumbnails, retained originals, and scoped API-key access using existing storage providers. Product images remain unchanged.
12
+
13
+ Support configurable store media variants with automatic generation, independent custom crops, and preset changes applied when each image is next saved. Existing thumbnails migrate as custom sources and product image policies remain unchanged.
14
+
15
+ - 6696fd0: Add an opt-in unified sidebar with nested module navigation and keyboard-accessible collapsed flyouts. Include module subpages in global search, preserve standalone destinations, and place sidebar collapse controls in the footer. Enable the unified layout for SaaS Portal.
16
+
3
17
  ## 0.8.9
4
18
 
5
19
  ### Patch Changes
@@ -39,7 +39,7 @@ export const useOrganization = () => {
39
39
  organizationId: string,
40
40
  data: { name: string; slug: string; officialCompanyName: string; logo: string; avatarLogo?: string }
41
41
  ) => {
42
- return await $fetch<Organization>(`/api/admin/organizations/${organizationId}`, {
42
+ return await $fetch<Organization, string>(`/api/admin/organizations/${organizationId}`, {
43
43
  method: 'PATCH',
44
44
  body: data
45
45
  })
@@ -197,7 +197,7 @@ export const useUserStore = defineStore('user', () => {
197
197
 
198
198
  // console.log('Fetching user permissions from API for user:', currentUser.value.id)
199
199
  try {
200
- const data = await $fetch<PermissionsResponse>('/api/auth/permissions')
200
+ const data = await $fetch<PermissionsResponse, string>('/api/auth/permissions')
201
201
  if (data) {
202
202
  permissions.value = data.permissions
203
203
  role.value = data.role
@@ -49,7 +49,9 @@
49
49
  "settings": {
50
50
  "title": "Settings"
51
51
  },
52
- "logout": "Log Out"
52
+ "logout": "Log Out",
53
+ "searchDescription": "Find a page in your workspace.",
54
+ "searchPages": "Search pages…"
53
55
  },
54
56
  "dashboard": {
55
57
  "title": "Dashboard",
@@ -49,7 +49,9 @@
49
49
  "settings": {
50
50
  "title": "Instellingen"
51
51
  },
52
- "logout": "Uitloggen"
52
+ "logout": "Uitloggen",
53
+ "searchDescription": "Vind een pagina in uw werkruimte.",
54
+ "searchPages": "Zoek pagina’s…"
53
55
  },
54
56
  "dashboard": {
55
57
  "title": "Dashboard",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt-customer-portal/core",
3
- "version": "0.8.9",
3
+ "version": "0.9.1",
4
4
  "license": "MIT",
5
5
  "homepage": "https://nuxt-customer-portal.com",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  id: 'core',
3
- version: '0.8.9',
3
+ version: '0.9.1',
4
4
  source: '@nuxt-customer-portal/core',
5
5
  dependsOn: [],
6
6
  schema: './server/db/schema/index.ts',
@@ -1,6 +1,6 @@
1
1
  import { defineEventHandler, type H3Event, createError } from 'h3'
2
2
  import { auth } from '../utils/auth'
3
- import { isPublicStoreRoute } from '../utils/public-api-route'
3
+ import { isMediaLibraryRoute, isPublicStoreRoute } from '../utils/public-api-route'
4
4
  import { isPublicInvitationRoute } from '../utils/public-invitation-route'
5
5
 
6
6
  async function isAuthenticated(event: H3Event): Promise<boolean> {
@@ -21,7 +21,7 @@ export default defineEventHandler(async (event) => {
21
21
  }
22
22
  // Products routes implement their own catalog-key, signature, or public-entry checks.
23
23
  const pathname = new URL(url, 'http://localhost').pathname
24
- if (isPublicStoreRoute(event.method, pathname)) {
24
+ if (isPublicStoreRoute(event.method, pathname) || isMediaLibraryRoute(event.method, pathname)) {
25
25
  return
26
26
  }
27
27
  if (isPublicInvitationRoute(event.method, pathname)) {
@@ -19,3 +19,11 @@ export function isPublicStoreRoute(method: string, pathname: string) {
19
19
  (method === 'DELETE' && pathname === '/api/store/planning/hold')
20
20
  )
21
21
  }
22
+
23
+ // Media endpoints authenticate administrator sessions or scoped API keys themselves.
24
+ export function isMediaLibraryRoute(method: string, pathname: string) {
25
+ if (!['GET', 'POST', 'PUT', 'DELETE'].includes(method)) {
26
+ return false
27
+ }
28
+ return pathname === '/api/products/media' || pathname.startsWith('/api/products/media/')
29
+ }