@open-mercato/core 0.7.1-develop.7154.1.981330c924 → 0.7.1-develop.7171.1.9b31dbba45
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/.turbo/turbo-build.log +1 -1
- package/AGENTS.md +2 -2
- package/dist/modules/auth/commands/users.js +14 -1
- package/dist/modules/auth/commands/users.js.map +2 -2
- package/dist/modules/auth/data/entities.js +2 -2
- package/dist/modules/auth/data/entities.js.map +2 -2
- package/dist/modules/auth/lib/backendChrome.js +26 -3
- package/dist/modules/auth/lib/backendChrome.js.map +2 -2
- package/dist/modules/auth/lib/profile-sections.js +1 -1
- package/dist/modules/auth/lib/profile-sections.js.map +2 -2
- package/dist/modules/auth/migrations/Migration20260907120000_auth.js +19 -0
- package/dist/modules/auth/migrations/Migration20260907120000_auth.js.map +7 -0
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.meta.js +2 -2
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.meta.js.map +1 -1
- package/dist/modules/customer_accounts/api/admin/demo-accounts.js +118 -0
- package/dist/modules/customer_accounts/api/admin/demo-accounts.js.map +7 -0
- package/dist/modules/customer_accounts/api/invitations/accept.js +23 -6
- package/dist/modules/customer_accounts/api/invitations/accept.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/settings/CustomerAccountsSettingsPageClient.js +10 -13
- package/dist/modules/customer_accounts/backend/customer_accounts/settings/CustomerAccountsSettingsPageClient.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/useDemoPortalAccounts.js +28 -0
- package/dist/modules/customer_accounts/backend/customer_accounts/useDemoPortalAccounts.js.map +7 -0
- package/dist/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.js +6 -1
- package/dist/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.js.map +2 -2
- package/dist/modules/customer_accounts/data/entities.js +4 -1
- package/dist/modules/customer_accounts/data/entities.js.map +2 -2
- package/dist/modules/customer_accounts/lib/exampleAccounts.js +9 -0
- package/dist/modules/customer_accounts/lib/exampleAccounts.js.map +7 -0
- package/dist/modules/customer_accounts/migrations/Migration20260827160000_customer_accounts.js +16 -0
- package/dist/modules/customer_accounts/migrations/Migration20260827160000_customer_accounts.js.map +7 -0
- package/dist/modules/customer_accounts/services/customerInvitationService.js +53 -6
- package/dist/modules/customer_accounts/services/customerInvitationService.js.map +2 -2
- package/dist/modules/customer_accounts/setup.js +2 -6
- package/dist/modules/customer_accounts/setup.js.map +2 -2
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js +55 -40
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js.map +2 -2
- package/dist/modules/customers/commands/people.js +16 -1
- package/dist/modules/customers/commands/people.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js +18 -36
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js.map +2 -2
- package/dist/modules/entities/api/records.js +18 -15
- package/dist/modules/entities/api/records.js.map +3 -3
- package/dist/modules/entities/lib/scoped-field-defs.js +52 -0
- package/dist/modules/entities/lib/scoped-field-defs.js.map +7 -0
- package/dist/modules/entities/lib/validation.js +4 -35
- package/dist/modules/entities/lib/validation.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/[id]/page.js +32 -54
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js +12 -29
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js.map +2 -2
- package/dist/modules/notifications/backend/profile/notification-preferences/page.meta.js +2 -2
- package/dist/modules/notifications/backend/profile/notification-preferences/page.meta.js.map +1 -1
- package/dist/modules/progress/lib/progressServiceImpl.js +14 -3
- package/dist/modules/progress/lib/progressServiceImpl.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +9 -9
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/components/documents/LineItemDialog.js +50 -10
- package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/PaymentsSection.js +8 -3
- package/dist/modules/sales/components/documents/PaymentsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ReturnEditDialog.js +2 -7
- package/dist/modules/sales/components/documents/ReturnEditDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/ReturnsSection.js +2 -7
- package/dist/modules/sales/components/documents/ReturnsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentsSection.js +3 -8
- package/dist/modules/sales/components/documents/ShipmentsSection.js.map +2 -2
- package/dist/modules/wms/commands/sales-order-assignment.js +12 -0
- package/dist/modules/wms/commands/sales-order-assignment.js.map +2 -2
- package/dist/modules/wms/data/enrichers.js +25 -0
- package/dist/modules/wms/data/enrichers.js.map +2 -2
- package/dist/modules/wms/lib/enricherCacheTags.js +9 -0
- package/dist/modules/wms/lib/enricherCacheTags.js.map +7 -0
- package/dist/modules/wms/lib/invalidateInventoryEnricherCache.js +37 -0
- package/dist/modules/wms/lib/invalidateInventoryEnricherCache.js.map +7 -0
- package/dist/modules/wms/lib/inventoryEnricherCacheSubscriber.js +14 -0
- package/dist/modules/wms/lib/inventoryEnricherCacheSubscriber.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-balance.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-balance.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-inventory.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-inventory.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-movement.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-movement.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-profile.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-profile.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-reservation.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-reservation.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-sales-line.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-sales-line.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-sales-order.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-sales-order.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-variant.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-variant.js.map +7 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-warehouse.js +12 -0
- package/dist/modules/wms/subscribers/invalidate-enricher-cache-warehouse.js.map +7 -0
- package/package.json +7 -7
- package/src/modules/auth/commands/users.ts +14 -1
- package/src/modules/auth/data/entities.ts +2 -2
- package/src/modules/auth/lib/backendChrome.tsx +46 -2
- package/src/modules/auth/lib/profile-sections.tsx +14 -3
- package/src/modules/auth/migrations/.snapshot-open-mercato.json +4 -2
- package/src/modules/auth/migrations/Migration20260907120000_auth.ts +21 -0
- package/src/modules/communication_channels/backend/profile/communication-channels/page.meta.ts +2 -2
- package/src/modules/customer_accounts/AGENTS.md +3 -1
- package/src/modules/customer_accounts/api/admin/demo-accounts.ts +149 -0
- package/src/modules/customer_accounts/api/invitations/accept.ts +23 -6
- package/src/modules/customer_accounts/backend/customer_accounts/settings/CustomerAccountsSettingsPageClient.tsx +43 -41
- package/src/modules/customer_accounts/backend/customer_accounts/useDemoPortalAccounts.ts +42 -0
- package/src/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.tsx +10 -3
- package/src/modules/customer_accounts/data/entities.ts +5 -1
- package/src/modules/customer_accounts/i18n/de.json +4 -2
- package/src/modules/customer_accounts/i18n/en.json +4 -2
- package/src/modules/customer_accounts/i18n/es.json +4 -2
- package/src/modules/customer_accounts/i18n/ko.json +4 -2
- package/src/modules/customer_accounts/i18n/pl.json +4 -2
- package/src/modules/customer_accounts/lib/exampleAccounts.ts +18 -0
- package/src/modules/customer_accounts/migrations/.snapshot-open-mercato.json +5 -7
- package/src/modules/customer_accounts/migrations/Migration20260827160000_customer_accounts.ts +23 -0
- package/src/modules/customer_accounts/services/customerInvitationService.ts +89 -5
- package/src/modules/customer_accounts/setup.ts +2 -6
- package/src/modules/customer_accounts/widgets/injection/account-status/widget.client.tsx +74 -41
- package/src/modules/customers/commands/people.ts +15 -0
- package/src/modules/data_sync/backend/data-sync/runs/[id]/page.tsx +19 -44
- package/src/modules/entities/api/records.ts +24 -15
- package/src/modules/entities/lib/scoped-field-defs.ts +76 -0
- package/src/modules/entities/lib/validation.ts +5 -45
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +33 -62
- package/src/modules/integrations/backend/integrations/bundle/[id]/page.tsx +13 -37
- package/src/modules/notifications/backend/profile/notification-preferences/page.meta.ts +2 -2
- package/src/modules/progress/AGENTS.md +1 -1
- package/src/modules/progress/lib/progressServiceImpl.ts +26 -3
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +19 -25
- package/src/modules/sales/components/documents/LineItemDialog.tsx +53 -9
- package/src/modules/sales/components/documents/PaymentsSection.tsx +8 -8
- package/src/modules/sales/components/documents/ReturnEditDialog.tsx +2 -8
- package/src/modules/sales/components/documents/ReturnsSection.tsx +8 -7
- package/src/modules/sales/components/documents/ShipmentsSection.tsx +9 -8
- package/src/modules/sales/i18n/de.json +2 -0
- package/src/modules/sales/i18n/en.json +2 -0
- package/src/modules/sales/i18n/es.json +2 -0
- package/src/modules/sales/i18n/ko.json +2 -0
- package/src/modules/sales/i18n/pl.json +2 -0
- package/src/modules/wms/commands/sales-order-assignment.ts +20 -0
- package/src/modules/wms/data/enrichers.ts +25 -0
- package/src/modules/wms/lib/enricherCacheTags.ts +29 -0
- package/src/modules/wms/lib/invalidateInventoryEnricherCache.ts +71 -0
- package/src/modules/wms/lib/inventoryEnricherCacheSubscriber.ts +30 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-balance.ts +9 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-inventory.ts +9 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-movement.ts +9 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-profile.ts +9 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-reservation.ts +9 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-sales-line.ts +14 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-sales-order.ts +18 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-variant.ts +9 -0
- package/src/modules/wms/subscribers/invalidate-enricher-cache-warehouse.ts +9 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Drop the cached WMS inventory enrichment for a tenant after a write that
|
|
2
|
+
// changed the data it was derived from.
|
|
3
|
+
//
|
|
4
|
+
// The three WMS inventory enrichers cache their cross-module reads read-through
|
|
5
|
+
// with a short TTL (see `enricherCacheTags.ts`). Every write surface that moves
|
|
6
|
+
// balances, reservations, movements, profiles, warehouses or the sales-order
|
|
7
|
+
// warehouse assignment drops the matching tags here, so a user sees the new
|
|
8
|
+
// stock on the next request rather than after the TTL.
|
|
9
|
+
//
|
|
10
|
+
// The cache service prefixes tags with the *current* cache tenant, which is an
|
|
11
|
+
// AsyncLocalStorage value set on the request path. A subscriber or command side
|
|
12
|
+
// effect running outside that scope would otherwise write its invalidation
|
|
13
|
+
// against the `tenant:global:` prefix and silently miss every entry the request
|
|
14
|
+
// path stored. `runWithCacheTenant` re-enters the right scope, mirroring
|
|
15
|
+
// `directory/subscribers/invalidateOrgScopeCache.ts`.
|
|
16
|
+
|
|
17
|
+
import { runWithCacheTenant } from '@open-mercato/cache'
|
|
18
|
+
import { createLogger } from '@open-mercato/shared/lib/logger'
|
|
19
|
+
import {
|
|
20
|
+
WMS_INVENTORY_CACHE_TAG,
|
|
21
|
+
WMS_WAREHOUSE_CACHE_TAG,
|
|
22
|
+
} from './enricherCacheTags'
|
|
23
|
+
|
|
24
|
+
const logger = createLogger('wms').child({ component: 'enricher-cache' })
|
|
25
|
+
|
|
26
|
+
type CacheService = {
|
|
27
|
+
deleteByTags(tags: string[]): Promise<number>
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type EnricherCacheScope = 'inventory' | 'warehouse' | 'all'
|
|
31
|
+
|
|
32
|
+
type Resolver = { resolve: <T = unknown>(name: string) => T }
|
|
33
|
+
|
|
34
|
+
function resolveCache(container: Resolver | null | undefined): CacheService | null {
|
|
35
|
+
if (!container?.resolve) return null
|
|
36
|
+
for (const name of ['cache', 'cacheService']) {
|
|
37
|
+
try {
|
|
38
|
+
const candidate = container.resolve<CacheService>(name)
|
|
39
|
+
if (candidate && typeof candidate.deleteByTags === 'function') return candidate
|
|
40
|
+
} catch {
|
|
41
|
+
// try the next registration name
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function tagsForScope(scope: EnricherCacheScope): string[] {
|
|
48
|
+
if (scope === 'inventory') return [WMS_INVENTORY_CACHE_TAG]
|
|
49
|
+
if (scope === 'warehouse') return [WMS_WAREHOUSE_CACHE_TAG]
|
|
50
|
+
return [WMS_INVENTORY_CACHE_TAG, WMS_WAREHOUSE_CACHE_TAG]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Best-effort tag invalidation. A failure is logged and swallowed: an
|
|
55
|
+
* invalidation that throws must never fail the write that triggered it, and the
|
|
56
|
+
* enricher TTL bounds how long a missed drop can serve stale data.
|
|
57
|
+
*/
|
|
58
|
+
export async function invalidateWmsInventoryEnricherCache(
|
|
59
|
+
container: Resolver | null | undefined,
|
|
60
|
+
tenantId: string | null | undefined,
|
|
61
|
+
scope: EnricherCacheScope = 'all',
|
|
62
|
+
): Promise<void> {
|
|
63
|
+
if (!tenantId) return
|
|
64
|
+
const cache = resolveCache(container)
|
|
65
|
+
if (!cache) return
|
|
66
|
+
try {
|
|
67
|
+
await runWithCacheTenant(tenantId, () => cache.deleteByTags(tagsForScope(scope)))
|
|
68
|
+
} catch (err) {
|
|
69
|
+
logger.warn('Failed to invalidate WMS inventory enricher cache', { tenantId, scope, err })
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Shared handler behind the WMS inventory enricher-cache invalidation
|
|
2
|
+
// subscribers. Each subscriber file binds it to one event pattern, because
|
|
3
|
+
// `metadata.event` takes a single pattern and the matcher is single-segment —
|
|
4
|
+
// `wms.*` does NOT match `wms.inventory_balance.created`, so every event family
|
|
5
|
+
// the enrichers read from is registered explicitly.
|
|
6
|
+
//
|
|
7
|
+
// It lives here rather than under `subscribers/` because the module generator
|
|
8
|
+
// scans that directory recursively and treats every file it finds as a
|
|
9
|
+
// subscriber.
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
invalidateWmsInventoryEnricherCache,
|
|
13
|
+
type EnricherCacheScope,
|
|
14
|
+
} from './invalidateInventoryEnricherCache'
|
|
15
|
+
|
|
16
|
+
type SubscriberContext = {
|
|
17
|
+
resolve: <T = unknown>(name: string) => T
|
|
18
|
+
tenantId?: string | null
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function createInventoryEnricherCacheHandler(scope: EnricherCacheScope) {
|
|
22
|
+
return async function handle(payload: unknown, ctx: SubscriberContext): Promise<void> {
|
|
23
|
+
const data = (payload ?? {}) as Record<string, unknown>
|
|
24
|
+
const tenantId =
|
|
25
|
+
typeof data.tenantId === 'string' && data.tenantId.length > 0
|
|
26
|
+
? data.tenantId
|
|
27
|
+
: ctx.tenantId ?? null
|
|
28
|
+
await invalidateWmsInventoryEnricherCache(ctx, tenantId, scope)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
event: 'wms.inventory_balance.*',
|
|
5
|
+
persistent: false,
|
|
6
|
+
id: 'wms:invalidate-enricher-cache-balance',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createInventoryEnricherCacheHandler('inventory')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
event: 'wms.inventory.*',
|
|
5
|
+
persistent: false,
|
|
6
|
+
id: 'wms:invalidate-enricher-cache-inventory',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createInventoryEnricherCacheHandler('inventory')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
event: 'wms.inventory_movement.*',
|
|
5
|
+
persistent: false,
|
|
6
|
+
id: 'wms:invalidate-enricher-cache-movement',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createInventoryEnricherCacheHandler('inventory')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
event: 'wms.inventory_profile.*',
|
|
5
|
+
persistent: false,
|
|
6
|
+
id: 'wms:invalidate-enricher-cache-profile',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createInventoryEnricherCacheHandler('inventory')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
event: 'wms.inventory_reservation.*',
|
|
5
|
+
persistent: false,
|
|
6
|
+
id: 'wms:invalidate-enricher-cache-reservation',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createInventoryEnricherCacheHandler('inventory')
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
// The sales module declares `sales.line.*` in its event registry and documents
|
|
4
|
+
// it publicly, but no write surface emits it today — line writes ride the order
|
|
5
|
+
// commands' `sales.order.*`. Registering the pattern anyway costs one ephemeral
|
|
6
|
+
// subscription and means that wiring those events later cannot silently
|
|
7
|
+
// reintroduce the staleness `invalidate-enricher-cache-sales-order.ts` closes.
|
|
8
|
+
export const metadata = {
|
|
9
|
+
event: 'sales.line.*',
|
|
10
|
+
persistent: false,
|
|
11
|
+
id: 'wms:invalidate-enricher-cache-sales-line',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default createInventoryEnricherCacheHandler('warehouse')
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
// `wms.sales-order-inventory` reads the order's lines, and both the required
|
|
4
|
+
// quantity behind `reservationSummary.status` and the variant list behind
|
|
5
|
+
// `stockSummary` come from them. Order lines are written inside the sales order
|
|
6
|
+
// commands, which emit `sales.order.*` — not a WMS event — so without this the
|
|
7
|
+
// enrichment would stay stale for the whole TTL after a line edit.
|
|
8
|
+
//
|
|
9
|
+
// Scope `warehouse` rather than `inventory`: `wms:warehouse` is declared by the
|
|
10
|
+
// sales-order enricher alone, so this drops exactly its entries and leaves the
|
|
11
|
+
// two catalog enrichers' caches intact.
|
|
12
|
+
export const metadata = {
|
|
13
|
+
event: 'sales.order.*',
|
|
14
|
+
persistent: false,
|
|
15
|
+
id: 'wms:invalidate-enricher-cache-sales-order',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default createInventoryEnricherCacheHandler('warehouse')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
event: 'catalog.variant.*',
|
|
5
|
+
persistent: false,
|
|
6
|
+
id: 'wms:invalidate-enricher-cache-variant',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createInventoryEnricherCacheHandler('inventory')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInventoryEnricherCacheHandler } from '../lib/inventoryEnricherCacheSubscriber'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
event: 'wms.warehouse.*',
|
|
5
|
+
persistent: false,
|
|
6
|
+
id: 'wms:invalidate-enricher-cache-warehouse',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default createInventoryEnricherCacheHandler('warehouse')
|