@unifiedcommerce/core 0.0.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/dist/adapters/console-email.d.ts +23 -0
- package/dist/adapters/console-email.d.ts.map +1 -0
- package/dist/adapters/console-email.js +38 -0
- package/dist/auth/access.d.ts +101 -0
- package/dist/auth/access.d.ts.map +1 -0
- package/dist/auth/access.js +128 -0
- package/dist/auth/auth-schema.d.ts +1383 -0
- package/dist/auth/auth-schema.d.ts.map +1 -0
- package/dist/auth/auth-schema.js +117 -0
- package/dist/auth/middleware.d.ts +5 -0
- package/dist/auth/middleware.d.ts.map +1 -0
- package/dist/auth/middleware.js +91 -0
- package/dist/auth/org.d.ts +22 -0
- package/dist/auth/org.d.ts.map +1 -0
- package/dist/auth/org.js +36 -0
- package/dist/auth/permissions.d.ts +4 -0
- package/dist/auth/permissions.d.ts.map +1 -0
- package/dist/auth/permissions.js +24 -0
- package/dist/auth/pos.d.ts +3 -0
- package/dist/auth/pos.d.ts.map +1 -0
- package/dist/auth/pos.js +62 -0
- package/dist/auth/setup.d.ts +31 -0
- package/dist/auth/setup.d.ts.map +1 -0
- package/dist/auth/setup.js +106 -0
- package/dist/auth/system-actor.d.ts +7 -0
- package/dist/auth/system-actor.d.ts.map +1 -0
- package/dist/auth/system-actor.js +17 -0
- package/dist/auth/types.d.ts +11 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +1 -0
- package/dist/config/defaults.d.ts +3 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +80 -0
- package/dist/config/define-config.d.ts +9 -0
- package/dist/config/define-config.d.ts.map +1 -0
- package/dist/config/define-config.js +44 -0
- package/dist/config/types.d.ts +299 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +1 -0
- package/dist/generated/plugin-manifest.d.ts +48 -0
- package/dist/generated/plugin-manifest.d.ts.map +1 -0
- package/dist/generated/plugin-manifest.js +20 -0
- package/dist/hooks/checkout-completion.d.ts +58 -0
- package/dist/hooks/checkout-completion.d.ts.map +1 -0
- package/dist/hooks/checkout-completion.js +137 -0
- package/dist/hooks/checkout.d.ts +99 -0
- package/dist/hooks/checkout.d.ts.map +1 -0
- package/dist/hooks/checkout.js +317 -0
- package/dist/hooks/order-emails.d.ts +16 -0
- package/dist/hooks/order-emails.d.ts.map +1 -0
- package/dist/hooks/order-emails.js +44 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13381 -0
- package/dist/index.js.map +156 -0
- package/dist/interfaces/graphql/index.d.ts +4 -0
- package/dist/interfaces/graphql/index.d.ts.map +1 -0
- package/dist/interfaces/graphql/index.js +415 -0
- package/dist/interfaces/mcp/agent-prompt.d.ts +16 -0
- package/dist/interfaces/mcp/agent-prompt.d.ts.map +1 -0
- package/dist/interfaces/mcp/agent-prompt.js +172 -0
- package/dist/interfaces/mcp/context-enrichment.d.ts +39 -0
- package/dist/interfaces/mcp/context-enrichment.d.ts.map +1 -0
- package/dist/interfaces/mcp/context-enrichment.js +119 -0
- package/dist/interfaces/mcp/server.d.ts +7 -0
- package/dist/interfaces/mcp/server.d.ts.map +1 -0
- package/dist/interfaces/mcp/server.js +515 -0
- package/dist/interfaces/mcp/transport.d.ts +5 -0
- package/dist/interfaces/mcp/transport.d.ts.map +1 -0
- package/dist/interfaces/mcp/transport.js +52 -0
- package/dist/interfaces/rest/customer-portal.d.ts +5 -0
- package/dist/interfaces/rest/customer-portal.d.ts.map +1 -0
- package/dist/interfaces/rest/customer-portal.js +206 -0
- package/dist/interfaces/rest/index.d.ts +5 -0
- package/dist/interfaces/rest/index.d.ts.map +1 -0
- package/dist/interfaces/rest/index.js +68 -0
- package/dist/interfaces/rest/router.d.ts +164 -0
- package/dist/interfaces/rest/router.d.ts.map +1 -0
- package/dist/interfaces/rest/router.js +259 -0
- package/dist/interfaces/rest/routes/admin-jobs.d.ts +5 -0
- package/dist/interfaces/rest/routes/admin-jobs.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/admin-jobs.js +48 -0
- package/dist/interfaces/rest/routes/audit.d.ts +5 -0
- package/dist/interfaces/rest/routes/audit.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/audit.js +43 -0
- package/dist/interfaces/rest/routes/carts.d.ts +5 -0
- package/dist/interfaces/rest/routes/carts.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/carts.js +55 -0
- package/dist/interfaces/rest/routes/catalog.d.ts +5 -0
- package/dist/interfaces/rest/routes/catalog.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/catalog.js +256 -0
- package/dist/interfaces/rest/routes/checkout.d.ts +5 -0
- package/dist/interfaces/rest/routes/checkout.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/checkout.js +216 -0
- package/dist/interfaces/rest/routes/inventory.d.ts +5 -0
- package/dist/interfaces/rest/routes/inventory.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/inventory.js +59 -0
- package/dist/interfaces/rest/routes/media.d.ts +5 -0
- package/dist/interfaces/rest/routes/media.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/media.js +65 -0
- package/dist/interfaces/rest/routes/orders.d.ts +5 -0
- package/dist/interfaces/rest/routes/orders.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/orders.js +64 -0
- package/dist/interfaces/rest/routes/payments.d.ts +5 -0
- package/dist/interfaces/rest/routes/payments.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/payments.js +45 -0
- package/dist/interfaces/rest/routes/pricing.d.ts +5 -0
- package/dist/interfaces/rest/routes/pricing.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/pricing.js +48 -0
- package/dist/interfaces/rest/routes/promotions.d.ts +5 -0
- package/dist/interfaces/rest/routes/promotions.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/promotions.js +75 -0
- package/dist/interfaces/rest/routes/search.d.ts +5 -0
- package/dist/interfaces/rest/routes/search.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/search.js +60 -0
- package/dist/interfaces/rest/routes/webhooks.d.ts +5 -0
- package/dist/interfaces/rest/routes/webhooks.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/webhooks.js +39 -0
- package/dist/interfaces/rest/schemas/admin-jobs.d.ts +327 -0
- package/dist/interfaces/rest/schemas/admin-jobs.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/admin-jobs.js +37 -0
- package/dist/interfaces/rest/schemas/audit.d.ts +59 -0
- package/dist/interfaces/rest/schemas/audit.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/audit.js +43 -0
- package/dist/interfaces/rest/schemas/carts.d.ts +1446 -0
- package/dist/interfaces/rest/schemas/carts.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/carts.js +109 -0
- package/dist/interfaces/rest/schemas/catalog.d.ts +5416 -0
- package/dist/interfaces/rest/schemas/catalog.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/catalog.js +397 -0
- package/dist/interfaces/rest/schemas/checkout.d.ts +160 -0
- package/dist/interfaces/rest/schemas/checkout.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/checkout.js +60 -0
- package/dist/interfaces/rest/schemas/customer-portal.d.ts +2197 -0
- package/dist/interfaces/rest/schemas/customer-portal.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/customer-portal.js +177 -0
- package/dist/interfaces/rest/schemas/inventory.d.ts +469 -0
- package/dist/interfaces/rest/schemas/inventory.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/inventory.js +128 -0
- package/dist/interfaces/rest/schemas/media.d.ts +303 -0
- package/dist/interfaces/rest/schemas/media.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/media.js +69 -0
- package/dist/interfaces/rest/schemas/orders.d.ts +1782 -0
- package/dist/interfaces/rest/schemas/orders.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/orders.js +93 -0
- package/dist/interfaces/rest/schemas/pricing.d.ts +256 -0
- package/dist/interfaces/rest/schemas/pricing.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/pricing.js +72 -0
- package/dist/interfaces/rest/schemas/promotions.d.ts +363 -0
- package/dist/interfaces/rest/schemas/promotions.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/promotions.js +98 -0
- package/dist/interfaces/rest/schemas/responses.d.ts +4062 -0
- package/dist/interfaces/rest/schemas/responses.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/responses.js +63 -0
- package/dist/interfaces/rest/schemas/search.d.ts +245 -0
- package/dist/interfaces/rest/schemas/search.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/search.js +55 -0
- package/dist/interfaces/rest/schemas/shared.d.ts +95 -0
- package/dist/interfaces/rest/schemas/shared.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/shared.js +51 -0
- package/dist/interfaces/rest/schemas/webhooks.d.ts +221 -0
- package/dist/interfaces/rest/schemas/webhooks.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/webhooks.js +62 -0
- package/dist/interfaces/rest/utils.d.ts +45 -0
- package/dist/interfaces/rest/utils.d.ts.map +1 -0
- package/dist/interfaces/rest/utils.js +71 -0
- package/dist/interfaces/rest/webhook-router.d.ts +41 -0
- package/dist/interfaces/rest/webhook-router.d.ts.map +1 -0
- package/dist/interfaces/rest/webhook-router.js +36 -0
- package/dist/kernel/compensation/executor.d.ts +21 -0
- package/dist/kernel/compensation/executor.d.ts.map +1 -0
- package/dist/kernel/compensation/executor.js +36 -0
- package/dist/kernel/compensation/types.d.ts +25 -0
- package/dist/kernel/compensation/types.d.ts.map +1 -0
- package/dist/kernel/compensation/types.js +1 -0
- package/dist/kernel/database/adapter.d.ts +10 -0
- package/dist/kernel/database/adapter.d.ts.map +1 -0
- package/dist/kernel/database/adapter.js +3 -0
- package/dist/kernel/database/drizzle-db.d.ts +49 -0
- package/dist/kernel/database/drizzle-db.d.ts.map +1 -0
- package/dist/kernel/database/drizzle-db.js +20 -0
- package/dist/kernel/database/migrate.d.ts +38 -0
- package/dist/kernel/database/migrate.d.ts.map +1 -0
- package/dist/kernel/database/migrate.js +61 -0
- package/dist/kernel/database/plugin-types.d.ts +32 -0
- package/dist/kernel/database/plugin-types.d.ts.map +1 -0
- package/dist/kernel/database/plugin-types.js +10 -0
- package/dist/kernel/database/schema.d.ts +24 -0
- package/dist/kernel/database/schema.d.ts.map +1 -0
- package/dist/kernel/database/schema.js +36 -0
- package/dist/kernel/database/scoped-db.d.ts +20 -0
- package/dist/kernel/database/scoped-db.d.ts.map +1 -0
- package/dist/kernel/database/scoped-db.js +62 -0
- package/dist/kernel/database/tx-context.d.ts +15 -0
- package/dist/kernel/database/tx-context.d.ts.map +1 -0
- package/dist/kernel/database/tx-context.js +19 -0
- package/dist/kernel/error-mapper.d.ts +3 -0
- package/dist/kernel/error-mapper.d.ts.map +1 -0
- package/dist/kernel/error-mapper.js +12 -0
- package/dist/kernel/errors.d.ts +38 -0
- package/dist/kernel/errors.d.ts.map +1 -0
- package/dist/kernel/errors.js +69 -0
- package/dist/kernel/factory/in-memory-repository-factory.d.ts +20 -0
- package/dist/kernel/factory/in-memory-repository-factory.d.ts.map +1 -0
- package/dist/kernel/factory/in-memory-repository-factory.js +83 -0
- package/dist/kernel/factory/repository-factory.d.ts +71 -0
- package/dist/kernel/factory/repository-factory.d.ts.map +1 -0
- package/dist/kernel/factory/repository-factory.js +136 -0
- package/dist/kernel/hooks/create-context.d.ts +25 -0
- package/dist/kernel/hooks/create-context.d.ts.map +1 -0
- package/dist/kernel/hooks/create-context.js +22 -0
- package/dist/kernel/hooks/executor.d.ts +12 -0
- package/dist/kernel/hooks/executor.d.ts.map +1 -0
- package/dist/kernel/hooks/executor.js +50 -0
- package/dist/kernel/hooks/registry.d.ts +28 -0
- package/dist/kernel/hooks/registry.d.ts.map +1 -0
- package/dist/kernel/hooks/registry.js +58 -0
- package/dist/kernel/hooks/types.d.ts +37 -0
- package/dist/kernel/hooks/types.d.ts.map +1 -0
- package/dist/kernel/hooks/types.js +1 -0
- package/dist/kernel/http-error.d.ts +30 -0
- package/dist/kernel/http-error.d.ts.map +1 -0
- package/dist/kernel/http-error.js +35 -0
- package/dist/kernel/jobs/adapter.d.ts +25 -0
- package/dist/kernel/jobs/adapter.d.ts.map +1 -0
- package/dist/kernel/jobs/adapter.js +9 -0
- package/dist/kernel/jobs/drizzle-adapter.d.ts +15 -0
- package/dist/kernel/jobs/drizzle-adapter.d.ts.map +1 -0
- package/dist/kernel/jobs/drizzle-adapter.js +42 -0
- package/dist/kernel/jobs/runner.d.ts +24 -0
- package/dist/kernel/jobs/runner.d.ts.map +1 -0
- package/dist/kernel/jobs/runner.js +114 -0
- package/dist/kernel/jobs/schema.d.ts +280 -0
- package/dist/kernel/jobs/schema.d.ts.map +1 -0
- package/dist/kernel/jobs/schema.js +37 -0
- package/dist/kernel/jobs/types.d.ts +30 -0
- package/dist/kernel/jobs/types.d.ts.map +1 -0
- package/dist/kernel/jobs/types.js +1 -0
- package/dist/kernel/local-api.d.ts +103 -0
- package/dist/kernel/local-api.d.ts.map +1 -0
- package/dist/kernel/local-api.js +87 -0
- package/dist/kernel/plugin/capability-registry.d.ts +9 -0
- package/dist/kernel/plugin/capability-registry.d.ts.map +1 -0
- package/dist/kernel/plugin/capability-registry.js +28 -0
- package/dist/kernel/plugin/dependency-graph.d.ts +6 -0
- package/dist/kernel/plugin/dependency-graph.d.ts.map +1 -0
- package/dist/kernel/plugin/dependency-graph.js +55 -0
- package/dist/kernel/plugin/manifest.d.ts +90 -0
- package/dist/kernel/plugin/manifest.d.ts.map +1 -0
- package/dist/kernel/plugin/manifest.js +140 -0
- package/dist/kernel/query/executor.d.ts +21 -0
- package/dist/kernel/query/executor.d.ts.map +1 -0
- package/dist/kernel/query/executor.js +128 -0
- package/dist/kernel/query/registry.d.ts +33 -0
- package/dist/kernel/query/registry.d.ts.map +1 -0
- package/dist/kernel/query/registry.js +20 -0
- package/dist/kernel/result.d.ts +36 -0
- package/dist/kernel/result.d.ts.map +1 -0
- package/dist/kernel/result.js +16 -0
- package/dist/kernel/schema/extra-columns.d.ts +23 -0
- package/dist/kernel/schema/extra-columns.d.ts.map +1 -0
- package/dist/kernel/schema/extra-columns.js +10 -0
- package/dist/kernel/service-registry.d.ts +109 -0
- package/dist/kernel/service-registry.d.ts.map +1 -0
- package/dist/kernel/service-registry.js +26 -0
- package/dist/kernel/service-timing.d.ts +25 -0
- package/dist/kernel/service-timing.d.ts.map +1 -0
- package/dist/kernel/service-timing.js +62 -0
- package/dist/kernel/state-machine/machine.d.ts +24 -0
- package/dist/kernel/state-machine/machine.d.ts.map +1 -0
- package/dist/kernel/state-machine/machine.js +70 -0
- package/dist/modules/analytics/cubes.d.ts +19 -0
- package/dist/modules/analytics/cubes.d.ts.map +1 -0
- package/dist/modules/analytics/cubes.js +187 -0
- package/dist/modules/analytics/drizzle-adapter.d.ts +13 -0
- package/dist/modules/analytics/drizzle-adapter.d.ts.map +1 -0
- package/dist/modules/analytics/drizzle-adapter.js +358 -0
- package/dist/modules/analytics/hooks.d.ts +13 -0
- package/dist/modules/analytics/hooks.d.ts.map +1 -0
- package/dist/modules/analytics/hooks.js +12 -0
- package/dist/modules/analytics/models.d.ts +14 -0
- package/dist/modules/analytics/models.d.ts.map +1 -0
- package/dist/modules/analytics/models.js +118 -0
- package/dist/modules/analytics/repository/index.d.ts +5 -0
- package/dist/modules/analytics/repository/index.d.ts.map +1 -0
- package/dist/modules/analytics/repository/index.js +1 -0
- package/dist/modules/analytics/service.d.ts +45 -0
- package/dist/modules/analytics/service.d.ts.map +1 -0
- package/dist/modules/analytics/service.js +196 -0
- package/dist/modules/analytics/types.d.ts +119 -0
- package/dist/modules/analytics/types.d.ts.map +1 -0
- package/dist/modules/analytics/types.js +25 -0
- package/dist/modules/audit/hooks.d.ts +7 -0
- package/dist/modules/audit/hooks.d.ts.map +1 -0
- package/dist/modules/audit/hooks.js +67 -0
- package/dist/modules/audit/schema.d.ts +178 -0
- package/dist/modules/audit/schema.d.ts.map +1 -0
- package/dist/modules/audit/schema.js +21 -0
- package/dist/modules/audit/service.d.ts +38 -0
- package/dist/modules/audit/service.d.ts.map +1 -0
- package/dist/modules/audit/service.js +109 -0
- package/dist/modules/cart/access.d.ts +11 -0
- package/dist/modules/cart/access.d.ts.map +1 -0
- package/dist/modules/cart/access.js +18 -0
- package/dist/modules/cart/matcher.d.ts +20 -0
- package/dist/modules/cart/matcher.d.ts.map +1 -0
- package/dist/modules/cart/matcher.js +2 -0
- package/dist/modules/cart/repository/in-memory.d.ts +30 -0
- package/dist/modules/cart/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/cart/repository/in-memory.js +159 -0
- package/dist/modules/cart/repository/index.d.ts +45 -0
- package/dist/modules/cart/repository/index.d.ts.map +1 -0
- package/dist/modules/cart/repository/index.js +158 -0
- package/dist/modules/cart/schema.d.ts +359 -0
- package/dist/modules/cart/schema.d.ts.map +1 -0
- package/dist/modules/cart/schema.js +40 -0
- package/dist/modules/cart/schemas.d.ts +29 -0
- package/dist/modules/cart/schemas.d.ts.map +1 -0
- package/dist/modules/cart/schemas.js +14 -0
- package/dist/modules/cart/service.d.ts +63 -0
- package/dist/modules/cart/service.d.ts.map +1 -0
- package/dist/modules/cart/service.js +339 -0
- package/dist/modules/catalog/repository/in-memory.d.ts +82 -0
- package/dist/modules/catalog/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/catalog/repository/in-memory.js +444 -0
- package/dist/modules/catalog/repository/index.d.ts +106 -0
- package/dist/modules/catalog/repository/index.d.ts.map +1 -0
- package/dist/modules/catalog/repository/index.js +455 -0
- package/dist/modules/catalog/schema.d.ts +1193 -0
- package/dist/modules/catalog/schema.d.ts.map +1 -0
- package/dist/modules/catalog/schema.js +149 -0
- package/dist/modules/catalog/schemas.d.ts +81 -0
- package/dist/modules/catalog/schemas.d.ts.map +1 -0
- package/dist/modules/catalog/schemas.js +62 -0
- package/dist/modules/catalog/service.d.ts +160 -0
- package/dist/modules/catalog/service.d.ts.map +1 -0
- package/dist/modules/catalog/service.js +759 -0
- package/dist/modules/customers/repository/in-memory.d.ts +37 -0
- package/dist/modules/customers/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/customers/repository/in-memory.js +278 -0
- package/dist/modules/customers/repository/index.d.ts +47 -0
- package/dist/modules/customers/repository/index.d.ts.map +1 -0
- package/dist/modules/customers/repository/index.js +206 -0
- package/dist/modules/customers/schema.d.ts +560 -0
- package/dist/modules/customers/schema.d.ts.map +1 -0
- package/dist/modules/customers/schema.js +60 -0
- package/dist/modules/customers/service.d.ts +25 -0
- package/dist/modules/customers/service.d.ts.map +1 -0
- package/dist/modules/customers/service.js +91 -0
- package/dist/modules/fulfillment/repository/in-memory.d.ts +53 -0
- package/dist/modules/fulfillment/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/fulfillment/repository/in-memory.js +327 -0
- package/dist/modules/fulfillment/repository/index.d.ts +63 -0
- package/dist/modules/fulfillment/repository/index.d.ts.map +1 -0
- package/dist/modules/fulfillment/repository/index.js +268 -0
- package/dist/modules/fulfillment/schema.d.ts +655 -0
- package/dist/modules/fulfillment/schema.d.ts.map +1 -0
- package/dist/modules/fulfillment/schema.js +83 -0
- package/dist/modules/fulfillment/service.d.ts +58 -0
- package/dist/modules/fulfillment/service.d.ts.map +1 -0
- package/dist/modules/fulfillment/service.js +338 -0
- package/dist/modules/fulfillment/types.d.ts +44 -0
- package/dist/modules/fulfillment/types.d.ts.map +1 -0
- package/dist/modules/fulfillment/types.js +1 -0
- package/dist/modules/inventory/repository/in-memory.d.ts +51 -0
- package/dist/modules/inventory/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/inventory/repository/in-memory.js +281 -0
- package/dist/modules/inventory/repository/index.d.ts +81 -0
- package/dist/modules/inventory/repository/index.d.ts.map +1 -0
- package/dist/modules/inventory/repository/index.js +310 -0
- package/dist/modules/inventory/schema.d.ts +570 -0
- package/dist/modules/inventory/schema.d.ts.map +1 -0
- package/dist/modules/inventory/schema.js +69 -0
- package/dist/modules/inventory/schemas.d.ts +31 -0
- package/dist/modules/inventory/schemas.d.ts.map +1 -0
- package/dist/modules/inventory/schemas.js +28 -0
- package/dist/modules/inventory/service.d.ts +65 -0
- package/dist/modules/inventory/service.d.ts.map +1 -0
- package/dist/modules/inventory/service.js +271 -0
- package/dist/modules/media/adapter.d.ts +16 -0
- package/dist/modules/media/adapter.d.ts.map +1 -0
- package/dist/modules/media/adapter.js +1 -0
- package/dist/modules/media/repository/in-memory.d.ts +26 -0
- package/dist/modules/media/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/media/repository/in-memory.js +145 -0
- package/dist/modules/media/repository/index.d.ts +35 -0
- package/dist/modules/media/repository/index.d.ts.map +1 -0
- package/dist/modules/media/repository/index.js +176 -0
- package/dist/modules/media/schema.d.ts +289 -0
- package/dist/modules/media/schema.d.ts.map +1 -0
- package/dist/modules/media/schema.js +35 -0
- package/dist/modules/media/service.d.ts +42 -0
- package/dist/modules/media/service.d.ts.map +1 -0
- package/dist/modules/media/service.js +89 -0
- package/dist/modules/orders/repository/in-memory.d.ts +40 -0
- package/dist/modules/orders/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/orders/repository/in-memory.js +245 -0
- package/dist/modules/orders/repository/index.d.ts +48 -0
- package/dist/modules/orders/repository/index.d.ts.map +1 -0
- package/dist/modules/orders/repository/index.js +199 -0
- package/dist/modules/orders/schema.d.ts +672 -0
- package/dist/modules/orders/schema.d.ts.map +1 -0
- package/dist/modules/orders/schema.js +63 -0
- package/dist/modules/orders/service.d.ts +85 -0
- package/dist/modules/orders/service.d.ts.map +1 -0
- package/dist/modules/orders/service.js +313 -0
- package/dist/modules/orders/stale-order-cleanup.d.ts +27 -0
- package/dist/modules/orders/stale-order-cleanup.d.ts.map +1 -0
- package/dist/modules/orders/stale-order-cleanup.js +55 -0
- package/dist/modules/organization/service.d.ts +53 -0
- package/dist/modules/organization/service.d.ts.map +1 -0
- package/dist/modules/organization/service.js +151 -0
- package/dist/modules/payments/adapter.d.ts +42 -0
- package/dist/modules/payments/adapter.d.ts.map +1 -0
- package/dist/modules/payments/adapter.js +1 -0
- package/dist/modules/payments/repository/index.d.ts +5 -0
- package/dist/modules/payments/repository/index.d.ts.map +1 -0
- package/dist/modules/payments/repository/index.js +1 -0
- package/dist/modules/payments/service.d.ts +23 -0
- package/dist/modules/payments/service.d.ts.map +1 -0
- package/dist/modules/payments/service.js +72 -0
- package/dist/modules/pricing/repository/in-memory.d.ts +25 -0
- package/dist/modules/pricing/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/pricing/repository/in-memory.js +288 -0
- package/dist/modules/pricing/repository/index.d.ts +34 -0
- package/dist/modules/pricing/repository/index.d.ts.map +1 -0
- package/dist/modules/pricing/repository/index.js +176 -0
- package/dist/modules/pricing/schema.d.ts +565 -0
- package/dist/modules/pricing/schema.d.ts.map +1 -0
- package/dist/modules/pricing/schema.js +57 -0
- package/dist/modules/pricing/schemas.d.ts +37 -0
- package/dist/modules/pricing/schemas.d.ts.map +1 -0
- package/dist/modules/pricing/schemas.js +30 -0
- package/dist/modules/pricing/service.d.ts +62 -0
- package/dist/modules/pricing/service.d.ts.map +1 -0
- package/dist/modules/pricing/service.js +308 -0
- package/dist/modules/promotions/repository/in-memory.d.ts +32 -0
- package/dist/modules/promotions/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/promotions/repository/in-memory.js +227 -0
- package/dist/modules/promotions/repository/index.d.ts +41 -0
- package/dist/modules/promotions/repository/index.d.ts.map +1 -0
- package/dist/modules/promotions/repository/index.js +204 -0
- package/dist/modules/promotions/schema.d.ts +427 -0
- package/dist/modules/promotions/schema.d.ts.map +1 -0
- package/dist/modules/promotions/schema.js +52 -0
- package/dist/modules/promotions/schemas.d.ts +33 -0
- package/dist/modules/promotions/schemas.d.ts.map +1 -0
- package/dist/modules/promotions/schemas.js +32 -0
- package/dist/modules/promotions/service.d.ts +80 -0
- package/dist/modules/promotions/service.d.ts.map +1 -0
- package/dist/modules/promotions/service.js +347 -0
- package/dist/modules/search/adapter.d.ts +51 -0
- package/dist/modules/search/adapter.d.ts.map +1 -0
- package/dist/modules/search/adapter.js +1 -0
- package/dist/modules/search/hooks.d.ts +8 -0
- package/dist/modules/search/hooks.d.ts.map +1 -0
- package/dist/modules/search/hooks.js +6 -0
- package/dist/modules/search/repository/index.d.ts +5 -0
- package/dist/modules/search/repository/index.d.ts.map +1 -0
- package/dist/modules/search/repository/index.js +1 -0
- package/dist/modules/search/service.d.ts +24 -0
- package/dist/modules/search/service.d.ts.map +1 -0
- package/dist/modules/search/service.js +217 -0
- package/dist/modules/shipping/calculator.d.ts +42 -0
- package/dist/modules/shipping/calculator.d.ts.map +1 -0
- package/dist/modules/shipping/calculator.js +91 -0
- package/dist/modules/shipping/repository/index.d.ts +5 -0
- package/dist/modules/shipping/repository/index.d.ts.map +1 -0
- package/dist/modules/shipping/repository/index.js +1 -0
- package/dist/modules/shipping/service.d.ts +28 -0
- package/dist/modules/shipping/service.d.ts.map +1 -0
- package/dist/modules/shipping/service.js +20 -0
- package/dist/modules/tax/adapter.d.ts +58 -0
- package/dist/modules/tax/adapter.d.ts.map +1 -0
- package/dist/modules/tax/adapter.js +1 -0
- package/dist/modules/tax/repository/index.d.ts +5 -0
- package/dist/modules/tax/repository/index.d.ts.map +1 -0
- package/dist/modules/tax/repository/index.js +1 -0
- package/dist/modules/tax/service.d.ts +19 -0
- package/dist/modules/tax/service.d.ts.map +1 -0
- package/dist/modules/tax/service.js +34 -0
- package/dist/modules/webhooks/hook.d.ts +13 -0
- package/dist/modules/webhooks/hook.d.ts.map +1 -0
- package/dist/modules/webhooks/hook.js +29 -0
- package/dist/modules/webhooks/repository/in-memory.d.ts +31 -0
- package/dist/modules/webhooks/repository/in-memory.d.ts.map +1 -0
- package/dist/modules/webhooks/repository/in-memory.js +187 -0
- package/dist/modules/webhooks/repository/index.d.ts +40 -0
- package/dist/modules/webhooks/repository/index.d.ts.map +1 -0
- package/dist/modules/webhooks/repository/index.js +175 -0
- package/dist/modules/webhooks/schema.d.ts +404 -0
- package/dist/modules/webhooks/schema.d.ts.map +1 -0
- package/dist/modules/webhooks/schema.js +40 -0
- package/dist/modules/webhooks/service.d.ts +23 -0
- package/dist/modules/webhooks/service.d.ts.map +1 -0
- package/dist/modules/webhooks/service.js +92 -0
- package/dist/modules/webhooks/signing.d.ts +2 -0
- package/dist/modules/webhooks/signing.d.ts.map +1 -0
- package/dist/modules/webhooks/signing.js +5 -0
- package/dist/modules/webhooks/ssrf-guard.d.ts +19 -0
- package/dist/modules/webhooks/ssrf-guard.d.ts.map +1 -0
- package/dist/modules/webhooks/ssrf-guard.js +79 -0
- package/dist/modules/webhooks/tasks.d.ts +16 -0
- package/dist/modules/webhooks/tasks.d.ts.map +1 -0
- package/dist/modules/webhooks/tasks.js +35 -0
- package/dist/modules/webhooks/worker.d.ts +21 -0
- package/dist/modules/webhooks/worker.d.ts.map +1 -0
- package/dist/modules/webhooks/worker.js +113 -0
- package/dist/runtime/commerce.d.ts +110 -0
- package/dist/runtime/commerce.d.ts.map +1 -0
- package/dist/runtime/commerce.js +37 -0
- package/dist/runtime/kernel.d.ts +72 -0
- package/dist/runtime/kernel.d.ts.map +1 -0
- package/dist/runtime/kernel.js +298 -0
- package/dist/runtime/logger.d.ts +11 -0
- package/dist/runtime/logger.d.ts.map +1 -0
- package/dist/runtime/logger.js +32 -0
- package/dist/runtime/server.d.ts +28 -0
- package/dist/runtime/server.d.ts.map +1 -0
- package/dist/runtime/server.js +277 -0
- package/dist/runtime/shutdown.d.ts +15 -0
- package/dist/runtime/shutdown.d.ts.map +1 -0
- package/dist/runtime/shutdown.js +34 -0
- package/dist/runtime/state-manager.d.ts +14 -0
- package/dist/runtime/state-manager.d.ts.map +1 -0
- package/dist/runtime/state-manager.js +84 -0
- package/dist/runtime/state-repository.d.ts +13 -0
- package/dist/runtime/state-repository.d.ts.map +1 -0
- package/dist/runtime/state-repository.js +160 -0
- package/dist/runtime/state.d.ts +382 -0
- package/dist/runtime/state.d.ts.map +1 -0
- package/dist/runtime/state.js +37 -0
- package/dist/runtime/store.d.ts +382 -0
- package/dist/runtime/store.d.ts.map +1 -0
- package/dist/runtime/store.js +37 -0
- package/dist/test-utils/create-pglite-adapter.d.ts +32 -0
- package/dist/test-utils/create-pglite-adapter.d.ts.map +1 -0
- package/dist/test-utils/create-pglite-adapter.js +106 -0
- package/dist/test-utils/create-plugin-test-app.d.ts +50 -0
- package/dist/test-utils/create-plugin-test-app.d.ts.map +1 -0
- package/dist/test-utils/create-plugin-test-app.js +74 -0
- package/dist/test-utils/create-repository-test-harness.d.ts +8 -0
- package/dist/test-utils/create-repository-test-harness.d.ts.map +1 -0
- package/dist/test-utils/create-repository-test-harness.js +7 -0
- package/dist/test-utils/create-test-config.d.ts +18 -0
- package/dist/test-utils/create-test-config.d.ts.map +1 -0
- package/dist/test-utils/create-test-config.js +174 -0
- package/dist/test-utils/create-test-kernel.d.ts +3 -0
- package/dist/test-utils/create-test-kernel.d.ts.map +1 -0
- package/dist/test-utils/create-test-kernel.js +5 -0
- package/dist/test-utils/create-test-plugin-context.d.ts +42 -0
- package/dist/test-utils/create-test-plugin-context.d.ts.map +1 -0
- package/dist/test-utils/create-test-plugin-context.js +46 -0
- package/dist/test-utils/rest-api-test-utils.d.ts +64 -0
- package/dist/test-utils/rest-api-test-utils.d.ts.map +1 -0
- package/dist/test-utils/rest-api-test-utils.js +207 -0
- package/dist/test-utils/test-actors.d.ts +15 -0
- package/dist/test-utils/test-actors.d.ts.map +1 -0
- package/dist/test-utils/test-actors.js +57 -0
- package/dist/test-utils/typed-hooks.d.ts +43 -0
- package/dist/test-utils/typed-hooks.d.ts.map +1 -0
- package/dist/test-utils/typed-hooks.js +35 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/commerce-types.d.ts +34 -0
- package/dist/types/commerce-types.d.ts.map +1 -0
- package/dist/types/commerce-types.js +1 -0
- package/dist/utils/id.d.ts +2 -0
- package/dist/utils/id.d.ts.map +1 -0
- package/dist/utils/id.js +3 -0
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +16 -0
- package/dist/utils/pagination.d.ts +11 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/pagination.js +15 -0
- package/package.json +63 -0
- package/src/adapters/console-email.ts +43 -0
- package/src/auth/access.ts +187 -0
- package/src/auth/auth-schema.ts +131 -0
- package/src/auth/middleware.ts +115 -0
- package/src/auth/org.ts +41 -0
- package/src/auth/permissions.ts +28 -0
- package/src/auth/setup.ts +160 -0
- package/src/auth/system-actor.ts +19 -0
- package/src/auth/types.ts +10 -0
- package/src/config/defaults.ts +82 -0
- package/src/config/define-config.ts +53 -0
- package/src/config/types.ts +299 -0
- package/src/generated/plugin-capabilities.d.ts +20 -0
- package/src/generated/plugin-manifest.ts +23 -0
- package/src/generated/plugin-repositories.d.ts +20 -0
- package/src/hooks/checkout-completion.ts +262 -0
- package/src/hooks/checkout.ts +677 -0
- package/src/hooks/order-emails.ts +62 -0
- package/src/index.ts +214 -0
- package/src/interfaces/mcp/agent-prompt.ts +174 -0
- package/src/interfaces/mcp/context-enrichment.ts +177 -0
- package/src/interfaces/mcp/server.ts +617 -0
- package/src/interfaces/mcp/transport.ts +68 -0
- package/src/interfaces/rest/customer-portal.ts +299 -0
- package/src/interfaces/rest/index.ts +74 -0
- package/src/interfaces/rest/router.ts +334 -0
- package/src/interfaces/rest/routes/admin-jobs.ts +58 -0
- package/src/interfaces/rest/routes/audit.ts +50 -0
- package/src/interfaces/rest/routes/carts.ts +89 -0
- package/src/interfaces/rest/routes/catalog.ts +493 -0
- package/src/interfaces/rest/routes/checkout.ts +283 -0
- package/src/interfaces/rest/routes/inventory.ts +70 -0
- package/src/interfaces/rest/routes/media.ts +86 -0
- package/src/interfaces/rest/routes/orders.ts +78 -0
- package/src/interfaces/rest/routes/payments.ts +60 -0
- package/src/interfaces/rest/routes/pricing.ts +57 -0
- package/src/interfaces/rest/routes/promotions.ts +92 -0
- package/src/interfaces/rest/routes/search.ts +71 -0
- package/src/interfaces/rest/routes/webhooks.ts +46 -0
- package/src/interfaces/rest/schemas/admin-jobs.ts +40 -0
- package/src/interfaces/rest/schemas/audit.ts +46 -0
- package/src/interfaces/rest/schemas/carts.ts +125 -0
- package/src/interfaces/rest/schemas/catalog.ts +450 -0
- package/src/interfaces/rest/schemas/checkout.ts +66 -0
- package/src/interfaces/rest/schemas/customer-portal.ts +195 -0
- package/src/interfaces/rest/schemas/inventory.ts +138 -0
- package/src/interfaces/rest/schemas/media.ts +75 -0
- package/src/interfaces/rest/schemas/orders.ts +104 -0
- package/src/interfaces/rest/schemas/pricing.ts +80 -0
- package/src/interfaces/rest/schemas/promotions.ts +110 -0
- package/src/interfaces/rest/schemas/responses.ts +85 -0
- package/src/interfaces/rest/schemas/search.ts +58 -0
- package/src/interfaces/rest/schemas/shared.ts +62 -0
- package/src/interfaces/rest/schemas/webhooks.ts +68 -0
- package/src/interfaces/rest/utils.ts +104 -0
- package/src/interfaces/rest/webhook-router.ts +50 -0
- package/src/kernel/compensation/executor.ts +61 -0
- package/src/kernel/compensation/types.ts +26 -0
- package/src/kernel/database/adapter.ts +13 -0
- package/src/kernel/database/drizzle-db.ts +56 -0
- package/src/kernel/database/migrate.ts +76 -0
- package/src/kernel/database/plugin-types.ts +34 -0
- package/src/kernel/database/schema.ts +49 -0
- package/src/kernel/database/scoped-db.ts +68 -0
- package/src/kernel/database/tx-context.ts +46 -0
- package/src/kernel/error-mapper.ts +15 -0
- package/src/kernel/errors.ts +89 -0
- package/src/kernel/factory/repository-factory.ts +242 -0
- package/src/kernel/hooks/create-context.ts +43 -0
- package/src/kernel/hooks/executor.ts +88 -0
- package/src/kernel/hooks/registry.ts +74 -0
- package/src/kernel/hooks/types.ts +52 -0
- package/src/kernel/http-error.ts +44 -0
- package/src/kernel/jobs/adapter.ts +36 -0
- package/src/kernel/jobs/drizzle-adapter.ts +58 -0
- package/src/kernel/jobs/runner.ts +153 -0
- package/src/kernel/jobs/schema.ts +46 -0
- package/src/kernel/jobs/types.ts +30 -0
- package/src/kernel/local-api.ts +185 -0
- package/src/kernel/plugin/manifest.ts +253 -0
- package/src/kernel/query/executor.ts +184 -0
- package/src/kernel/query/registry.ts +46 -0
- package/src/kernel/result.ts +33 -0
- package/src/kernel/schema/extra-columns.ts +37 -0
- package/src/kernel/service-registry.ts +76 -0
- package/src/kernel/service-timing.ts +89 -0
- package/src/kernel/state-machine/machine.ts +101 -0
- package/src/modules/analytics/drizzle-adapter.ts +426 -0
- package/src/modules/analytics/hooks.ts +11 -0
- package/src/modules/analytics/models.ts +125 -0
- package/src/modules/analytics/repository/index.ts +6 -0
- package/src/modules/analytics/service.ts +245 -0
- package/src/modules/analytics/types.ts +180 -0
- package/src/modules/audit/hooks.ts +78 -0
- package/src/modules/audit/schema.ts +33 -0
- package/src/modules/audit/service.ts +151 -0
- package/src/modules/cart/access.ts +27 -0
- package/src/modules/cart/matcher.ts +26 -0
- package/src/modules/cart/repository/index.ts +234 -0
- package/src/modules/cart/schema.ts +42 -0
- package/src/modules/cart/schemas.ts +38 -0
- package/src/modules/cart/service.ts +541 -0
- package/src/modules/catalog/repository/index.ts +772 -0
- package/src/modules/catalog/schema.ts +203 -0
- package/src/modules/catalog/schemas.ts +104 -0
- package/src/modules/catalog/service.ts +1544 -0
- package/src/modules/customers/repository/index.ts +327 -0
- package/src/modules/customers/schema.ts +64 -0
- package/src/modules/customers/service.ts +171 -0
- package/src/modules/fulfillment/repository/index.ts +426 -0
- package/src/modules/fulfillment/schema.ts +101 -0
- package/src/modules/fulfillment/service.ts +555 -0
- package/src/modules/fulfillment/types.ts +59 -0
- package/src/modules/inventory/repository/index.ts +509 -0
- package/src/modules/inventory/schema.ts +94 -0
- package/src/modules/inventory/schemas.ts +38 -0
- package/src/modules/inventory/service.ts +490 -0
- package/src/modules/media/adapter.ts +17 -0
- package/src/modules/media/repository/index.ts +274 -0
- package/src/modules/media/schema.ts +41 -0
- package/src/modules/media/service.ts +151 -0
- package/src/modules/orders/repository/index.ts +287 -0
- package/src/modules/orders/schema.ts +66 -0
- package/src/modules/orders/service.ts +619 -0
- package/src/modules/orders/stale-order-cleanup.ts +76 -0
- package/src/modules/organization/service.ts +191 -0
- package/src/modules/payments/adapter.ts +47 -0
- package/src/modules/payments/repository/index.ts +6 -0
- package/src/modules/payments/service.ts +107 -0
- package/src/modules/pricing/repository/index.ts +291 -0
- package/src/modules/pricing/schema.ts +71 -0
- package/src/modules/pricing/schemas.ts +38 -0
- package/src/modules/pricing/service.ts +494 -0
- package/src/modules/promotions/repository/index.ts +325 -0
- package/src/modules/promotions/schema.ts +62 -0
- package/src/modules/promotions/schemas.ts +38 -0
- package/src/modules/promotions/service.ts +598 -0
- package/src/modules/search/adapter.ts +57 -0
- package/src/modules/search/hooks.ts +12 -0
- package/src/modules/search/repository/index.ts +6 -0
- package/src/modules/search/service.ts +315 -0
- package/src/modules/shipping/calculator.ts +188 -0
- package/src/modules/shipping/repository/index.ts +6 -0
- package/src/modules/shipping/service.ts +51 -0
- package/src/modules/tax/adapter.ts +60 -0
- package/src/modules/tax/repository/index.ts +6 -0
- package/src/modules/tax/service.ts +53 -0
- package/src/modules/webhooks/hook.ts +34 -0
- package/src/modules/webhooks/repository/index.ts +278 -0
- package/src/modules/webhooks/schema.ts +56 -0
- package/src/modules/webhooks/service.ts +117 -0
- package/src/modules/webhooks/signing.ts +6 -0
- package/src/modules/webhooks/ssrf-guard.ts +71 -0
- package/src/modules/webhooks/tasks.ts +52 -0
- package/src/modules/webhooks/worker.ts +134 -0
- package/src/runtime/commerce.ts +145 -0
- package/src/runtime/kernel.ts +419 -0
- package/src/runtime/logger.ts +36 -0
- package/src/runtime/server.ts +345 -0
- package/src/runtime/shutdown.ts +43 -0
- package/src/test-utils/create-pglite-adapter.ts +129 -0
- package/src/test-utils/create-plugin-test-app.ts +128 -0
- package/src/test-utils/create-repository-test-harness.ts +16 -0
- package/src/test-utils/create-test-config.ts +190 -0
- package/src/test-utils/create-test-kernel.ts +7 -0
- package/src/test-utils/create-test-plugin-context.ts +75 -0
- package/src/test-utils/rest-api-test-utils.ts +265 -0
- package/src/test-utils/test-actors.ts +62 -0
- package/src/test-utils/typed-hooks.ts +54 -0
- package/src/types/commerce-types.ts +34 -0
- package/src/utils/id.ts +3 -0
- package/src/utils/logger.ts +18 -0
- package/src/utils/pagination.ts +22 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
function makeId() {
|
|
2
|
+
return crypto.randomUUID();
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* In-memory implementation of CatalogRepository for testing.
|
|
6
|
+
* Provides the same interface as the Drizzle-based repository but stores data in memory.
|
|
7
|
+
*/
|
|
8
|
+
export class InMemoryCatalogRepository {
|
|
9
|
+
entities = new Map();
|
|
10
|
+
attributes = new Map();
|
|
11
|
+
customFields = new Map();
|
|
12
|
+
categories = new Map();
|
|
13
|
+
entityCategories = [];
|
|
14
|
+
brands = new Map();
|
|
15
|
+
entityBrands = [];
|
|
16
|
+
optionTypes = new Map();
|
|
17
|
+
optionValues = new Map();
|
|
18
|
+
variants = new Map();
|
|
19
|
+
variantOptionValues = [];
|
|
20
|
+
// Entities
|
|
21
|
+
async findEntityById(id, _ctx) {
|
|
22
|
+
return this.entities.get(id);
|
|
23
|
+
}
|
|
24
|
+
async findEntityBySlug(slug, _ctx) {
|
|
25
|
+
return [...this.entities.values()].find((e) => e.slug === slug);
|
|
26
|
+
}
|
|
27
|
+
async findEntities(filter, _ctx) {
|
|
28
|
+
let result = [...this.entities.values()];
|
|
29
|
+
if (filter?.type)
|
|
30
|
+
result = result.filter((e) => e.type === filter.type);
|
|
31
|
+
if (filter?.status)
|
|
32
|
+
result = result.filter((e) => e.status === filter.status);
|
|
33
|
+
if (filter?.ids) {
|
|
34
|
+
const idSet = new Set(filter.ids);
|
|
35
|
+
result = result.filter((e) => idSet.has(e.id));
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
async createEntity(data, _ctx) {
|
|
40
|
+
const duplicate = [...this.entities.values()].find((e) => e.slug === data.slug);
|
|
41
|
+
if (duplicate) {
|
|
42
|
+
throw new Error(`Entity with slug "${data.slug}" already exists.`);
|
|
43
|
+
}
|
|
44
|
+
const now = new Date();
|
|
45
|
+
const entity = {
|
|
46
|
+
id: data.id ?? makeId(),
|
|
47
|
+
type: data.type,
|
|
48
|
+
slug: data.slug,
|
|
49
|
+
status: data.status ?? "draft",
|
|
50
|
+
isVisible: data.isVisible ?? false,
|
|
51
|
+
metadata: data.metadata ?? null,
|
|
52
|
+
createdAt: data.createdAt ?? now,
|
|
53
|
+
updatedAt: data.updatedAt ?? now,
|
|
54
|
+
publishedAt: data.publishedAt ?? null,
|
|
55
|
+
};
|
|
56
|
+
this.entities.set(entity.id, entity);
|
|
57
|
+
return entity;
|
|
58
|
+
}
|
|
59
|
+
async updateEntity(id, data, _ctx) {
|
|
60
|
+
const existing = this.entities.get(id);
|
|
61
|
+
if (!existing)
|
|
62
|
+
return undefined;
|
|
63
|
+
const updated = {
|
|
64
|
+
id: existing.id,
|
|
65
|
+
type: data.type ?? existing.type,
|
|
66
|
+
slug: data.slug ?? existing.slug,
|
|
67
|
+
status: data.status ?? existing.status,
|
|
68
|
+
isVisible: data.isVisible ?? existing.isVisible,
|
|
69
|
+
metadata: data.metadata !== undefined
|
|
70
|
+
? (data.metadata ?? null)
|
|
71
|
+
: existing.metadata,
|
|
72
|
+
createdAt: existing.createdAt,
|
|
73
|
+
updatedAt: new Date(),
|
|
74
|
+
publishedAt: data.publishedAt !== undefined
|
|
75
|
+
? (data.publishedAt ?? null)
|
|
76
|
+
: existing.publishedAt,
|
|
77
|
+
};
|
|
78
|
+
this.entities.set(id, updated);
|
|
79
|
+
return updated;
|
|
80
|
+
}
|
|
81
|
+
async deleteEntity(id, _ctx) {
|
|
82
|
+
return this.entities.delete(id);
|
|
83
|
+
}
|
|
84
|
+
// Attributes
|
|
85
|
+
async findAttributesByEntityId(entityId, _ctx) {
|
|
86
|
+
return this.attributes.get(entityId) ?? [];
|
|
87
|
+
}
|
|
88
|
+
async findAttributeByLocale(entityId, locale, _ctx) {
|
|
89
|
+
return (this.attributes.get(entityId) ?? []).find((a) => a.locale === locale);
|
|
90
|
+
}
|
|
91
|
+
async createAttribute(data, _ctx) {
|
|
92
|
+
const attr = {
|
|
93
|
+
id: data.id ?? makeId(),
|
|
94
|
+
entityId: data.entityId,
|
|
95
|
+
locale: data.locale ?? "en",
|
|
96
|
+
title: data.title,
|
|
97
|
+
subtitle: data.subtitle ?? null,
|
|
98
|
+
description: data.description ?? null,
|
|
99
|
+
richDescription: data.richDescription ?? null,
|
|
100
|
+
seoTitle: data.seoTitle ?? null,
|
|
101
|
+
seoDescription: data.seoDescription ?? null,
|
|
102
|
+
};
|
|
103
|
+
const list = this.attributes.get(data.entityId) ?? [];
|
|
104
|
+
list.push(attr);
|
|
105
|
+
this.attributes.set(data.entityId, list);
|
|
106
|
+
return attr;
|
|
107
|
+
}
|
|
108
|
+
async updateAttribute(id, data, _ctx) {
|
|
109
|
+
for (const [entityId, attrs] of this.attributes.entries()) {
|
|
110
|
+
const idx = attrs.findIndex((a) => a.id === id);
|
|
111
|
+
if (idx !== -1) {
|
|
112
|
+
const existing = attrs[idx];
|
|
113
|
+
const updated = {
|
|
114
|
+
id: existing.id,
|
|
115
|
+
entityId: existing.entityId,
|
|
116
|
+
locale: data.locale ?? existing.locale,
|
|
117
|
+
title: data.title ?? existing.title,
|
|
118
|
+
subtitle: data.subtitle !== undefined
|
|
119
|
+
? (data.subtitle ?? null)
|
|
120
|
+
: existing.subtitle,
|
|
121
|
+
description: data.description !== undefined
|
|
122
|
+
? (data.description ?? null)
|
|
123
|
+
: existing.description,
|
|
124
|
+
richDescription: data.richDescription !== undefined
|
|
125
|
+
? (data.richDescription ?? null)
|
|
126
|
+
: existing.richDescription,
|
|
127
|
+
seoTitle: data.seoTitle !== undefined
|
|
128
|
+
? (data.seoTitle ?? null)
|
|
129
|
+
: existing.seoTitle,
|
|
130
|
+
seoDescription: data.seoDescription !== undefined
|
|
131
|
+
? (data.seoDescription ?? null)
|
|
132
|
+
: existing.seoDescription,
|
|
133
|
+
};
|
|
134
|
+
attrs[idx] = updated;
|
|
135
|
+
return updated;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
async upsertAttribute(entityId, locale, data, ctx) {
|
|
141
|
+
const existing = await this.findAttributeByLocale(entityId, locale, ctx);
|
|
142
|
+
if (existing) {
|
|
143
|
+
return (await this.updateAttribute(existing.id, data, ctx));
|
|
144
|
+
}
|
|
145
|
+
return this.createAttribute({ ...data, entityId, locale }, ctx);
|
|
146
|
+
}
|
|
147
|
+
async deleteAttributesByEntityId(entityId, _ctx) {
|
|
148
|
+
this.attributes.delete(entityId);
|
|
149
|
+
}
|
|
150
|
+
// Custom Fields
|
|
151
|
+
async findCustomFieldsByEntityId(entityId, _ctx) {
|
|
152
|
+
return this.customFields.get(entityId) ?? [];
|
|
153
|
+
}
|
|
154
|
+
async createCustomField(data, _ctx) {
|
|
155
|
+
const field = {
|
|
156
|
+
id: data.id ?? makeId(),
|
|
157
|
+
entityId: data.entityId,
|
|
158
|
+
fieldName: data.fieldName,
|
|
159
|
+
fieldType: data.fieldType,
|
|
160
|
+
textValue: data.textValue ?? null,
|
|
161
|
+
numberValue: data.numberValue ?? null,
|
|
162
|
+
booleanValue: data.booleanValue ?? null,
|
|
163
|
+
dateValue: data.dateValue ?? null,
|
|
164
|
+
jsonValue: data.jsonValue ?? null,
|
|
165
|
+
};
|
|
166
|
+
const list = this.customFields.get(data.entityId) ?? [];
|
|
167
|
+
list.push(field);
|
|
168
|
+
this.customFields.set(data.entityId, list);
|
|
169
|
+
return field;
|
|
170
|
+
}
|
|
171
|
+
async deleteCustomFieldsByEntityId(entityId, _ctx) {
|
|
172
|
+
this.customFields.delete(entityId);
|
|
173
|
+
}
|
|
174
|
+
// Categories
|
|
175
|
+
async findCategoryById(id, _ctx) {
|
|
176
|
+
return this.categories.get(id);
|
|
177
|
+
}
|
|
178
|
+
async findCategoryBySlug(slug, _ctx) {
|
|
179
|
+
return [...this.categories.values()].find((c) => c.slug === slug);
|
|
180
|
+
}
|
|
181
|
+
async findAllCategories(_ctx) {
|
|
182
|
+
return [...this.categories.values()];
|
|
183
|
+
}
|
|
184
|
+
async createCategory(data, _ctx) {
|
|
185
|
+
const duplicate = [...this.categories.values()].find((c) => c.slug === data.slug);
|
|
186
|
+
if (duplicate) {
|
|
187
|
+
throw new Error(`Category with slug "${data.slug}" already exists.`);
|
|
188
|
+
}
|
|
189
|
+
const category = {
|
|
190
|
+
id: data.id ?? makeId(),
|
|
191
|
+
parentId: data.parentId ?? null,
|
|
192
|
+
slug: data.slug,
|
|
193
|
+
sortOrder: data.sortOrder ?? 0,
|
|
194
|
+
metadata: data.metadata ?? null,
|
|
195
|
+
};
|
|
196
|
+
this.categories.set(category.id, category);
|
|
197
|
+
return category;
|
|
198
|
+
}
|
|
199
|
+
async updateCategory(id, data, _ctx) {
|
|
200
|
+
const existing = this.categories.get(id);
|
|
201
|
+
if (!existing)
|
|
202
|
+
return undefined;
|
|
203
|
+
const updated = {
|
|
204
|
+
id: existing.id,
|
|
205
|
+
parentId: data.parentId !== undefined
|
|
206
|
+
? (data.parentId ?? null)
|
|
207
|
+
: existing.parentId,
|
|
208
|
+
slug: data.slug ?? existing.slug,
|
|
209
|
+
sortOrder: data.sortOrder ?? existing.sortOrder,
|
|
210
|
+
metadata: data.metadata !== undefined
|
|
211
|
+
? (data.metadata ?? null)
|
|
212
|
+
: existing.metadata,
|
|
213
|
+
};
|
|
214
|
+
this.categories.set(id, updated);
|
|
215
|
+
return updated;
|
|
216
|
+
}
|
|
217
|
+
async deleteCategory(id, _ctx) {
|
|
218
|
+
return this.categories.delete(id);
|
|
219
|
+
}
|
|
220
|
+
// Entity Categories
|
|
221
|
+
async findEntityCategories(entityId, _ctx) {
|
|
222
|
+
return this.entityCategories.filter((ec) => ec.entityId === entityId);
|
|
223
|
+
}
|
|
224
|
+
async findEntitiesByCategory(categoryId, _ctx) {
|
|
225
|
+
return this.entityCategories
|
|
226
|
+
.filter((ec) => ec.categoryId === categoryId)
|
|
227
|
+
.map((ec) => ec.entityId);
|
|
228
|
+
}
|
|
229
|
+
async addEntityToCategory(entityId, categoryId, sortOrder = 0, _ctx) {
|
|
230
|
+
const exists = this.entityCategories.some((ec) => ec.entityId === entityId && ec.categoryId === categoryId);
|
|
231
|
+
if (!exists) {
|
|
232
|
+
this.entityCategories.push({ entityId, categoryId, sortOrder });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
async removeEntityFromCategory(entityId, categoryId, _ctx) {
|
|
236
|
+
const before = this.entityCategories.length;
|
|
237
|
+
this.entityCategories = this.entityCategories.filter((ec) => !(ec.entityId === entityId && ec.categoryId === categoryId));
|
|
238
|
+
return this.entityCategories.length < before;
|
|
239
|
+
}
|
|
240
|
+
async deleteEntityCategoriesByEntityId(entityId, _ctx) {
|
|
241
|
+
this.entityCategories = this.entityCategories.filter((ec) => ec.entityId !== entityId);
|
|
242
|
+
}
|
|
243
|
+
async deleteEntityCategoriesByCategoryId(categoryId, _ctx) {
|
|
244
|
+
this.entityCategories = this.entityCategories.filter((ec) => ec.categoryId !== categoryId);
|
|
245
|
+
}
|
|
246
|
+
// Brands
|
|
247
|
+
async findBrandById(id, _ctx) {
|
|
248
|
+
return this.brands.get(id);
|
|
249
|
+
}
|
|
250
|
+
async findBrandBySlug(slug, _ctx) {
|
|
251
|
+
return [...this.brands.values()].find((b) => b.slug === slug);
|
|
252
|
+
}
|
|
253
|
+
async findAllBrands(_ctx) {
|
|
254
|
+
return [...this.brands.values()];
|
|
255
|
+
}
|
|
256
|
+
async createBrand(data, _ctx) {
|
|
257
|
+
const duplicate = [...this.brands.values()].find((b) => b.slug === data.slug);
|
|
258
|
+
if (duplicate) {
|
|
259
|
+
throw new Error(`Brand with slug "${data.slug}" already exists.`);
|
|
260
|
+
}
|
|
261
|
+
const brand = {
|
|
262
|
+
id: data.id ?? makeId(),
|
|
263
|
+
slug: data.slug,
|
|
264
|
+
displayName: data.displayName,
|
|
265
|
+
metadata: data.metadata ?? null,
|
|
266
|
+
};
|
|
267
|
+
this.brands.set(brand.id, brand);
|
|
268
|
+
return brand;
|
|
269
|
+
}
|
|
270
|
+
async updateBrand(id, data, _ctx) {
|
|
271
|
+
const existing = this.brands.get(id);
|
|
272
|
+
if (!existing)
|
|
273
|
+
return undefined;
|
|
274
|
+
const updated = {
|
|
275
|
+
id: existing.id,
|
|
276
|
+
slug: data.slug ?? existing.slug,
|
|
277
|
+
displayName: data.displayName ?? existing.displayName,
|
|
278
|
+
metadata: data.metadata !== undefined
|
|
279
|
+
? (data.metadata ?? null)
|
|
280
|
+
: existing.metadata,
|
|
281
|
+
};
|
|
282
|
+
this.brands.set(id, updated);
|
|
283
|
+
return updated;
|
|
284
|
+
}
|
|
285
|
+
async deleteBrand(id, _ctx) {
|
|
286
|
+
return this.brands.delete(id);
|
|
287
|
+
}
|
|
288
|
+
// Entity Brands
|
|
289
|
+
async findEntityBrands(entityId, _ctx) {
|
|
290
|
+
return this.entityBrands.filter((eb) => eb.entityId === entityId);
|
|
291
|
+
}
|
|
292
|
+
async addEntityToBrand(entityId, brandId, sortOrder = 0, _ctx) {
|
|
293
|
+
const exists = this.entityBrands.some((eb) => eb.entityId === entityId && eb.brandId === brandId);
|
|
294
|
+
if (!exists) {
|
|
295
|
+
this.entityBrands.push({ entityId, brandId, sortOrder });
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
async removeEntityFromBrand(entityId, brandId, _ctx) {
|
|
299
|
+
const before = this.entityBrands.length;
|
|
300
|
+
this.entityBrands = this.entityBrands.filter((eb) => !(eb.entityId === entityId && eb.brandId === brandId));
|
|
301
|
+
return this.entityBrands.length < before;
|
|
302
|
+
}
|
|
303
|
+
async deleteEntityBrandsByEntityId(entityId, _ctx) {
|
|
304
|
+
this.entityBrands = this.entityBrands.filter((eb) => eb.entityId !== entityId);
|
|
305
|
+
}
|
|
306
|
+
async deleteEntityBrandsByBrandId(brandId, _ctx) {
|
|
307
|
+
this.entityBrands = this.entityBrands.filter((eb) => eb.brandId !== brandId);
|
|
308
|
+
}
|
|
309
|
+
// Option Types
|
|
310
|
+
async findOptionTypesByEntityId(entityId, _ctx) {
|
|
311
|
+
return [...this.optionTypes.values()].filter((ot) => ot.entityId === entityId);
|
|
312
|
+
}
|
|
313
|
+
async findOptionTypeById(id, _ctx) {
|
|
314
|
+
return this.optionTypes.get(id);
|
|
315
|
+
}
|
|
316
|
+
async createOptionType(data, _ctx) {
|
|
317
|
+
const optionType = {
|
|
318
|
+
id: data.id ?? makeId(),
|
|
319
|
+
entityId: data.entityId,
|
|
320
|
+
name: data.name,
|
|
321
|
+
displayName: data.displayName,
|
|
322
|
+
sortOrder: data.sortOrder ?? 0,
|
|
323
|
+
};
|
|
324
|
+
this.optionTypes.set(optionType.id, optionType);
|
|
325
|
+
return optionType;
|
|
326
|
+
}
|
|
327
|
+
async deleteOptionTypesByEntityId(entityId, _ctx) {
|
|
328
|
+
for (const [id, ot] of this.optionTypes) {
|
|
329
|
+
if (ot.entityId === entityId)
|
|
330
|
+
this.optionTypes.delete(id);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
// Option Values
|
|
334
|
+
async findOptionValuesByTypeId(optionTypeId, _ctx) {
|
|
335
|
+
return [...this.optionValues.values()].filter((ov) => ov.optionTypeId === optionTypeId);
|
|
336
|
+
}
|
|
337
|
+
async findOptionValueById(id, _ctx) {
|
|
338
|
+
return this.optionValues.get(id);
|
|
339
|
+
}
|
|
340
|
+
async findOptionValuesByIds(ids, _ctx) {
|
|
341
|
+
return ids
|
|
342
|
+
.map((id) => this.optionValues.get(id))
|
|
343
|
+
.filter((v) => v !== undefined);
|
|
344
|
+
}
|
|
345
|
+
async createOptionValue(data, _ctx) {
|
|
346
|
+
const optionValue = {
|
|
347
|
+
id: data.id ?? makeId(),
|
|
348
|
+
optionTypeId: data.optionTypeId,
|
|
349
|
+
value: data.value,
|
|
350
|
+
displayValue: data.displayValue,
|
|
351
|
+
sortOrder: data.sortOrder ?? 0,
|
|
352
|
+
metadata: data.metadata ?? null,
|
|
353
|
+
};
|
|
354
|
+
this.optionValues.set(optionValue.id, optionValue);
|
|
355
|
+
return optionValue;
|
|
356
|
+
}
|
|
357
|
+
async deleteOptionValuesByTypeId(optionTypeId, _ctx) {
|
|
358
|
+
for (const [id, ov] of this.optionValues) {
|
|
359
|
+
if (ov.optionTypeId === optionTypeId)
|
|
360
|
+
this.optionValues.delete(id);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
// Variants
|
|
364
|
+
async findVariantsByEntityId(entityId, _ctx) {
|
|
365
|
+
return [...this.variants.values()].filter((v) => v.entityId === entityId);
|
|
366
|
+
}
|
|
367
|
+
async findVariantById(id, _ctx) {
|
|
368
|
+
return this.variants.get(id);
|
|
369
|
+
}
|
|
370
|
+
async findVariantBySku(sku, _ctx) {
|
|
371
|
+
return [...this.variants.values()].find((v) => v.sku === sku);
|
|
372
|
+
}
|
|
373
|
+
async findVariantByBarcode(barcode, _ctx) {
|
|
374
|
+
return [...this.variants.values()].find((v) => v.barcode === barcode);
|
|
375
|
+
}
|
|
376
|
+
async createVariant(data, _ctx) {
|
|
377
|
+
if (data.sku != null) {
|
|
378
|
+
const duplicate = [...this.variants.values()].find((v) => v.sku === data.sku);
|
|
379
|
+
if (duplicate) {
|
|
380
|
+
throw new Error(`Variant with SKU "${data.sku}" already exists.`);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
const variant = {
|
|
384
|
+
id: data.id ?? makeId(),
|
|
385
|
+
entityId: data.entityId,
|
|
386
|
+
sku: data.sku ?? null,
|
|
387
|
+
barcode: data.barcode ?? null,
|
|
388
|
+
status: data.status ?? "active",
|
|
389
|
+
sortOrder: data.sortOrder ?? 0,
|
|
390
|
+
metadata: data.metadata ?? null,
|
|
391
|
+
};
|
|
392
|
+
this.variants.set(variant.id, variant);
|
|
393
|
+
return variant;
|
|
394
|
+
}
|
|
395
|
+
async updateVariant(id, data, _ctx) {
|
|
396
|
+
const existing = this.variants.get(id);
|
|
397
|
+
if (!existing)
|
|
398
|
+
return undefined;
|
|
399
|
+
const updated = {
|
|
400
|
+
id: existing.id,
|
|
401
|
+
entityId: existing.entityId,
|
|
402
|
+
sku: data.sku !== undefined ? (data.sku ?? null) : existing.sku,
|
|
403
|
+
barcode: data.barcode !== undefined ? (data.barcode ?? null) : existing.barcode,
|
|
404
|
+
status: data.status ?? existing.status,
|
|
405
|
+
sortOrder: data.sortOrder ?? existing.sortOrder,
|
|
406
|
+
metadata: data.metadata !== undefined
|
|
407
|
+
? (data.metadata ?? null)
|
|
408
|
+
: existing.metadata,
|
|
409
|
+
};
|
|
410
|
+
this.variants.set(id, updated);
|
|
411
|
+
return updated;
|
|
412
|
+
}
|
|
413
|
+
async deleteVariantsByEntityId(entityId, _ctx) {
|
|
414
|
+
for (const [id, v] of this.variants) {
|
|
415
|
+
if (v.entityId === entityId)
|
|
416
|
+
this.variants.delete(id);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
// Variant Option Values
|
|
420
|
+
async findVariantOptionValues(variantId, _ctx) {
|
|
421
|
+
return this.variantOptionValues.filter((vov) => vov.variantId === variantId);
|
|
422
|
+
}
|
|
423
|
+
async createVariantOptionValues(data, _ctx) {
|
|
424
|
+
for (const item of data) {
|
|
425
|
+
const exists = this.variantOptionValues.some((vov) => vov.variantId === item.variantId &&
|
|
426
|
+
vov.optionValueId === item.optionValueId);
|
|
427
|
+
if (!exists) {
|
|
428
|
+
this.variantOptionValues.push({
|
|
429
|
+
variantId: item.variantId,
|
|
430
|
+
optionValueId: item.optionValueId,
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
async deleteVariantOptionValuesByVariantId(variantId, _ctx) {
|
|
436
|
+
this.variantOptionValues = this.variantOptionValues.filter((vov) => vov.variantId !== variantId);
|
|
437
|
+
}
|
|
438
|
+
async deleteVariantOptionValuesByEntityId(entityId, _ctx) {
|
|
439
|
+
const entityVariantIds = new Set([...this.variants.values()]
|
|
440
|
+
.filter((v) => v.entityId === entityId)
|
|
441
|
+
.map((v) => v.id));
|
|
442
|
+
this.variantOptionValues = this.variantOptionValues.filter((vov) => !entityVariantIds.has(vov.variantId));
|
|
443
|
+
}
|
|
444
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { TxContext } from "../../../kernel/database/tx-context";
|
|
2
|
+
import type { DrizzleDatabase } from "../../../kernel/database/drizzle-db";
|
|
3
|
+
import { sellableEntities, sellableAttributes, sellableCustomFields, categories, entityCategories, brands, entityBrands, optionTypes, optionValues, variants, variantOptionValues } from "../schema";
|
|
4
|
+
export type SellableEntity = typeof sellableEntities.$inferSelect;
|
|
5
|
+
export type SellableEntityInsert = typeof sellableEntities.$inferInsert;
|
|
6
|
+
export type SellableAttribute = typeof sellableAttributes.$inferSelect;
|
|
7
|
+
export type SellableAttributeInsert = typeof sellableAttributes.$inferInsert;
|
|
8
|
+
export type SellableCustomField = typeof sellableCustomFields.$inferSelect;
|
|
9
|
+
export type SellableCustomFieldInsert = typeof sellableCustomFields.$inferInsert;
|
|
10
|
+
export type Category = typeof categories.$inferSelect;
|
|
11
|
+
export type CategoryInsert = typeof categories.$inferInsert;
|
|
12
|
+
export type EntityCategory = typeof entityCategories.$inferSelect;
|
|
13
|
+
export type EntityCategoryInsert = typeof entityCategories.$inferInsert;
|
|
14
|
+
export type Brand = typeof brands.$inferSelect;
|
|
15
|
+
export type BrandInsert = typeof brands.$inferInsert;
|
|
16
|
+
export type EntityBrand = typeof entityBrands.$inferSelect;
|
|
17
|
+
export type EntityBrandInsert = typeof entityBrands.$inferInsert;
|
|
18
|
+
export type OptionType = typeof optionTypes.$inferSelect;
|
|
19
|
+
export type OptionTypeInsert = typeof optionTypes.$inferInsert;
|
|
20
|
+
export type OptionValue = typeof optionValues.$inferSelect;
|
|
21
|
+
export type OptionValueInsert = typeof optionValues.$inferInsert;
|
|
22
|
+
export type Variant = typeof variants.$inferSelect;
|
|
23
|
+
export type VariantInsert = typeof variants.$inferInsert;
|
|
24
|
+
export type VariantOptionValue = typeof variantOptionValues.$inferSelect;
|
|
25
|
+
export type VariantOptionValueInsert = typeof variantOptionValues.$inferInsert;
|
|
26
|
+
/**
|
|
27
|
+
* CatalogRepository provides type-safe database operations for catalog entities.
|
|
28
|
+
*
|
|
29
|
+
* This repository uses Drizzle ORM with PostgresJsDatabase for full type inference.
|
|
30
|
+
* Transaction context is passed through TxContext when needed for transactional writes.
|
|
31
|
+
*
|
|
32
|
+
* All methods support an optional TxContext parameter for transaction participation.
|
|
33
|
+
* When ctx is provided, operations run within that transaction; otherwise they use the main db.
|
|
34
|
+
*/
|
|
35
|
+
export declare class CatalogRepository {
|
|
36
|
+
private readonly db;
|
|
37
|
+
constructor(db: DrizzleDatabase);
|
|
38
|
+
/**
|
|
39
|
+
* Returns the appropriate database context - either a transaction or the main db.
|
|
40
|
+
* Both DrizzleDatabase and DrizzleTx have the same query builder interface.
|
|
41
|
+
*/
|
|
42
|
+
private getDb;
|
|
43
|
+
findEntityById(id: string, ctx?: TxContext): Promise<SellableEntity | undefined>;
|
|
44
|
+
findEntityBySlug(orgId: string, slug: string, ctx?: TxContext): Promise<SellableEntity | undefined>;
|
|
45
|
+
findEntities(orgId: string, filter?: {
|
|
46
|
+
type?: string;
|
|
47
|
+
status?: string;
|
|
48
|
+
ids?: string[];
|
|
49
|
+
}, ctx?: TxContext): Promise<SellableEntity[]>;
|
|
50
|
+
createEntity(data: SellableEntityInsert, ctx?: TxContext): Promise<SellableEntity>;
|
|
51
|
+
updateEntity(id: string, data: Partial<Omit<SellableEntityInsert, "id">>, ctx?: TxContext): Promise<SellableEntity | undefined>;
|
|
52
|
+
deleteEntity(id: string, ctx?: TxContext): Promise<boolean>;
|
|
53
|
+
findAttributesByEntityId(entityId: string, ctx?: TxContext): Promise<SellableAttribute[]>;
|
|
54
|
+
findAttributeByLocale(entityId: string, locale: string, ctx?: TxContext): Promise<SellableAttribute | undefined>;
|
|
55
|
+
createAttribute(data: SellableAttributeInsert, ctx?: TxContext): Promise<SellableAttribute>;
|
|
56
|
+
updateAttribute(id: string, data: Partial<Omit<SellableAttributeInsert, "id">>, ctx?: TxContext): Promise<SellableAttribute | undefined>;
|
|
57
|
+
upsertAttribute(entityId: string, locale: string, data: Omit<SellableAttributeInsert, "entityId" | "locale">, ctx?: TxContext): Promise<SellableAttribute>;
|
|
58
|
+
deleteAttributesByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
59
|
+
findCustomFieldsByEntityId(entityId: string, ctx?: TxContext): Promise<SellableCustomField[]>;
|
|
60
|
+
createCustomField(data: SellableCustomFieldInsert, ctx?: TxContext): Promise<SellableCustomField>;
|
|
61
|
+
deleteCustomFieldsByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
62
|
+
findCategoryById(id: string, ctx?: TxContext): Promise<Category | undefined>;
|
|
63
|
+
findCategoryBySlug(orgId: string, slug: string, ctx?: TxContext): Promise<Category | undefined>;
|
|
64
|
+
findAllCategories(orgId: string, ctx?: TxContext): Promise<Category[]>;
|
|
65
|
+
createCategory(data: CategoryInsert, ctx?: TxContext): Promise<Category>;
|
|
66
|
+
updateCategory(id: string, data: Partial<Omit<CategoryInsert, "id">>, ctx?: TxContext): Promise<Category | undefined>;
|
|
67
|
+
deleteCategory(id: string, ctx?: TxContext): Promise<boolean>;
|
|
68
|
+
findEntityCategories(entityId: string, ctx?: TxContext): Promise<EntityCategory[]>;
|
|
69
|
+
findEntitiesByCategory(categoryId: string, ctx?: TxContext): Promise<string[]>;
|
|
70
|
+
addEntityToCategory(entityId: string, categoryId: string, sortOrder?: number, ctx?: TxContext): Promise<void>;
|
|
71
|
+
removeEntityFromCategory(entityId: string, categoryId: string, ctx?: TxContext): Promise<boolean>;
|
|
72
|
+
deleteEntityCategoriesByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
73
|
+
deleteEntityCategoriesByCategoryId(categoryId: string, ctx?: TxContext): Promise<void>;
|
|
74
|
+
findBrandById(id: string, ctx?: TxContext): Promise<Brand | undefined>;
|
|
75
|
+
findBrandBySlug(orgId: string, slug: string, ctx?: TxContext): Promise<Brand | undefined>;
|
|
76
|
+
findAllBrands(orgId: string, ctx?: TxContext): Promise<Brand[]>;
|
|
77
|
+
createBrand(data: BrandInsert, ctx?: TxContext): Promise<Brand>;
|
|
78
|
+
updateBrand(id: string, data: Partial<Omit<BrandInsert, "id">>, ctx?: TxContext): Promise<Brand | undefined>;
|
|
79
|
+
deleteBrand(id: string, ctx?: TxContext): Promise<boolean>;
|
|
80
|
+
findEntityBrands(entityId: string, ctx?: TxContext): Promise<EntityBrand[]>;
|
|
81
|
+
addEntityToBrand(entityId: string, brandId: string, sortOrder?: number, ctx?: TxContext): Promise<void>;
|
|
82
|
+
removeEntityFromBrand(entityId: string, brandId: string, ctx?: TxContext): Promise<boolean>;
|
|
83
|
+
deleteEntityBrandsByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
84
|
+
deleteEntityBrandsByBrandId(brandId: string, ctx?: TxContext): Promise<void>;
|
|
85
|
+
findOptionTypesByEntityId(entityId: string, ctx?: TxContext): Promise<OptionType[]>;
|
|
86
|
+
findOptionTypeById(id: string, ctx?: TxContext): Promise<OptionType | undefined>;
|
|
87
|
+
createOptionType(data: OptionTypeInsert, ctx?: TxContext): Promise<OptionType>;
|
|
88
|
+
deleteOptionTypesByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
89
|
+
findOptionValuesByTypeId(optionTypeId: string, ctx?: TxContext): Promise<OptionValue[]>;
|
|
90
|
+
findOptionValueById(id: string, ctx?: TxContext): Promise<OptionValue | undefined>;
|
|
91
|
+
findOptionValuesByIds(ids: string[], ctx?: TxContext): Promise<OptionValue[]>;
|
|
92
|
+
createOptionValue(data: OptionValueInsert, ctx?: TxContext): Promise<OptionValue>;
|
|
93
|
+
deleteOptionValuesByTypeId(optionTypeId: string, ctx?: TxContext): Promise<void>;
|
|
94
|
+
findVariantsByEntityId(entityId: string, ctx?: TxContext): Promise<Variant[]>;
|
|
95
|
+
findVariantById(id: string, ctx?: TxContext): Promise<Variant | undefined>;
|
|
96
|
+
findVariantBySku(sku: string, ctx?: TxContext): Promise<Variant | undefined>;
|
|
97
|
+
findVariantByBarcode(barcode: string, ctx?: TxContext): Promise<Variant | undefined>;
|
|
98
|
+
createVariant(data: VariantInsert, ctx?: TxContext): Promise<Variant>;
|
|
99
|
+
updateVariant(id: string, data: Partial<Omit<VariantInsert, "id">>, ctx?: TxContext): Promise<Variant | undefined>;
|
|
100
|
+
deleteVariantsByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
101
|
+
findVariantOptionValues(variantId: string, ctx?: TxContext): Promise<VariantOptionValue[]>;
|
|
102
|
+
createVariantOptionValues(data: VariantOptionValueInsert[], ctx?: TxContext): Promise<void>;
|
|
103
|
+
deleteVariantOptionValuesByVariantId(variantId: string, ctx?: TxContext): Promise<void>;
|
|
104
|
+
deleteVariantOptionValuesByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/repository/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,mBAAmB,EACpB,MAAM,WAAW,CAAC;AAGnB,M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