@shophost/rest-api 2.0.30 → 2.0.32
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/package.json +18 -13
- package/scripts/minify.mjs +123 -0
- package/src/app.js +1 -53
- package/src/core/auth/auth.schema.js +1 -41
- package/src/core/auth/auth.util.js +1 -44
- package/src/core/auth/better-auth.lib.js +1 -100
- package/src/core/auth/generate-password-hash.util.d.ts +0 -3
- package/src/core/auth/generate-password-hash.util.js +1 -30
- package/src/core/auth/headers.schema.js +1 -22
- package/src/core/auth/user.schema.js +1 -30
- package/src/core/db/__generated__/client/browser.d.ts +0 -128
- package/src/core/db/__generated__/client/browser.js +1 -18
- package/src/core/db/__generated__/client/client.d.ts +0 -143
- package/src/core/db/__generated__/client/client.js +1 -35
- package/src/core/db/__generated__/client/commonInputTypes.js +1 -11
- package/src/core/db/__generated__/client/enums.js +1 -200
- package/src/core/db/__generated__/client/internal/class.d.ts +0 -343
- package/src/core/db/__generated__/client/internal/class.js +1 -55
- package/src/core/db/__generated__/client/internal/prismaNamespace.d.ts +0 -234
- package/src/core/db/__generated__/client/internal/prismaNamespace.js +1 -541
- package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.d.ts +0 -15
- package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js +1 -512
- package/src/core/db/__generated__/client/models/Account.d.ts +0 -628
- package/src/core/db/__generated__/client/models/Account.js +1 -2
- package/src/core/db/__generated__/client/models/Address.d.ts +0 -701
- package/src/core/db/__generated__/client/models/Address.js +1 -2
- package/src/core/db/__generated__/client/models/Campaign.d.ts +0 -638
- package/src/core/db/__generated__/client/models/Campaign.js +1 -2
- package/src/core/db/__generated__/client/models/ClosingTimes.d.ts +0 -634
- package/src/core/db/__generated__/client/models/ClosingTimes.js +1 -2
- package/src/core/db/__generated__/client/models/File.d.ts +0 -752
- package/src/core/db/__generated__/client/models/File.js +1 -2
- package/src/core/db/__generated__/client/models/Invitation.d.ts +0 -628
- package/src/core/db/__generated__/client/models/Invitation.js +1 -2
- package/src/core/db/__generated__/client/models/LegalEntity.d.ts +0 -652
- package/src/core/db/__generated__/client/models/LegalEntity.js +1 -2
- package/src/core/db/__generated__/client/models/Manufacturer.d.ts +0 -679
- package/src/core/db/__generated__/client/models/Manufacturer.js +1 -2
- package/src/core/db/__generated__/client/models/ManufacturerTranslation.d.ts +0 -628
- package/src/core/db/__generated__/client/models/ManufacturerTranslation.js +1 -2
- package/src/core/db/__generated__/client/models/Member.d.ts +0 -628
- package/src/core/db/__generated__/client/models/Member.js +1 -2
- package/src/core/db/__generated__/client/models/Modifier.d.ts +0 -662
- package/src/core/db/__generated__/client/models/Modifier.js +1 -2
- package/src/core/db/__generated__/client/models/ModifierGroup.d.ts +0 -686
- package/src/core/db/__generated__/client/models/ModifierGroup.js +1 -2
- package/src/core/db/__generated__/client/models/ModifierGroupTranslation.d.ts +0 -628
- package/src/core/db/__generated__/client/models/ModifierGroupTranslation.js +1 -2
- package/src/core/db/__generated__/client/models/OpeningTimes.d.ts +0 -634
- package/src/core/db/__generated__/client/models/OpeningTimes.js +1 -2
- package/src/core/db/__generated__/client/models/Order.d.ts +0 -700
- package/src/core/db/__generated__/client/models/Order.js +1 -2
- package/src/core/db/__generated__/client/models/OrderItem.d.ts +0 -686
- package/src/core/db/__generated__/client/models/OrderItem.js +1 -2
- package/src/core/db/__generated__/client/models/OrderItemTranslation.d.ts +0 -628
- package/src/core/db/__generated__/client/models/OrderItemTranslation.js +1 -2
- package/src/core/db/__generated__/client/models/Organization.d.ts +0 -811
- package/src/core/db/__generated__/client/models/Organization.js +1 -2
- package/src/core/db/__generated__/client/models/OrganizationConfiguration.d.ts +0 -676
- package/src/core/db/__generated__/client/models/OrganizationConfiguration.js +1 -2
- package/src/core/db/__generated__/client/models/Payment.d.ts +0 -668
- package/src/core/db/__generated__/client/models/Payment.js +1 -2
- package/src/core/db/__generated__/client/models/PaymentSession.d.ts +0 -638
- package/src/core/db/__generated__/client/models/PaymentSession.js +1 -2
- package/src/core/db/__generated__/client/models/Product.d.ts +0 -746
- package/src/core/db/__generated__/client/models/Product.js +1 -2
- package/src/core/db/__generated__/client/models/ProductCategory.d.ts +0 -689
- package/src/core/db/__generated__/client/models/ProductCategory.js +1 -2
- package/src/core/db/__generated__/client/models/ProductCategoryTranslation.d.ts +0 -628
- package/src/core/db/__generated__/client/models/ProductCategoryTranslation.js +1 -2
- package/src/core/db/__generated__/client/models/ProductSnapshot.d.ts +0 -664
- package/src/core/db/__generated__/client/models/ProductSnapshot.js +1 -2
- package/src/core/db/__generated__/client/models/ProductTranslation.d.ts +0 -628
- package/src/core/db/__generated__/client/models/ProductTranslation.js +1 -2
- package/src/core/db/__generated__/client/models/Reservation.d.ts +0 -650
- package/src/core/db/__generated__/client/models/Reservation.js +1 -2
- package/src/core/db/__generated__/client/models/Session.d.ts +0 -628
- package/src/core/db/__generated__/client/models/Session.js +1 -2
- package/src/core/db/__generated__/client/models/ShippingMethod.d.ts +0 -679
- package/src/core/db/__generated__/client/models/ShippingMethod.js +1 -2
- package/src/core/db/__generated__/client/models/ShippingZone.d.ts +0 -638
- package/src/core/db/__generated__/client/models/ShippingZone.js +1 -2
- package/src/core/db/__generated__/client/models/User.d.ts +0 -736
- package/src/core/db/__generated__/client/models/User.js +1 -2
- package/src/core/db/__generated__/client/models/Verification.d.ts +0 -592
- package/src/core/db/__generated__/client/models/Verification.js +1 -2
- package/src/core/db/__generated__/client/models.js +1 -2
- package/src/core/db/index.js +1 -2
- package/src/core/exceptions/http-exception.js +1 -9
- package/src/core/hono/hono.js +1 -123
- package/src/core/lib/prisma.d.ts +9 -1
- package/src/core/lib/prisma.js +1 -11
- package/src/core/logging/pino.js +1 -5
- package/src/core/notifications/email.service.d.ts +0 -15
- package/src/core/notifications/email.service.js +1 -116
- package/src/core/openapi/openapi.lib.js +1 -26
- package/src/core/types/google-maps.types.js +1 -2
- package/src/core/utils/currency.util.js +1 -11
- package/src/core/utils/env.util.js +1 -8
- package/src/core/utils/object.util.d.ts +0 -10
- package/src/core/utils/object.util.js +1 -39
- package/src/core/utils/translations.util.js +0 -2
- package/src/core/utils/zod.util.d.ts +0 -12
- package/src/core/utils/zod.util.js +1 -85
- package/src/db.js +1 -3
- package/src/features/access/access.handler.js +1 -91
- package/src/features/access/access.route.js +1 -220
- package/src/features/access/access.schema.js +1 -108
- package/src/features/access/access.service.js +1 -294
- package/src/features/cart/cart.handler.js +1 -17
- package/src/features/cart/cart.route.js +1 -32
- package/src/features/cart/cart.schema.js +1 -39
- package/src/features/cart/cart.service.d.ts +0 -7
- package/src/features/cart/cart.service.js +1 -97
- package/src/features/cart/cart.util.js +1 -76
- package/src/features/file/file.handler.js +1 -23
- package/src/features/file/file.route.js +1 -34
- package/src/features/file/file.schema.js +1 -77
- package/src/features/file/file.service.d.ts +0 -6
- package/src/features/file/file.service.js +1 -66
- package/src/features/health/health.handler.js +1 -10
- package/src/features/health/health.route.js +1 -25
- package/src/features/index.js +1 -16
- package/src/features/location/location.handler.js +1 -25
- package/src/features/location/location.route.js +1 -56
- package/src/features/location/location.schema.js +1 -50
- package/src/features/location/location.service.d.ts +0 -3
- package/src/features/location/location.service.js +1 -141
- package/src/features/manufacturer/manufacturer.handler.js +1 -53
- package/src/features/manufacturer/manufacturer.route.js +1 -97
- package/src/features/manufacturer/manufacturer.schema.js +1 -125
- package/src/features/manufacturer/manufacturer.service.d.ts +0 -19
- package/src/features/manufacturer/manufacturer.service.js +1 -190
- package/src/features/order/emails/order-confirmation.email.js +1 -229
- package/src/features/order/emails/order-notification.email.js +1 -229
- package/src/features/order/fulfilment.schema.js +1 -3
- package/src/features/order/order.handler.js +1 -54
- package/src/features/order/order.route.js +1 -111
- package/src/features/order/order.schema.js +1 -158
- package/src/features/order/order.service.d.ts +0 -15
- package/src/features/order/order.service.js +1 -306
- package/src/features/order/recipient.schema.js +1 -38
- package/src/features/organization/legal-entity.schema.js +1 -83
- package/src/features/organization/organization-configuration.schema.js +1 -115
- package/src/features/organization/organization.handler.js +1 -48
- package/src/features/organization/organization.route.js +1 -84
- package/src/features/organization/organization.schema.js +1 -64
- package/src/features/organization/organization.service.d.ts +0 -15
- package/src/features/organization/organization.service.js +1 -334
- package/src/features/payment/payment.handler.js +1 -16
- package/src/features/payment/payment.route.js +1 -22
- package/src/features/payment/payment.schema.js +1 -46
- package/src/features/payment/payment.service.js +1 -100
- package/src/features/payment/stripe.service.js +1 -164
- package/src/features/product/product-modifier.schema.js +1 -84
- package/src/features/product/product.handler.js +1 -87
- package/src/features/product/product.route.js +1 -179
- package/src/features/product/product.schema.js +1 -143
- package/src/features/product/product.service.d.ts +0 -25
- package/src/features/product/product.service.js +1 -440
- package/src/features/product-category/product-category.handler.js +1 -59
- package/src/features/product-category/product-category.route.js +1 -139
- package/src/features/product-category/product-category.schema.js +1 -86
- package/src/features/product-category/product-category.service.d.ts +0 -22
- package/src/features/product-category/product-category.service.js +1 -220
- package/src/features/reservation/emails/reservation-cancellation.email.js +1 -82
- package/src/features/reservation/emails/reservation-confirmation.email.js +1 -82
- package/src/features/reservation/emails/reservation-notification.email.js +1 -93
- package/src/features/reservation/reservation.handler.js +1 -65
- package/src/features/reservation/reservation.route.js +1 -167
- package/src/features/reservation/reservation.schema.js +1 -51
- package/src/features/reservation/reservation.service.d.ts +0 -18
- package/src/features/reservation/reservation.service.js +1 -231
- package/src/features/shipping/shipping.handler.js +1 -32
- package/src/features/shipping/shipping.route.js +1 -51
- package/src/features/shipping/shipping.service.d.ts +0 -7
- package/src/features/shipping/shipping.service.js +1 -96
- package/src/features/shipping-method/shipping-method.handler.js +1 -60
- package/src/features/shipping-method/shipping-method.route.js +1 -144
- package/src/features/shipping-method/shipping-method.schema.js +1 -48
- package/src/features/shipping-method/shipping-method.service.d.ts +0 -25
- package/src/features/shipping-method/shipping-method.service.js +1 -229
- package/src/features/shipping-method/shipping-zone.schema.js +1 -31
- package/src/features/webhook/webhook.handler.js +1 -50
- package/src/features/webhook/webhook.route.js +1 -33
- package/src/index.js +1 -6
- package/src/integrations/next.js +1 -82
- package/src/schemas/address.schema.d.ts +0 -8
- package/src/schemas/address.schema.js +1 -112
- package/src/schemas/currency.schema.d.ts +0 -42
- package/src/schemas/currency.schema.js +1 -118
- package/src/schemas/error.schema.js +1 -12
- package/src/schemas/index.js +1 -29
- package/src/schemas/locales.schema.js +1 -238
- package/src/schemas/number.schema.js +1 -29
- package/src/schemas/pagination.schema.js +1 -54
- package/src/schemas/params.schema.js +1 -20
- package/src/schemas/queries.schema.js +1 -6
- package/src/test/global-setup.d.ts +1 -0
- package/src/test/global-setup.js +1 -0
- package/src/test/integration/api-fixtures.d.ts +4 -16
- package/src/test/integration/api-fixtures.js +1 -225
- package/src/test/integration/seed.d.ts +81 -0
- package/src/test/integration/seed.js +1 -0
- package/src/test/integration/test-helpers.d.ts +107 -924
- package/src/test/integration/test-helpers.js +1 -1100
- package/src/test/setup-test-env.d.ts +1 -1
- package/src/test/setup-test-env.js +1 -29
- package/src/app.js.map +0 -1
- package/src/core/auth/auth.schema.js.map +0 -1
- package/src/core/auth/auth.util.js.map +0 -1
- package/src/core/auth/better-auth.lib.js.map +0 -1
- package/src/core/auth/generate-password-hash.util.js.map +0 -1
- package/src/core/auth/headers.schema.js.map +0 -1
- package/src/core/auth/user.schema.js.map +0 -1
- package/src/core/db/__generated__/client/browser.js.map +0 -1
- package/src/core/db/__generated__/client/client.js.map +0 -1
- package/src/core/db/__generated__/client/commonInputTypes.js.map +0 -1
- package/src/core/db/__generated__/client/enums.js.map +0 -1
- package/src/core/db/__generated__/client/internal/class.js.map +0 -1
- package/src/core/db/__generated__/client/internal/prismaNamespace.js.map +0 -1
- package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js.map +0 -1
- package/src/core/db/__generated__/client/models/Account.js.map +0 -1
- package/src/core/db/__generated__/client/models/Address.js.map +0 -1
- package/src/core/db/__generated__/client/models/Campaign.js.map +0 -1
- package/src/core/db/__generated__/client/models/ClosingTimes.js.map +0 -1
- package/src/core/db/__generated__/client/models/File.js.map +0 -1
- package/src/core/db/__generated__/client/models/Invitation.js.map +0 -1
- package/src/core/db/__generated__/client/models/LegalEntity.js.map +0 -1
- package/src/core/db/__generated__/client/models/Manufacturer.js.map +0 -1
- package/src/core/db/__generated__/client/models/ManufacturerTranslation.js.map +0 -1
- package/src/core/db/__generated__/client/models/Member.js.map +0 -1
- package/src/core/db/__generated__/client/models/Modifier.js.map +0 -1
- package/src/core/db/__generated__/client/models/ModifierGroup.js.map +0 -1
- package/src/core/db/__generated__/client/models/ModifierGroupTranslation.js.map +0 -1
- package/src/core/db/__generated__/client/models/OpeningTimes.js.map +0 -1
- package/src/core/db/__generated__/client/models/Order.js.map +0 -1
- package/src/core/db/__generated__/client/models/OrderItem.js.map +0 -1
- package/src/core/db/__generated__/client/models/OrderItemTranslation.js.map +0 -1
- package/src/core/db/__generated__/client/models/Organization.js.map +0 -1
- package/src/core/db/__generated__/client/models/OrganizationConfiguration.js.map +0 -1
- package/src/core/db/__generated__/client/models/Payment.js.map +0 -1
- package/src/core/db/__generated__/client/models/PaymentSession.js.map +0 -1
- package/src/core/db/__generated__/client/models/Product.js.map +0 -1
- package/src/core/db/__generated__/client/models/ProductCategory.js.map +0 -1
- package/src/core/db/__generated__/client/models/ProductCategoryTranslation.js.map +0 -1
- package/src/core/db/__generated__/client/models/ProductSnapshot.js.map +0 -1
- package/src/core/db/__generated__/client/models/ProductTranslation.js.map +0 -1
- package/src/core/db/__generated__/client/models/Reservation.js.map +0 -1
- package/src/core/db/__generated__/client/models/Session.js.map +0 -1
- package/src/core/db/__generated__/client/models/ShippingMethod.js.map +0 -1
- package/src/core/db/__generated__/client/models/ShippingZone.js.map +0 -1
- package/src/core/db/__generated__/client/models/User.js.map +0 -1
- package/src/core/db/__generated__/client/models/Verification.js.map +0 -1
- package/src/core/db/__generated__/client/models.js.map +0 -1
- package/src/core/db/index.js.map +0 -1
- package/src/core/exceptions/http-exception.js.map +0 -1
- package/src/core/hono/hono.js.map +0 -1
- package/src/core/lib/prisma.js.map +0 -1
- package/src/core/logging/pino.js.map +0 -1
- package/src/core/notifications/email.service.js.map +0 -1
- package/src/core/openapi/openapi.lib.js.map +0 -1
- package/src/core/types/google-maps.types.js.map +0 -1
- package/src/core/utils/currency.util.js.map +0 -1
- package/src/core/utils/env.util.js.map +0 -1
- package/src/core/utils/object.util.js.map +0 -1
- package/src/core/utils/translations.util.js.map +0 -1
- package/src/core/utils/zod.util.js.map +0 -1
- package/src/db.js.map +0 -1
- package/src/features/access/access.handler.js.map +0 -1
- package/src/features/access/access.route.js.map +0 -1
- package/src/features/access/access.schema.js.map +0 -1
- package/src/features/access/access.service.js.map +0 -1
- package/src/features/cart/cart.handler.js.map +0 -1
- package/src/features/cart/cart.route.js.map +0 -1
- package/src/features/cart/cart.schema.js.map +0 -1
- package/src/features/cart/cart.service.js.map +0 -1
- package/src/features/cart/cart.util.js.map +0 -1
- package/src/features/file/file.handler.js.map +0 -1
- package/src/features/file/file.route.js.map +0 -1
- package/src/features/file/file.schema.js.map +0 -1
- package/src/features/file/file.service.js.map +0 -1
- package/src/features/health/health.handler.js.map +0 -1
- package/src/features/health/health.route.js.map +0 -1
- package/src/features/index.js.map +0 -1
- package/src/features/location/location.handler.js.map +0 -1
- package/src/features/location/location.route.js.map +0 -1
- package/src/features/location/location.schema.js.map +0 -1
- package/src/features/location/location.service.js.map +0 -1
- package/src/features/manufacturer/manufacturer.handler.js.map +0 -1
- package/src/features/manufacturer/manufacturer.route.js.map +0 -1
- package/src/features/manufacturer/manufacturer.schema.js.map +0 -1
- package/src/features/manufacturer/manufacturer.service.js.map +0 -1
- package/src/features/order/emails/order-confirmation.email.js.map +0 -1
- package/src/features/order/emails/order-notification.email.js.map +0 -1
- package/src/features/order/fulfilment.schema.js.map +0 -1
- package/src/features/order/order.handler.js.map +0 -1
- package/src/features/order/order.route.js.map +0 -1
- package/src/features/order/order.schema.js.map +0 -1
- package/src/features/order/order.service.js.map +0 -1
- package/src/features/order/recipient.schema.js.map +0 -1
- package/src/features/organization/legal-entity.schema.js.map +0 -1
- package/src/features/organization/organization-configuration.schema.js.map +0 -1
- package/src/features/organization/organization.handler.js.map +0 -1
- package/src/features/organization/organization.route.js.map +0 -1
- package/src/features/organization/organization.schema.js.map +0 -1
- package/src/features/organization/organization.service.js.map +0 -1
- package/src/features/payment/payment.handler.js.map +0 -1
- package/src/features/payment/payment.route.js.map +0 -1
- package/src/features/payment/payment.schema.js.map +0 -1
- package/src/features/payment/payment.service.js.map +0 -1
- package/src/features/payment/stripe.service.js.map +0 -1
- package/src/features/product/product-modifier.schema.js.map +0 -1
- package/src/features/product/product.handler.js.map +0 -1
- package/src/features/product/product.route.js.map +0 -1
- package/src/features/product/product.schema.js.map +0 -1
- package/src/features/product/product.service.js.map +0 -1
- package/src/features/product-category/product-category.handler.js.map +0 -1
- package/src/features/product-category/product-category.route.js.map +0 -1
- package/src/features/product-category/product-category.schema.js.map +0 -1
- package/src/features/product-category/product-category.service.js.map +0 -1
- package/src/features/reservation/emails/reservation-cancellation.email.js.map +0 -1
- package/src/features/reservation/emails/reservation-confirmation.email.js.map +0 -1
- package/src/features/reservation/emails/reservation-notification.email.js.map +0 -1
- package/src/features/reservation/reservation.handler.js.map +0 -1
- package/src/features/reservation/reservation.route.js.map +0 -1
- package/src/features/reservation/reservation.schema.js.map +0 -1
- package/src/features/reservation/reservation.service.js.map +0 -1
- package/src/features/shipping/shipping.handler.js.map +0 -1
- package/src/features/shipping/shipping.route.js.map +0 -1
- package/src/features/shipping/shipping.service.js.map +0 -1
- package/src/features/shipping-method/shipping-method.handler.js.map +0 -1
- package/src/features/shipping-method/shipping-method.route.js.map +0 -1
- package/src/features/shipping-method/shipping-method.schema.js.map +0 -1
- package/src/features/shipping-method/shipping-method.service.js.map +0 -1
- package/src/features/shipping-method/shipping-zone.schema.js.map +0 -1
- package/src/features/webhook/webhook.handler.js.map +0 -1
- package/src/features/webhook/webhook.route.js.map +0 -1
- package/src/index.js.map +0 -1
- package/src/integrations/next.js.map +0 -1
- package/src/schemas/address.schema.js.map +0 -1
- package/src/schemas/currency.schema.js.map +0 -1
- package/src/schemas/error.schema.js.map +0 -1
- package/src/schemas/index.js.map +0 -1
- package/src/schemas/locales.schema.js.map +0 -1
- package/src/schemas/number.schema.js.map +0 -1
- package/src/schemas/pagination.schema.js.map +0 -1
- package/src/schemas/params.schema.js.map +0 -1
- package/src/schemas/queries.schema.js.map +0 -1
- package/src/test/integration/api-fixtures.js.map +0 -1
- package/src/test/integration/test-helpers.js.map +0 -1
- package/src/test/setup-test-env.js.map +0 -1
|
@@ -1,238 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const localeMap = new Map([
|
|
3
|
-
["af", "Afrikaans"],
|
|
4
|
-
["sq", "Albanian"],
|
|
5
|
-
["ar_dz", "Arabic (Algeria)"],
|
|
6
|
-
["ar_bh", "Arabic (Bahrain)"],
|
|
7
|
-
["ar_eg", "Arabic (Egypt)"],
|
|
8
|
-
["ar_iq", "Arabic (Iraq)"],
|
|
9
|
-
["ar_jo", "Arabic (Jordan)"],
|
|
10
|
-
["ar_kw", "Arabic (Kuwait)"],
|
|
11
|
-
["ar_lb", "Arabic (Lebanon)"],
|
|
12
|
-
["ar_ly", "Arabic (Libya)"],
|
|
13
|
-
["ar_ma", "Arabic (Morocco)"],
|
|
14
|
-
["ar_om", "Arabic (Oman)"],
|
|
15
|
-
["ar_qa", "Arabic (Qatar)"],
|
|
16
|
-
["ar_sa", "Arabic (Saudi Arabia)"],
|
|
17
|
-
["ar_sy", "Arabic (Syria)"],
|
|
18
|
-
["ar_tn", "Arabic (Tunisia)"],
|
|
19
|
-
["ar_ae", "Arabic (U.A.E.)"],
|
|
20
|
-
["ar_ye", "Arabic (Yemen)"],
|
|
21
|
-
["eu", "Basque"],
|
|
22
|
-
["be", "Belarusian"],
|
|
23
|
-
["bg", "Bulgarian"],
|
|
24
|
-
["ca", "Catalan"],
|
|
25
|
-
["zh_hk", "Chinese (Hong Kong)"],
|
|
26
|
-
["zh_cn", "Chinese (PRC)"],
|
|
27
|
-
["zh_sg", "Chinese (Singapore)"],
|
|
28
|
-
["zh_tw", "Chinese (Taiwan)"],
|
|
29
|
-
["hr", "Croatian"],
|
|
30
|
-
["cs", "Czech"],
|
|
31
|
-
["da", "Danish"],
|
|
32
|
-
["nl_be", "Dutch (Belgium)"],
|
|
33
|
-
["nl", "Dutch (Standard)"],
|
|
34
|
-
["en", "English"],
|
|
35
|
-
["en_au", "English (Australia)"],
|
|
36
|
-
["en_bz", "English (Belize)"],
|
|
37
|
-
["en_ca", "English (Canada)"],
|
|
38
|
-
["en_ie", "English (Ireland)"],
|
|
39
|
-
["en_jm", "English (Jamaica)"],
|
|
40
|
-
["en_nz", "English (New Zealand)"],
|
|
41
|
-
["en_za", "English (South Africa)"],
|
|
42
|
-
["en_tt", "English (Trinidad)"],
|
|
43
|
-
["en_gb", "English (United Kingdom)"],
|
|
44
|
-
["en_us", "English (United States)"],
|
|
45
|
-
["et", "Estonian"],
|
|
46
|
-
["fo", "Faeroese"],
|
|
47
|
-
["fa", "Farsi"],
|
|
48
|
-
["fi", "Finnish"],
|
|
49
|
-
["fr_be", "French (Belgium)"],
|
|
50
|
-
["fr_ca", "French (Canada)"],
|
|
51
|
-
["fr_lu", "French (Luxembourg)"],
|
|
52
|
-
["fr", "French (Standard)"],
|
|
53
|
-
["fr_ch", "French (Switzerland)"],
|
|
54
|
-
["gd", "Gaelic (Scotland)"],
|
|
55
|
-
["de_at", "German (Austria)"],
|
|
56
|
-
["de_li", "German (Liechtenstein)"],
|
|
57
|
-
["de_lu", "German (Luxembourg)"],
|
|
58
|
-
["de", "German (Standard)"],
|
|
59
|
-
["de_ch", "German (Switzerland)"],
|
|
60
|
-
["el", "Greek"],
|
|
61
|
-
["he", "Hebrew"],
|
|
62
|
-
["hi", "Hindi"],
|
|
63
|
-
["hu", "Hungarian"],
|
|
64
|
-
["is", "Icelandic"],
|
|
65
|
-
["id", "Indonesian"],
|
|
66
|
-
["ga", "Irish"],
|
|
67
|
-
["it", "Italian (Standard)"],
|
|
68
|
-
["it_ch", "Italian (Switzerland)"],
|
|
69
|
-
["ja", "Japanese"],
|
|
70
|
-
["ko", "Korean"],
|
|
71
|
-
["ku", "Kurdish"],
|
|
72
|
-
["lv", "Latvian"],
|
|
73
|
-
["lt", "Lithuanian"],
|
|
74
|
-
["mk", "Macedonian (FYROM)"],
|
|
75
|
-
["ml", "Malayalam"],
|
|
76
|
-
["ms", "Malaysian"],
|
|
77
|
-
["mt", "Maltese"],
|
|
78
|
-
["no", "Norwegian"],
|
|
79
|
-
["nb", "Norwegian (Bokmål)"],
|
|
80
|
-
["nn", "Norwegian (Nynorsk)"],
|
|
81
|
-
["pl", "Polish"],
|
|
82
|
-
["pt_br", "Portuguese (Brazil)"],
|
|
83
|
-
["pt", "Portuguese (Portugal)"],
|
|
84
|
-
["pa", "Punjabi"],
|
|
85
|
-
["rm", "Rhaeto-Romanic"],
|
|
86
|
-
["ro", "Romanian"],
|
|
87
|
-
["ro_md", "Romanian (Republic of Moldova)"],
|
|
88
|
-
["ru", "Russian"],
|
|
89
|
-
["ru_md", "Russian (Republic of Moldova)"],
|
|
90
|
-
["sr", "Serbian"],
|
|
91
|
-
["sk", "Slovak"],
|
|
92
|
-
["sl", "Slovenian"],
|
|
93
|
-
["sb", "Sorbian"],
|
|
94
|
-
["es_ar", "Spanish (Argentina)"],
|
|
95
|
-
["es_bo", "Spanish (Bolivia)"],
|
|
96
|
-
["es_cl", "Spanish (Chile)"],
|
|
97
|
-
["es_co", "Spanish (Colombia)"],
|
|
98
|
-
["es_cr", "Spanish (Costa Rica)"],
|
|
99
|
-
["es_do", "Spanish (Dominican Republic)"],
|
|
100
|
-
["es_ec", "Spanish (Ecuador)"],
|
|
101
|
-
["es_sv", "Spanish (El Salvador)"],
|
|
102
|
-
["es_gt", "Spanish (Guatemala)"],
|
|
103
|
-
["es_hn", "Spanish (Honduras)"],
|
|
104
|
-
["es_mx", "Spanish (Mexico)"],
|
|
105
|
-
["es", "Spanish (Spain)"],
|
|
106
|
-
["sv", "Swedish"],
|
|
107
|
-
["sv_fi", "Swedish (Finland)"],
|
|
108
|
-
["th", "Thai"],
|
|
109
|
-
["tr", "Turkish"],
|
|
110
|
-
["uk", "Ukrainian"],
|
|
111
|
-
["ur", "Urdu"],
|
|
112
|
-
["vi", "Vietnamese"],
|
|
113
|
-
["cy", "Welsh"],
|
|
114
|
-
["ji", "Yiddish"],
|
|
115
|
-
["zu", "Zulu"],
|
|
116
|
-
]);
|
|
117
|
-
export const localeOptions = Array.from(localeMap.entries()).map(([value, label]) => ({ value, label }));
|
|
118
|
-
export const locale = z
|
|
119
|
-
.enum([
|
|
120
|
-
"af",
|
|
121
|
-
"sq",
|
|
122
|
-
"ar_dz",
|
|
123
|
-
"ar_bh",
|
|
124
|
-
"ar_eg",
|
|
125
|
-
"ar_iq",
|
|
126
|
-
"ar_jo",
|
|
127
|
-
"ar_kw",
|
|
128
|
-
"ar_lb",
|
|
129
|
-
"ar_ly",
|
|
130
|
-
"ar_ma",
|
|
131
|
-
"ar_om",
|
|
132
|
-
"ar_qa",
|
|
133
|
-
"ar_sa",
|
|
134
|
-
"ar_sy",
|
|
135
|
-
"ar_tn",
|
|
136
|
-
"ar_ae",
|
|
137
|
-
"ar_ye",
|
|
138
|
-
"eu",
|
|
139
|
-
"be",
|
|
140
|
-
"bg",
|
|
141
|
-
"ca",
|
|
142
|
-
"zh_hk",
|
|
143
|
-
"zh_cn",
|
|
144
|
-
"zh_sg",
|
|
145
|
-
"zh_tw",
|
|
146
|
-
"hr",
|
|
147
|
-
"cs",
|
|
148
|
-
"da",
|
|
149
|
-
"nl_be",
|
|
150
|
-
"nl",
|
|
151
|
-
"en",
|
|
152
|
-
"en_au",
|
|
153
|
-
"en_bz",
|
|
154
|
-
"en_ca",
|
|
155
|
-
"en_ie",
|
|
156
|
-
"en_jm",
|
|
157
|
-
"en_nz",
|
|
158
|
-
"en_za",
|
|
159
|
-
"en_tt",
|
|
160
|
-
"en_gb",
|
|
161
|
-
"en_us",
|
|
162
|
-
"et",
|
|
163
|
-
"fo",
|
|
164
|
-
"fa",
|
|
165
|
-
"fi",
|
|
166
|
-
"fr_be",
|
|
167
|
-
"fr_ca",
|
|
168
|
-
"fr_lu",
|
|
169
|
-
"fr",
|
|
170
|
-
"fr_ch",
|
|
171
|
-
"gd",
|
|
172
|
-
"de_at",
|
|
173
|
-
"de_li",
|
|
174
|
-
"de_lu",
|
|
175
|
-
"de",
|
|
176
|
-
"de_ch",
|
|
177
|
-
"el",
|
|
178
|
-
"he",
|
|
179
|
-
"hi",
|
|
180
|
-
"hu",
|
|
181
|
-
"is",
|
|
182
|
-
"id",
|
|
183
|
-
"ga",
|
|
184
|
-
"it",
|
|
185
|
-
"it_ch",
|
|
186
|
-
"ja",
|
|
187
|
-
"ko",
|
|
188
|
-
"ku",
|
|
189
|
-
"lv",
|
|
190
|
-
"lt",
|
|
191
|
-
"mk",
|
|
192
|
-
"ml",
|
|
193
|
-
"ms",
|
|
194
|
-
"mt",
|
|
195
|
-
"no",
|
|
196
|
-
"nb",
|
|
197
|
-
"nn",
|
|
198
|
-
"pl",
|
|
199
|
-
"pt_br",
|
|
200
|
-
"pt",
|
|
201
|
-
"pa",
|
|
202
|
-
"rm",
|
|
203
|
-
"ro",
|
|
204
|
-
"ro_md",
|
|
205
|
-
"ru",
|
|
206
|
-
"ru_md",
|
|
207
|
-
"sr",
|
|
208
|
-
"sk",
|
|
209
|
-
"sl",
|
|
210
|
-
"sb",
|
|
211
|
-
"es_ar",
|
|
212
|
-
"es_bo",
|
|
213
|
-
"es_cl",
|
|
214
|
-
"es_co",
|
|
215
|
-
"es_cr",
|
|
216
|
-
"es_do",
|
|
217
|
-
"es_ec",
|
|
218
|
-
"es_sv",
|
|
219
|
-
"es_gt",
|
|
220
|
-
"es_hn",
|
|
221
|
-
"es_mx",
|
|
222
|
-
"es",
|
|
223
|
-
"sv",
|
|
224
|
-
"sv_fi",
|
|
225
|
-
"th",
|
|
226
|
-
"tr",
|
|
227
|
-
"uk",
|
|
228
|
-
"ur",
|
|
229
|
-
"vi",
|
|
230
|
-
"cy",
|
|
231
|
-
"ji",
|
|
232
|
-
"zu",
|
|
233
|
-
])
|
|
234
|
-
.openapi({
|
|
235
|
-
description: "Enum for locale values",
|
|
236
|
-
example: "en",
|
|
237
|
-
});
|
|
238
|
-
//# sourceMappingURL=locales.schema.js.map
|
|
1
|
+
import{z as a}from"@hono/zod-openapi";export const localeMap=new Map([["af","Afrikaans"],["sq","Albanian"],["ar_dz","Arabic (Algeria)"],["ar_bh","Arabic (Bahrain)"],["ar_eg","Arabic (Egypt)"],["ar_iq","Arabic (Iraq)"],["ar_jo","Arabic (Jordan)"],["ar_kw","Arabic (Kuwait)"],["ar_lb","Arabic (Lebanon)"],["ar_ly","Arabic (Libya)"],["ar_ma","Arabic (Morocco)"],["ar_om","Arabic (Oman)"],["ar_qa","Arabic (Qatar)"],["ar_sa","Arabic (Saudi Arabia)"],["ar_sy","Arabic (Syria)"],["ar_tn","Arabic (Tunisia)"],["ar_ae","Arabic (U.A.E.)"],["ar_ye","Arabic (Yemen)"],["eu","Basque"],["be","Belarusian"],["bg","Bulgarian"],["ca","Catalan"],["zh_hk","Chinese (Hong Kong)"],["zh_cn","Chinese (PRC)"],["zh_sg","Chinese (Singapore)"],["zh_tw","Chinese (Taiwan)"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl_be","Dutch (Belgium)"],["nl","Dutch (Standard)"],["en","English"],["en_au","English (Australia)"],["en_bz","English (Belize)"],["en_ca","English (Canada)"],["en_ie","English (Ireland)"],["en_jm","English (Jamaica)"],["en_nz","English (New Zealand)"],["en_za","English (South Africa)"],["en_tt","English (Trinidad)"],["en_gb","English (United Kingdom)"],["en_us","English (United States)"],["et","Estonian"],["fo","Faeroese"],["fa","Farsi"],["fi","Finnish"],["fr_be","French (Belgium)"],["fr_ca","French (Canada)"],["fr_lu","French (Luxembourg)"],["fr","French (Standard)"],["fr_ch","French (Switzerland)"],["gd","Gaelic (Scotland)"],["de_at","German (Austria)"],["de_li","German (Liechtenstein)"],["de_lu","German (Luxembourg)"],["de","German (Standard)"],["de_ch","German (Switzerland)"],["el","Greek"],["he","Hebrew"],["hi","Hindi"],["hu","Hungarian"],["is","Icelandic"],["id","Indonesian"],["ga","Irish"],["it","Italian (Standard)"],["it_ch","Italian (Switzerland)"],["ja","Japanese"],["ko","Korean"],["ku","Kurdish"],["lv","Latvian"],["lt","Lithuanian"],["mk","Macedonian (FYROM)"],["ml","Malayalam"],["ms","Malaysian"],["mt","Maltese"],["no","Norwegian"],["nb","Norwegian (Bokmål)"],["nn","Norwegian (Nynorsk)"],["pl","Polish"],["pt_br","Portuguese (Brazil)"],["pt","Portuguese (Portugal)"],["pa","Punjabi"],["rm","Rhaeto-Romanic"],["ro","Romanian"],["ro_md","Romanian (Republic of Moldova)"],["ru","Russian"],["ru_md","Russian (Republic of Moldova)"],["sr","Serbian"],["sk","Slovak"],["sl","Slovenian"],["sb","Sorbian"],["es_ar","Spanish (Argentina)"],["es_bo","Spanish (Bolivia)"],["es_cl","Spanish (Chile)"],["es_co","Spanish (Colombia)"],["es_cr","Spanish (Costa Rica)"],["es_do","Spanish (Dominican Republic)"],["es_ec","Spanish (Ecuador)"],["es_sv","Spanish (El Salvador)"],["es_gt","Spanish (Guatemala)"],["es_hn","Spanish (Honduras)"],["es_mx","Spanish (Mexico)"],["es","Spanish (Spain)"],["sv","Swedish"],["sv_fi","Swedish (Finland)"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["ur","Urdu"],["vi","Vietnamese"],["cy","Welsh"],["ji","Yiddish"],["zu","Zulu"]]);export const localeOptions=Array.from(localeMap.entries()).map(([a,e])=>({value:a,label:e}));export const locale=a.enum(["af","sq","ar_dz","ar_bh","ar_eg","ar_iq","ar_jo","ar_kw","ar_lb","ar_ly","ar_ma","ar_om","ar_qa","ar_sa","ar_sy","ar_tn","ar_ae","ar_ye","eu","be","bg","ca","zh_hk","zh_cn","zh_sg","zh_tw","hr","cs","da","nl_be","nl","en","en_au","en_bz","en_ca","en_ie","en_jm","en_nz","en_za","en_tt","en_gb","en_us","et","fo","fa","fi","fr_be","fr_ca","fr_lu","fr","fr_ch","gd","de_at","de_li","de_lu","de","de_ch","el","he","hi","hu","is","id","ga","it","it_ch","ja","ko","ku","lv","lt","mk","ml","ms","mt","no","nb","nn","pl","pt_br","pt","pa","rm","ro","ro_md","ru","ru_md","sr","sk","sl","sb","es_ar","es_bo","es_cl","es_co","es_cr","es_do","es_ec","es_sv","es_gt","es_hn","es_mx","es","sv","sv_fi","th","tr","uk","ur","vi","cy","ji","zu"]).openapi({description:"Enum for locale values",example:"en"});
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const optionalNumber = z
|
|
3
|
-
.union([z.string(), z.number(), z.null()]) // Accept string, number, or null as input
|
|
4
|
-
.optional() // Still allow undefined
|
|
5
|
-
.transform((val) => {
|
|
6
|
-
// Handle null/undefined/empty cases
|
|
7
|
-
if (val === null || val === undefined || val === "")
|
|
8
|
-
return null;
|
|
9
|
-
// If already a number, use it directly
|
|
10
|
-
if (typeof val === "number")
|
|
11
|
-
return val;
|
|
12
|
-
// Convert string to number
|
|
13
|
-
const num = Number(val);
|
|
14
|
-
return isNaN(num) ? val : num;
|
|
15
|
-
})
|
|
16
|
-
.pipe(z
|
|
17
|
-
.number()
|
|
18
|
-
.nonnegative({ message: "This field must be a positive number" })
|
|
19
|
-
.nullable() // Output can be null
|
|
20
|
-
.refine((val) => val === null || val >= 0, {
|
|
21
|
-
message: "Price must be positive",
|
|
22
|
-
}));
|
|
23
|
-
export const requiredNumber = z.coerce
|
|
24
|
-
.number()
|
|
25
|
-
.min(0.1, "This field must be positive")
|
|
26
|
-
.refine((value) => /^\d+(\.\d{1,2})?$/.test(value.toString()), {
|
|
27
|
-
message: "This field can have a maximum of two decimal points",
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=number.schema.js.map
|
|
1
|
+
import{z as e}from"@hono/zod-openapi";export const optionalNumber=e.union([e.string(),e.number(),e.null()]).optional().transform(e=>{if(null==e||""===e)return null;if("number"==typeof e)return e;const n=Number(e);return isNaN(n)?e:n}).pipe(e.number().nonnegative({message:"This field must be a positive number"}).nullable().refine(e=>null===e||e>=0,{message:"Price must be positive"}));export const requiredNumber=e.coerce.number().min(.1,"This field must be positive").refine(e=>/^\d+(\.\d{1,2})?$/.test(e.toString()),{message:"This field can have a maximum of two decimal points"});
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { locale } from "./locales.schema";
|
|
3
|
-
export const PaginationQuerySchema = z.object({
|
|
4
|
-
page: z.coerce.number().optional().default(1).openapi({
|
|
5
|
-
example: 1,
|
|
6
|
-
description: "Page number",
|
|
7
|
-
}),
|
|
8
|
-
limit: z.coerce.number().optional().default(10).openapi({
|
|
9
|
-
example: 50,
|
|
10
|
-
description: "Number of items per page",
|
|
11
|
-
}),
|
|
12
|
-
search: z.string().optional().openapi({
|
|
13
|
-
example: "Apple",
|
|
14
|
-
description: "Search query",
|
|
15
|
-
}),
|
|
16
|
-
published: z.coerce.boolean().optional().openapi({
|
|
17
|
-
example: true,
|
|
18
|
-
description: "Whether to filter by published items",
|
|
19
|
-
}),
|
|
20
|
-
locale: locale.optional(),
|
|
21
|
-
});
|
|
22
|
-
export const PaginationMetaSchema = z
|
|
23
|
-
.object({
|
|
24
|
-
isFirstPage: z.boolean().openapi({
|
|
25
|
-
example: true,
|
|
26
|
-
description: "Whether the current page is the first page",
|
|
27
|
-
}),
|
|
28
|
-
isLastPage: z.boolean().openapi({
|
|
29
|
-
example: false,
|
|
30
|
-
description: "Whether the current page is the last page",
|
|
31
|
-
}),
|
|
32
|
-
currentPage: z.number().openapi({
|
|
33
|
-
example: 1,
|
|
34
|
-
description: "The current page number",
|
|
35
|
-
}),
|
|
36
|
-
previousPage: z.number().nullable().openapi({
|
|
37
|
-
example: 0,
|
|
38
|
-
description: "The previous page number",
|
|
39
|
-
}),
|
|
40
|
-
nextPage: z.number().nullable().openapi({
|
|
41
|
-
example: 2,
|
|
42
|
-
description: "The next page number",
|
|
43
|
-
}),
|
|
44
|
-
pageCount: z.number().openapi({
|
|
45
|
-
example: 5,
|
|
46
|
-
description: "The total number of pages",
|
|
47
|
-
}),
|
|
48
|
-
totalCount: z.number().openapi({
|
|
49
|
-
example: 50,
|
|
50
|
-
description: "The total number of items",
|
|
51
|
-
}),
|
|
52
|
-
})
|
|
53
|
-
.openapi("PaginationMeta");
|
|
54
|
-
//# sourceMappingURL=pagination.schema.js.map
|
|
1
|
+
import{z as e}from"@hono/zod-openapi";import{locale as p}from"./locales.schema";export const PaginationQuerySchema=e.object({page:e.coerce.number().optional().default(1).openapi({example:1,description:"Page number"}),limit:e.coerce.number().optional().default(10).openapi({example:50,description:"Number of items per page"}),search:e.string().optional().openapi({example:"Apple",description:"Search query"}),published:e.coerce.boolean().optional().openapi({example:!0,description:"Whether to filter by published items"}),locale:p.optional()});export const PaginationMetaSchema=e.object({isFirstPage:e.boolean().openapi({example:!0,description:"Whether the current page is the first page"}),isLastPage:e.boolean().openapi({example:!1,description:"Whether the current page is the last page"}),currentPage:e.number().openapi({example:1,description:"The current page number"}),previousPage:e.number().nullable().openapi({example:0,description:"The previous page number"}),nextPage:e.number().nullable().openapi({example:2,description:"The next page number"}),pageCount:e.number().openapi({example:5,description:"The total number of pages"}),totalCount:e.number().openapi({example:50,description:"The total number of items"})}).openapi("PaginationMeta");
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const OrganizationParams = z
|
|
3
|
-
.object({
|
|
4
|
-
organizationId: z
|
|
5
|
-
.string()
|
|
6
|
-
.cuid()
|
|
7
|
-
.min(1, "organizationId is required")
|
|
8
|
-
.openapi({
|
|
9
|
-
example: "ckel0e8qw00004n5p5w6fznym",
|
|
10
|
-
description: "The organization ID",
|
|
11
|
-
}),
|
|
12
|
-
})
|
|
13
|
-
.openapi("OrganizationParams");
|
|
14
|
-
export const OrganizationWithIdParams = OrganizationParams.extend({
|
|
15
|
-
id: z.string().cuid().min(1, "id is required").openapi({
|
|
16
|
-
example: "ckel0e8qw00004n5p5w6fznym",
|
|
17
|
-
description: "The organization ID",
|
|
18
|
-
}),
|
|
19
|
-
}).openapi("OrganizationWithIdParams");
|
|
20
|
-
//# sourceMappingURL=params.schema.js.map
|
|
1
|
+
import{z as i}from"@hono/zod-openapi";export const OrganizationParams=i.object({organizationId:i.string().cuid().min(1,"organizationId is required").openapi({example:"ckel0e8qw00004n5p5w6fznym",description:"The organization ID"})}).openapi("OrganizationParams");export const OrganizationWithIdParams=OrganizationParams.extend({id:i.string().cuid().min(1,"id is required").openapi({example:"ckel0e8qw00004n5p5w6fznym",description:"The organization ID"})}).openapi("OrganizationWithIdParams");
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { locale } from "./locales.schema";
|
|
3
|
-
export const GetResourceQuerySchema = z.object({
|
|
4
|
-
locale: locale.optional().nullable(),
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=queries.schema.js.map
|
|
1
|
+
import{z as o}from"@hono/zod-openapi";import{locale as e}from"./locales.schema";export const GetResourceQuerySchema=o.object({locale:e.optional().nullable()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setup(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e}from"tslib";import{execSync as o}from"node:child_process";import t from"node:path";import{fileURLToPath as i}from"node:url";const s="postgresql://shophost:shophost@localhost:5555/shophost_test",r=t.dirname(i(import.meta.url)),n=t.resolve(r,"../..");export function setup(){return e(this,void 0,void 0,function*(){process.env.DATABASE_URL=s,o("pnpm exec prisma db push --accept-data-loss",{cwd:n,env:Object.assign(Object.assign({},process.env),{DATABASE_URL:s}),stdio:"pipe"});const{PrismaPg:e}=yield import("@prisma/adapter-pg"),{createPrismaClient:t}=yield import("../core/lib/prisma"),i=t({adapter:new e({connectionString:s}),log:["warn","error"]});try{const{TABLES:e}=yield import("./integration/seed"),o=e.map(e=>`"${e}"`).join(", ");yield i.$executeRawUnsafe(`TRUNCATE TABLE ${o} CASCADE`)}catch(e){}const{seedDatabase:r}=yield import("./integration/seed");yield r(i),yield i.$disconnect()})}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { AppOpenAPI } from "../../core/hono/hono";
|
|
2
|
+
export declare const requestJson: (context: {
|
|
3
|
+
app: AppOpenAPI;
|
|
4
|
+
}, path: string, options: {
|
|
5
5
|
body?: unknown;
|
|
6
6
|
method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
|
|
7
7
|
}) => Promise<Response>;
|
|
@@ -27,7 +27,6 @@ export declare const buildOrganizationPayload: (suffix?: string) => {
|
|
|
27
27
|
zipCode: string;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
export declare const createOrganization: (context: ApiTestContext, suffix?: string) => Promise<Response>;
|
|
31
30
|
export declare const buildManufacturerPayload: (suffix?: string) => {
|
|
32
31
|
name: string;
|
|
33
32
|
defaultLocale: string;
|
|
@@ -36,7 +35,6 @@ export declare const buildManufacturerPayload: (suffix?: string) => {
|
|
|
36
35
|
about: string;
|
|
37
36
|
}[];
|
|
38
37
|
};
|
|
39
|
-
export declare const createManufacturer: (context: ApiTestContext, organizationId: string, suffix?: string) => Promise<Response>;
|
|
40
38
|
export declare const buildProductCategoryPayload: (suffix?: string) => {
|
|
41
39
|
slug: string;
|
|
42
40
|
defaultLocale: string;
|
|
@@ -46,7 +44,6 @@ export declare const buildProductCategoryPayload: (suffix?: string) => {
|
|
|
46
44
|
description: string;
|
|
47
45
|
}[];
|
|
48
46
|
};
|
|
49
|
-
export declare const createProductCategory: (context: ApiTestContext, organizationId: string, suffix?: string) => Promise<Response>;
|
|
50
47
|
type BuildProductPayloadOptions = {
|
|
51
48
|
categoryIds?: string[];
|
|
52
49
|
manufacturerId?: string | null;
|
|
@@ -97,7 +94,6 @@ export declare const buildProductPayload: ({ categoryIds, manufacturerId, modifi
|
|
|
97
94
|
skuSuffix: string;
|
|
98
95
|
};
|
|
99
96
|
};
|
|
100
|
-
export declare const createProduct: (context: ApiTestContext, organizationId: string, options?: BuildProductPayloadOptions) => Promise<Response>;
|
|
101
97
|
export declare const buildShippingAddressPayload: (suffix?: string) => {
|
|
102
98
|
firstname: string;
|
|
103
99
|
lastname: string;
|
|
@@ -111,7 +107,6 @@ export declare const buildShippingAddressPayload: (suffix?: string) => {
|
|
|
111
107
|
placeId: string;
|
|
112
108
|
deliveryInstructions: string;
|
|
113
109
|
};
|
|
114
|
-
export declare const createShippingAddress: (context: ApiTestContext, suffix?: string) => Promise<Response>;
|
|
115
110
|
export declare const buildShippingMethodPayload: (suffix?: string) => {
|
|
116
111
|
title: string;
|
|
117
112
|
providerName: string;
|
|
@@ -124,7 +119,6 @@ export declare const buildShippingMethodPayload: (suffix?: string) => {
|
|
|
124
119
|
eta: string;
|
|
125
120
|
}[];
|
|
126
121
|
};
|
|
127
|
-
export declare const createShippingMethod: (context: ApiTestContext, organizationId: string, suffix?: string) => Promise<Response>;
|
|
128
122
|
export declare const buildReservationPayload: (suffix?: string) => {
|
|
129
123
|
firstname: string;
|
|
130
124
|
lastname: string;
|
|
@@ -132,7 +126,6 @@ export declare const buildReservationPayload: (suffix?: string) => {
|
|
|
132
126
|
phone: string;
|
|
133
127
|
date: string;
|
|
134
128
|
};
|
|
135
|
-
export declare const createReservation: (context: ApiTestContext, organizationId: string, suffix?: string) => Promise<Response>;
|
|
136
129
|
export declare const buildOrderPayload: ({ checkoutBaseUrl, productId, shippingMethodId, }: {
|
|
137
130
|
checkoutBaseUrl?: string;
|
|
138
131
|
productId: string;
|
|
@@ -151,9 +144,4 @@ export declare const buildOrderPayload: ({ checkoutBaseUrl, productId, shippingM
|
|
|
151
144
|
};
|
|
152
145
|
checkoutBaseUrl: string;
|
|
153
146
|
};
|
|
154
|
-
export declare const createOrder: (context: ApiTestContext, organizationId: string, payload: {
|
|
155
|
-
checkoutBaseUrl?: string;
|
|
156
|
-
productId: string;
|
|
157
|
-
shippingMethodId?: string;
|
|
158
|
-
}) => Promise<Response>;
|
|
159
147
|
export {};
|