@shophost/rest-api 2.0.67 → 2.0.69

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.
Files changed (141) hide show
  1. package/package.json +1 -1
  2. package/schema.prisma +1 -0
  3. package/scripts/shophost-rest-api.mjs +198 -1
  4. package/src/bootstrap.js +1 -1
  5. package/src/container.js +1 -1
  6. package/src/core/auth/auth.schema.js +1 -1
  7. package/src/core/auth/auth.util.js +1 -1
  8. package/src/core/auth/better-auth.lib.js +1 -1
  9. package/src/core/auth/generate-password-hash.util.js +1 -1
  10. package/src/core/auth/headers.schema.js +1 -1
  11. package/src/core/auth/user.schema.js +1 -1
  12. package/src/core/db/__generated__/client/browser.js +1 -1
  13. package/src/core/db/__generated__/client/client.js +1 -1
  14. package/src/core/db/__generated__/client/enums.js +1 -1
  15. package/src/core/db/__generated__/client/internal/class.js +789 -1
  16. package/src/core/db/__generated__/client/internal/prismaNamespace.d.ts +1 -0
  17. package/src/core/db/__generated__/client/internal/prismaNamespace.js +1 -1
  18. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.d.ts +1 -0
  19. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js +1 -1
  20. package/src/core/db/__generated__/client/models/OrganizationConfiguration.d.ts +41 -1
  21. package/src/core/db/index.js +1 -1
  22. package/src/core/email/components.js +1 -1
  23. package/src/core/exceptions/http-exception.js +1 -1
  24. package/src/core/hono/hono.js +1 -1
  25. package/src/core/lib/prisma.js +1 -1
  26. package/src/core/logging/pino.js +1 -1
  27. package/src/core/notifications/email.service.js +1 -1
  28. package/src/core/openapi/openapi.lib.js +1 -1
  29. package/src/core/utils/currency.util.js +1 -1
  30. package/src/core/utils/env.util.js +1 -1
  31. package/src/core/utils/object.util.js +1 -1
  32. package/src/core/utils/translations.util.js +1 -1
  33. package/src/core/utils/zod.util.js +1 -1
  34. package/src/db.js +1 -1
  35. package/src/features/access/access.handler.js +1 -1
  36. package/src/features/access/access.route.js +1 -1
  37. package/src/features/access/access.schema.js +1 -1
  38. package/src/features/access/access.service.js +1 -1
  39. package/src/features/analytics/analytics.handler.js +1 -1
  40. package/src/features/analytics/analytics.route.js +1 -1
  41. package/src/features/analytics/analytics.schema.js +1 -1
  42. package/src/features/analytics/analytics.service.js +1 -1
  43. package/src/features/cart/cart.handler.js +1 -1
  44. package/src/features/cart/cart.route.js +1 -1
  45. package/src/features/cart/cart.schema.js +1 -1
  46. package/src/features/cart/cart.service.js +1 -1
  47. package/src/features/cart/cart.util.js +1 -1
  48. package/src/features/customer/customer.handler.js +1 -1
  49. package/src/features/customer/customer.route.js +1 -1
  50. package/src/features/customer/customer.schema.js +1 -1
  51. package/src/features/customer/customer.service.js +1 -1
  52. package/src/features/file/file.handler.js +1 -1
  53. package/src/features/file/file.route.js +1 -1
  54. package/src/features/file/file.schema.js +1 -1
  55. package/src/features/file/file.service.js +1 -1
  56. package/src/features/health/health.handler.js +1 -1
  57. package/src/features/health/health.route.js +1 -1
  58. package/src/features/index.js +1 -1
  59. package/src/features/integration/integration-config.js +1 -1
  60. package/src/features/integration/integration-registry.js +1 -1
  61. package/src/features/integration/integration.handler.js +1 -1
  62. package/src/features/integration/integration.route.js +1 -1
  63. package/src/features/integration/integration.schema.js +1 -1
  64. package/src/features/integration/integration.service.js +1 -1
  65. package/src/features/inventory/inventory.service.js +1 -1
  66. package/src/features/location/location.handler.js +1 -1
  67. package/src/features/location/location.route.js +1 -1
  68. package/src/features/location/location.schema.js +1 -1
  69. package/src/features/location/location.service.js +1 -1
  70. package/src/features/manufacturer/manufacturer.handler.js +1 -1
  71. package/src/features/manufacturer/manufacturer.route.js +1 -1
  72. package/src/features/manufacturer/manufacturer.schema.js +1 -1
  73. package/src/features/manufacturer/manufacturer.service.js +1 -1
  74. package/src/features/order/emails/order-confirmation.email.js +1 -1
  75. package/src/features/order/emails/order-notification.email.js +1 -1
  76. package/src/features/order/fulfilment.schema.js +1 -1
  77. package/src/features/order/order-fulfillment.service.js +1 -1
  78. package/src/features/order/order.handler.js +1 -1
  79. package/src/features/order/order.route.js +1 -1
  80. package/src/features/order/order.schema.js +1 -1
  81. package/src/features/order/order.service.js +1 -1
  82. package/src/features/order/recipient.schema.js +1 -1
  83. package/src/features/organization/legal-entity.schema.js +1 -1
  84. package/src/features/organization/organization-configuration.schema.d.ts +2 -0
  85. package/src/features/organization/organization-configuration.schema.js +1 -1
  86. package/src/features/organization/organization.handler.js +1 -1
  87. package/src/features/organization/organization.route.d.ts +5 -0
  88. package/src/features/organization/organization.route.js +1 -1
  89. package/src/features/organization/organization.schema.d.ts +2 -0
  90. package/src/features/organization/organization.schema.js +1 -1
  91. package/src/features/organization/organization.service.d.ts +4 -0
  92. package/src/features/organization/organization.service.js +1 -1
  93. package/src/features/payment/payment-webhook.service.js +1 -1
  94. package/src/features/payment/payment.handler.js +1 -1
  95. package/src/features/payment/payment.route.js +1 -1
  96. package/src/features/payment/payment.schema.js +1 -1
  97. package/src/features/payment/payment.service.js +1 -1
  98. package/src/features/payment/stripe.service.js +1 -1
  99. package/src/features/product/product-modifier.schema.js +1 -1
  100. package/src/features/product/product.handler.js +1 -1
  101. package/src/features/product/product.route.js +1 -1
  102. package/src/features/product/product.schema.js +1 -1
  103. package/src/features/product/product.service.js +1 -1
  104. package/src/features/product-category/product-category.handler.js +1 -1
  105. package/src/features/product-category/product-category.route.js +1 -1
  106. package/src/features/product-category/product-category.schema.js +1 -1
  107. package/src/features/product-category/product-category.service.js +1 -1
  108. package/src/features/reservation/emails/reservation-cancellation.email.js +1 -1
  109. package/src/features/reservation/emails/reservation-confirmation.email.js +1 -1
  110. package/src/features/reservation/emails/reservation-email-date.d.ts +2 -0
  111. package/src/features/reservation/emails/reservation-email-date.js +1 -0
  112. package/src/features/reservation/emails/reservation-notification.email.js +1 -1
  113. package/src/features/reservation/emails/reservation-updated.email.js +1 -1
  114. package/src/features/reservation/reservation.handler.js +1 -1
  115. package/src/features/reservation/reservation.route.js +1 -1
  116. package/src/features/reservation/reservation.schema.js +1 -1
  117. package/src/features/reservation/reservation.service.js +1 -1
  118. package/src/features/shipping/shipping.handler.js +1 -1
  119. package/src/features/shipping/shipping.route.js +1 -1
  120. package/src/features/shipping/shipping.service.js +1 -1
  121. package/src/features/shipping-method/shipping-method.handler.js +1 -1
  122. package/src/features/shipping-method/shipping-method.route.js +1 -1
  123. package/src/features/shipping-method/shipping-method.schema.js +1 -1
  124. package/src/features/shipping-method/shipping-method.service.js +1 -1
  125. package/src/features/shipping-method/shipping-zone.schema.js +1 -1
  126. package/src/features/webhook/webhook.handler.js +1 -1
  127. package/src/features/webhook/webhook.route.js +1 -1
  128. package/src/index.js +1 -1
  129. package/src/integrations/next.js +1 -1
  130. package/src/schemas/address.schema.js +1 -1
  131. package/src/schemas/currency.schema.js +1 -1
  132. package/src/schemas/error.schema.js +1 -1
  133. package/src/schemas/index.d.ts +1 -0
  134. package/src/schemas/index.js +1 -1
  135. package/src/schemas/locales.schema.js +1 -1
  136. package/src/schemas/number.schema.js +1 -1
  137. package/src/schemas/pagination.schema.js +1 -1
  138. package/src/schemas/params.schema.js +1 -1
  139. package/src/schemas/queries.schema.js +1 -1
  140. package/src/schemas/time-zone.schema.d.ts +9 -0
  141. package/src/schemas/time-zone.schema.js +1 -0
@@ -1 +1 @@
1
- const _0x46f462=_0x151f,_0x1eba37=_0x151f;(function(_0x36b314,_0x10df92){const _0x4ba711=_0x151f,_0x4ed1b2=_0x151f,_0x1d8da3=_0x36b314();while(!![]){try{const _0x3b28f0=-parseInt(_0x4ba711(0x1f7))/0x1*(parseInt(_0x4ba711(0x1ce))/0x2)+parseInt(_0x4ba711(0x1e3))/0x3*(parseInt(_0x4ba711(0x21d))/0x4)+-parseInt(_0x4ed1b2(0x21f))/0x5*(-parseInt(_0x4ed1b2(0x25d))/0x6)+-parseInt(_0x4ed1b2(0x275))/0x7*(parseInt(_0x4ed1b2(0x221))/0x8)+parseInt(_0x4ed1b2(0x1bb))/0x9*(-parseInt(_0x4ba711(0x227))/0xa)+parseInt(_0x4ba711(0x1da))/0xb*(parseInt(_0x4ba711(0x246))/0xc)+parseInt(_0x4ba711(0x1d7))/0xd;if(_0x3b28f0===_0x10df92)break;else _0x1d8da3['push'](_0x1d8da3['shift']());}catch(_0x360ea8){_0x1d8da3['push'](_0x1d8da3['shift']());}}}(_0x490d,0xe51e8));import{jsx as _0x577715,jsxs as _0x4e24ee}from'react/jsx-runtime';function _0x151f(_0x526070,_0x4b2724){_0x526070=_0x526070-0x1b1;const _0x490d17=_0x490d();let _0x151fc6=_0x490d17[_0x526070];if(_0x151f['mrZbiG']===undefined){var _0x3f98b4=function(_0x1acea3){const _0x4bd672='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x443390='',_0x3f2d77='';for(let _0xccc5f7=0x0,_0x4ee6f4,_0x1d7b41,_0x1b0ebe=0x0;_0x1d7b41=_0x1acea3['charAt'](_0x1b0ebe++);~_0x1d7b41&&(_0x4ee6f4=_0xccc5f7%0x4?_0x4ee6f4*0x40+_0x1d7b41:_0x1d7b41,_0xccc5f7++%0x4)?_0x443390+=String['fromCharCode'](0xff&_0x4ee6f4>>(-0x2*_0xccc5f7&0x6)):0x0){_0x1d7b41=_0x4bd672['indexOf'](_0x1d7b41);}for(let _0x29df83=0x0,_0xef5b5f=_0x443390['length'];_0x29df83<_0xef5b5f;_0x29df83++){_0x3f2d77+='%'+('00'+_0x443390['charCodeAt'](_0x29df83)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3f2d77);};_0x151f['ZUsmed']=_0x3f98b4,_0x151f['gIfOvm']={},_0x151f['mrZbiG']=!![];}const _0x1f2fbd=_0x490d17[0x0],_0x472631=_0x526070+_0x1f2fbd,_0x316f0e=_0x151f['gIfOvm'][_0x472631];return!_0x316f0e?(_0x151fc6=_0x151f['ZUsmed'](_0x151fc6),_0x151f['gIfOvm'][_0x472631]=_0x151fc6):_0x151fc6=_0x316f0e,_0x151fc6;}import{format as _0x39bef9}from'date-fns';import{Body as _0x25c9bf,Column as _0x4b56a6,Container as _0x3ab2d9,Head as _0x54d037,Heading as _0x5e4bab,Hr as _0x45db63,Html as _0x58b3e5,Img as _0x4f3446,Link as _0x1adb27,Preview as _0x31d48d,Row as _0x392eed,Section as _0x33c3d0,Tailwind as _0x750746,Text as _0x2886bf}from'../../../core/email/components';const u=({user:_0x37536a,organization:_0x3ade0a,reservation:_0x3916f0})=>{const _0x21bf6f=_0x151f,_0x2d3f08=_0x151f,_0x27b64d={'ZSxMJ':_0x21bf6f(0x211)+_0x2d3f08(0x254)+_0x21bf6f(0x1ea)+_0x2d3f08(0x256),'haKKc':_0x21bf6f(0x272),'sYsGe':'https://'+'www.inst'+'agram.co'+_0x21bf6f(0x1f9)+_0x21bf6f(0x263),'BxijQ':function(_0x190e97,_0x599a6c,_0x42480e){return _0x190e97(_0x599a6c,_0x42480e);},'JbPdI':function(_0x536318,_0x14bd9d,_0x597366){return _0x536318(_0x14bd9d,_0x597366);},'psiEc':function(_0x52eda3,_0x47e699,_0x116d53){return _0x52eda3(_0x47e699,_0x116d53);},'fCyun':_0x2d3f08(0x1ef)+_0x2d3f08(0x241)+_0x2d3f08(0x1e9)+_0x2d3f08(0x22c)+_0x21bf6f(0x21b)+_0x21bf6f(0x26f),'wSmrR':'w-[40%]\x20'+_0x21bf6f(0x27c),'VAjaL':'text-cen'+_0x21bf6f(0x235)+_0x2d3f08(0x1b9)+_0x21bf6f(0x1d1),'tXuEH':function(_0x6a6959,_0x2f7522){return _0x6a6959===_0x2f7522;},'UZtmD':function(_0x504978,_0x5f231d){return _0x504978===_0x5f231d;},'oVmuh':function(_0x215d88,_0x16ebe3,_0x3b8be4){return _0x215d88(_0x16ebe3,_0x3b8be4);}};var _0x2e4162,_0x49c2fe,_0xe81039,_0x56f22a,_0x2b9af0;const _0x4c1277=_0x2d3f08(0x1e5)+_0x21bf6f(0x22a)+_0x2d3f08(0x1c6)+_0x3ade0a[_0x2d3f08(0x25b)]+(_0x21bf6f(0x1bc)+_0x2d3f08(0x271)+_0x2d3f08(0x281)),_0x1c4744=_0x39bef9(new Date(_0x3916f0[_0x21bf6f(0x24f)]),_0x21bf6f(0x26a)+_0x21bf6f(0x1d8)+_0x2d3f08(0x1e7));return _0x4e24ee(_0x58b3e5,{'children':[_0x577715(_0x54d037,{}),_0x577715(_0x31d48d,{'children':_0x4c1277}),_0x577715(_0x750746,{'children':_0x4e24ee(_0x25c9bf,{'className':_0x2d3f08(0x211)+'50\x20font-'+_0x21bf6f(0x26c),'children':[_0x4e24ee(_0x3ab2d9,{'className':_0x27b64d[_0x2d3f08(0x236)],'children':[_0x577715(_0x33c3d0,{'className':_0x21bf6f(0x265),'children':_0x4e24ee(_0x392eed,{'children':[_0x577715(_0x4b56a6,{'className':_0x2d3f08(0x202),'children':_0x577715(_0x4f3446,{'alt':_0x3ade0a[_0x21bf6f(0x25b)]+_0x21bf6f(0x274),'height':_0x21bf6f(0x257),'src':(_0x2e4162=_0x3ade0a[_0x21bf6f(0x1b1)])===null||_0x2e4162===void 0x0?void 0x0:_0x2e4162[_0x21bf6f(0x20d)],'className':_0x21bf6f(0x1f1)+'lg'})}),_0x577715(_0x4b56a6,{'align':_0x2d3f08(0x272),'children':_0x4e24ee(_0x392eed,{'align':_0x27b64d[_0x2d3f08(0x273)],'children':[_0x577715(_0x4b56a6,{'children':_0x577715(_0x1adb27,{'href':_0x27b64d['sYsGe'],'children':_0x577715(_0x4f3446,{'alt':_0x2d3f08(0x27f)+'m','className':_0x21bf6f(0x1ed),'height':'36','src':'https://'+'react.em'+'ail/stat'+_0x2d3f08(0x22f)+_0x2d3f08(0x1fa)+_0x2d3f08(0x1ec),'width':'36'})})}),_0x577715(_0x4b56a6,{'children':_0x577715(_0x1adb27,{'href':_0x21bf6f(0x261)+_0x2d3f08(0x21c)+_0x21bf6f(0x1f5)+_0x21bf6f(0x20b)+'istro/','children':_0x27b64d[_0x2d3f08(0x218)](_0x577715,_0x4f3446,{'alt':_0x2d3f08(0x203),'className':_0x2d3f08(0x1ed),'height':'36','src':_0x2d3f08(0x261)+_0x21bf6f(0x242)+_0x21bf6f(0x1f0)+'ic/faceb'+_0x21bf6f(0x1b6)+_0x2d3f08(0x269),'width':'36'})})})]})})]})}),_0x4e24ee(_0x33c3d0,{'children':[_0x27b64d[_0x21bf6f(0x245)](_0x4e24ee,_0x5e4bab,{'className':_0x21bf6f(0x1f8)+_0x2d3f08(0x205)+_0x21bf6f(0x284)+_0x2d3f08(0x23f)+_0x21bf6f(0x1fd),'children':['Hi\x20',_0x37536a['firstnam'+'e'],',']}),_0x27b64d[_0x2d3f08(0x260)](_0x577715,_0x2886bf,{'className':_0x2d3f08(0x1b4)+_0x21bf6f(0x1e0)+_0x21bf6f(0x230)+'lg','children':_0x21bf6f(0x1e5)+_0x2d3f08(0x22a)+'\x20has\x20bee'+_0x2d3f08(0x271)+_0x2d3f08(0x280)})]})]}),_0x4e24ee(_0x3ab2d9,{'className':_0x27b64d[_0x21bf6f(0x1fe)],'children':[_0x577715(_0x33c3d0,{'className':'mb-6','children':_0x4e24ee(_0x392eed,{'children':[_0x4e24ee(_0x4b56a6,{'className':_0x2d3f08(0x27e),'children':[_0x577715(_0x2886bf,{'className':_0x21bf6f(0x1b4)+_0x2d3f08(0x264)+'-0','children':_0x2d3f08(0x237)+_0x21bf6f(0x1bf)+_0x21bf6f(0x1ee)+_0x2d3f08(0x1b5)}),_0x4e24ee(_0x2886bf,{'className':_0x21bf6f(0x1df)+'ibold\x20te'+_0x2d3f08(0x1fc)+'800\x20my-0','children':[_0x3916f0[_0x2d3f08(0x25f)+'e'],'\x20',_0x3916f0[_0x2d3f08(0x1e6)]]}),_0x4e24ee(_0x2886bf,{'className':_0x21bf6f(0x1df)+'ibold\x20te'+_0x21bf6f(0x1fc)+_0x2d3f08(0x1cb),'children':['Referenc'+_0x2d3f08(0x1d5),_0x3916f0['referenc'+_0x2d3f08(0x249)]]}),_0x4e24ee(_0x2886bf,{'className':_0x2d3f08(0x1df)+_0x21bf6f(0x1c4)+'xt-gray-'+_0x21bf6f(0x1cb),'children':[_0x2d3f08(0x27b)+_0x2d3f08(0x217),_0x1c4744]}),_0x4e24ee(_0x2886bf,{'className':_0x2d3f08(0x1df)+_0x21bf6f(0x1c4)+_0x21bf6f(0x1fc)+'800\x20my-0','children':[_0x2d3f08(0x228)+_0x2d3f08(0x1f6)+':\x20',_0x3916f0[_0x2d3f08(0x21a)]]})]}),_0x577715(_0x4b56a6,{'className':_0x27b64d[_0x2d3f08(0x266)],'align':'right','valign':_0x2d3f08(0x1c0),'children':_0x577715(_0x2886bf,{'className':_0x2d3f08(0x1b4)+_0x21bf6f(0x264)+_0x21bf6f(0x22d),'children':_0x39bef9(new Date(),_0x21bf6f(0x26a)+'yy')})})]})}),_0x577715(_0x45db63,{'className':_0x2d3f08(0x1be)+_0x21bf6f(0x239)+_0x2d3f08(0x279)}),_0x4e24ee(_0x33c3d0,{'className':_0x2d3f08(0x265),'children':[_0x4e24ee(_0x2886bf,{'className':'text-gra'+_0x2d3f08(0x208),'children':[_0x21bf6f(0x1e5)+'ervation'+_0x21bf6f(0x26d),_0x3ade0a[_0x2d3f08(0x25b)],_0x21bf6f(0x1bc)+_0x2d3f08(0x271)+_0x21bf6f(0x252)+'you\x20did\x20'+_0x21bf6f(0x231)+'est\x20this'+_0x2d3f08(0x200)+_0x2d3f08(0x1dd)+'\x20wish\x20to'+_0x2d3f08(0x1c7)+'new\x20rese'+'rvation,'+_0x2d3f08(0x23c)+_0x21bf6f(0x213)+'us\x20at\x20',_0x3ade0a[_0x2d3f08(0x206)],'.']}),_0x4e24ee(_0x2886bf,{'className':_0x2d3f08(0x1b4)+_0x21bf6f(0x208),'children':[_0x2d3f08(0x27d)+_0x2d3f08(0x267)+_0x2d3f08(0x1e2)+'t\x20',_0x3ade0a[_0x2d3f08(0x25b)],_0x21bf6f(0x1e1)+_0x21bf6f(0x224)]})]})]}),_0x577715(_0x33c3d0,{'className':_0x27b64d[_0x2d3f08(0x24d)],'children':_0x4e24ee(_0x21bf6f(0x1c2),{'className':_0x21bf6f(0x1c8),'children':[_0x577715('tr',{'className':_0x21bf6f(0x1c8),'children':_0x577715('td',{'align':_0x21bf6f(0x258),'children':((_0x49c2fe=_0x3ade0a[_0x21bf6f(0x1b1)])===null||_0x27b64d[_0x2d3f08(0x253)](_0x49c2fe,void 0x0)?void 0x0:_0x49c2fe[_0x2d3f08(0x20d)])&&_0x577715(_0x4f3446,{'alt':_0x3ade0a[_0x2d3f08(0x25b)]+_0x2d3f08(0x274),'height':_0x21bf6f(0x257),'src':_0x3ade0a[_0x2d3f08(0x1b1)]['url'],'className':_0x2d3f08(0x1f1)+'lg'})})}),_0x577715('tr',{'className':_0x2d3f08(0x1c8),'children':_0x4e24ee('td',{'align':_0x21bf6f(0x258),'children':[_0x577715(_0x2886bf,{'className':_0x21bf6f(0x207)+_0x21bf6f(0x1dc)+_0x2d3f08(0x233)+_0x2d3f08(0x1c9)+_0x2d3f08(0x284)+_0x2d3f08(0x22e)+_0x21bf6f(0x1b4)+'y-900','children':_0x3ade0a[_0x21bf6f(0x25b)]}),_0x4e24ee(_0x2886bf,{'className':_0x2d3f08(0x207)+_0x21bf6f(0x1dc)+_0x2d3f08(0x24e)+_0x2d3f08(0x255)+_0x21bf6f(0x204)+_0x2d3f08(0x244)+'0','children':[(_0xe81039=_0x3ade0a[_0x2d3f08(0x20a)])===null||_0xe81039===void 0x0?void 0x0:_0xe81039[_0x21bf6f(0x240)+_0x2d3f08(0x20f)],',','\x20',(_0x56f22a=_0x3ade0a[_0x2d3f08(0x20a)])===null||_0x56f22a===void 0x0?void 0x0:_0x56f22a['zipCode'],'\x20',_0x27b64d['tXuEH'](_0x2b9af0=_0x3ade0a[_0x21bf6f(0x20a)],null)||_0x27b64d[_0x21bf6f(0x1d2)](_0x2b9af0,void 0x0)?void 0x0:_0x2b9af0[_0x21bf6f(0x268)]]}),_0x27b64d[_0x21bf6f(0x247)](_0x577715,_0x2886bf,{'className':_0x2d3f08(0x1cd)+_0x21bf6f(0x215)+_0x2d3f08(0x1d4)+']\x20leadin'+_0x21bf6f(0x283)+_0x2d3f08(0x238)+_0x21bf6f(0x1eb),'children':_0x3ade0a['phone']})]})}),_0x577715('tr',{'children':_0x577715('td',{'align':'center','children':_0x4e24ee(_0x392eed,{'className':'table-ce'+_0x2d3f08(0x1bd)+_0x2d3f08(0x26b)+'6px]\x20ali'+_0x2d3f08(0x243)+_0x21bf6f(0x21e),'children':[_0x577715(_0x4b56a6,{'className':_0x21bf6f(0x22b),'children':_0x577715(_0x1adb27,{'href':_0x21bf6f(0x261)+_0x2d3f08(0x21c)+_0x2d3f08(0x1f5)+_0x21bf6f(0x20b)+_0x21bf6f(0x1d0),'children':_0x577715(_0x4f3446,{'alt':_0x21bf6f(0x203),'height':'36','src':'https://'+_0x2d3f08(0x242)+_0x2d3f08(0x1f0)+_0x21bf6f(0x1cc)+_0x2d3f08(0x1b6)+_0x21bf6f(0x269),'width':'36'})})}),_0x577715(_0x4b56a6,{'children':_0x577715(_0x1adb27,{'href':'https://'+'www.inst'+'agram.co'+_0x21bf6f(0x1f9)+_0x2d3f08(0x263),'children':_0x577715(_0x4f3446,{'alt':_0x21bf6f(0x27f)+'m','height':'36','src':_0x2d3f08(0x261)+_0x21bf6f(0x242)+_0x21bf6f(0x1f0)+_0x21bf6f(0x22f)+'gram-log'+_0x21bf6f(0x1ec),'width':'36'})})})]})})})]})})]})})]});},F={'user':{'id':_0x46f462(0x23a)+_0x1eba37(0x1b2)+'ePP6BAW6'+_0x46f462(0x1c3),'name':'Abhishek'+'\x20Shaji','email':_0x46f462(0x1de)+_0x46f462(0x1ff)+_0x1eba37(0x212),'emailVerified':!0x0,'image':_0x1eba37(0x261)+'lh3.goog'+_0x1eba37(0x220)+_0x1eba37(0x223)+_0x1eba37(0x1d3)+_0x1eba37(0x1c1)+_0x1eba37(0x229)+_0x46f462(0x25e)+_0x46f462(0x1ba)+'mU-7aE2F'+_0x46f462(0x234)+_0x1eba37(0x1f4)+'-c','createdAt':_0x46f462(0x288)+_0x46f462(0x26e)+_0x46f462(0x262),'updatedAt':_0x1eba37(0x288)+_0x1eba37(0x26e)+_0x46f462(0x262),'firstname':_0x46f462(0x24a),'lastname':_0x46f462(0x24b)},'reservation':{'id':_0x1eba37(0x1e4)+'m0000itx'+_0x1eba37(0x25a)+'r','referenceId':'PH6LD6','firstname':_0x46f462(0x24a),'lastname':_0x46f462(0x24b),'phone':_0x46f462(0x1d9)+_0x46f462(0x27a),'guests':0x4,'date':new Date(_0x1eba37(0x232)+_0x46f462(0x1d6)+_0x46f462(0x259)),'createdAt':_0x46f462(0x288)+_0x46f462(0x26e)+_0x1eba37(0x262),'acceptedAt':_0x1eba37(0x288)+_0x46f462(0x1c5)+_0x46f462(0x1b8),'cancelledAt':_0x1eba37(0x288)+_0x46f462(0x23d)+_0x1eba37(0x23e)},'organization':{'id':_0x1eba37(0x287)+'q0001lg0'+_0x1eba37(0x277)+'b','name':_0x1eba37(0x270)+_0x1eba37(0x210),'phone':_0x46f462(0x1d9)+'5862','email':_0x46f462(0x225)+_0x46f462(0x1e8)+'stro.pl','createdAt':_0x1eba37(0x288)+_0x1eba37(0x23b)+_0x46f462(0x222),'legalEntityId':null,'address':{'id':_0x46f462(0x287)+_0x1eba37(0x278)+_0x1eba37(0x209)+'t','firstname':null,'lastname':null,'phone':null,'addressLineOne':_0x1eba37(0x214)+'aterów\x20G'+_0x46f462(0x20c),'doorNumber':null,'addressLineTwo':'3','zipCode':'33-332','city':'Kraków','country':'PL','placeId':_0x1eba37(0x285)+'RkRbFkcR'+_0x46f462(0x1db)+_0x1eba37(0x250),'deliveryInstructions':null},'configuration':{'id':_0x46f462(0x287)+_0x1eba37(0x1fb)+'3ghgs262'+'n','hostname':_0x1eba37(0x1e8)+'stro.pl','countriesShipping':['us'],'stripeAccountId':'null','enableHostCheckout':!0x1,'enableHostTracking':!0x1,'isAcceptingOrders':!0x1,'isAcceptingReservations':!0x1,'defaultLocale':'en','supportedLocales':['en','pl'],'defaultCurrency':_0x46f462(0x1f2),'createdAt':_0x1eba37(0x288)+'22T23:05'+_0x46f462(0x222)},'logo':_0x46f462(0x261)+_0x46f462(0x216)+_0x1eba37(0x1cf)+_0x46f462(0x282)+_0x1eba37(0x201)+_0x46f462(0x24c)+'age.com/'+_0x46f462(0x226)+_0x46f462(0x248)+'KPlvjxYm'+_0x1eba37(0x1f3)+_0x46f462(0x1ca),'logoFile':{'id':'cm8ktmu8'+_0x1eba37(0x1b7)+_0x46f462(0x20e)+'k','url':_0x1eba37(0x261)+_0x46f462(0x216)+_0x46f462(0x1cf)+_0x1eba37(0x282)+_0x46f462(0x201)+_0x1eba37(0x24c)+_0x1eba37(0x1b3)+_0x1eba37(0x226)+_0x1eba37(0x248)+_0x46f462(0x286)+'2af3SAWv'+_0x1eba37(0x1ca),'mimeType':_0x1eba37(0x276)+'g','size':0x193641,'filename':_0x1eba37(0x219)}}};u[_0x1eba37(0x25c)+_0x46f462(0x251)]=F;export default u;function _0x490d(){const _0xfc7f81=['Es03mda','mZuWAwPPywW','ywrKCMvZCW','l21HzhjHC0i','zxr0ysaY','DxjS','mZu2z3DJBgy','Aw5Lt25L','Axn0CM8','yMCTz3jHEs0','lNbS','y29UDgfJDca','ugXHyYbcB2G','wZrWEf0GDgu','EJnSAxv5yxq','ifrPBwu6ia','qNHPALe','Bg9NBY5WBMC','z3vLC3rZ','igjNlxDOAxq','D3D3lMzHy2u','mtyWnZzfvvnnr3e','BsbWDc01','mtb3rhbHBMq','Bgv1C2vYy28','ognnBu1QAa','oJe0lJi3mvO','BNrLBNqUy28','ihrPBwuU','y29UDgfJDea','Bg9NBY16zuO','ndb2rvrVsNy','tNvTyMvYig8','ve52twL6ALG','zxj2yxrPB24','ChiTwZHWEf0','Dw5KzwqTEgW','ltaGChqTmq','EgWGChqTmIa','AwmVAw5ZDge','ltiGDgv4Dc0','BM90ihjLCxu','mJaYns0Wnc0','nNb4xsbMB24','Df9nx3vPsgG','DgvYigjNlwC','wLn4tuO','q2fUy2vSBgu','ihrLEhqTz3i','CMf5ltiWmca','vKqWt0O1mMy','mJjumJm6mdu','ihbSzwfZzsa','mJnumta6mtu','oJq1lJC4ovO','z3jHEs04mda','ywrKCMvZC0W','Bwf4lxCTwZy','CMvHy3qUzw0','z24TyM90Dg8','lwDYyxKTnta','sMjqzeK','nda5mLvVAeP0uq','B1zTDwG','Ew1guK1gq0K','zuLK','qwjOAxnOzwS','u2HHAMK','y2vSlxn0B3i','vKfQyuW','nNb4xsbSzwe','zgf0zq','u1nb','CM9WCW','BgvKlIbjzIa','DfH1ruG','ntaGCc02ig0','zgLUzY1BmJq','mhb4xq','mtaW','y2vUDgvY','oJaWlJaWmfO','mwL2owSYBxe','BMfTzq','uhjLDMLLD1a','mZG2mJuYnhPArw9KuW','tNHJBtfHwxq','zMLYC3rUyw0','ChnPrwm','Ahr0Chm6lY8','oJqWlJi2mfO','yMLZDhjVlW','Es01mdaGBwi','BwiTnG','D1nTCLi','Dg8GD2vSy28','y2L0Eq','lNbUzW','zgqUtu0UExK','ChHDihCTwZu','C2fUCW','igf0ia','mJjumJi6ntq','zsbWEc02','twfKCMfZiei','BIbJyw5JzwW','CMLNAhq','Agfls2m','igXVz28','mtaZndu1ntjRB0HUu2e','Aw1Hz2uVCg4','m2i1ow1KEtC','CJaWmdjSzZa','BxqTna','ntG2mG','rgf0zsbHBMq','Cc0Wig10lta','v2uGAg9Wzsa','DY1BnJaLxq','sw5ZDgfNCMe','BgvKlG','BgvK','lNb1yMXPyY4','zY1BmJrWEf0','BgqGDgv4Dc0','q2HjsMyTBNm','s1bSDMP4ww0','y204A3rOzMq','mJaYns0WmY0','Bg9NB0zPBgu','mg1Kqw5TnvK','ywDLlMnVBs8','Dgv4Dc1NCMe','DgfPBhm','B29RlwXVz28','otaWmdvSzZa','oJiZlJq1nLO','CMf5ltuWiha','qMLxBLLWq1K','mZC0mtq0ngHJz2DMrW','igHHCYbIzwu','BgWGAc1Bndq','yM9YzgvYlwC','zcbYzxnLCNy','Dg9W','B2nlyMTdqu0','DgfIBgu','AgrIyunQquO','AwjVBgqGDgu','mJjumJm6mda','ihDPDgGG','ig1HA2uGysa','DY1MDwXS','Dc1Zzw1PyM8','qK9QlNbUzW','odaWig15lta','AwmVzMfJzwi','BwiTmcbTDc0','nZG2rgzqzKTO','Cw5LChnZm2q','Axn0CM8V','Es01','vvP0Buq','Bs9Hl0fdzZG','EhqTwZe2ChG','ztOG','mdDumtK6mZa','ndiXmJmXmLjJrNfPDa','ExKGj2f0jYa','kZq4ntCWmtm','nda5nZvvELLjv0K','mJfNDe9IrLm','ihrLEhqTwZe','yxrPB24GB3i','A29UDgfRDea','zM9UDc1Zzw0','Es02mdaGBwi','igfUB3rOzxi','BwuGEw91ige','mteWmwTgzMvkCq','y205nhDICgi','ww91CIbYzxm','BgfZDg5HBwu','seG6Bw0','BwfKCMfZyMK','mdbWEf0GCM8','yxGTDY1BnJa','yxKTntaW','BY5WBMC','BxGTwZrWEf0','yxrPB24Gzgu','BxGTyxv0BYa','ywLSl3n0yxq','CM91BMrLzc0','ueXo','mMfMm1nbv3y','zvO1zJ1Zoty','yM9VAY5JB20','zIbhDwvZDhm','nZa2twf5ufHx','Dgv4Dc0ZEgW','Bs9TywrYyxm','z3jHBs1SB2C','CJaWmdnSzZa','EhqTz3jHEs0','ig1Ilta','zKn5Dw4','ywjOAxnOzwS','ignHBMnLBgW','yMXVyI52zxi','DY1BodaLxq','rMfJzwjVB2S','ChHDihrLEhq','igzVBNqTyM8','CgHVBMu','BxKTwZHWEf0'];_0x490d=function(){return _0xfc7f81;};return _0x490d();}export{u as ReservationCancellationEmail};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Body as y,Column as s,Container as b,Head as N,Heading as v,Hr as k,Html as A,Img as r,Link as n,Preview as T,Row as d,Section as i,Tailwind as C,Text as l}from"../../../core/email/components";import{formatReservationEmailDate as j,formatReservationEmailDateTime as F}from"./reservation-email-date";const u=({user:x,organization:t,reservation:c})=>{var m,o,h,g,p;const f=`Your reservation with ${t.name} has been cancelled`,w=F(c.date);return a(A,{children:[e(N,{}),e(T,{children:f}),e(C,{children:a(y,{className:"bg-gray-50 font-sans",children:[a(b,{className:"bg-gray-50 p-6 max-w-[600px]",children:[e(i,{className:"mb-6",children:a(d,{children:[e(s,{className:"w-[80%]",children:e(r,{alt:`${t.name} logo`,height:"100",src:(m=t.logoFile)===null||m===void 0?void 0:m.url,className:"rounded-lg"})}),e(s,{align:"right",children:a(d,{align:"right",children:[e(s,{children:e(n,{href:"https://www.instagram.com/madrasbistro/",children:e(r,{alt:"Instagram",className:"mx-[4px]",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})}),e(s,{children:e(n,{href:"https://www.facebook.com/madrasBistro/",children:e(r,{alt:"Facebook",className:"mx-[4px]",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})})]})})]})}),a(i,{children:[a(v,{className:"text-3xl font-bold text-gray-800 mb-0",children:["Hi ",x.firstname,","]}),e(l,{className:"text-gray-600 mb-2 text-lg",children:"Your reservation has been cancelled."})]})]}),a(b,{className:"mx-auto max-w-[600px] rounded-xl bg-white px-6",children:[e(i,{className:"mb-6",children:a(d,{children:[a(s,{className:"w-[60%]",children:[e(l,{className:"text-gray-500 mb-0",children:"Cancelled reservation details"}),a(l,{className:"font-semibold text-gray-800 my-0",children:[c.firstname," ",c.lastname]}),a(l,{className:"font-semibold text-gray-800 my-0",children:["Reference: ",c.referenceId]}),a(l,{className:"font-semibold text-gray-800 my-0",children:["Date and Time: ",w]}),a(l,{className:"font-semibold text-gray-800 my-0",children:["Number of Guests: ",c.guests]})]}),e(s,{className:"w-[40%] p-0 mt-0",align:"right",valign:"top",children:e(l,{className:"text-gray-500 mb-0 pt-1",children:j(new Date)})})]})}),e(k,{className:"border-gray-200 mt-4"}),a(i,{className:"mb-6",children:[a(l,{className:"text-gray-700",children:["Your reservation at ",t.name," has been cancelled. If you did not request this cancellation or wish to make a new reservation, please contact us at ",t.phone,"."]}),a(l,{className:"text-gray-700",children:["We hope to welcome you at ",t.name," another time."]})]})]}),e(i,{className:"text-center bg-gray-50 py-5",children:a("table",{className:"w-full",children:[e("tr",{className:"w-full",children:e("td",{align:"center",children:((o=t.logoFile)===null||o===void 0?void 0:o.url)&&e(r,{alt:`${t.name} logo`,height:"100",src:t.logoFile.url,className:"rounded-lg"})})}),e("tr",{className:"w-full",children:a("td",{align:"center",children:[e(l,{className:"my-[8px] text-[16px] font-semibold text-xl pt-2 text-gray-900",children:t.name}),a(l,{className:"my-[8px] text-[16px] leading-[24px] text-gray-500",children:[(h=t.address)===null||h===void 0?void 0:h.addressLineOne,","," ",(g=t.address)===null||g===void 0?void 0:g.zipCode," ",(p=t.address)===null||p===void 0?void 0:p.city]}),e(l,{className:"mb-0 mt-[4px] text-[16px] leading-[24px] text-gray-500",children:t.phone})]})}),e("tr",{children:e("td",{align:"center",children:a(d,{className:"table-cell h-[44px] w-[56px] align-bottom pt-5",children:[e(s,{className:"pr-[8px]",children:e(n,{href:"https://www.facebook.com/madrasBistro/",children:e(r,{alt:"Facebook",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})}),e(s,{children:e(n,{href:"https://www.instagram.com/madrasbistro/",children:e(r,{alt:"Instagram",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})})]})})})]})})]})})]})},I={user:{id:"VD0OJ52f0mdAnm5YePP6BAW6hdbaCjAJ",name:"Abhishek Shaji",email:"kontakt@abhishek.pl",emailVerified:!0,image:"https://lh3.googleusercontent.com/a/ACg8ocKbkCAMTNvMizjXNxcm1aYtBiWnYpCYmU-7aE2Ft_M_uiHheZ5f=s96-c",createdAt:"2025-03-22T22:54:40.260Z",updatedAt:"2025-03-22T22:54:40.260Z",firstname:"Abhishek",lastname:"Shaji"},reservation:{id:"cm94wbpbm0000itx1iv9k2mqr",referenceId:"PH6LD6",firstname:"Abhishek",lastname:"Shaji",phone:"+48570135862",guests:4,date:new Date("2025-04-07T19:30:00.000Z"),createdAt:"2025-03-22T22:54:40.260Z",acceptedAt:"2025-03-22T23:00:23.456Z",cancelledAt:"2025-03-23T10:15:45.789Z"},organization:{id:"cm8kthfdq0001lg03b59mdy7b",name:"Madras Bistro",phone:"+48570135862",email:"contact@madrasbistro.pl",createdAt:"2025-03-22T23:05:14.271Z",legalEntityId:null,address:{id:"cm8kthfdr0002lg0350ijialt",firstname:null,lastname:null,phone:null,addressLineOne:"Plac Bohater\xF3w Getta 2",doorNumber:null,addressLineTwo:"3",zipCode:"33-332",city:"Krak\xF3w",country:"PL",placeId:"ChIJf-nsRkRbFkcR21gtObFSSSA",deliveryInstructions:null},configuration:{id:"cm8kthfdr0003lg03ghgs262n",hostname:"madrasbistro.pl",countriesShipping:["us"],stripeAccountId:"null",enableHostCheckout:!1,enableHostTracking:!1,isAcceptingOrders:!1,isAcceptingReservations:!1,defaultLocale:"en",supportedLocales:["en","pl"],defaultCurrency:"PLN",createdAt:"2025-03-22T23:05:14.271Z"},logo:"https://z3liuyatqnepss3d.public.blob.vercel-storage.com/logo-zeJymFRMFCIKPlvjxYm2af3SAWvBOj.png",logoFile:{id:"cm8ktmu890005lg0356gwclfk",url:"https://z3liuyatqnepss3d.public.blob.vercel-storage.com/logo-zeJymFRMFCIKPlvjxYm2af3SAWvBOj.png",mimeType:"image/png",size:1652289,filename:"logo.png"}}};u.PreviewProps=I;export default u;export{u as ReservationCancellationEmail};
@@ -1 +1 @@
1
- const _0x59cf00=_0x4ea7,_0x2953ff=_0x4ea7;(function(_0x5d8c4f,_0x7799e3){const _0x15de36=_0x4ea7,_0x3c963a=_0x4ea7,_0x5e7524=_0x5d8c4f();while(!![]){try{const _0x522a60=-parseInt(_0x15de36(0x1a4))/0x1*(-parseInt(_0x3c963a(0x1e0))/0x2)+-parseInt(_0x15de36(0x153))/0x3+-parseInt(_0x15de36(0x1dd))/0x4*(-parseInt(_0x15de36(0x15a))/0x5)+-parseInt(_0x15de36(0x1af))/0x6*(parseInt(_0x3c963a(0x181))/0x7)+parseInt(_0x15de36(0x1a9))/0x8+-parseInt(_0x3c963a(0x1b9))/0x9*(-parseInt(_0x3c963a(0x15c))/0xa)+-parseInt(_0x3c963a(0x19a))/0xb*(parseInt(_0x15de36(0x13b))/0xc);if(_0x522a60===_0x7799e3)break;else _0x5e7524['push'](_0x5e7524['shift']());}catch(_0x269b93){_0x5e7524['push'](_0x5e7524['shift']());}}}(_0x3eec,0xec6e5));function _0x4ea7(_0x484ab,_0x5d8d22){_0x484ab=_0x484ab-0x122;const _0x3eecae=_0x3eec();let _0x4ea793=_0x3eecae[_0x484ab];if(_0x4ea7['LgNEfE']===undefined){var _0x1cd8aa=function(_0x376f6c){const _0x16b0bd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x72a209='',_0x56e7df='';for(let _0x320dcd=0x0,_0x254d61,_0x517ca1,_0x999ea7=0x0;_0x517ca1=_0x376f6c['charAt'](_0x999ea7++);~_0x517ca1&&(_0x254d61=_0x320dcd%0x4?_0x254d61*0x40+_0x517ca1:_0x517ca1,_0x320dcd++%0x4)?_0x72a209+=String['fromCharCode'](0xff&_0x254d61>>(-0x2*_0x320dcd&0x6)):0x0){_0x517ca1=_0x16b0bd['indexOf'](_0x517ca1);}for(let _0x389417=0x0,_0x41d543=_0x72a209['length'];_0x389417<_0x41d543;_0x389417++){_0x56e7df+='%'+('00'+_0x72a209['charCodeAt'](_0x389417)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x56e7df);};_0x4ea7['aGJEWj']=_0x1cd8aa,_0x4ea7['HBZOfR']={},_0x4ea7['LgNEfE']=!![];}const _0x185ec5=_0x3eecae[0x0],_0x3b56ab=_0x484ab+_0x185ec5,_0x4f31ec=_0x4ea7['HBZOfR'][_0x3b56ab];return!_0x4f31ec?(_0x4ea793=_0x4ea7['aGJEWj'](_0x4ea793),_0x4ea7['HBZOfR'][_0x3b56ab]=_0x4ea793):_0x4ea793=_0x4f31ec,_0x4ea793;}import{jsx as _0x64f07a,jsxs as _0x28028e}from'react/jsx-runtime';function _0x3eec(){const _0x34c739=['y205nhDICgi','B20G','mZCZmtGWng9dBu5Mwa','y2vUDgvY','EhqTwZe2ChG','mJq5nZmYv1voCLrj','sw5ZDgfNCMe','zxj2yxrPB24','ifnOywPP','yxrLCSoZDYbh','CNDHCMqGDg8','ltiGDgv4Dc0','Es01','BxGTwZrWEf0','y29UDgfJDea','mwL2owSYBxe','yMXVyI52zxi','mJfNDe9IrLm','Bg9NBY16zuO','DgfIBguTy2u','tNvTyMvYig8','lNbS','Es05mda','B29RlwXVz28','Axn0CM8V','qwjOAxnOzwS','ywjOAxnOzwS','Bwf4lxCTwZy','uMTsyKzRy1i','AgrIyunQquO','Es01mdaGBwi','nNb4xsbMB24','ntaGzM9UDc0','Dgv4Dc1NCMe','AwjVBgqGDgu','ww91CIbYzxm','yM9YzgvYlwC','mMfMm1nbv3y','ihLVDxiGDge','vgHPCYbPCYa','lNbUzW','CMvHy3qUzw0','BgfZDg5HBwu','Aw1Hz2uVCg4','CMvMzxjLBMm','ig5LzwqGDg8','yM9VAY5JB20','Bs9TywrYyxm','s3jHA8oZDW','ywLSl3n0yxq','ihrLEhqTz3i','oJiZlJq1nLO','BxqTna','y2L0Eq','Bg9NBY5WBMC','nNb4xsbSzwe','mJrjELLzuvC','igHHCYbIzwu','otaWmdvSzZa','mJaYns0WmY0','A0vmrgW','BwiTnG','DxjS','DgvYigjNlwC','DgfIBgu','EJnSAxv5yxq','rhbtz0u','ltaGChqTmq','qMLxBLLWq1K','igzVBNqTyM8','zY1BmJrWEf0','Es03mda','y204A3rTDtG','kZq4ntCWmtm','ugHVBMu','ywrKCMvZC0W','BxGTyxv0BYa','vxD4uhC','y204A3rOzMq','ChHDihCTwZu','mtmZnJK2mKrxtKPqzq','zM9UDc1Zzw0','CJaWmdjSzZa','DY1MDwXS','lIbjzIb5B3u','oJaWlJaWmfO','ywDYyw0Uy28','nvbJtwzvAG','yMXLigzVCIa','mtbSqxzqvM4','Df9nx3vPsgG','ExKGj2f0jYa','igrPCMvJDgW','mJaYns0Wnc0','BMCGEw91ige','mtaW','Bg9NB0zPBgu','D3D3lMLUC3q','ihrLEhqTwZe','ig1Ilta','BNvSBa','AwmVzMfJzwi','BtaWmdbPDhG','CtaWmdfSzZa','mhb4xq','qK9QlNbUzW','oJqWlJi2mfO','ChHDihrLEhq','z3jHBs1SB2C','m2DOz3mYnJi','DY1BodaLxq','zsbWEc02','yxKTntaW','igXVz28','odaWig15lta','yMCTz3jHEs0','DY1BndaLxsa','BvuTn2ffmKy','BwfKCMfZyMK','ywrKCMvZCW','vNfPBMC','mdbWEf0GCM8','Es02mdaGBwi','ueXo','BgGZlMDVB2C','A1zsvw8','nZu2otHZCgDJr0W','BwiTmcbTDc0','ywDLlMnVBs8','BMfTzq','seG6Bw0','AwXZ','CfLsCeS','s1bSDMP4ww0','z24TyM90Dg8','z3vLC3rZ','CgHVBMu','Aw9UigrLDge','mZu2z3DJBgy','ntG2mG','igjNlxDOAxq','Dc1Zzw1PyM8','l21HzhjHC0i','mJjumJm6mdu','BNrLBNqUy28','CYb0BYb5B3u','AwmVAw5ZDge','rgf0zsbHBMq','zvbqnKjbvZy','mJjumJm6mda','Ahr0Chm6lY8','mZu3mZGYm2zXB3vLwG','CM91BMrLzc0','twfKCMfZiei','Dg9W','ve52twL6ALG','C3rYBY5WBa','uhjLDMLLD1a','Dgv4Dc0ZEgW','mZuWAwPPywW','sgKG','n1nVA2Dbsq','mJjumJi6ntq','y2vSlxn0B3i','EMLWq29Kzq','CMLNAhq','nJm5mte4nfvxtvDdrq','Ew1guK1gq0K','yMLZDhjVlW','CMf5ltiWmca','Dgv4Dc1Jzw4','zxmGzNjVBsa','nZaYyxjOBNDU','rMfJzwjVB2S','uMvMzxjLBMm','mdDumtK6mZa','EsbJAgfUz2u','BgWGAc1Bndq','EhqTz3jHEs0','BxKTwZHWEf0','BIbJB25MAxi','Cw5LChnZm2q','nJuWody5mMHSuLfyAq','BY5WBMC','ntaGCc02ig0','CMf5ltuWiha','yxrPB24GzNi','q2HjsMyTBNm','zuLK','BgqGDgv4Dc0','m2i1ow1KEtC','mZmTmZmY','EgWGChqTmIa','zgqUtu0UExK','D3D3lMzHy2u','zvO1zJ1Zoty','ChiTwZHWEf0','B2nlyMTdqu0','Axn0CM8','oJe0lJi3mvO','lwDYyxKTnta','mtuGBwLUDxq','u2HHAMK','DY1BnJaLxq','ig1HA2uGyw4','mg1Kqw5TnvK','ignVBMzPCM0','z3jHEs04mda','yxrPB24Siha','Ew91CIbYzxm','Aw5Lt25L','zgf0zq','zxr0ysaY','BwvKlG','Bs9Hl0fdzZG','lNb1yMXPyY4'];_0x3eec=function(){return _0x34c739;};return _0x3eec();}import{format as _0x577ec4}from'date-fns';import{Body as _0x39f86f,Column as _0x2baf50,Container as _0x2449fc,Head as _0x5d4ab2,Heading as _0x3480b3,Hr as _0x4661a3,Html as _0x1ee805,Img as _0x55ca69,Link as _0x4bd5f0,Preview as _0x1472d2,Row as _0x474745,Section as _0x2de2d7,Tailwind as _0x5a3a61,Text as _0x1f7621}from'../../../core/email/components';const u=({user:_0x37a517,organization:_0x474677,reservation:_0x2085d0})=>{const _0x55ad77=_0x4ea7,_0x3fef89=_0x4ea7,_0x2d1cef={'hXAce':function(_0x61f9bb,_0xea93c4,_0x402c74){return _0x61f9bb(_0xea93c4,_0x402c74);},'vtfyw':_0x55ad77(0x1a8),'JBWsd':_0x55ad77(0x199)+_0x55ad77(0x12c)+'ail/stat'+'ic/insta'+'gram-log'+_0x55ad77(0x1ba),'kELDl':function(_0x36cf9d,_0x272d96,_0x2c708d){return _0x36cf9d(_0x272d96,_0x2c708d);},'wWrcQ':_0x55ad77(0x154)+'ibold\x20te'+_0x55ad77(0x1b5)+'800\x20my-0','UwxPw':'text-gra'+_0x55ad77(0x1f9)+'-0','Vqing':'text-gra'+_0x55ad77(0x14a),'kVRUo':_0x55ad77(0x1ad)+_0x55ad77(0x142)+_0x3fef89(0x1bc)+_0x3fef89(0x1e7),'lBmsO':_0x3fef89(0x19b)+'lg','DpSgE':_0x3fef89(0x1b6)+_0x55ad77(0x165)+_0x3fef89(0x13a)+'ding-[24'+_0x3fef89(0x16e)+_0x3fef89(0x1cb)+'0','pYRpK':_0x55ad77(0x199)+_0x3fef89(0x164)+_0x55ad77(0x159)+_0x3fef89(0x132)+_0x55ad77(0x1ab)};var _0x566f9d,_0x1527c0,_0x1e8c1c,_0x2aead7,_0x5aba9e;const _0x11085b=_0x3fef89(0x12a)+_0x3fef89(0x1d4)+_0x55ad77(0x1e2)+_0x3fef89(0x1d1)+_0x55ad77(0x1bd)+_0x55ad77(0x1dc)+_0x474677[_0x55ad77(0x184)],_0x2a496f=_0x577ec4(new Date(_0x2085d0[_0x55ad77(0x1d6)]),_0x3fef89(0x1c4)+_0x55ad77(0x15e)+_0x55ad77(0x185));return _0x28028e(_0x1ee805,{'children':[_0x64f07a(_0x5d4ab2,{}),_0x2d1cef['hXAce'](_0x64f07a,_0x1472d2,{'children':_0x11085b}),_0x64f07a(_0x5a3a61,{'children':_0x28028e(_0x39f86f,{'className':_0x3fef89(0x176)+_0x3fef89(0x123)+'sans','children':[_0x28028e(_0x2449fc,{'className':_0x55ad77(0x176)+_0x55ad77(0x1bb)+'ax-w-[60'+_0x55ad77(0x16b),'children':[_0x64f07a(_0x2de2d7,{'className':_0x3fef89(0x140),'children':_0x28028e(_0x474745,{'children':[_0x64f07a(_0x2baf50,{'className':_0x3fef89(0x171),'children':_0x64f07a(_0x55ca69,{'alt':_0x474677[_0x3fef89(0x184)]+_0x55ad77(0x174),'height':_0x3fef89(0x162),'src':(_0x566f9d=_0x474677[_0x55ad77(0x163)])===null||_0x566f9d===void 0x0?void 0x0:_0x566f9d[_0x3fef89(0x141)],'className':_0x55ad77(0x19b)+'lg'})}),_0x64f07a(_0x2baf50,{'align':'right','children':_0x28028e(_0x474745,{'align':_0x2d1cef['vtfyw'],'children':[_0x64f07a(_0x2baf50,{'children':_0x64f07a(_0x4bd5f0,{'href':_0x55ad77(0x199)+_0x55ad77(0x164)+_0x3fef89(0x159)+_0x55ad77(0x132)+_0x55ad77(0x1ab),'children':_0x64f07a(_0x55ca69,{'alt':_0x55ad77(0x1e1)+'m','className':'mx-[4px]','height':'36','src':_0x2d1cef['JBWsd'],'width':'36'})})}),_0x64f07a(_0x2baf50,{'children':_0x64f07a(_0x4bd5f0,{'href':_0x3fef89(0x199)+_0x3fef89(0x1c5)+'book.com'+_0x3fef89(0x191)+_0x55ad77(0x1f3),'children':_0x64f07a(_0x55ca69,{'alt':'Facebook','className':_0x3fef89(0x1e8),'height':'36','src':_0x55ad77(0x199)+_0x55ad77(0x12c)+_0x55ad77(0x134)+'ic/faceb'+_0x3fef89(0x1f2)+_0x3fef89(0x12b),'width':'36'})})})]})})]})}),_0x28028e(_0x2de2d7,{'children':[_0x2d1cef[_0x55ad77(0x13f)](_0x28028e,_0x3480b3,{'className':_0x3fef89(0x1a1)+_0x55ad77(0x148)+_0x3fef89(0x1c0)+_0x3fef89(0x1d2)+_0x3fef89(0x166),'children':[_0x3fef89(0x1a3),_0x37a517['firstnam'+'e'],',']}),_0x64f07a(_0x1f7621,{'className':_0x3fef89(0x124)+_0x3fef89(0x17d)+_0x55ad77(0x1e6)+'lg','children':_0x55ad77(0x126)+_0x3fef89(0x1e2)+_0x55ad77(0x13c)+_0x55ad77(0x1b7)+_0x55ad77(0x1d8)})]})]}),_0x28028e(_0x2449fc,{'className':_0x55ad77(0x14f)+_0x3fef89(0x1f6)+_0x55ad77(0x17c)+'unded-xl'+_0x3fef89(0x18f)+_0x55ad77(0x172),'children':[_0x64f07a(_0x2de2d7,{'className':'mb-6','children':_0x28028e(_0x474745,{'children':[_0x28028e(_0x2baf50,{'className':_0x3fef89(0x1ce),'children':[_0x64f07a(_0x1f7621,{'className':_0x3fef89(0x124)+_0x55ad77(0x1f9)+'-0','children':'Reservat'+_0x3fef89(0x18c)+_0x3fef89(0x186)}),_0x28028e(_0x1f7621,{'className':_0x55ad77(0x154)+_0x3fef89(0x125)+_0x55ad77(0x1b5)+_0x3fef89(0x175),'children':[_0x2085d0['firstnam'+'e'],'\x20',_0x2085d0[_0x55ad77(0x12d)]]}),_0x28028e(_0x1f7621,{'className':_0x55ad77(0x154)+_0x55ad77(0x125)+_0x3fef89(0x1b5)+_0x3fef89(0x175),'children':[_0x55ad77(0x1b1)+'e:\x20',_0x2085d0[_0x3fef89(0x12f)+_0x55ad77(0x1bf)]]}),_0x28028e(_0x1f7621,{'className':_0x2d1cef['wWrcQ'],'children':[_0x55ad77(0x196)+'\x20Time:\x20',_0x2a496f]}),_0x28028e(_0x1f7621,{'className':_0x55ad77(0x154)+_0x3fef89(0x125)+'xt-gray-'+_0x3fef89(0x175),'children':[_0x55ad77(0x1ef)+'f\x20Guests'+':\x20',_0x2085d0[_0x55ad77(0x18a)]]}),_0x64f07a(_0x1f7621,{'className':_0x2d1cef[_0x55ad77(0x150)],'children':_0x3fef89(0x14d)}),_0x64f07a(_0x1f7621,{'className':_0x3fef89(0x154)+_0x3fef89(0x125)+_0x55ad77(0x1b5)+_0x55ad77(0x175),'children':_0x2085d0['phone']})]}),_0x64f07a(_0x2baf50,{'className':_0x55ad77(0x177)+'p-0\x20mt-0','align':_0x55ad77(0x1a8),'valign':_0x55ad77(0x19d),'children':_0x64f07a(_0x1f7621,{'className':_0x3fef89(0x124)+_0x55ad77(0x1f9)+_0x55ad77(0x146),'children':_0x577ec4(new Date(),_0x3fef89(0x1c4)+'yy')})})]})}),_0x64f07a(_0x4661a3,{'className':_0x3fef89(0x127)+_0x55ad77(0x1ac)+_0x55ad77(0x137)}),_0x28028e(_0x2de2d7,{'className':_0x3fef89(0x140),'children':[_0x28028e(_0x1f7621,{'className':_0x2d1cef['Vqing'],'children':['We\x27re\x20lo'+'oking\x20fo'+_0x3fef89(0x1e5)+'\x20welcomi'+_0x3fef89(0x161)+'t\x20',_0x474677[_0x55ad77(0x184)],_0x3fef89(0x157)+_0x55ad77(0x130)+_0x55ad77(0x1cf)+_0x55ad77(0x1b3)+_0x55ad77(0x194)+'r\x20reserv'+_0x3fef89(0x1d3)+'lease\x20co'+'ntact\x20us'+_0x3fef89(0x15f)+'y\x20at\x20',_0x474677[_0x3fef89(0x18b)],'.']}),_0x64f07a(_0x1f7621,{'className':_0x2d1cef[_0x3fef89(0x17b)],'children':'Please\x20n'+'ote\x20that'+'\x20we\x20hold'+_0x55ad77(0x129)+_0x3fef89(0x15b)+_0x55ad77(0x1cc)+_0x3fef89(0x1ae)+_0x3fef89(0x1d4)+_0x55ad77(0x1e2)+'\x20time.'})]})]}),_0x64f07a(_0x2de2d7,{'className':_0x2d1cef[_0x55ad77(0x180)],'children':_0x28028e(_0x3fef89(0x143),{'className':_0x55ad77(0x156),'children':[_0x2d1cef[_0x55ad77(0x13f)](_0x64f07a,'tr',{'className':_0x55ad77(0x156),'children':_0x64f07a('td',{'align':'center','children':((_0x1527c0=_0x474677[_0x55ad77(0x163)])===null||_0x1527c0===void 0x0?void 0x0:_0x1527c0['url'])&&_0x64f07a(_0x55ca69,{'alt':_0x474677[_0x3fef89(0x184)]+'\x20logo','height':_0x3fef89(0x162),'src':_0x474677[_0x55ad77(0x163)][_0x3fef89(0x141)],'className':_0x2d1cef['lBmsO']})})}),_0x64f07a('tr',{'className':_0x55ad77(0x156),'children':_0x28028e('td',{'align':_0x55ad77(0x1de),'children':[_0x64f07a(_0x1f7621,{'className':_0x55ad77(0x1b6)+_0x55ad77(0x165)+_0x55ad77(0x122)+_0x3fef89(0x190)+_0x55ad77(0x1c0)+_0x55ad77(0x1c3)+'text-gra'+_0x3fef89(0x1f1),'children':_0x474677[_0x3fef89(0x184)]}),_0x28028e(_0x1f7621,{'className':_0x2d1cef[_0x3fef89(0x145)],'children':[(_0x1e8c1c=_0x474677[_0x3fef89(0x17a)])===null||_0x1e8c1c===void 0x0?void 0x0:_0x1e8c1c[_0x55ad77(0x14e)+_0x3fef89(0x1d5)],',','\x20',(_0x2aead7=_0x474677[_0x55ad77(0x17a)])===null||_0x2aead7===void 0x0?void 0x0:_0x2aead7[_0x3fef89(0x1a7)],'\x20',(_0x5aba9e=_0x474677[_0x3fef89(0x17a)])===null||_0x5aba9e===void 0x0?void 0x0:_0x5aba9e[_0x3fef89(0x138)]]}),_0x64f07a(_0x1f7621,{'className':_0x55ad77(0x182)+'[4px]\x20te'+_0x55ad77(0x1df)+']\x20leadin'+_0x55ad77(0x149)+_0x55ad77(0x135)+_0x55ad77(0x173),'children':_0x474677[_0x3fef89(0x18b)]})]})}),_0x64f07a('tr',{'children':_0x64f07a('td',{'align':'center','children':_0x28028e(_0x474745,{'className':_0x3fef89(0x1ee)+_0x55ad77(0x1b4)+_0x3fef89(0x152)+'6px]\x20ali'+_0x3fef89(0x189)+'m\x20pt-5','children':[_0x64f07a(_0x2baf50,{'className':_0x3fef89(0x1c7),'children':_0x64f07a(_0x4bd5f0,{'href':_0x55ad77(0x199)+_0x3fef89(0x1c5)+_0x3fef89(0x131)+_0x55ad77(0x191)+_0x3fef89(0x1f3),'children':_0x64f07a(_0x55ca69,{'alt':_0x3fef89(0x1b0),'height':'36','src':'https://'+_0x3fef89(0x12c)+_0x55ad77(0x134)+_0x55ad77(0x168)+'ook-logo'+_0x3fef89(0x12b),'width':'36'})})}),_0x64f07a(_0x2baf50,{'children':_0x64f07a(_0x4bd5f0,{'href':_0x2d1cef[_0x55ad77(0x187)],'children':_0x64f07a(_0x55ca69,{'alt':_0x3fef89(0x1e1)+'m','height':'36','src':'https://'+_0x3fef89(0x12c)+'ail/stat'+_0x55ad77(0x195)+_0x3fef89(0x16f)+'o.png','width':'36'})})})]})})})]})})]})})]});},P={'user':{'id':'VD0OJ52f'+_0x59cf00(0x1d0)+_0x2953ff(0x197)+_0x2953ff(0x1f8),'name':'Abhishek'+_0x59cf00(0x1e3),'email':'kontakt@'+_0x2953ff(0x1f5)+_0x2953ff(0x1f0),'emailVerified':!0x0,'image':_0x59cf00(0x199)+_0x2953ff(0x17f)+'leuserco'+_0x59cf00(0x193)+_0x59cf00(0x1d9)+_0x2953ff(0x1c8)+_0x59cf00(0x19e)+'Nxcm1aYt'+_0x2953ff(0x147)+_0x2953ff(0x178)+_0x59cf00(0x15d)+_0x59cf00(0x1c6)+'-c','createdAt':_0x59cf00(0x13e)+'22T22:54'+_0x2953ff(0x16d),'updatedAt':_0x59cf00(0x13e)+_0x59cf00(0x1a5)+_0x59cf00(0x16d),'firstname':_0x59cf00(0x1f4),'lastname':_0x59cf00(0x1cd)},'reservation':{'id':_0x2953ff(0x1db)+_0x2953ff(0x169)+_0x59cf00(0x1ea)+'r','referenceId':'PH6LD6','firstname':_0x59cf00(0x1f4),'lastname':_0x59cf00(0x1cd),'phone':_0x59cf00(0x14c)+_0x59cf00(0x18e),'guests':0x4,'date':new Date(_0x59cf00(0x160)+_0x59cf00(0x1b2)+_0x59cf00(0x158)),'createdAt':_0x2953ff(0x13e)+_0x59cf00(0x1a5)+':40.260Z','acceptedAt':_0x59cf00(0x13e)+_0x2953ff(0x198)+_0x2953ff(0x136),'cancelledAt':null},'organization':{'id':_0x59cf00(0x151)+_0x2953ff(0x16a)+_0x2953ff(0x1c1)+'b','name':_0x59cf00(0x19c)+_0x59cf00(0x1c9),'phone':'+4857013'+_0x2953ff(0x18e),'email':_0x2953ff(0x1e9)+_0x59cf00(0x179)+_0x2953ff(0x19f),'createdAt':_0x2953ff(0x13e)+_0x2953ff(0x192)+':14.271Z','legalEntityId':null,'address':{'id':_0x2953ff(0x151)+_0x59cf00(0x155)+_0x2953ff(0x1a2)+'t','firstname':null,'lastname':null,'phone':null,'addressLineOne':'Plac\x20Boh'+_0x59cf00(0x1e4)+_0x2953ff(0x1d7),'doorNumber':null,'addressLineTwo':'3','zipCode':_0x59cf00(0x1c2),'city':_0x2953ff(0x133),'country':'PL','placeId':_0x59cf00(0x1be)+_0x2953ff(0x1f7)+_0x2953ff(0x1ec)+'SSA','deliveryInstructions':null},'configuration':{'id':_0x59cf00(0x151)+'r0003lg0'+_0x59cf00(0x170)+'n','hostname':_0x59cf00(0x179)+_0x59cf00(0x19f),'countriesShipping':['us'],'stripeAccountId':_0x59cf00(0x167),'enableHostCheckout':!0x1,'enableHostTracking':!0x1,'isAcceptingOrders':!0x1,'isAcceptingReservations':!0x1,'defaultLocale':'en','supportedLocales':['en','pl'],'defaultCurrency':_0x2953ff(0x17e),'createdAt':'2025-03-'+_0x59cf00(0x192)+_0x2953ff(0x1ca)},'logo':_0x2953ff(0x199)+_0x59cf00(0x144)+_0x2953ff(0x1b8)+_0x2953ff(0x1da)+_0x59cf00(0x1eb)+_0x2953ff(0x1a6)+'age.com/'+_0x59cf00(0x1ed)+_0x2953ff(0x1aa)+_0x59cf00(0x188)+'2af3SAWv'+_0x59cf00(0x16c),'logoFile':{'id':_0x2953ff(0x14b)+_0x2953ff(0x13d)+_0x2953ff(0x18d)+'k','url':_0x59cf00(0x199)+_0x59cf00(0x144)+_0x2953ff(0x1b8)+_0x2953ff(0x1da)+_0x2953ff(0x1eb)+'cel-stor'+_0x2953ff(0x183)+_0x59cf00(0x1ed)+_0x2953ff(0x1aa)+_0x59cf00(0x188)+_0x2953ff(0x128)+'BOj.png','mimeType':_0x59cf00(0x12e)+'g','size':0x193641,'filename':_0x59cf00(0x139)}}};u[_0x59cf00(0x1a0)+'rops']=P;export default u;export{u as ReservationConfirmationEmail};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Body as N,Column as s,Container as b,Head as v,Heading as k,Hr as A,Html as T,Img as i,Link as n,Preview as j,Row as m,Section as c,Tailwind as C,Text as l}from"../../../core/email/components";import{formatReservationEmailDate as P,formatReservationEmailDateTime as F}from"./reservation-email-date";const u=({user:x,organization:t,reservation:r})=>{var o,d,h,g,p;const y=`This is your reservation confirmation from ${t.name}`,f=t.configuration.defaultTimeZone,w=F(r.date,f);return a(T,{children:[e(v,{}),e(j,{children:y}),e(C,{children:a(N,{className:"bg-gray-50 font-sans",children:[a(b,{className:"bg-gray-50 p-6 max-w-[600px]",children:[e(c,{className:"mb-6",children:a(m,{children:[e(s,{className:"w-[80%]",children:e(i,{alt:`${t.name} logo`,height:"100",src:(o=t.logoFile)===null||o===void 0?void 0:o.url,className:"rounded-lg"})}),e(s,{align:"right",children:a(m,{align:"right",children:[e(s,{children:e(n,{href:"https://www.instagram.com/madrasbistro/",children:e(i,{alt:"Instagram",className:"mx-[4px]",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})}),e(s,{children:e(n,{href:"https://www.facebook.com/madrasBistro/",children:e(i,{alt:"Facebook",className:"mx-[4px]",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})})]})})]})}),a(c,{children:[a(k,{className:"text-3xl font-bold text-gray-800 mb-0",children:["Hi ",x.firstname,","]}),e(l,{className:"text-gray-600 mb-2 text-lg",children:"Your reservation has been confirmed."})]})]}),a(b,{className:"mx-auto max-w-[600px] rounded-xl bg-white px-6",children:[e(c,{className:"mb-6",children:a(m,{children:[a(s,{className:"w-[60%]",children:[e(l,{className:"text-gray-500 mb-0",children:"Reservation details"}),a(l,{className:"font-semibold text-gray-800 my-0",children:[r.firstname," ",r.lastname]}),a(l,{className:"font-semibold text-gray-800 my-0",children:["Reference: ",r.referenceId]}),a(l,{className:"font-semibold text-gray-800 my-0",children:["Date and Time: ",w]}),a(l,{className:"font-semibold text-gray-800 my-0",children:["Number of Guests: ",r.guests]}),e(l,{className:"text-gray-500 mb-0",children:"Phone"}),e(l,{className:"font-semibold text-gray-800 my-0",children:r.phone})]}),e(s,{className:"w-[40%] p-0 mt-0",align:"right",valign:"top",children:e(l,{className:"text-gray-500 mb-0 pt-1",children:P(new Date,f)})})]})}),e(A,{className:"border-gray-200 mt-4"}),a(c,{className:"mb-6",children:[a(l,{className:"text-gray-700",children:["We're looking forward to welcoming you at ",t.name,". If you need to make any changes to your reservation, please contact us directly at ",t.phone,"."]}),e(l,{className:"text-gray-700",children:"Please note that we hold your table for 15 minutes from your reservation time."})]})]}),e(c,{className:"text-center bg-gray-50 py-5",children:a("table",{className:"w-full",children:[e("tr",{className:"w-full",children:e("td",{align:"center",children:((d=t.logoFile)===null||d===void 0?void 0:d.url)&&e(i,{alt:`${t.name} logo`,height:"100",src:t.logoFile.url,className:"rounded-lg"})})}),e("tr",{className:"w-full",children:a("td",{align:"center",children:[e(l,{className:"my-[8px] text-[16px] font-semibold text-xl pt-2 text-gray-900",children:t.name}),a(l,{className:"my-[8px] text-[16px] leading-[24px] text-gray-500",children:[(h=t.address)===null||h===void 0?void 0:h.addressLineOne,","," ",(g=t.address)===null||g===void 0?void 0:g.zipCode," ",(p=t.address)===null||p===void 0?void 0:p.city]}),e(l,{className:"mb-0 mt-[4px] text-[16px] leading-[24px] text-gray-500",children:t.phone})]})}),e("tr",{children:e("td",{align:"center",children:a(m,{className:"table-cell h-[44px] w-[56px] align-bottom pt-5",children:[e(s,{className:"pr-[8px]",children:e(n,{href:"https://www.facebook.com/madrasBistro/",children:e(i,{alt:"Facebook",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})}),e(s,{children:e(n,{href:"https://www.instagram.com/madrasbistro/",children:e(i,{alt:"Instagram",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})})]})})})]})})]})})]})},I={user:{id:"VD0OJ52f0mdAnm5YePP6BAW6hdbaCjAJ",name:"Abhishek Shaji",email:"kontakt@abhishek.pl",emailVerified:!0,image:"https://lh3.googleusercontent.com/a/ACg8ocKbkCAMTNvMizjXNxcm1aYtBiWnYpCYmU-7aE2Ft_M_uiHheZ5f=s96-c",createdAt:"2025-03-22T22:54:40.260Z",updatedAt:"2025-03-22T22:54:40.260Z",firstname:"Abhishek",lastname:"Shaji"},reservation:{id:"cm94wbpbm0000itx1iv9k2mqr",referenceId:"PH6LD6",firstname:"Abhishek",lastname:"Shaji",phone:"+48570135862",guests:4,date:new Date("2025-04-07T19:30:00.000Z"),createdAt:"2025-03-22T22:54:40.260Z",acceptedAt:"2025-03-22T23:00:23.456Z",cancelledAt:null},organization:{id:"cm8kthfdq0001lg03b59mdy7b",name:"Madras Bistro",phone:"+48570135862",email:"contact@madrasbistro.pl",createdAt:"2025-03-22T23:05:14.271Z",legalEntityId:null,address:{id:"cm8kthfdr0002lg0350ijialt",firstname:null,lastname:null,phone:null,addressLineOne:"Plac Bohater\xF3w Getta 2",doorNumber:null,addressLineTwo:"3",zipCode:"33-332",city:"Krak\xF3w",country:"PL",placeId:"ChIJf-nsRkRbFkcR21gtObFSSSA",deliveryInstructions:null},configuration:{id:"cm8kthfdr0003lg03ghgs262n",hostname:"madrasbistro.pl",countriesShipping:["us"],stripeAccountId:"null",enableHostCheckout:!1,enableHostTracking:!1,isAcceptingOrders:!1,isAcceptingReservations:!1,defaultLocale:"en",supportedLocales:["en","pl"],defaultCurrency:"PLN",createdAt:"2025-03-22T23:05:14.271Z"},logo:"https://z3liuyatqnepss3d.public.blob.vercel-storage.com/logo-zeJymFRMFCIKPlvjxYm2af3SAWvBOj.png",logoFile:{id:"cm8ktmu890005lg0356gwclfk",url:"https://z3liuyatqnepss3d.public.blob.vercel-storage.com/logo-zeJymFRMFCIKPlvjxYm2af3SAWvBOj.png",mimeType:"image/png",size:1652289,filename:"logo.png"}}};u.PreviewProps=I;export default u;export{u as ReservationConfirmationEmail};
@@ -0,0 +1,2 @@
1
+ export declare function formatReservationEmailDate(date: Date | string, timeZone?: string): string;
2
+ export declare function formatReservationEmailDateTime(date: Date | string, timeZone?: string): string;
@@ -0,0 +1 @@
1
+ import{DEFAULT_ORGANIZATION_TIME_ZONE as o,isValidTimeZone as m}from"../../../schemas/time-zone.schema";function s(e){return!e||!m(e)?o:e}function n(e,r,t){const a=new Intl.DateTimeFormat("en-GB",Object.assign(Object.assign({},r),{timeZone:s(t)})).formatToParts(new Date(e));return Object.fromEntries(a.filter(i=>i.type!=="literal").map(i=>[i.type,i.value]))}export function formatReservationEmailDate(e,r){const t=n(e,{year:"numeric",month:"2-digit",day:"2-digit"},r);return`${t.day}.${t.month}.${t.year}`}export function formatReservationEmailDateTime(e,r){const t=n(e,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"},r);return`${t.day}.${t.month}.${t.year} at ${t.hour}:${t.minute}`}
@@ -1 +1 @@
1
- const _0x13ed5f=_0x3837,_0x4e6453=_0x3837;(function(_0x529ca6,_0x4b2c22){const _0x1b0df5=_0x3837,_0x166e91=_0x3837,_0x2e6b3b=_0x529ca6();while(!![]){try{const _0x5e9b18=-parseInt(_0x1b0df5(0x19a))/0x1*(parseInt(_0x1b0df5(0x15c))/0x2)+-parseInt(_0x1b0df5(0x131))/0x3+-parseInt(_0x166e91(0xf2))/0x4*(-parseInt(_0x1b0df5(0x11b))/0x5)+parseInt(_0x1b0df5(0x197))/0x6*(-parseInt(_0x166e91(0x125))/0x7)+-parseInt(_0x1b0df5(0x1b8))/0x8*(parseInt(_0x166e91(0x148))/0x9)+parseInt(_0x166e91(0x199))/0xa+parseInt(_0x166e91(0x183))/0xb;if(_0x5e9b18===_0x4b2c22)break;else _0x2e6b3b['push'](_0x2e6b3b['shift']());}catch(_0x57e839){_0x2e6b3b['push'](_0x2e6b3b['shift']());}}}(_0x2fea,0x444af));import{jsx as _0x5716fa,jsxs as _0x314956}from'react/jsx-runtime';import{format as _0x23fdce}from'date-fns';import{Body as _0x58001f,Button as _0x297987,Column as _0x2dd177,Container as _0x42a749,Head as _0x3dbdf4,Heading as _0x578d2b,Hr as _0x398dc5,Html as _0x2e8b7d,Img as _0x61b693,Link as _0x2b0cda,Preview as _0x34dd3a,Row as _0x1f875a,Section as _0x3730a5,Tailwind as _0x19eda2,Text as _0x7aac3}from'../../../core/email/components';function _0x2fea(){const _0x38bbfd=['Bg9NB0zPBgu','AM9OBKbTywq','zgLUzY1BmJq','CYbYzxnLCNy','CMvHy3qUzw0','B2nlyMTdqu0','sM9OBG','y204A3rOzMq','BgWGAc1Bndq','lNb1yMXPyY4','nvblAMvnsG','uhjLDMLLD1a','nNb4xsbMB24','CMLNAhq','AwmVzMfJzwi','DM9SyLq','DxjS','y2vUDgvY','BgfZDg5HBwu','A29UDgfRDea','ndqXnJG2y1DXCw5Q','Ahr0Chm6lY8','BwiTmcbTDc0','z24TyM90Dg8','ugXLyxnLihi','otaWmdvSzZa','Dgv4Dc1Jzw4','oJqWlJi2mfO','Es01','mZuWAwPPywW','sgKG','ugXHyYbcB2G','mty1otuXmhb6tuPgsa','whfeuxi','yMCTyMX1zs0','yMXVyI52zxi','ueG2teq2','ihb4ltuGDgu','wZrWEf0GDgu','y205nhDICgi','DgfIBgu','BgqGDgv4Dc0','Df9nx3vPsgG','BMfTzq','Denzs2q','ihrLEhqTwZe','ztOG','D3D3lMLUC3q','CMfZyMLZDhi','zxr0ysaY','EJnSAxv5yxq','B29RlwXVz28','zMLYC3rUyw0','uMvMzxjLBMm','BwiTnG','mtHLBhv3wha','zIbhDwvZDhm','Bg9NBY5WBMC','ywrKCMvZCW','mwL2owSYBxe','mdbWEf0GCM8','uvfsDKi','BxGTyxv0BYa','rg9L','Bs9Hl0fdzZG','q2HjsMyTBNm','CMf5ltuWiha','ugHVBMu','ihjLy2vPDMu','CM91BMrLzc0','Bs9TywrYyxm','Bgv1C2vYy28','twfKCMfZiei','ntaGzM9UDc0','ihnVB24Gyxm','mKD5CLLiqW','ifrPBwu6ia','seG6Bw0','Es03mda','wxPsA3i','u2HHAMK','oJe0lJi3mvO','zgqUtu0UExK','z3jHBs1SB2C','BNrLCIbIBg8','BY5WBMC','CJaWmdnSzZa','BxGTwZrWEf0','Dc1Zzw1PyM8','DY1MDwXS','ntG2mG','CM9WCW','yxKTntaW','zY1BmJrWEf0','zsbWEc02','igXVz28','Bg9NBY16zuO','Dw5KzwqTEgW','oJaWlJaWmfO','EgWGChqTmIa','xsbSzwfKAw4','DY1BodaLxq','ywDYyw0Uy28','Cw5LChnZm2q','CMf5ltiWmca','qwjOAxnOzwS','s0W5tu41mMy','s1bSDMP4ww0','mdDumtK6mZa','BNrLBNqUy28','D3D3lMzHy2u','kZq4ntCWmtm','zgf0zq','yMCTz3jHEs0','otqYnJa1nfz3CxLduG','Dgv4Dc0ZEgW','tNHJBtfHwxq','odaWig15lta','y2L0Eq','ww91igHHDMu','ywLSl3n0yxq','yxrPB24','ChHDihrLEhq','s2ndr0u','yxGTDY1BnJa','ig1Ilta','mhb4xq','ierLDgfPBhm','Aw1Hz2uVCg4','ihrLEhqTy2u','zcbYzxnWB24','zw1HAwW','m2i1ow1KEtC','BNvSBa','mtH5shvst1y','yM9YzgvYlwC','mZGWnZi1mhnhufPbvW','mZu2ntn1z0jPwMS','Aw9UihjLCxu','uMTsyKzRy1i','CtaWmdfSzZa','mJaYns0WmY0','igzVBNqTyM8','ve52twL6ALG','rMfJzwjVB2S','ltaGChqTmq','BwfKCMfZyMK','AwmVAw5ZDge','y2SGBxqTna','s3jHA8oZDW','ifnOywPP','u1nb','mJbumta6mZa','l21HzhjHC0i','Dgv4Dc1NCMe','AgrIzerRqLa','oJe1lJeYm1O','CMvXDwvZDca','zvO1zJ1Zoty','mJjumJi6ntq','AwXZ','m2DOz3mYnJi','yMLZDhjVlW','mMfMm1nbv3y','ExKGj2f0jYa','DgfIBguTy2u','Ew1guK1gq0K','mtiZmtG5nK1cBxbStq','mJjumJm6mdu','ntaGCc02ig0','yM9VAY5JB20','CMvMzxjLBMm','Aw9UigrLDge','y29UzMLNDxi','BxKTwZHWEf0','DY1BnJaLxq','ChHDihCTwZu','zxn0lG','CgHVBMu','tNvTyMvYig8','ywjOAxnOzwS','lwDYyxKTnta','mZu2z3DJBgy','lNbUzW','sw5ZDgfNCMe','EhqTwZe2ChG','Axn0CM8V','Es02mdaGBwi','l2fKBwLUl3i','ltiGDgv4Dc0','tMv3ihjLC2u','Bwf4lxCTwZy','BtaWmdbPDhG','CxnODNy','AwjVBgqGDgu','qK9QlNbUzW','nteYnZe2Afnzr3Le','Es05mda','y2vSlxn0B3i','vMLLDYbszxm','mJfNDe9IrLm','ywDLlMnVBs8','Es01mdaGBwi','zxzPzxCGyw4','zM9Yia','rgf0zsbHBMq','C3rYBY5WBa','zcbHig5LDYa','zxj2yxrPB24','ywrKCMvZC0W','zM9UDc1Zzw0','Aw5Lt25L','EhqTz3jHEs0','EhqTD2HPDgu','vKqWt0O1mMy','Axn0CM8','nJaWihjVDw4','zcb0BYb0AgK','CJaWmdjSzZa','CxDkswm','z3vLC3rZ','Cc0Wig10lta','mtaW','ueXo','EMLWq29Kzq','zxnLCNzHDgK','AgrIyunQquO'];_0x2fea=function(){return _0x38bbfd;};return _0x2fea();}const u=({user:_0x9d910a,member:_0x17e486,organization:_0x33af3f,reservation:_0x5495a9})=>{const _0xf2fb2=_0x3837,_0x233797=_0x3837,_0x203343={'QQRvB':function(_0x5c0082,_0x317ade){return _0x5c0082===_0x317ade;},'volbT':_0xf2fb2(0x11e),'qwJIc':_0x233797(0x126)+_0xf2fb2(0x140)+_0x233797(0x177)+_0x233797(0x157)+_0xf2fb2(0x1b3),'JwApn':_0xf2fb2(0xe6)+'m','KcCGE':_0xf2fb2(0x154),'YzRkr':'Email','XqDQr':'w-[40%]\x20'+_0x233797(0x10b),'tCYKd':'top','qshvv':function(_0x38b73d,_0x5105c8,_0x3a1f1d){return _0x38b73d(_0x5105c8,_0x3a1f1d);},'FotNc':function(_0x505fdc,_0x1e0b04,_0x292d82){return _0x505fdc(_0x1e0b04,_0x292d82);},'qZZFw':_0x233797(0xf5)+_0xf2fb2(0xfe)+_0xf2fb2(0x190)};var _0x46317c,_0x4259a3,_0x59664a,_0x16c813,_0x295ca6,_0x4409b6;const _0x2718c8=_0x233797(0xec)+'rvation\x20'+_0x233797(0x1ae)+_0xf2fb2(0xfa)+_0x33af3f[_0xf2fb2(0x13c)],_0x6f6643=_0x23fdce(new Date(_0x5495a9[_0x233797(0x181)]),_0xf2fb2(0x163)+_0xf2fb2(0x1b5)+_0x233797(0x15e));return _0x314956(_0x2e8b7d,{'children':[_0x5716fa(_0x3dbdf4,{}),_0x5716fa(_0x34dd3a,{'children':_0x2718c8}),_0x5716fa(_0x19eda2,{'children':_0x314956(_0x58001f,{'className':_0xf2fb2(0x182)+_0xf2fb2(0x15a)+'sans','children':[_0x314956(_0x42a749,{'className':_0x233797(0x182)+_0x233797(0x1ba)+_0x233797(0x18d)+_0x233797(0x18f),'children':[_0x5716fa(_0x3730a5,{'className':_0x233797(0x147),'children':_0x314956(_0x1f875a,{'children':[_0x5716fa(_0x2dd177,{'className':_0x233797(0x176),'children':_0x5716fa(_0x61b693,{'alt':_0x33af3f[_0xf2fb2(0x13c)]+_0x233797(0x170),'height':_0xf2fb2(0x10c),'src':(_0x46317c=_0x33af3f[_0x233797(0x111)])===null||_0x203343[_0xf2fb2(0x14e)](_0x46317c,void 0x0)?void 0x0:_0x46317c['url'],'className':_0x233797(0x156)+'lg'})}),_0x5716fa(_0x2dd177,{'align':_0x203343[_0x233797(0x120)],'children':_0x314956(_0x1f875a,{'align':_0x203343['volbT'],'children':[_0x5716fa(_0x2dd177,{'children':_0x5716fa(_0x2b0cda,{'href':_0x203343[_0x233797(0x109)],'children':_0x5716fa(_0x61b693,{'alt':_0x203343['JwApn'],'className':_0xf2fb2(0x168),'height':'36','src':_0xf2fb2(0x126)+_0xf2fb2(0x115)+_0x233797(0x189)+'ic/insta'+'gram-log'+_0x233797(0x166),'width':'36'})})}),_0x5716fa(_0x2dd177,{'children':_0x5716fa(_0x2b0cda,{'href':_0xf2fb2(0x126)+_0x233797(0x17f)+'book.com'+_0xf2fb2(0x1aa)+_0xf2fb2(0xe8),'children':_0x5716fa(_0x61b693,{'alt':_0xf2fb2(0x1a1),'className':'mx-[4px]','height':'36','src':'https://'+_0x233797(0x115)+'ail/stat'+_0xf2fb2(0x11f)+_0x233797(0x144)+_0x233797(0xe5),'width':'36'})})})]})})]})}),_0x314956(_0x3730a5,{'children':[_0x314956(_0x578d2b,{'className':_0xf2fb2(0x184)+_0xf2fb2(0x19f)+_0x233797(0x13a)+'gray-800'+_0xf2fb2(0x18e),'children':[_0xf2fb2(0x12f),_0x17e486[_0xf2fb2(0x145)+'e'],',']}),_0x5716fa(_0x7aac3,{'className':_0xf2fb2(0x1ab)+_0x233797(0xe9)+_0xf2fb2(0xeb)+'lg','children':_0x233797(0x188)+_0xf2fb2(0x155)+_0xf2fb2(0xfd)+'reservat'+_0xf2fb2(0x19b)+_0x233797(0x1c2)})]})]}),_0x314956(_0x42a749,{'className':_0x233797(0x14f)+_0x233797(0xed)+_0x233797(0x14d)+_0x233797(0x172)+'\x20bg-whit'+_0xf2fb2(0x16f),'children':[_0x5716fa(_0x3730a5,{'className':_0xf2fb2(0x147),'children':_0x314956(_0x1f875a,{'children':[_0x314956(_0x2dd177,{'className':_0xf2fb2(0x1c0),'children':[_0x5716fa(_0x7aac3,{'className':'text-gra'+_0x233797(0xf8)+'-0','children':'Reservat'+_0x233797(0x1bd)+_0x233797(0x1b1)}),_0x314956(_0x7aac3,{'className':_0xf2fb2(0x100)+_0x233797(0xf0)+'xt-gray-'+_0xf2fb2(0x186),'children':[_0x5495a9[_0x233797(0x145)+'e'],'\x20',_0x5495a9[_0xf2fb2(0x123)]]}),_0x314956(_0x7aac3,{'className':_0x233797(0x100)+_0x233797(0xf0)+_0xf2fb2(0x102)+_0xf2fb2(0x186),'children':[_0x233797(0x146)+_0x233797(0x13f),_0x5495a9[_0xf2fb2(0x1bc)+'eId']]}),_0x314956(_0x7aac3,{'className':'font-sem'+'ibold\x20te'+_0x233797(0x102)+_0x233797(0x186),'children':[_0x233797(0xfb)+_0xf2fb2(0x15d),_0x6f6643]}),_0x314956(_0x7aac3,{'className':_0xf2fb2(0x100)+'ibold\x20te'+_0xf2fb2(0x102)+_0xf2fb2(0x186),'children':[_0xf2fb2(0x1c4)+_0x233797(0x149)+':\x20',_0x5495a9[_0x233797(0x10a)]]}),_0x5716fa(_0x7aac3,{'className':'text-gra'+_0x233797(0xf8)+'-0','children':_0x203343[_0x233797(0x18c)]}),_0x5716fa(_0x7aac3,{'className':_0x233797(0x100)+_0x233797(0xf0)+'xt-gray-'+_0xf2fb2(0x186),'children':_0x5495a9[_0xf2fb2(0x1c3)]}),_0x5716fa(_0x7aac3,{'className':'text-gra'+_0x233797(0xf8)+'-0','children':_0x203343[_0x233797(0x160)]}),_0x5716fa(_0x7aac3,{'className':_0x233797(0x100)+_0xf2fb2(0xf0)+_0x233797(0x102)+'800\x20my-0','children':_0x9d910a[_0xf2fb2(0x194)]})]}),_0x5716fa(_0x2dd177,{'className':_0x203343[_0x233797(0x132)],'align':_0x203343[_0x233797(0x120)],'valign':_0x203343[_0xf2fb2(0x13d)],'children':_0x5716fa(_0x7aac3,{'className':'text-gra'+_0x233797(0xf8)+_0xf2fb2(0x1a2),'children':_0x203343[_0x233797(0xef)](_0x23fdce,new Date(),_0x233797(0x163)+'yy')})})]})}),_0x5716fa(_0x398dc5,{'className':_0xf2fb2(0x198)+_0xf2fb2(0x179)+'mt-4'}),_0x314956(_0x3730a5,{'className':_0xf2fb2(0x147),'children':[_0x5716fa(_0x7aac3,{'className':_0xf2fb2(0x1ab)+_0xf2fb2(0x15f),'children':_0xf2fb2(0x129)+_0x233797(0xf9)+_0xf2fb2(0x193)+_0xf2fb2(0x107)+_0xf2fb2(0x114)+'ation\x20re'+'quest\x20as'+_0x233797(0x15b)+'\x20possibl'+'e.'}),_0x203343['FotNc'](_0x5716fa,_0x297987,{'href':_0x233797(0x126)+'admin.'+((_0x4259a3=_0x33af3f[_0xf2fb2(0x1be)+_0xf2fb2(0x18a)])===null||_0x4259a3===void 0x0?void 0x0:_0x4259a3['hostname'])+(_0x233797(0xea)+_0xf2fb2(0x10f)+'ons/')+_0x5495a9['id'],'className':_0xf2fb2(0x133)+_0x233797(0x106)+'ded\x20py-3'+_0xf2fb2(0x136)+_0xf2fb2(0x103)+_0xf2fb2(0x192)+_0xf2fb2(0x165)+_0x233797(0x1a5),'children':_0x203343['qZZFw']})]})]}),_0x5716fa(_0x3730a5,{'className':_0x233797(0x12b)+'ter\x20bg-g'+_0xf2fb2(0x153)+_0xf2fb2(0x12d),'children':_0x314956(_0xf2fb2(0x139),{'className':'w-full','children':[_0x5716fa('tr',{'className':_0x233797(0x16a),'children':_0x5716fa('td',{'align':_0x233797(0x122),'children':((_0x59664a=_0x33af3f[_0x233797(0x111)])===null||_0x59664a===void 0x0?void 0x0:_0x59664a['url'])&&_0x5716fa(_0x61b693,{'alt':_0x33af3f['name']+_0x233797(0x170),'height':'100','src':_0x33af3f[_0xf2fb2(0x111)][_0x233797(0x121)],'className':_0x233797(0x156)+'lg'})})}),_0x203343[_0x233797(0xef)](_0x5716fa,'tr',{'className':_0x233797(0x16a),'children':_0x314956('td',{'align':_0x233797(0x122),'children':[_0x5716fa(_0x7aac3,{'className':_0xf2fb2(0x1bf)+'\x20text-[1'+_0xf2fb2(0x11d)+_0xf2fb2(0x169)+_0xf2fb2(0x13a)+_0x233797(0x174)+_0x233797(0x1ab)+_0xf2fb2(0xf3),'children':_0x33af3f[_0x233797(0x13c)]}),_0x314956(_0x7aac3,{'className':_0xf2fb2(0x1bf)+_0xf2fb2(0x13e)+'6px]\x20lea'+_0x233797(0x113)+_0x233797(0x18b)+_0xf2fb2(0x1c6)+'0','children':[(_0x16c813=_0x33af3f[_0xf2fb2(0x14b)])===null||_0x16c813===void 0x0?void 0x0:_0x16c813[_0xf2fb2(0xff)+_0x233797(0x101)],',','\x20',(_0x295ca6=_0x33af3f[_0x233797(0x14b)])===null||_0x295ca6===void 0x0?void 0x0:_0x295ca6[_0x233797(0x10e)],'\x20',(_0x4409b6=_0x33af3f[_0x233797(0x14b)])===null||_0x4409b6===void 0x0?void 0x0:_0x4409b6[_0x233797(0x187)]]}),_0x5716fa(_0x7aac3,{'className':_0x233797(0x127)+_0x233797(0x137)+_0x233797(0xe7)+_0x233797(0x175)+_0x233797(0x16e)+'\x20text-gr'+_0xf2fb2(0x16d),'children':_0x33af3f['phone']})]})}),_0x5716fa('tr',{'children':_0x5716fa('td',{'align':_0x233797(0x122),'children':_0x314956(_0x1f875a,{'className':_0x233797(0x1b6)+_0x233797(0x119)+_0x233797(0x1c1)+'6px]\x20ali'+_0xf2fb2(0x128)+'m\x20pt-5','children':[_0x5716fa(_0x2dd177,{'className':'pr-[8px]','children':_0x5716fa(_0x2b0cda,{'href':'https://'+_0xf2fb2(0x17f)+_0xf2fb2(0x1bb)+_0x233797(0x1aa)+_0xf2fb2(0xe8),'children':_0x5716fa(_0x61b693,{'alt':_0xf2fb2(0x1a1),'height':'36','src':_0xf2fb2(0x126)+_0xf2fb2(0x115)+_0x233797(0x189)+'ic/faceb'+_0x233797(0x144)+'.png','width':'36'})})}),_0x5716fa(_0x2dd177,{'children':_0x5716fa(_0x2b0cda,{'href':_0xf2fb2(0x126)+_0xf2fb2(0x140)+_0x233797(0x177)+_0xf2fb2(0x157)+_0xf2fb2(0x1b3),'children':_0x5716fa(_0x61b693,{'alt':_0xf2fb2(0xe6)+'m','height':'36','src':'https://'+_0xf2fb2(0x115)+'ail/stat'+_0x233797(0x1a4)+_0xf2fb2(0x164)+_0x233797(0x166),'width':'36'})})})]})})})]})})]})})]});},R={'user':{'id':_0x13ed5f(0x104)+'0mdAnm5Y'+'ePP6BAW6'+_0x4e6453(0x110),'name':_0x13ed5f(0x17a)+_0x4e6453(0x1a7),'email':_0x4e6453(0x124)+_0x4e6453(0x1c5)+'.pl','emailVerified':!0x0,'image':_0x4e6453(0x126)+'lh3.goog'+_0x13ed5f(0x158)+_0x4e6453(0x17e)+_0x13ed5f(0x151)+_0x4e6453(0x116)+_0x13ed5f(0x1a0)+_0x13ed5f(0x185)+'BiWnYpCY'+'mU-7aE2F'+_0x4e6453(0x13b)+_0x13ed5f(0x1af)+'-c','createdAt':_0x4e6453(0x19e)+_0x4e6453(0x1b0)+_0x4e6453(0x12c),'updatedAt':_0x4e6453(0x19e)+_0x4e6453(0x1b0)+_0x13ed5f(0x12c),'firstname':_0x13ed5f(0x17a),'lastname':_0x13ed5f(0x161)},'member':{'id':_0x4e6453(0x17b)+'0mdOnp8Y'+'eQR7CAX5'+_0x4e6453(0x1ac),'name':'John\x20Doe','email':_0x4e6453(0x112)+_0x13ed5f(0x141)+'o.pl','emailVerified':!0x0,'image':null,'createdAt':_0x4e6453(0x19e)+_0x13ed5f(0x1a9)+_0x13ed5f(0x1ad),'updatedAt':_0x13ed5f(0x19e)+_0x4e6453(0x1a9)+_0x13ed5f(0x1ad),'firstname':_0x4e6453(0x117),'lastname':_0x4e6453(0x150)},'reservation':{'id':_0x4e6453(0x138)+_0x13ed5f(0xee)+_0x4e6453(0x14c)+'r','referenceId':_0x13ed5f(0x135),'firstname':'Abhishek','lastname':_0x4e6453(0x161),'phone':_0x13ed5f(0x180)+'5862','guests':0x4,'date':new Date('2025-04-'+_0x4e6453(0x17d)+_0x4e6453(0x173)),'createdAt':_0x4e6453(0x19e)+_0x4e6453(0x1b0)+_0x13ed5f(0x12c),'acceptedAt':null,'cancelledAt':null},'organization':{'id':_0x4e6453(0x118)+_0x13ed5f(0x19d)+_0x4e6453(0x195)+'b','name':_0x13ed5f(0x159)+_0x4e6453(0x105),'phone':_0x4e6453(0x180)+_0x4e6453(0x16b),'email':'contact@'+_0x13ed5f(0x1a3)+_0x13ed5f(0xfc),'createdAt':_0x13ed5f(0x19e)+_0x13ed5f(0x1b9)+_0x4e6453(0x162),'legalEntityId':null,'address':{'id':_0x4e6453(0x118)+_0x13ed5f(0x108)+_0x13ed5f(0x12e)+'t','firstname':null,'lastname':null,'phone':null,'addressLineOne':_0x13ed5f(0x130)+'aterów\x20G'+_0x13ed5f(0x142),'doorNumber':null,'addressLineTwo':'3','zipCode':'33-332','city':_0x13ed5f(0x1a6),'country':'PL','placeId':_0x13ed5f(0x152)+_0x4e6453(0x19c)+_0x4e6453(0xf6)+_0x13ed5f(0x1a8),'deliveryInstructions':null},'configuration':{'id':_0x13ed5f(0x118)+_0x4e6453(0x167)+_0x13ed5f(0x1b2)+'n','hostname':_0x13ed5f(0x1a3)+_0x4e6453(0xfc),'countriesShipping':['us'],'stripeAccountId':_0x13ed5f(0x196),'enableHostCheckout':!0x1,'enableHostTracking':!0x1,'isAcceptingOrders':!0x1,'isAcceptingReservations':!0x1,'defaultLocale':'en','supportedLocales':['en','pl'],'defaultCurrency':_0x13ed5f(0x10d),'createdAt':_0x13ed5f(0x19e)+_0x4e6453(0x1b9)+':14.271Z'},'logo':_0x4e6453(0x126)+_0x4e6453(0x143)+_0x4e6453(0x178)+_0x4e6453(0x11a)+'blob.ver'+_0x13ed5f(0xf4)+'age.com/'+_0x13ed5f(0x171)+_0x4e6453(0x1b7)+'KPlvjxYm'+_0x4e6453(0x1b4)+_0x13ed5f(0xf1),'logoFile':{'id':'cm8ktmu8'+_0x13ed5f(0x12a)+_0x13ed5f(0x1c7)+'k','url':'https://'+_0x13ed5f(0x143)+_0x13ed5f(0x178)+'.public.'+_0x13ed5f(0x134)+_0x4e6453(0xf4)+_0x4e6453(0xf7)+_0x4e6453(0x171)+_0x13ed5f(0x1b7)+_0x4e6453(0x17c)+_0x4e6453(0x1b4)+_0x13ed5f(0xf1),'mimeType':_0x4e6453(0x191)+'g','size':0x193641,'filename':_0x13ed5f(0x14a)}}};u[_0x13ed5f(0x11c)+_0x13ed5f(0x16c)]=R;function _0x3837(_0x16e426,_0x25cdbc){_0x16e426=_0x16e426-0xe5;const _0x2feada=_0x2fea();let _0x383798=_0x2feada[_0x16e426];if(_0x3837['HLQOvm']===undefined){var _0x510c14=function(_0x5d7174){const _0x4c97db='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4ca8fc='',_0x16d97e='';for(let _0x266e89=0x0,_0xe8c58e,_0x5749fc,_0x14e5ac=0x0;_0x5749fc=_0x5d7174['charAt'](_0x14e5ac++);~_0x5749fc&&(_0xe8c58e=_0x266e89%0x4?_0xe8c58e*0x40+_0x5749fc:_0x5749fc,_0x266e89++%0x4)?_0x4ca8fc+=String['fromCharCode'](0xff&_0xe8c58e>>(-0x2*_0x266e89&0x6)):0x0){_0x5749fc=_0x4c97db['indexOf'](_0x5749fc);}for(let _0x5aee18=0x0,_0x284bf7=_0x4ca8fc['length'];_0x5aee18<_0x284bf7;_0x5aee18++){_0x16d97e+='%'+('00'+_0x4ca8fc['charCodeAt'](_0x5aee18)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x16d97e);};_0x3837['KsUMuS']=_0x510c14,_0x3837['bVLNpB']={},_0x3837['HLQOvm']=!![];}const _0x43cacd=_0x2feada[0x0],_0xac92b7=_0x16e426+_0x43cacd,_0x1bfbdf=_0x3837['bVLNpB'][_0xac92b7];return!_0x1bfbdf?(_0x383798=_0x3837['KsUMuS'](_0x383798),_0x3837['bVLNpB'][_0xac92b7]=_0x383798):_0x383798=_0x1bfbdf,_0x383798;}export default u;export{u as ReservationNotificationEmail};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Body as v,Button as k,Column as s,Container as f,Head as A,Heading as T,Hr as j,Html as P,Img as i,Link as c,Preview as C,Row as d,Section as n,Tailwind as R,Text as t}from"../../../core/email/components";import{formatReservationEmailDate as F,formatReservationEmailDateTime as D}from"./reservation-email-date";const u=({user:x,member:N,organization:l,reservation:r})=>{var m,o,h,g,p,b;const w=`New reservation request for ${l.name}`,y=D(r.date);return a(P,{children:[e(A,{}),e(C,{children:w}),e(R,{children:a(v,{className:"bg-gray-50 font-sans",children:[a(f,{className:"bg-gray-50 p-6 max-w-[600px]",children:[e(n,{className:"mb-6",children:a(d,{children:[e(s,{className:"w-[80%]",children:e(i,{alt:`${l.name} logo`,height:"100",src:(m=l.logoFile)===null||m===void 0?void 0:m.url,className:"rounded-lg"})}),e(s,{align:"right",children:a(d,{align:"right",children:[e(s,{children:e(c,{href:"https://www.instagram.com/madrasbistro/",children:e(i,{alt:"Instagram",className:"mx-[4px]",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})}),e(s,{children:e(c,{href:"https://www.facebook.com/madrasBistro/",children:e(i,{alt:"Facebook",className:"mx-[4px]",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})})]})})]})}),a(n,{children:[a(T,{className:"text-3xl font-bold text-gray-800 mb-0",children:["Hi ",N.firstname,","]}),e(t,{className:"text-gray-600 mb-2 text-lg",children:"You have received a new reservation request."})]})]}),a(f,{className:"mx-auto max-w-[600px] rounded-xl bg-white px-6",children:[e(n,{className:"mb-6",children:a(d,{children:[a(s,{className:"w-[60%]",children:[e(t,{className:"text-gray-500 mb-0",children:"Reservation details"}),a(t,{className:"font-semibold text-gray-800 my-0",children:[r.firstname," ",r.lastname]}),a(t,{className:"font-semibold text-gray-800 my-0",children:["Reference: ",r.referenceId]}),a(t,{className:"font-semibold text-gray-800 my-0",children:["Date and Time: ",y]}),a(t,{className:"font-semibold text-gray-800 my-0",children:["Number of Guests: ",r.guests]}),e(t,{className:"text-gray-500 mb-0",children:"Phone"}),e(t,{className:"font-semibold text-gray-800 my-0",children:r.phone}),e(t,{className:"text-gray-500 mb-0",children:"Email"}),e(t,{className:"font-semibold text-gray-800 my-0",children:x.email})]}),e(s,{className:"w-[40%] p-0 mt-0",align:"right",valign:"top",children:e(t,{className:"text-gray-500 mb-0 pt-1",children:F(new Date)})})]})}),e(j,{className:"border-gray-200 mt-4"}),a(n,{className:"mb-6",children:[e(t,{className:"text-gray-700",children:"Please review and respond to this reservation request as soon as possible."}),e(k,{href:`https://admin.${(o=l.configuration)===null||o===void 0?void 0:o.hostname}/admin/reservations/${r.id}`,className:"bg-blue-600 rounded py-3 px-5 text-white text-center block mt-4",children:"View Reservation Details"})]})]}),e(n,{className:"text-center bg-gray-50 py-5",children:a("table",{className:"w-full",children:[e("tr",{className:"w-full",children:e("td",{align:"center",children:((h=l.logoFile)===null||h===void 0?void 0:h.url)&&e(i,{alt:`${l.name} logo`,height:"100",src:l.logoFile.url,className:"rounded-lg"})})}),e("tr",{className:"w-full",children:a("td",{align:"center",children:[e(t,{className:"my-[8px] text-[16px] font-semibold text-xl pt-2 text-gray-900",children:l.name}),a(t,{className:"my-[8px] text-[16px] leading-[24px] text-gray-500",children:[(g=l.address)===null||g===void 0?void 0:g.addressLineOne,","," ",(p=l.address)===null||p===void 0?void 0:p.zipCode," ",(b=l.address)===null||b===void 0?void 0:b.city]}),e(t,{className:"mb-0 mt-[4px] text-[16px] leading-[24px] text-gray-500",children:l.phone})]})}),e("tr",{children:e("td",{align:"center",children:a(d,{className:"table-cell h-[44px] w-[56px] align-bottom pt-5",children:[e(s,{className:"pr-[8px]",children:e(c,{href:"https://www.facebook.com/madrasBistro/",children:e(i,{alt:"Facebook",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})}),e(s,{children:e(c,{href:"https://www.instagram.com/madrasbistro/",children:e(i,{alt:"Instagram",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})})]})})})]})})]})})]})},I={user:{id:"VD0OJ52f0mdAnm5YePP6BAW6hdbaCjAJ",name:"Abhishek Shaji",email:"kontakt@abhishek.pl",emailVerified:!0,image:"https://lh3.googleusercontent.com/a/ACg8ocKbkCAMTNvMizjXNxcm1aYtBiWnYpCYmU-7aE2Ft_M_uiHheZ5f=s96-c",createdAt:"2025-03-22T22:54:40.260Z",updatedAt:"2025-03-22T22:54:40.260Z",firstname:"Abhishek",lastname:"Shaji"},member:{id:"KL9MN52f0mdOnp8YeQR7CAX5hdbdDkBP",name:"John Doe",email:"john@madrasbistro.pl",emailVerified:!0,image:null,createdAt:"2025-03-20T10:30:15.123Z",updatedAt:"2025-03-20T10:30:15.123Z",firstname:"John",lastname:"Doe"},reservation:{id:"cm94wbpbm0000itx1iv9k2mqr",referenceId:"PH6LD6",firstname:"Abhishek",lastname:"Shaji",phone:"+48570135862",guests:4,date:new Date("2025-04-07T19:30:00.000Z"),createdAt:"2025-03-22T22:54:40.260Z",acceptedAt:null,cancelledAt:null},organization:{id:"cm8kthfdq0001lg03b59mdy7b",name:"Madras Bistro",phone:"+48570135862",email:"contact@madrasbistro.pl",createdAt:"2025-03-22T23:05:14.271Z",legalEntityId:null,address:{id:"cm8kthfdr0002lg0350ijialt",firstname:null,lastname:null,phone:null,addressLineOne:"Plac Bohater\xF3w Getta 2",doorNumber:null,addressLineTwo:"3",zipCode:"33-332",city:"Krak\xF3w",country:"PL",placeId:"ChIJf-nsRkRbFkcR21gtObFSSSA",deliveryInstructions:null},configuration:{id:"cm8kthfdr0003lg03ghgs262n",hostname:"madrasbistro.pl",countriesShipping:["us"],stripeAccountId:"null",enableHostCheckout:!1,enableHostTracking:!1,isAcceptingOrders:!1,isAcceptingReservations:!1,defaultLocale:"en",supportedLocales:["en","pl"],defaultCurrency:"PLN",createdAt:"2025-03-22T23:05:14.271Z"},logo:"https://z3liuyatqnepss3d.public.blob.vercel-storage.com/logo-zeJymFRMFCIKPlvjxYm2af3SAWvBOj.png",logoFile:{id:"cm8ktmu890005lg0356gwclfk",url:"https://z3liuyatqnepss3d.public.blob.vercel-storage.com/logo-zeJymFRMFCIKPlvjxYm2af3SAWvBOj.png",mimeType:"image/png",size:1652289,filename:"logo.png"}}};u.PreviewProps=I;export default u;export{u as ReservationNotificationEmail};
@@ -1 +1 @@
1
- const _0x1e7bde=_0x433b,_0x50d6d9=_0x433b;(function(_0x33bf12,_0x30cf3e){const _0x2227c6=_0x433b,_0x45f2b9=_0x433b,_0xa6cdf2=_0x33bf12();while(!![]){try{const _0x5a8819=parseInt(_0x2227c6(0x1a1))/0x1*(parseInt(_0x45f2b9(0x1a2))/0x2)+-parseInt(_0x2227c6(0x214))/0x3*(parseInt(_0x2227c6(0x1d1))/0x4)+-parseInt(_0x2227c6(0x1ad))/0x5*(-parseInt(_0x45f2b9(0x1e4))/0x6)+parseInt(_0x2227c6(0x1fc))/0x7*(parseInt(_0x45f2b9(0x15d))/0x8)+parseInt(_0x2227c6(0x1ba))/0x9*(-parseInt(_0x45f2b9(0x18f))/0xa)+parseInt(_0x45f2b9(0x1d5))/0xb+parseInt(_0x2227c6(0x212))/0xc*(-parseInt(_0x2227c6(0x186))/0xd);if(_0x5a8819===_0x30cf3e)break;else _0xa6cdf2['push'](_0xa6cdf2['shift']());}catch(_0x33727f){_0xa6cdf2['push'](_0xa6cdf2['shift']());}}}(_0x3a62,0x3688a));function _0x433b(_0x1448ef,_0x2e99f0){_0x1448ef=_0x1448ef-0x15d;const _0x3a62cf=_0x3a62();let _0x433ba7=_0x3a62cf[_0x1448ef];if(_0x433b['UEjuzK']===undefined){var _0x3ca613=function(_0x558257){const _0x2d8298='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x8d69ae='',_0x48cfdf='';for(let _0x4d7fbd=0x0,_0xdbb1c3,_0x3dc992,_0x548e7d=0x0;_0x3dc992=_0x558257['charAt'](_0x548e7d++);~_0x3dc992&&(_0xdbb1c3=_0x4d7fbd%0x4?_0xdbb1c3*0x40+_0x3dc992:_0x3dc992,_0x4d7fbd++%0x4)?_0x8d69ae+=String['fromCharCode'](0xff&_0xdbb1c3>>(-0x2*_0x4d7fbd&0x6)):0x0){_0x3dc992=_0x2d8298['indexOf'](_0x3dc992);}for(let _0x325db7=0x0,_0x3fc152=_0x8d69ae['length'];_0x325db7<_0x3fc152;_0x325db7++){_0x48cfdf+='%'+('00'+_0x8d69ae['charCodeAt'](_0x325db7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x48cfdf);};_0x433b['UttYYb']=_0x3ca613,_0x433b['inQaqC']={},_0x433b['UEjuzK']=!![];}const _0x1ba43e=_0x3a62cf[0x0],_0x4124a8=_0x1448ef+_0x1ba43e,_0x15f5cd=_0x433b['inQaqC'][_0x4124a8];return!_0x15f5cd?(_0x433ba7=_0x433b['UttYYb'](_0x433ba7),_0x433b['inQaqC'][_0x4124a8]=_0x433ba7):_0x433ba7=_0x15f5cd,_0x433ba7;}import{jsx as _0x7e7e8e,jsxs as _0x2fac72}from'react/jsx-runtime';import{format as _0x49f342}from'date-fns';import{Body as _0xd69956,Column as _0x2480fd,Container as _0x3dab1f,Head as _0x543796,Heading as _0x2bfcef,Hr as _0x10eab7,Html as _0x4c9fb4,Img as _0x5f06d4,Link as _0xd0984a,Preview as _0x221fe8,Row as _0x59a83a,Section as _0x5dd686,Tailwind as _0x175238,Text as _0x509d65}from'../../../core/email/components';const u=({user:_0x5c5e29,organization:_0x46ccb4,reservation:_0xcefe9b})=>{const _0x397e2f=_0x433b,_0x13f756=_0x433b,_0x28b46e={'yOpZL':_0x397e2f(0x1e3),'CivXw':function(_0xae3590,_0x239aeb,_0x5c9e38){return _0xae3590(_0x239aeb,_0x5c9e38);},'KSnOK':'w-[80%]','HcrZF':function(_0x5df156,_0x4d3740,_0x173ccc){return _0x5df156(_0x4d3740,_0x173ccc);},'bLvpx':_0x13f756(0x1f5)+_0x13f756(0x1e9)+'00px]\x20ro'+_0x13f756(0x1e0)+_0x13f756(0x1b4)+_0x13f756(0x16b),'NSYkK':_0x397e2f(0x1ea)+_0x397e2f(0x1e1)+'xt-gray-'+_0x13f756(0x181),'UTyfk':function(_0x25b4c1,_0x341282,_0x4ed20e){return _0x25b4c1(_0x341282,_0x4ed20e);},'RsQYg':function(_0x198c6e,_0x48eb8a,_0x567a1a){return _0x198c6e(_0x48eb8a,_0x567a1a);},'HGJXq':_0x13f756(0x19c)+'y-700','NOdXC':function(_0x3b77c7,_0x5c487a,_0x59eafa){return _0x3b77c7(_0x5c487a,_0x59eafa);},'kvFLO':function(_0x2ab004,_0x42b212,_0x299cff){return _0x2ab004(_0x42b212,_0x299cff);},'VGXra':_0x13f756(0x18b)+_0x397e2f(0x161)+_0x397e2f(0x17b)+_0x397e2f(0x1fd)+'px]\x20text'+_0x13f756(0x194)+'0'};var _0x5812f6,_0x108f61,_0x53c046,_0x47a258,_0x39e3a2;const _0x1af78a=_0x13f756(0x1cc)+_0x13f756(0x165)+_0x13f756(0x1b8)+_0x46ccb4['name']+('\x20has\x20bee'+_0x13f756(0x1fb)+'d'),_0x205bf9=_0x49f342(new Date(_0xcefe9b['date']),_0x13f756(0x1e7)+_0x397e2f(0x1a7)+_0x13f756(0x16c));return _0x2fac72(_0x4c9fb4,{'children':[_0x7e7e8e(_0x543796,{}),_0x7e7e8e(_0x221fe8,{'children':_0x1af78a}),_0x7e7e8e(_0x175238,{'children':_0x2fac72(_0xd69956,{'className':_0x13f756(0x168)+'50\x20font-'+_0x13f756(0x1e5),'children':[_0x2fac72(_0x3dab1f,{'className':'bg-gray-'+_0x13f756(0x1bb)+_0x397e2f(0x1ed)+_0x397e2f(0x1af),'children':[_0x7e7e8e(_0x5dd686,{'className':_0x28b46e[_0x13f756(0x187)],'children':_0x2fac72(_0x59a83a,{'children':[_0x28b46e[_0x397e2f(0x1d7)](_0x7e7e8e,_0x2480fd,{'className':_0x28b46e[_0x397e2f(0x1ca)],'children':_0x7e7e8e(_0x5f06d4,{'alt':_0x46ccb4[_0x13f756(0x1c3)]+_0x13f756(0x221),'height':_0x13f756(0x18a),'src':(_0x5812f6=_0x46ccb4[_0x13f756(0x213)])===null||_0x5812f6===void 0x0?void 0x0:_0x5812f6[_0x13f756(0x1ef)],'className':_0x13f756(0x19d)+'lg'})}),_0x7e7e8e(_0x2480fd,{'align':_0x13f756(0x1be),'children':_0x2fac72(_0x59a83a,{'align':_0x13f756(0x1be),'children':[_0x7e7e8e(_0x2480fd,{'children':_0x7e7e8e(_0xd0984a,{'href':_0x13f756(0x193)+_0x13f756(0x180)+_0x13f756(0x1c4)+_0x13f756(0x16d)+_0x397e2f(0x21b),'children':_0x7e7e8e(_0x5f06d4,{'alt':_0x13f756(0x207)+'m','className':_0x397e2f(0x1f6),'height':'36','src':'https://'+'react.em'+_0x397e2f(0x15f)+'ic/insta'+_0x13f756(0x218)+'o.png','width':'36'})})}),_0x7e7e8e(_0x2480fd,{'children':_0x7e7e8e(_0xd0984a,{'href':_0x13f756(0x193)+'www.face'+_0x13f756(0x190)+_0x13f756(0x1e2)+_0x13f756(0x1a5),'children':_0x7e7e8e(_0x5f06d4,{'alt':_0x13f756(0x1ec),'className':_0x13f756(0x1f6),'height':'36','src':_0x13f756(0x193)+_0x397e2f(0x1bf)+_0x13f756(0x15f)+_0x13f756(0x174)+_0x13f756(0x1b2)+_0x13f756(0x197),'width':'36'})})})]})})]})}),_0x2fac72(_0x5dd686,{'children':[_0x2fac72(_0x2bfcef,{'className':_0x397e2f(0x1bd)+_0x13f756(0x1f2)+_0x397e2f(0x1b6)+'gray-800'+_0x13f756(0x21f),'children':[_0x397e2f(0x189),_0x5c5e29[_0x13f756(0x169)+'e'],',']}),_0x28b46e[_0x397e2f(0x1ae)](_0x7e7e8e,_0x509d65,{'className':_0x13f756(0x19c)+_0x397e2f(0x1dd)+_0x397e2f(0x1f4)+'lg','children':_0x13f756(0x1cc)+'ervation'+'\x20details'+_0x397e2f(0x19a)+_0x13f756(0x1a6)+_0x13f756(0x1db)})]})]}),_0x2fac72(_0x3dab1f,{'className':_0x28b46e[_0x397e2f(0x195)],'children':[_0x7e7e8e(_0x5dd686,{'className':_0x13f756(0x1e3),'children':_0x2fac72(_0x59a83a,{'children':[_0x2fac72(_0x2480fd,{'className':_0x397e2f(0x1b7),'children':[_0x7e7e8e(_0x509d65,{'className':_0x397e2f(0x19c)+_0x397e2f(0x210)+'-0','children':'Updated\x20'+_0x13f756(0x172)+_0x397e2f(0x170)+_0x397e2f(0x20e)}),_0x2fac72(_0x509d65,{'className':'font-sem'+_0x13f756(0x1e1)+_0x13f756(0x19e)+_0x13f756(0x181),'children':[_0xcefe9b[_0x13f756(0x169)+'e'],'\x20',_0xcefe9b[_0x397e2f(0x1ab)]]}),_0x2fac72(_0x509d65,{'className':'font-sem'+_0x13f756(0x1e1)+_0x13f756(0x19e)+_0x13f756(0x181),'children':['Referenc'+_0x13f756(0x167),_0xcefe9b[_0x13f756(0x1f7)+_0x397e2f(0x19b)]]}),_0x2fac72(_0x509d65,{'className':_0x397e2f(0x1ea)+_0x13f756(0x1e1)+_0x13f756(0x19e)+_0x397e2f(0x181),'children':[_0x397e2f(0x176)+_0x397e2f(0x1ac),_0x205bf9]}),_0x2fac72(_0x509d65,{'className':_0x28b46e[_0x397e2f(0x1fe)],'children':['Number\x20o'+'f\x20Guests'+':\x20',_0xcefe9b[_0x13f756(0x163)]]}),_0x28b46e[_0x13f756(0x1cb)](_0x7e7e8e,_0x509d65,{'className':_0x13f756(0x19c)+'y-500\x20mb'+'-0','children':_0x397e2f(0x1dc)}),_0x28b46e[_0x397e2f(0x1cb)](_0x7e7e8e,_0x509d65,{'className':_0x397e2f(0x1ea)+'ibold\x20te'+_0x397e2f(0x19e)+'800\x20my-0','children':_0xcefe9b[_0x397e2f(0x1c9)]})]}),_0x7e7e8e(_0x2480fd,{'className':_0x13f756(0x1cf)+_0x397e2f(0x211),'align':_0x397e2f(0x1be),'valign':'top','children':_0x7e7e8e(_0x509d65,{'className':'text-gra'+'y-500\x20mb'+_0x397e2f(0x1f1),'children':_0x49f342(new Date(),_0x13f756(0x1e7)+'yy')})})]})}),_0x28b46e['UTyfk'](_0x7e7e8e,_0x10eab7,{'className':_0x397e2f(0x1d3)+_0x397e2f(0x21c)+_0x397e2f(0x1b1)}),_0x2fac72(_0x5dd686,{'className':_0x397e2f(0x1e3),'children':[_0x28b46e['RsQYg'](_0x2fac72,_0x509d65,{'className':_0x397e2f(0x19c)+'y-700','children':[_0x13f756(0x20a)+'ated\x20res'+'ervation'+'\x20is\x20now\x20'+_0x397e2f(0x21d)+_0x13f756(0x202),'\x20',_0x46ccb4[_0x397e2f(0x1c3)],'.\x20If\x20any'+_0x397e2f(0x16e)+_0x397e2f(0x1aa)+_0x13f756(0x20b)+'nge,\x20ple'+_0x397e2f(0x1f9)+_0x13f756(0x1c2)+_0x13f756(0x1c0)+_0x13f756(0x1d6),_0x46ccb4[_0x13f756(0x1c9)],'.']}),_0x7e7e8e(_0x509d65,{'className':_0x28b46e['HGJXq'],'children':_0x13f756(0x1d2)+_0x397e2f(0x1f8)+_0x397e2f(0x1bc)+'ming\x20you'+'.'})]})]}),_0x7e7e8e(_0x5dd686,{'className':_0x13f756(0x1f0)+_0x397e2f(0x184)+_0x13f756(0x17e)+_0x13f756(0x222),'children':_0x2fac72(_0x397e2f(0x199),{'className':_0x13f756(0x1fa),'children':[_0x7e7e8e('tr',{'className':_0x13f756(0x1fa),'children':_0x7e7e8e('td',{'align':'center','children':((_0x108f61=_0x46ccb4[_0x13f756(0x213)])===null||_0x108f61===void 0x0?void 0x0:_0x108f61[_0x13f756(0x1ef)])&&_0x7e7e8e(_0x5f06d4,{'alt':_0x46ccb4['name']+'\x20logo','height':_0x13f756(0x18a),'src':_0x46ccb4[_0x397e2f(0x213)][_0x397e2f(0x1ef)],'className':_0x13f756(0x19d)+'lg'})})}),_0x7e7e8e('tr',{'className':_0x13f756(0x1fa),'children':_0x28b46e[_0x397e2f(0x204)](_0x2fac72,'td',{'align':_0x397e2f(0x205),'children':[_0x28b46e[_0x13f756(0x179)](_0x7e7e8e,_0x509d65,{'className':_0x397e2f(0x18b)+'\x20text-[1'+_0x13f756(0x1da)+'t-semibo'+_0x13f756(0x1b6)+_0x13f756(0x20d)+_0x397e2f(0x19c)+_0x397e2f(0x164),'children':_0x46ccb4[_0x397e2f(0x1c3)]}),_0x2fac72(_0x509d65,{'className':_0x28b46e[_0x13f756(0x201)],'children':[(_0x53c046=_0x46ccb4['address'])===null||_0x53c046===void 0x0?void 0x0:_0x53c046['addressL'+_0x397e2f(0x1a9)],',','\x20',(_0x47a258=_0x46ccb4[_0x397e2f(0x173)])===null||_0x47a258===void 0x0?void 0x0:_0x47a258[_0x397e2f(0x16a)],'\x20',(_0x39e3a2=_0x46ccb4[_0x13f756(0x173)])===null||_0x39e3a2===void 0x0?void 0x0:_0x39e3a2[_0x397e2f(0x206)]]}),_0x7e7e8e(_0x509d65,{'className':_0x13f756(0x185)+_0x13f756(0x183)+'xt-[16px'+_0x13f756(0x1b9)+'g-[24px]'+_0x397e2f(0x21a)+_0x13f756(0x1a3),'children':_0x46ccb4[_0x397e2f(0x1c9)]})]})}),_0x7e7e8e('tr',{'children':_0x7e7e8e('td',{'align':'center','children':_0x28b46e['RsQYg'](_0x2fac72,_0x59a83a,{'className':_0x13f756(0x1b0)+_0x13f756(0x1a0)+_0x397e2f(0x20c)+_0x13f756(0x17d)+_0x397e2f(0x198)+_0x397e2f(0x162),'children':[_0x7e7e8e(_0x2480fd,{'className':'pr-[8px]','children':_0x7e7e8e(_0xd0984a,{'href':_0x397e2f(0x193)+'www.face'+'book.com'+_0x397e2f(0x1e2)+_0x13f756(0x1a5),'children':_0x7e7e8e(_0x5f06d4,{'alt':_0x397e2f(0x1ec),'height':'36','src':_0x397e2f(0x193)+_0x397e2f(0x1bf)+_0x397e2f(0x15f)+_0x397e2f(0x174)+_0x397e2f(0x1b2)+_0x13f756(0x197),'width':'36'})})}),_0x7e7e8e(_0x2480fd,{'children':_0x7e7e8e(_0xd0984a,{'href':'https://'+'www.inst'+_0x397e2f(0x1c4)+_0x13f756(0x16d)+_0x13f756(0x21b),'children':_0x7e7e8e(_0x5f06d4,{'alt':_0x13f756(0x207)+'m','height':'36','src':_0x397e2f(0x193)+_0x397e2f(0x1bf)+_0x13f756(0x15f)+_0x13f756(0x1c6)+'gram-log'+_0x397e2f(0x1e6),'width':'36'})})})]})})})]})})]})})]});},I={'user':{'id':_0x1e7bde(0x1cd)+'0mdAnm5Y'+'ePP6BAW6'+_0x50d6d9(0x17f),'name':_0x50d6d9(0x19f)+_0x50d6d9(0x18c),'email':_0x1e7bde(0x215)+_0x50d6d9(0x1a8)+_0x50d6d9(0x15e),'emailVerified':!0x0,'image':'https://'+_0x1e7bde(0x216)+_0x1e7bde(0x18d)+_0x50d6d9(0x1b3)+_0x50d6d9(0x1e8)+_0x50d6d9(0x1c8)+_0x50d6d9(0x200)+'Nxcm1aYt'+'BiWnYpCY'+'mU-7aE2F'+_0x1e7bde(0x191)+_0x50d6d9(0x203)+'-c','createdAt':_0x50d6d9(0x192)+_0x50d6d9(0x1c5)+_0x1e7bde(0x182),'updatedAt':_0x1e7bde(0x192)+_0x50d6d9(0x1c5)+_0x50d6d9(0x182),'firstname':'Abhishek','lastname':_0x50d6d9(0x1c7)},'reservation':{'id':'cm94wbpb'+_0x50d6d9(0x21e)+_0x50d6d9(0x220)+'r','referenceId':_0x50d6d9(0x160),'firstname':_0x1e7bde(0x19f),'lastname':_0x50d6d9(0x1c7),'phone':_0x50d6d9(0x209)+_0x50d6d9(0x1d8),'guests':0x6,'date':new Date(_0x50d6d9(0x20f)+_0x1e7bde(0x1b5)+':00.000Z'),'createdAt':_0x1e7bde(0x192)+_0x1e7bde(0x1c5)+_0x1e7bde(0x182),'acceptedAt':_0x50d6d9(0x192)+_0x50d6d9(0x1c1)+_0x1e7bde(0x188),'cancelledAt':null},'organization':{'id':_0x1e7bde(0x217)+_0x50d6d9(0x1ce)+'3b59mdy7'+'b','name':_0x50d6d9(0x1d4)+_0x1e7bde(0x18e),'phone':'+4857013'+_0x1e7bde(0x1d8),'email':_0x50d6d9(0x1df)+_0x1e7bde(0x171)+_0x50d6d9(0x1ff),'createdAt':_0x50d6d9(0x192)+_0x1e7bde(0x1a4)+_0x50d6d9(0x1eb),'legalEntityId':null,'address':{'id':_0x1e7bde(0x217)+_0x50d6d9(0x175)+_0x50d6d9(0x17a)+'t','firstname':null,'lastname':null,'phone':null,'addressLineOne':_0x50d6d9(0x1de)+_0x50d6d9(0x196)+_0x1e7bde(0x16f),'doorNumber':null,'addressLineTwo':'3','zipCode':'33-332','city':_0x1e7bde(0x178),'country':'PL','latitude':50.04647,'longitude':19.95508,'isDefault':!0x1,'deliveryInstructions':null,'placeId':_0x50d6d9(0x166)+_0x1e7bde(0x208)+_0x50d6d9(0x17c)+_0x50d6d9(0x1d9),'createdAt':_0x1e7bde(0x192)+_0x1e7bde(0x1a4)+':14.271Z','createdBy':null,'updatedAt':_0x50d6d9(0x192)+_0x50d6d9(0x1a4)+_0x1e7bde(0x1eb),'updatedBy':null,'deletedAt':null,'deletedBy':null},'configurationId':'cm8kthfd'+_0x50d6d9(0x219)+_0x50d6d9(0x1ee)+'j','logo':null,'logoId':_0x1e7bde(0x217)+_0x50d6d9(0x1d0)+'351daejo'+'w','updatedAt':_0x50d6d9(0x192)+_0x1e7bde(0x1a4)+':14.271Z','updatedBy':null,'deletedAt':null,'deletedBy':null,'slug':_0x50d6d9(0x177)+_0x50d6d9(0x18e)}};u[_0x50d6d9(0x1f3)+'rops']=I;function _0x3a62(){const _0x24e13e=['CMf5ltuWiha','AgrIyunQquO','D3D3lMLUC3q','odaWig15lta','oJqWlJi2mfO','wZrWEf0GDgu','DgvYigjNlwC','BwiTmcbTDc0','nJeXBwXfzLLz','Eu9WwKW','oJiZlJq1nLO','sgKG','mtaW','BxKTwZHWEf0','ifnOywPP','Bgv1C2vYy28','Axn0CM8','mtG0mhLtCxvsvG','yM9VAY5JB20','Df9nx3vPsgG','mJaYns0WmY0','Ahr0Chm6lY8','lwDYyxKTnta','yKX2ChG','yxrLCSoZDYbh','lNbUzW','z24TyM90Dg8','DgfIBgu','igHHDMuGyMu','zuLK','Dgv4Dc1NCMe','CM91BMrLzc0','EhqTz3jHEs0','qwjOAxnOzwS','BgWGAc1Bndq','ndmWmZHVCvLNsMe','mtjtshzcCg8','yxKTntaW','mJjumJm6mdu','Axn0CM8V','zw4GDxbKyxq','ExKGj2f0jYa','ywjOAxnOzwS','Aw5Lt25L','AwXSig5Lzwq','BgfZDg5HBwu','ifrPBwu6ia','mteWmZC1Dfn1BKTt','sgnYwKy','mhb4xq','DgfIBguTy2u','BxqTna','B29RlwXVz28','BNrLBNqUy28','igjNlxDOAxq','mdHumJa6mda','BgqGDgv4Dc0','DY1BnJaLxq','ihDPDgGG','xsbSzwfKAw4','nJKZmenMruzUrG','ntaGCc02ig0','Dg8GD2vSy28','Dgv4Dc0ZEgW','CMLNAhq','CMvHy3qUzw0','AxjLy3rSEsa','mJjumJm6mda','ywn0ihvZigq','BMfTzq','ywDYyw0Uy28','mJjumJi6ntq','AwmVAw5ZDge','u2HHAMK','B2nlyMTdqu0','CgHVBMu','s1nUt0S','vvr5zMS','ww91CIbYzxm','vKqWt0O1mMy','CtaWmdfSzZa','DY1BndaLxsa','CtaWmdbSzZa','nJm2rhfvuK5U','v2uGBg9VAYa','yM9YzgvYlwC','twfKCMfZiei','ndy5nte4nwrbDufSrq','yxqG','q2L2whC','ntG2mG','ndLV','nNb4xsbMB24','zwqU','ugHVBMu','Es02mdaGBwi','ugXHyYbcB2G','y29UDgfJDea','Dw5KzwqTEgW','AwjVBgqGDgu','l21HzhjHC0i','BwiTnG','mtH0rwn0D0O','C2fUCW','BY5WBMC','zgqUtu0UExK','Bs9Hl0fdzZG','Bwf4lxCTwZy','zM9UDc1Zzw0','oJe0lJi3mvO','rMfJzwjVB2S','yxGTDY1BnJa','m3PTEhO2DJq','DxjS','Dgv4Dc1Jzw4','ltaGChqTmq','igzVBNqTyM8','uhjLDMLLD1a','ltiGDgv4Dc0','BxGTyxv0BYa','BxGTwZrWEf0','CMvMzxjLBMm','zM9YD2fYzca','yxnLignVBNq','DY1MDwXS','BIb1CgrHDgu','mty3mZC3EuLWEe5w','zgLUzY1BmJq','tLnzA0S','C3rYBY5WBa','ve52twL6ALG','vKDyCMe','zcb3AxrO','zvO1zJ1Zoty','tK9Kwem','y2vUDgvY','y2L0Eq','sw5ZDgfNCMe','nhDKyKzRy1i','kZq4ntCWmtm','ww91CIb1Cgq','CYb0BYbJAge','ChHDihCTwZu','EgWGChqTmIa','AwXZ','mJaYns0Wnc0','Es01mdaGBwi','Cc0Wig10lta','mZqZmZjHzfv2Duy','Bg9NB0zPBgu','nJu1nuLgA294sq','A29UDgfRDea','BgGZlMDVB2C','y204A3rOzMq','z3jHBs1SB2C','CJaWmdnSzZa','ihrLEhqTz3i','yMLZDhjVlW','CMf5ltiWmca','C2nOzwr1Bgu','BtaWmdbPDhG','ig1Ilta','mwL2owSYBxe','igXVz28','Es01','mZjLzMLmAKq','lNbS','ywLSl3n0yxq','ueG2teq2','ihrLEhqTwZe','BsbWDc01','z3vLC3rZ','Es05mda','zxj2yxrPB24','q2HjsKOWB0O','ztOG','yMCTz3jHEs0','zMLYC3rUyw0','EMLWq29Kzq','zsbWEc02','seG6Bw0','Bs9TywrYyxm','DgHPBMCGC3q','zxr0ysaY','Aw9UigrLDge','BwfKCMfZyMK','CMvZzxj2yxq','ywrKCMvZCW','AwmVzMfJzwi','CJaWmdjSzZa','rgf0zsbHBMq','BwfKCMfZlwi','s3jHA8oZDW','A3zgte8','mZuWAwPPywW','nNb4xsbSzwe','EK0Yuwzin08','nNb4xsbHBgK'];_0x3a62=function(){return _0x24e13e;};return _0x3a62();}export default u;export{u as ReservationUpdatedEmail};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Body as y,Column as s,Container as x,Head as N,Heading as v,Hr as k,Html as A,Img as r,Link as c,Preview as T,Row as n,Section as i,Tailwind as j,Text as a}from"../../../core/email/components";import{formatReservationEmailDate as B,formatReservationEmailDateTime as I}from"./reservation-email-date";const u=({user:b,organization:l,reservation:d})=>{var m,o,h,g,p;const f=`Your reservation with ${l.name} has been updated`,w=I(d.date);return t(A,{children:[e(N,{}),e(T,{children:f}),e(j,{children:t(y,{className:"bg-gray-50 font-sans",children:[t(x,{className:"bg-gray-50 p-6 max-w-[600px]",children:[e(i,{className:"mb-6",children:t(n,{children:[e(s,{className:"w-[80%]",children:e(r,{alt:`${l.name} logo`,height:"100",src:(m=l.logoFile)===null||m===void 0?void 0:m.url,className:"rounded-lg"})}),e(s,{align:"right",children:t(n,{align:"right",children:[e(s,{children:e(c,{href:"https://www.instagram.com/madrasbistro/",children:e(r,{alt:"Instagram",className:"mx-[4px]",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})}),e(s,{children:e(c,{href:"https://www.facebook.com/madrasBistro/",children:e(r,{alt:"Facebook",className:"mx-[4px]",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})})]})})]})}),t(i,{children:[t(v,{className:"text-3xl font-bold text-gray-800 mb-0",children:["Hi ",b.firstname,","]}),e(a,{className:"text-gray-600 mb-2 text-lg",children:"Your reservation details have been updated."})]})]}),t(x,{className:"mx-auto max-w-[600px] rounded-xl bg-white px-6",children:[e(i,{className:"mb-6",children:t(n,{children:[t(s,{className:"w-[60%]",children:[e(a,{className:"text-gray-500 mb-0",children:"Updated reservation details"}),t(a,{className:"font-semibold text-gray-800 my-0",children:[d.firstname," ",d.lastname]}),t(a,{className:"font-semibold text-gray-800 my-0",children:["Reference: ",d.referenceId]}),t(a,{className:"font-semibold text-gray-800 my-0",children:["Date and Time: ",w]}),t(a,{className:"font-semibold text-gray-800 my-0",children:["Number of Guests: ",d.guests]}),e(a,{className:"text-gray-500 mb-0",children:"Phone"}),e(a,{className:"font-semibold text-gray-800 my-0",children:d.phone})]}),e(s,{className:"w-[40%] p-0 mt-0",align:"right",valign:"top",children:e(a,{className:"text-gray-500 mb-0 pt-1",children:B(new Date)})})]})}),e(k,{className:"border-gray-200 mt-4"}),t(i,{className:"mb-6",children:[t(a,{className:"text-gray-700",children:["Your updated reservation is now scheduled with"," ",l.name,". If anything still needs to change, please contact us directly at ",l.phone,"."]}),e(a,{className:"text-gray-700",children:"We look forward to welcoming you."})]})]}),e(i,{className:"text-center bg-gray-50 py-5",children:t("table",{className:"w-full",children:[e("tr",{className:"w-full",children:e("td",{align:"center",children:((o=l.logoFile)===null||o===void 0?void 0:o.url)&&e(r,{alt:`${l.name} logo`,height:"100",src:l.logoFile.url,className:"rounded-lg"})})}),e("tr",{className:"w-full",children:t("td",{align:"center",children:[e(a,{className:"my-[8px] text-[16px] font-semibold text-xl pt-2 text-gray-900",children:l.name}),t(a,{className:"my-[8px] text-[16px] leading-[24px] text-gray-500",children:[(h=l.address)===null||h===void 0?void 0:h.addressLineOne,","," ",(g=l.address)===null||g===void 0?void 0:g.zipCode," ",(p=l.address)===null||p===void 0?void 0:p.city]}),e(a,{className:"mb-0 mt-[4px] text-[16px] leading-[24px] text-gray-500",children:l.phone})]})}),e("tr",{children:e("td",{align:"center",children:t(n,{className:"table-cell h-[44px] w-[56px] align-bottom pt-5",children:[e(s,{className:"pr-[8px]",children:e(c,{href:"https://www.facebook.com/madrasBistro/",children:e(r,{alt:"Facebook",height:"36",src:"https://react.email/static/facebook-logo.png",width:"36"})})}),e(s,{children:e(c,{href:"https://www.instagram.com/madrasbistro/",children:e(r,{alt:"Instagram",height:"36",src:"https://react.email/static/instagram-logo.png",width:"36"})})})]})})})]})})]})})]})},P={user:{id:"VD0OJ52f0mdAnm5YePP6BAW6hdbaCjAJ",name:"Abhishek Shaji",email:"kontakt@abhishek.pl",emailVerified:!0,image:"https://lh3.googleusercontent.com/a/ACg8ocKbkCAMTNvMizjXNxcm1aYtBiWnYpCYmU-7aE2Ft_M_uiHheZ5f=s96-c",createdAt:"2025-03-22T22:54:40.260Z",updatedAt:"2025-03-22T22:54:40.260Z",firstname:"Abhishek",lastname:"Shaji"},reservation:{id:"cm94wbpbm0000itx1iv9k2mqr",referenceId:"PH6LD6",firstname:"Abhishek",lastname:"Shaji",phone:"+48570135862",guests:6,date:new Date("2025-04-08T20:00:00.000Z"),createdAt:"2025-03-22T22:54:40.260Z",acceptedAt:"2025-03-22T23:00:23.456Z",cancelledAt:null},organization:{id:"cm8kthfdq0001lg03b59mdy7b",name:"Madras Bistro",phone:"+48570135862",email:"contact@madrasbistro.pl",createdAt:"2025-03-22T23:05:14.271Z",legalEntityId:null,address:{id:"cm8kthfdr0002lg0350ijialt",firstname:null,lastname:null,phone:null,addressLineOne:"Plac Bohater\xF3w Getta 2",doorNumber:null,addressLineTwo:"3",zipCode:"33-332",city:"Krak\xF3w",country:"PL",latitude:50.04647,longitude:19.95508,isDefault:!1,deliveryInstructions:null,placeId:"ChIJJ0oJ4wdbFkcRzM2QfH7O49o",createdAt:"2025-03-22T23:05:14.271Z",createdBy:null,updatedAt:"2025-03-22T23:05:14.271Z",updatedBy:null,deletedAt:null,deletedBy:null},configurationId:"cm8kthfdr0003lg03zmxz6v4j",logo:null,logoId:"cm8kthfdq0000lg0351daejow",updatedAt:"2025-03-22T23:05:14.271Z",updatedBy:null,deletedAt:null,deletedBy:null,slug:"madras-bistro"}};u.PreviewProps=P;export default u;export{u as ReservationUpdatedEmail};
@@ -1 +1 @@
1
- (function(_0x3fa1a0,_0x3e013b){const _0x31c0fe=_0xe056,_0x576025=_0xe056,_0x4dffc5=_0x3fa1a0();while(!![]){try{const _0x1339b6=-parseInt(_0x31c0fe(0x1da))/0x1+-parseInt(_0x576025(0x1c8))/0x2+parseInt(_0x576025(0x1ea))/0x3+-parseInt(_0x31c0fe(0x1e6))/0x4*(-parseInt(_0x576025(0x1e8))/0x5)+parseInt(_0x576025(0x1c0))/0x6+parseInt(_0x31c0fe(0x1e4))/0x7*(parseInt(_0x31c0fe(0x1d8))/0x8)+-parseInt(_0x576025(0x1cd))/0x9;if(_0x1339b6===_0x3e013b)break;else _0x4dffc5['push'](_0x4dffc5['shift']());}catch(_0x5d5cad){_0x4dffc5['push'](_0x4dffc5['shift']());}}}(_0x5a56,0x87bfc));function _0x5a56(){const _0x3be624=['yxv0Aa','nJKZnZC2vw5hEuDu','DMfSAwq','mJeZodu1thjUBNPr','BNrvC2vY','zxnLCNzHDgK','DMf0Aw9UCW','CgfYyw0','Cxjir3e','yM9KEq','zLfJA00','zxj2yxrPB24','C2vYDMf0Aw8','n1jxt2vAwa','zgvSzxrL','mtCYtKrhA2Lw','zgvSzxrLuMu','mte0mtviBNPLtgK','CMvHza','mty1ndeWn3vJAhLqCq','z2v0','B3jNyw5PEMe','z2v0txLszxm','mtK0odKYmhvrAhPgqG','CxvLCNK','z2v0vxnLCLi','B25Z','DxbKyxrL','B3bLBMfWAq','DxbKyxrLu3q','DgLVBKLK','mtqWoda0AufIwxLU','CMvZzxj2yxq','Aw9Uswq','yxr1CW','B3bLCMf0Aw8','mtK4nZe1nvLOBeXvyW','z2v0uMvZzxi','z2v0q3vYCMu','DxbKyxrLuMu','ANnVBG','y3jLyxrLuMu','DMf0Aw9U','AxnhCMfUDgu','CMvX','BLn0yxr1CW'];_0x5a56=function(){return _0x3be624;};return _0x5a56();}import{__awaiter as _0x55fde5}from'tslib';function _0xe056(_0x363ea0,_0x1081d1){_0x363ea0=_0x363ea0-0x1c0;const _0x5a5654=_0x5a56();let _0xe056ec=_0x5a5654[_0x363ea0];if(_0xe056['eMzwaR']===undefined){var _0x53b299=function(_0x26b0c5){const _0x36ad93='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18aa61='',_0x5a3821='';for(let _0x255c8f=0x0,_0x3c40f6,_0x3a022d,_0x485149=0x0;_0x3a022d=_0x26b0c5['charAt'](_0x485149++);~_0x3a022d&&(_0x3c40f6=_0x255c8f%0x4?_0x3c40f6*0x40+_0x3a022d:_0x3a022d,_0x255c8f++%0x4)?_0x18aa61+=String['fromCharCode'](0xff&_0x3c40f6>>(-0x2*_0x255c8f&0x6)):0x0){_0x3a022d=_0x36ad93['indexOf'](_0x3a022d);}for(let _0x2cae9c=0x0,_0x33cf93=_0x18aa61['length'];_0x2cae9c<_0x33cf93;_0x2cae9c++){_0x5a3821+='%'+('00'+_0x18aa61['charCodeAt'](_0x2cae9c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5a3821);};_0xe056['LXOvHn']=_0x53b299,_0xe056['jCqpNL']={},_0xe056['eMzwaR']=!![];}const _0x509ff9=_0x5a5654[0x0],_0x47b63f=_0x363ea0+_0x509ff9,_0x469cb1=_0xe056['jCqpNL'][_0x47b63f];return!_0x469cb1?(_0xe056ec=_0xe056['LXOvHn'](_0xe056ec),_0xe056['jCqpNL'][_0x47b63f]=_0xe056ec):_0xe056ec=_0x469cb1,_0xe056ec;}import{createApiRouter as _0x231baf}from'../../core/hono/hono';import{reservationRoute as _0x1b01ff}from'./reservation.route';export const registerReservationHandlers=_0x56566f=>{const _0x368f7f=_0xe056,_0x4f0af7=_0xe056,_0x412b11={'fQckM':_0x368f7f(0x1de),'qrHGq':_0x4f0af7(0x1d1)},_0x3f5aae=_0x231baf();return _0x3f5aae['openapi'](_0x1b01ff[_0x368f7f(0x1d2)+_0x368f7f(0x1e3)+'n'],_0x20355f=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0x2b06dd=_0x4f0af7,_0x33f01e=_0x4f0af7,_0x1b40ae=_0x20355f[_0x2b06dd(0x1eb)](_0x2b06dd(0x1d7)),_0x23365a=_0x20355f[_0x2b06dd(0x1d5)][_0x33f01e(0x1d9)](_0x33f01e(0x1d1)),_0x7a867d=_0x20355f[_0x2b06dd(0x1d5)][_0x33f01e(0x1d9)](_0x33f01e(0x1de));let _0x456ae7=null;try{_0x456ae7=yield _0x1b40ae[_0x2b06dd(0x1cf)+_0x33f01e(0x1db)]();}catch{}const _0xde3831=yield _0x56566f[_0x33f01e(0x1d2)+_0x33f01e(0x1e3)+'n'](_0x7a867d[_0x2b06dd(0x1ec)+_0x33f01e(0x1c7)],_0x456ae7,_0x23365a);return _0x20355f[_0x33f01e(0x1d1)](_0xde3831,0xc9);})),_0x3f5aae[_0x368f7f(0x1c5)](_0x1b01ff[_0x4f0af7(0x1ed)+_0x4f0af7(0x1e2)+'s'],_0x2351b1=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0x2f2097=_0x368f7f,_0x21acd0=_0x368f7f,_0x52a29a=_0x2351b1[_0x2f2097(0x1eb)](_0x21acd0(0x1d7)),_0x7fceb7=_0x2351b1[_0x2f2097(0x1d5)]['valid'](_0x2f2097(0x1de)),_0x1d8dea=_0x2351b1[_0x2f2097(0x1d5)][_0x2f2097(0x1d9)](_0x2f2097(0x1c1)),_0x89795d=yield _0x52a29a['getCurre'+_0x21acd0(0x1db)](),_0x5c9933=yield _0x56566f['getMyRes'+_0x21acd0(0x1e2)+'s'](_0x89795d['id'],_0x7fceb7[_0x2f2097(0x1ec)+_0x2f2097(0x1c7)],_0x1d8dea);return _0x2351b1[_0x21acd0(0x1d1)](_0x5c9933,0xc8);})),_0x3f5aae[_0x368f7f(0x1c5)](_0x1b01ff[_0x368f7f(0x1ce)+_0x4f0af7(0x1d3)],_0x1a1bda=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0x1816cf=_0x368f7f,_0x408e3e=_0x368f7f,_0x4f9ec4=_0x1a1bda[_0x1816cf(0x1eb)](_0x1816cf(0x1d7)),_0x2ef354=_0x1a1bda[_0x408e3e(0x1d5)]['valid'](_0x412b11[_0x408e3e(0x1e1)]),_0x382a68=yield _0x4f9ec4[_0x408e3e(0x1cf)+_0x1816cf(0x1db)](),_0x37c5fd=yield _0x56566f[_0x408e3e(0x1ce)+_0x408e3e(0x1d3)](_0x382a68,_0x2ef354[_0x1816cf(0x1ec)+_0x408e3e(0x1c7)],_0x2ef354[_0x408e3e(0x1c9)+_0x408e3e(0x1ca)]);return _0x1a1bda[_0x408e3e(0x1d1)](_0x37c5fd,0xc8);})),_0x3f5aae[_0x4f0af7(0x1c5)](_0x1b01ff[_0x4f0af7(0x1ce)+_0x4f0af7(0x1dd)],_0x6c1c31=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0x285bad=_0x368f7f,_0x1050ae=_0x368f7f,_0x23aab0=_0x6c1c31[_0x285bad(0x1eb)](_0x1050ae(0x1d7)),_0x1b5d28=_0x6c1c31['req'][_0x285bad(0x1d9)](_0x1050ae(0x1de)),_0x39629c=_0x6c1c31[_0x1050ae(0x1d5)][_0x1050ae(0x1d9)](_0x285bad(0x1c1));yield _0x23aab0[_0x1050ae(0x1d4)+'d'](_0x285bad(0x1e9));const _0x416468=yield _0x56566f[_0x1050ae(0x1ce)+_0x1050ae(0x1dd)](_0x1b5d28[_0x1050ae(0x1ec)+_0x285bad(0x1c7)],_0x39629c);return _0x6c1c31[_0x1050ae(0x1d1)](_0x416468,0xc8);})),_0x3f5aae[_0x368f7f(0x1c5)](_0x1b01ff[_0x368f7f(0x1c2)+'eservati'+_0x368f7f(0x1c3)],_0x3afcea=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0x5e86fa=_0x368f7f,_0x35ddbf=_0x368f7f,_0x296c1e=_0x3afcea['get'](_0x5e86fa(0x1d7)),_0x372a5c=_0x3afcea[_0x35ddbf(0x1d5)][_0x35ddbf(0x1d9)](_0x35ddbf(0x1de));yield _0x296c1e[_0x35ddbf(0x1d4)+'d'](_0x5e86fa(0x1e9));const _0x448683=yield _0x56566f['getUserR'+_0x35ddbf(0x1dc)+_0x35ddbf(0x1c3)](_0x372a5c['userId'],_0x372a5c[_0x35ddbf(0x1ec)+'tionId']);return _0x3afcea[_0x35ddbf(0x1d1)](_0x448683,0xc8);})),_0x3f5aae[_0x368f7f(0x1c5)](_0x1b01ff['updateRe'+_0x4f0af7(0x1e3)+'n'],_0x1d4f41=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0xb2fc20=_0x4f0af7,_0x184645=_0x4f0af7,_0x12e3fb=_0x1d4f41[_0xb2fc20(0x1eb)](_0x184645(0x1d7)),_0x1b30cd=_0x1d4f41[_0x184645(0x1d5)][_0xb2fc20(0x1d9)](_0xb2fc20(0x1de)),_0x1a0bf8=_0x1d4f41['req']['valid'](_0x412b11[_0x184645(0x1df)]);yield _0x12e3fb['isGrante'+'d'](_0x184645(0x1c4));const _0x3c83f4=yield _0x56566f['updateRe'+_0x184645(0x1e3)+'n'](_0x1b30cd[_0xb2fc20(0x1ec)+'tionId'],_0x1b30cd[_0x184645(0x1c9)+'ionId'],_0x1a0bf8);return _0x1d4f41['json'](_0x3c83f4,0xc8);})),_0x3f5aae[_0x368f7f(0x1c5)](_0x1b01ff[_0x368f7f(0x1d0)+'servatio'+_0x4f0af7(0x1d6)],_0xedd2ff=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0x12e720=_0x368f7f,_0x5059ed=_0x368f7f,_0x55fd58=_0xedd2ff['get']('auth'),_0x4afdd9=_0xedd2ff[_0x12e720(0x1d5)][_0x5059ed(0x1d9)]('param');yield _0x55fd58[_0x5059ed(0x1d4)+'d'](_0x5059ed(0x1c4));const _0x57ec6c=yield _0x56566f[_0x5059ed(0x1c6)+_0x12e720(0x1cb)](_0x4afdd9[_0x12e720(0x1ec)+_0x5059ed(0x1c7)],_0x4afdd9[_0x5059ed(0x1c9)+_0x5059ed(0x1ca)],_0x4afdd9[_0x5059ed(0x1cc)+'n']);return _0xedd2ff['json'](_0x57ec6c,0xc8);})),_0x3f5aae[_0x4f0af7(0x1c5)](_0x1b01ff[_0x368f7f(0x1e7)+_0x4f0af7(0x1e3)+'n'],_0x1bc23a=>_0x55fde5(void 0x0,void 0x0,void 0x0,function*(){const _0xa091ab=_0x4f0af7,_0x4eb2ba=_0x4f0af7,_0x287564=_0x1bc23a[_0xa091ab(0x1eb)](_0xa091ab(0x1d7)),_0x310d18=_0x1bc23a['req'][_0xa091ab(0x1d9)](_0xa091ab(0x1de));return yield _0x287564[_0xa091ab(0x1d4)+'d'](_0xa091ab(0x1e5)),yield _0x56566f[_0xa091ab(0x1e7)+_0xa091ab(0x1e3)+'n'](_0x310d18[_0x4eb2ba(0x1ec)+_0x4eb2ba(0x1c7)],_0x310d18[_0x4eb2ba(0x1c9)+_0xa091ab(0x1ca)]),_0x1bc23a[_0xa091ab(0x1e0)](null,0xcc);})),_0x3f5aae;};
1
+ import{__awaiter as s}from"tslib";import{createApiRouter as u}from"../../core/hono/hono";import{reservationRoute as d}from"./reservation.route";export const registerReservationHandlers=i=>{const n=u();return n.openapi(d.createReservation,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("json"),a=e.req.valid("param");let r=null;try{r=yield o.getCurrentUser()}catch{}const v=yield i.createReservation(a.organizationId,r,t);return e.json(v,201)})),n.openapi(d.getMyReservations,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("param"),a=e.req.valid("query"),r=yield o.getCurrentUser(),v=yield i.getMyReservations(r.id,t.organizationId,a);return e.json(v,200)})),n.openapi(d.getReservation,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("param"),a=yield o.getCurrentUser(),r=yield i.getReservation(a,t.organizationId,t.reservationId);return e.json(r,200)})),n.openapi(d.getReservations,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("param"),a=e.req.valid("query");yield o.isGranted("read");const r=yield i.getReservations(t.organizationId,a);return e.json(r,200)})),n.openapi(d.getUserReservations,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("param");yield o.isGranted("read");const a=yield i.getUserReservations(t.userId,t.organizationId);return e.json(a,200)})),n.openapi(d.updateReservation,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("param"),a=e.req.valid("json");yield o.isGranted("update");const r=yield i.updateReservation(t.organizationId,t.reservationId,a);return e.json(r,200)})),n.openapi(d.updateReservationStatus,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("param");yield o.isGranted("update");const a=yield i.updateStatus(t.organizationId,t.reservationId,t.operation);return e.json(a,200)})),n.openapi(d.deleteReservation,e=>s(void 0,void 0,void 0,function*(){const o=e.get("auth"),t=e.req.valid("param");return yield o.isGranted("delete"),yield i.deleteReservation(t.organizationId,t.reservationId),e.body(null,204)})),n};
@@ -1 +1 @@
1
- const _0x38ae16=_0x43c3,_0x8c1e4d=_0x43c3;(function(_0x58507e,_0xd0e412){const _0xe0fe52=_0x43c3,_0x5ad6c7=_0x43c3,_0x273742=_0x58507e();while(!![]){try{const _0x258d7d=parseInt(_0xe0fe52(0x1c7))/0x1+-parseInt(_0xe0fe52(0x1e3))/0x2*(-parseInt(_0x5ad6c7(0x205))/0x3)+parseInt(_0x5ad6c7(0x1bf))/0x4+parseInt(_0x5ad6c7(0x1e7))/0x5+parseInt(_0x5ad6c7(0x1ce))/0x6+-parseInt(_0xe0fe52(0x1c6))/0x7+-parseInt(_0x5ad6c7(0x211))/0x8;if(_0x258d7d===_0xd0e412)break;else _0x273742['push'](_0x273742['shift']());}catch(_0x2518d8){_0x273742['push'](_0x273742['shift']());}}}(_0x4ef9,0x5dc3c));import{z as _0x28c338}from'@hono/zod-openapi';import{createApiRoute as _0x2f34fc}from'../../core/hono/hono';function _0x43c3(_0x370bec,_0x5d24c8){_0x370bec=_0x370bec-0x1bf;const _0x4ef90a=_0x4ef9();let _0x43c331=_0x4ef90a[_0x370bec];if(_0x43c3['QArsfJ']===undefined){var _0x4d56c1=function(_0x400b45){const _0x433d91='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28c338='',_0x2f34fc='';for(let _0x4050d7=0x0,_0x16f2bb,_0x1fd4e5,_0x124834=0x0;_0x1fd4e5=_0x400b45['charAt'](_0x124834++);~_0x1fd4e5&&(_0x16f2bb=_0x4050d7%0x4?_0x16f2bb*0x40+_0x1fd4e5:_0x1fd4e5,_0x4050d7++%0x4)?_0x28c338+=String['fromCharCode'](0xff&_0x16f2bb>>(-0x2*_0x4050d7&0x6)):0x0){_0x1fd4e5=_0x433d91['indexOf'](_0x1fd4e5);}for(let _0x514a1e=0x0,_0x143f12=_0x28c338['length'];_0x514a1e<_0x143f12;_0x514a1e++){_0x2f34fc+='%'+('00'+_0x28c338['charCodeAt'](_0x514a1e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f34fc);};_0x43c3['dwvWbK']=_0x4d56c1,_0x43c3['PUODEX']={},_0x43c3['QArsfJ']=!![];}const _0x36aac7=_0x4ef90a[0x0],_0x11a61d=_0x370bec+_0x36aac7,_0x2328a3=_0x43c3['PUODEX'][_0x11a61d];return!_0x2328a3?(_0x43c331=_0x43c3['dwvWbK'](_0x43c331),_0x43c3['PUODEX'][_0x11a61d]=_0x43c331):_0x43c331=_0x2328a3,_0x43c331;}import{CreateReservationSchema as _0x4050d7,ErrorSchema as _0x16f2bb,HeaderSchema as _0x1fd4e5,OrganizationParams as _0x124834,PaginationMetaSchema as _0x514a1e,PaginationQuerySchema as _0x143f12,ReservationListQuerySchema as _0x2c9ef5,ReservationSchema as _0x3c0304,UpdateReservationSchema as _0x4d1233}from'../../schemas';function _0x4ef9(){const _0x5014a2=['z2v0txLszxm','zxnLCNzHDgK','DgLVBKLK','B3jNyw5PEMe','nJC4otbHyMm','lZPVCMDHBMK','BNrPy2f0zwq','C2vYDMf0Aw8','zwnPzMLJihi','z2v0vxnLCLi','r2v0ifjLC2u','t3bLCMf0Aw8','B25Z','ue9tva','B3b0Aw9UywW','revmrvrf','B2jQzwn0','l3jLC2vYDMe','vxnLCIbjra','mJiYm2zWswHgwG','B3bLBMfWAq','r2v0igeGC3a','BIbLEgLZDgK','r2v0ifvZzxi','q3jLyxrLige','y3jLyxrLuMu','ywnJzxb0','C3rYAw5N','zw51Bq','zgvM','z2v0uMvZzxi','mtuYnZq3ndrnsK11Cg4','yxjYyxK','B25jza','B25jzc86B3a','BMf0zwqGCMu','BNmGzM9Yihq','DgLVBG','mZa2nZi4mgXKAuDhDa','DMf0Aw9UCW','zxjHDgLVBG','B24GyNKGsuq','DxbKyxrLuMu','rgvSzxrLifi','DgLVBNmVoNi','mJe0nZe2nLPSs2DqAa','nJq3nZeXv3frtvnw','Cgf0Aa','AguGC3rHDhu','uefuq0G','r2v0ie15ifi','CYbVzIbHihi','EMf0Aw9Uswq','mtG1mdq2D3DsruH1','q3jLyxrLifi','BML6yxrPB24','vxbKyxrLifi','igfUig9Yz2e','DxnLCKLK','zxj2yxrPB24','AguGyxv0Agu','DgLVBIbjra','t3jNyw5PEMe','vxbKyxrLihq','ihvZzxi','zgvSzxrLuMu','r0vu','r2v0igfSBca','uMvZzxj2yxq','Aw9UCYbMB3i','ifjLC2vYDMe','ihjLC2vYDMe','Aw9U','BLn0yxr1CW','mtiZnfvqvgnwva','DgLVBNmVBwu','DgLVBNm','igeGDxnLCG','mZq4nZG2mfPOs05huG','r2v0ihbHz2K','ig5LDYbYzxm','BMCGCMvZzxi','B24Gu3rHDhu','zxH0zw5K','B3bLCMf0Aw8','zxiVoNvZzxi','y2XQmtiZndu','Aw9Uswq','CMvZzxj2yxq'];_0x4ef9=function(){return _0x5014a2;};return _0x4ef9();}const s=_0x28c338['object']({'organizationId':_0x28c338[_0x38ae16(0x20d)]()[_0x38ae16(0x206)]({'description':'Organiza'+_0x8c1e4d(0x1d6),'example':_0x8c1e4d(0x1ef)+'67890abc'+_0x38ae16(0x20f),'param':{'in':_0x38ae16(0x1c8),'name':_0x8c1e4d(0x1f5)+_0x38ae16(0x1f4)}}),'reservationId':_0x28c338['string']()['openapi']({'description':_0x38ae16(0x1dd)+'ion\x20ID','example':_0x38ae16(0x1ef)+_0x8c1e4d(0x1f6)+_0x38ae16(0x20f),'param':{'in':_0x38ae16(0x1c8),'name':_0x38ae16(0x1f1)+_0x38ae16(0x1f0)}})}),c=_0x28c338['object']({'organizationId':_0x28c338[_0x38ae16(0x20d)]()['openapi']({'description':_0x38ae16(0x1d7)+'tion\x20ID','example':_0x8c1e4d(0x1ef)+_0x38ae16(0x1f6)+_0x38ae16(0x20f),'param':{'in':_0x8c1e4d(0x1c8),'name':'organiza'+_0x8c1e4d(0x1f4)}}),'userId':_0x28c338[_0x8c1e4d(0x20d)]()[_0x8c1e4d(0x206)]({'description':_0x38ae16(0x204),'example':_0x8c1e4d(0x1ef)+_0x8c1e4d(0x1f6)+_0x38ae16(0x20f),'param':{'in':'path','name':_0x38ae16(0x1d3)}})}),R=s[_0x38ae16(0x1ec)]({'operation':_0x28c338[_0x8c1e4d(0x20e)]([_0x8c1e4d(0x20c),'cancel'])[_0x8c1e4d(0x206)]({'description':_0x38ae16(0x1fd)+'n','example':_0x8c1e4d(0x20c),'param':{'in':'path','name':_0x8c1e4d(0x1ed)+'n'}})}),h=_0x2f34fc({'body':_0x4050d7,'description':_0x8c1e4d(0x20a)+_0x8c1e4d(0x1e9)+_0x8c1e4d(0x1d4),'headers':_0x1fd4e5,'method':_0x8c1e4d(0x1ff),'operationId':_0x8c1e4d(0x20b)+_0x8c1e4d(0x1f9)+'n','path':'/:organi'+_0x8c1e4d(0x1cd)+_0x8c1e4d(0x203)+_0x8c1e4d(0x1e5),'pathParams':_0x124834,'responses':{0xc9:_0x3c0304,0x190:_0x16f2bb,0x191:_0x16f2bb,0x1f4:_0x16f2bb},'summary':_0x38ae16(0x1cf)+_0x38ae16(0x1f3)+'on','tags':['Reservat'+_0x38ae16(0x1e1)]}),u=_0x2f34fc({'description':_0x8c1e4d(0x207)+_0x38ae16(0x1fa)+_0x8c1e4d(0x1f3)+_0x38ae16(0x1c2),'headers':_0x1fd4e5,'method':_0x8c1e4d(0x1db),'operationId':_0x38ae16(0x210)+'vation','path':_0x38ae16(0x1f7)+_0x38ae16(0x1cd)+_0x8c1e4d(0x203)+_0x38ae16(0x1c5)+_0x38ae16(0x1f3)+_0x8c1e4d(0x213),'pathParams':s,'responses':{0xc8:_0x3c0304,0x190:_0x16f2bb,0x191:_0x16f2bb,0x194:_0x16f2bb,0x1f4:_0x16f2bb},'summary':_0x38ae16(0x1fc)+'rvation','tags':[_0x38ae16(0x1dd)+_0x8c1e4d(0x1e1)]}),g=_0x2f34fc({'description':_0x38ae16(0x1dc)+_0x8c1e4d(0x1f1)+_0x38ae16(0x1de)+_0x8c1e4d(0x1d2)+_0x8c1e4d(0x1d0),'headers':_0x1fd4e5,'method':_0x8c1e4d(0x1db),'operationId':'getReser'+_0x38ae16(0x1c0),'path':_0x38ae16(0x1f7)+_0x8c1e4d(0x1cd)+_0x38ae16(0x203)+_0x38ae16(0x1e5),'pathParams':_0x124834,'query':_0x2c9ef5,'responses':{0xc8:_0x28c338[_0x38ae16(0x202)]({'list':_0x28c338[_0x38ae16(0x212)](_0x3c0304),'meta':_0x514a1e}),0x190:_0x16f2bb,0x191:_0x16f2bb,0x1f4:_0x16f2bb},'summary':'Get\x20Rese'+'rvations','tags':[_0x38ae16(0x1dd)+'ion']}),I=_0x2f34fc({'description':_0x8c1e4d(0x1e8)+_0x8c1e4d(0x215)+_0x8c1e4d(0x1f9)+_0x38ae16(0x216)+_0x38ae16(0x1d5)+_0x8c1e4d(0x1f8)+_0x8c1e4d(0x1d9),'headers':_0x1fd4e5,'method':_0x38ae16(0x1db),'operationId':_0x8c1e4d(0x1f2)+'ervation'+'s','path':'/:organi'+_0x8c1e4d(0x1cd)+_0x38ae16(0x203)+_0x8c1e4d(0x1e4),'pathParams':_0x124834,'query':_0x143f12,'responses':{0xc8:_0x28c338[_0x8c1e4d(0x202)]({'list':_0x28c338[_0x8c1e4d(0x212)](_0x3c0304),'meta':_0x514a1e}),0x190:_0x16f2bb,0x191:_0x16f2bb,0x1f4:_0x16f2bb},'summary':_0x38ae16(0x1cb)+_0x8c1e4d(0x1f3)+_0x8c1e4d(0x1fe),'tags':[_0x38ae16(0x1dd)+'ion']}),l=_0x2f34fc({'description':_0x8c1e4d(0x1dc)+_0x8c1e4d(0x1f1)+_0x8c1e4d(0x1de)+_0x38ae16(0x1e6),'headers':_0x1fd4e5,'method':_0x8c1e4d(0x1db),'operationId':_0x8c1e4d(0x1fb)+_0x8c1e4d(0x1f3)+'ons','path':_0x38ae16(0x1f7)+_0x38ae16(0x1cd)+_0x38ae16(0x203)+'tions/us'+_0x8c1e4d(0x1ee)+'Id','pathParams':c,'responses':{0xc8:_0x28c338['array'](_0x3c0304),0x190:_0x16f2bb,0x191:_0x16f2bb,0x194:_0x16f2bb,0x1f4:_0x16f2bb},'summary':_0x38ae16(0x209)+_0x38ae16(0x1df)+_0x38ae16(0x1e5),'tags':['Reservat'+'ion']}),y=_0x2f34fc({'body':_0x4d1233,'description':'Update\x20a'+_0x8c1e4d(0x208)+_0x38ae16(0x1ea)+'vation','headers':_0x1fd4e5,'method':_0x38ae16(0x1ca),'operationId':_0x38ae16(0x1c3)+_0x8c1e4d(0x1f9)+'n','path':_0x38ae16(0x1f7)+_0x38ae16(0x1cd)+_0x8c1e4d(0x203)+_0x38ae16(0x1c5)+_0x38ae16(0x1f3)+'onId','pathParams':s,'responses':{0xc8:_0x3c0304,0x190:_0x16f2bb,0x191:_0x16f2bb,0x194:_0x16f2bb,0x1f4:_0x16f2bb},'summary':_0x8c1e4d(0x1d1)+_0x38ae16(0x1f3)+'on','tags':['Reservat'+_0x38ae16(0x1e1)]}),b=_0x2f34fc({'body':_0x28c338[_0x38ae16(0x202)]({})[_0x8c1e4d(0x200)](),'bodyRequired':!0x1,'description':_0x38ae16(0x1d8)+_0x38ae16(0x1c9)+_0x38ae16(0x1cc)+_0x38ae16(0x1f3)+'on','headers':_0x1fd4e5,'method':_0x8c1e4d(0x1ca),'operationId':_0x8c1e4d(0x1c3)+_0x38ae16(0x1f9)+_0x38ae16(0x1e2),'path':'/:organi'+_0x38ae16(0x1cd)+'/reserva'+_0x8c1e4d(0x1c5)+_0x8c1e4d(0x1f3)+_0x8c1e4d(0x214)+_0x38ae16(0x1c1),'pathParams':R,'responses':{0xc8:_0x3c0304,0x190:_0x16f2bb,0x191:_0x16f2bb,0x194:_0x16f2bb,0x1f4:_0x16f2bb},'summary':_0x8c1e4d(0x1d1)+_0x8c1e4d(0x1f3)+_0x8c1e4d(0x1eb)+'s','tags':[_0x38ae16(0x1dd)+_0x38ae16(0x1e1)]}),z=_0x2f34fc({'body':_0x28c338['object']({})[_0x8c1e4d(0x200)](),'bodyRequired':!0x1,'description':'Delete\x20a'+_0x38ae16(0x1e0)+_0x8c1e4d(0x217),'headers':_0x1fd4e5,'method':_0x8c1e4d(0x201),'operationId':_0x38ae16(0x1da)+_0x38ae16(0x1f9)+'n','path':_0x8c1e4d(0x1f7)+'zationId'+_0x8c1e4d(0x203)+'tions/:r'+'eservati'+_0x38ae16(0x213),'pathParams':s,'responses':{0xcc:null,0x190:_0x16f2bb,0x191:_0x16f2bb,0x194:_0x16f2bb,0x1f4:_0x16f2bb},'summary':_0x38ae16(0x1c4)+'eservati'+'on','tags':[_0x38ae16(0x1dd)+_0x38ae16(0x1e1)]});export const reservationRoute={'createReservation':h,'getReservation':u,'getReservations':g,'getMyReservations':I,'getUserReservations':l,'updateReservation':y,'updateReservationStatus':b,'deleteReservation':z};
1
+ import{z as a}from"@hono/zod-openapi";import{createApiRoute as t}from"../../core/hono/hono";import{CreateReservationSchema as p,ErrorSchema as e,HeaderSchema as r,OrganizationParams as n,PaginationMetaSchema as i,PaginationQuerySchema as d,ReservationListQuerySchema as v,ReservationSchema as o,UpdateReservationSchema as m}from"../../schemas";const s=a.object({organizationId:a.string().openapi({description:"Organization ID",example:"clj1234567890abcdef",param:{in:"path",name:"organizationId"}}),reservationId:a.string().openapi({description:"Reservation ID",example:"clj1234567890abcdef",param:{in:"path",name:"reservationId"}})}),c=a.object({organizationId:a.string().openapi({description:"Organization ID",example:"clj1234567890abcdef",param:{in:"path",name:"organizationId"}}),userId:a.string().openapi({description:"User ID",example:"clj1234567890abcdef",param:{in:"path",name:"userId"}})}),R=s.extend({operation:a.enum(["accept","cancel"]).openapi({description:"Operation",example:"accept",param:{in:"path",name:"operation"}})}),h=t({body:p,description:"Create a new reservation",headers:r,method:"POST",operationId:"createReservation",path:"/:organizationId/reservations",pathParams:n,responses:{201:o,400:e,401:e,500:e},summary:"Create Reservation",tags:["Reservation"]}),u=t({description:"Get a specific reservation by ID",headers:r,method:"GET",operationId:"getReservation",path:"/:organizationId/reservations/:reservationId",pathParams:s,responses:{200:o,400:e,401:e,404:e,500:e},summary:"Get Reservation",tags:["Reservation"]}),g=t({description:"Get all reservations for an organization",headers:r,method:"GET",operationId:"getReservations",path:"/:organizationId/reservations",pathParams:n,query:v,responses:{200:a.object({list:a.array(o),meta:i}),400:e,401:e,500:e},summary:"Get Reservations",tags:["Reservation"]}),I=t({description:"Get paginated reservations for the authenticated user",headers:r,method:"GET",operationId:"getMyReservations",path:"/:organizationId/reservations/me",pathParams:n,query:d,responses:{200:a.object({list:a.array(o),meta:i}),400:e,401:e,500:e},summary:"Get My Reservations",tags:["Reservation"]}),l=t({description:"Get all reservations for a user",headers:r,method:"GET",operationId:"getUserReservations",path:"/:organizationId/reservations/user/:userId",pathParams:c,responses:{200:a.array(o),400:e,401:e,404:e,500:e},summary:"Get User Reservations",tags:["Reservation"]}),y=t({body:m,description:"Update an existing reservation",headers:r,method:"PATCH",operationId:"updateReservation",path:"/:organizationId/reservations/:reservationId",pathParams:s,responses:{200:o,400:e,401:e,404:e,500:e},summary:"Update Reservation",tags:["Reservation"]}),b=t({body:a.object({}).optional(),bodyRequired:!1,description:"Update the status of a reservation",headers:r,method:"PATCH",operationId:"updateReservationStatus",path:"/:organizationId/reservations/:reservationId/:operation",pathParams:R,responses:{200:o,400:e,401:e,404:e,500:e},summary:"Update Reservation Status",tags:["Reservation"]}),z=t({body:a.object({}).optional(),bodyRequired:!1,description:"Delete a reservation",headers:r,method:"DELETE",operationId:"deleteReservation",path:"/:organizationId/reservations/:reservationId",pathParams:s,responses:{204:null,400:e,401:e,404:e,500:e},summary:"Delete Reservation",tags:["Reservation"]});export const reservationRoute={createReservation:h,getReservation:u,getReservations:g,getMyReservations:I,getUserReservations:l,updateReservation:y,updateReservationStatus:b,deleteReservation:z};
@@ -1 +1 @@
1
- const _0xa3e89b=_0x8b93,_0x599e14=_0x8b93;(function(_0x2f26a7,_0x49d35c){const _0x182c8f=_0x8b93,_0x24bfb6=_0x8b93,_0x34c702=_0x2f26a7();while(!![]){try{const _0x18bed0=-parseInt(_0x182c8f(0xd5))/0x1*(-parseInt(_0x24bfb6(0xc4))/0x2)+parseInt(_0x182c8f(0x9b))/0x3+-parseInt(_0x24bfb6(0xa2))/0x4*(-parseInt(_0x182c8f(0xd0))/0x5)+-parseInt(_0x24bfb6(0x92))/0x6+parseInt(_0x24bfb6(0xaf))/0x7*(-parseInt(_0x24bfb6(0xb9))/0x8)+parseInt(_0x182c8f(0xd9))/0x9+parseInt(_0x182c8f(0xb8))/0xa*(-parseInt(_0x182c8f(0xba))/0xb);if(_0x18bed0===_0x49d35c)break;else _0x34c702['push'](_0x34c702['shift']());}catch(_0xf08841){_0x34c702['push'](_0x34c702['shift']());}}}(_0x3698,0xee835));function _0x8b93(_0x32ac59,_0x26416b){_0x32ac59=_0x32ac59-0x8a;const _0x3698b3=_0x3698();let _0x8b932b=_0x3698b3[_0x32ac59];if(_0x8b93['jvdAUZ']===undefined){var _0x1ea771=function(_0x507ecf){const _0x56bffc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20a28a='',_0x2714f4='';for(let _0x412338=0x0,_0x55736d,_0x51fb7f,_0x422d46=0x0;_0x51fb7f=_0x507ecf['charAt'](_0x422d46++);~_0x51fb7f&&(_0x55736d=_0x412338%0x4?_0x55736d*0x40+_0x51fb7f:_0x51fb7f,_0x412338++%0x4)?_0x20a28a+=String['fromCharCode'](0xff&_0x55736d>>(-0x2*_0x412338&0x6)):0x0){_0x51fb7f=_0x56bffc['indexOf'](_0x51fb7f);}for(let _0x467ecf=0x0,_0x263038=_0x20a28a['length'];_0x467ecf<_0x263038;_0x467ecf++){_0x2714f4+='%'+('00'+_0x20a28a['charCodeAt'](_0x467ecf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2714f4);};_0x8b93['yByREq']=_0x1ea771,_0x8b93['QXbxpi']={},_0x8b93['jvdAUZ']=!![];}const _0xfd7a0c=_0x3698b3[0x0],_0x241744=_0x32ac59+_0xfd7a0c,_0x4553bd=_0x8b93['QXbxpi'][_0x241744];return!_0x4553bd?(_0x8b932b=_0x8b93['yByREq'](_0x8b932b),_0x8b93['QXbxpi'][_0x241744]=_0x8b932b):_0x8b932b=_0x4553bd,_0x8b932b;}import{z as _0x20a28a}from'@hono/zod-openapi';import{requiredNumber as _0x2714f4}from'../../schemas/number.schema';import{PaginationQuerySchema as _0x412338}from'../../schemas/pagination.schema';function _0x3698(){const _0x2d6d60=['B2jQzwn0','ihjLzMvYzw4','zxH0zw5K','j3mGzMLYC3q','mtbcswLqz3y','ofvOq0LkBq','nJqXnZKXn0XtDLbmwa','DhjPBq','ihjLC2vYDMe','BwjLCG','CIbMB3iGDgG','B3b0Aw9UywW','mJaYmY0WnI0','y2uGsuqGzM8','mdfumda6mda','B3bLBMfWAq','mZy5mdG4mLf2wK1Vuq','zgvYihDHCYa','C3rYAw5N','zgf0zq','BgvUz3rO','j3mGBgfZDca','rxH0zxjUywW','AxjLza','zsbVCMrLCG','oJu5lJK5ovO','B25ZihnJAgu','tNvTyMvYig8','mtyWrxLuzgrm','BIb0AguGB3i','Aw9UigrHDgu','ihrVihrOAxm','ihrPBwu','muDou0vYAa','zcb0Aw1L','AxngAw5PDgu','mtrumty6mJa','mta5mduWmZL0q2r5wwC','y2fUy2vSBgu','Axnoyu4','nJC4otbHyMm','igLUy2X1zgu','igLZihjLCxu','igfUzcb0Aw0','oJaWlJaWmfO','y3jLyxrLza','q3vZDg9Tzxi','odKW','oJaWwG','zcbPBIb0Agu','BNvSBgfIBgu','yw55','zhvSzwqGzNi','tgfZDcbUyw0','mZfumJm6ntK','ig51BwjLCG','zgf0zsbHBMq','rMLSDgvYihi','ote1nZyZoevtvwLyqW','vxbKyxrLuMu','rgf0zsb3Agu','tMfo','DhjHBNnMB3i','igrHDguGyw4','C2vYDMf0Aw8','zxnLCNzHDgK','CMvMAw5L','otK1ody4wffhEvb0','ig5HBwu','t1jelteYmZq','mJaYnI0WmY0','rg9L','ugHVBMuGBNu','BMfTzq','odu0ntjfDM9rt2m','y29LCMnL','sM9OBG','rMLYC3qGBMe','kZeYmZq1nJC','DgLVBG','zgvUDgLMAwu','CgLJAW','CIb0AguGB3i','uMvZzxj2yxq','ywnJzxb0zwq','DwvYEq','mtvumtq6mZa','nJKWmJeWnxnOtuPsua','z2v0vgLTzq','vw5PCxvLigK','j3mGCgHVBMu','zIbNDwvZDhm'];_0x3698=function(){return _0x2d6d60;};return _0x3698();}const n=_0x55736d=>_0x20a28a[_0xa3e89b(0x8b)]()[_0x599e14(0x96)+'m'](_0x51fb7f=>typeof _0x51fb7f==_0x599e14(0xc6)?_0x51fb7f[_0x599e14(0xbb)]():'')[_0x599e14(0x9a)](_0x422d46=>_0x422d46[_0xa3e89b(0xc8)]>0x0,{'message':_0x55736d+(_0xa3e89b(0xde)+'ired')}),o=_0x20a28a['any']()[_0xa3e89b(0x96)+'m'](_0x467ecf=>_0x467ecf==null||_0x467ecf===''?Number[_0x599e14(0x95)]:Number(_0x467ecf))[_0x599e14(0x9a)](_0x263038=>Number[_0xa3e89b(0xd7)](_0x263038)&&_0x263038>0x0,{'message':_0xa3e89b(0xcf)+_0x599e14(0xb3)+_0xa3e89b(0xde)+'ired'}),s=_0x20a28a[_0x599e14(0x8b)]()[_0xa3e89b(0x9a)](_0x97617d=>_0x97617d!=null&&_0x97617d!=='',{'message':_0xa3e89b(0xab)+_0x599e14(0xd2)+'\x20is\x20requ'+_0xa3e89b(0xcb)})[_0x599e14(0x96)+'m'](_0x55a1c0=>new Date(_0x55a1c0))[_0xa3e89b(0x9a)](_0x4995d2=>!Number[_0xa3e89b(0xdb)](_0x4995d2[_0xa3e89b(0xb0)]()),{'message':_0xa3e89b(0xab)+'ion\x20date'+'\x20is\x20requ'+_0x599e14(0xcb)});export const ReservationSchema=_0x20a28a[_0x599e14(0xb4)]({'id':_0x20a28a[_0xa3e89b(0xc6)]()[_0x599e14(0xc3)]({'description':_0xa3e89b(0xb1)+_0xa3e89b(0xa8)+_0xa3e89b(0xbe)+_0xa3e89b(0xcc),'example':'clj12345'+_0xa3e89b(0xdc)+'def'}),'firstname':_0x20a28a[_0xa3e89b(0xc6)]()[_0x599e14(0xc3)]({'description':_0x599e14(0xe2)+_0x599e14(0xb7)+_0x599e14(0x9c),'example':'John'}),'lastname':_0x20a28a[_0xa3e89b(0xc6)]()[_0xa3e89b(0xc3)]({'description':_0x599e14(0xe2)+_0xa3e89b(0xc9)+_0xa3e89b(0xa1),'example':'Doe'}),'guests':_0x2714f4,'phone':_0x20a28a[_0xa3e89b(0xc6)]()[_0xa3e89b(0xc3)]({'description':_0x599e14(0xe2)+_0x599e14(0xb2)+_0x599e14(0x8f),'example':_0x599e14(0xa6)+_0x599e14(0xe3)}),'date':_0x20a28a[_0xa3e89b(0xa3)][_0x599e14(0xc7)]()['openapi']({'description':_0x599e14(0xab)+_0xa3e89b(0xd2)+_0x599e14(0xdf)+'e','example':_0xa3e89b(0xc0)+_0xa3e89b(0xd8)+_0x599e14(0xe4)}),'referenceId':_0x20a28a[_0x599e14(0xc6)]()[_0x599e14(0xc3)]({'description':_0x599e14(0xca)+_0x599e14(0xb5)+_0x599e14(0xc1)+_0xa3e89b(0xaa)+'der','example':_0x599e14(0x9d)+'5'}),'acceptedAt':_0x20a28a[_0xa3e89b(0xc7)]()[_0x599e14(0x8a)]()[_0xa3e89b(0xbf)]()[_0xa3e89b(0xc3)]({'description':_0xa3e89b(0x94)+'n\x20the\x20or'+_0x599e14(0xc5)+_0x599e14(0xac),'example':_0x599e14(0xc0)+_0x599e14(0xae)+_0xa3e89b(0xe4)}),'cancelledAt':_0x20a28a[_0xa3e89b(0xc7)]()[_0x599e14(0x8a)]()[_0xa3e89b(0xbf)]()[_0xa3e89b(0xc3)]({'description':_0xa3e89b(0x94)+_0xa3e89b(0xd1)+_0x599e14(0xc5)+_0x599e14(0xda)+'d','example':_0xa3e89b(0xc0)+'14T16:20'+':00Z'}),'createdAt':_0x20a28a['date']()[_0x599e14(0x8a)]()[_0x599e14(0xbf)]()['openapi']({'description':_0xa3e89b(0x94)+'n\x20the\x20or'+_0xa3e89b(0xc5)+_0xa3e89b(0xe1),'example':_0xa3e89b(0xc0)+_0xa3e89b(0xd8)+_0xa3e89b(0xe4)})})[_0xa3e89b(0xc3)]('Reservat'+'ion'),CreateReservationSchema=ReservationSchema[_0xa3e89b(0xa9)]({'firstname':!0x0,'lastname':!0x0,'guests':!0x0,'phone':!0x0,'date':!0x0})[_0xa3e89b(0xb6)]({'firstname':n(_0xa3e89b(0xa5)+'me')[_0xa3e89b(0xc3)]({'description':'Customer'+_0xa3e89b(0xb7)+_0xa3e89b(0x9c),'example':_0x599e14(0xa4)}),'lastname':n(_0xa3e89b(0x8d)+'e')['openapi']({'description':_0xa3e89b(0xe2)+_0xa3e89b(0xc9)+_0x599e14(0xa1),'example':_0x599e14(0x9f)}),'guests':o[_0xa3e89b(0xc3)]({'description':_0x599e14(0xcf)+_0xa3e89b(0xb3)+_0xa3e89b(0xdd)+_0xa3e89b(0xe5)+_0xa3e89b(0xbc)+_0xa3e89b(0xa7),'example':0x2}),'phone':n(_0xa3e89b(0xa0)+_0xa3e89b(0xbd))[_0xa3e89b(0xc3)]({'description':_0x599e14(0xe2)+_0xa3e89b(0xb2)+_0x599e14(0x8f),'example':'+1234567'+_0xa3e89b(0xe3)}),'date':s[_0xa3e89b(0xc3)]({'description':_0xa3e89b(0xab)+_0x599e14(0xd2)+_0x599e14(0xdf)+'e','example':_0xa3e89b(0xc0)+_0x599e14(0xd8)+_0x599e14(0xe4)})})[_0xa3e89b(0xc3)]('CreateRe'+_0xa3e89b(0x98)+'n'),UpdateReservationSchema=CreateReservationSchema[_0xa3e89b(0xa9)]({'firstname':!0x0,'lastname':!0x0,'guests':!0x0,'date':!0x0})[_0x599e14(0xc3)](_0xa3e89b(0x93)+'servatio'+'n'),ReservationListQuerySchema=_0x412338[_0x599e14(0xb6)]({'from':_0x20a28a[_0x599e14(0xa3)][_0x599e14(0xc7)]()[_0xa3e89b(0xbf)]()['openapi']({'description':_0xa3e89b(0x91)+_0xa3e89b(0x99)+_0xa3e89b(0xce)+_0x599e14(0x8c)+'om\x20this\x20'+_0xa3e89b(0x90)+_0xa3e89b(0xd4),'example':_0xa3e89b(0x9e)+_0xa3e89b(0xc2)+_0x599e14(0xe0)}),'to':_0x20a28a[_0x599e14(0xa3)]['date']()[_0x599e14(0xbf)]()['openapi']({'description':'Filter\x20r'+_0xa3e89b(0x99)+_0xa3e89b(0xce)+'duled\x20up'+_0x599e14(0xd3)+_0x599e14(0x97)+_0x599e14(0xd6),'example':_0x599e14(0x9e)+_0xa3e89b(0x8e)+_0xa3e89b(0xcd)})})[_0x599e14(0xc3)]('Reservat'+'ionListQ'+_0x599e14(0xad));
1
+ import{z as t}from"@hono/zod-openapi";import{requiredNumber as a}from"../../schemas/number.schema";import{PaginationQuerySchema as i}from"../../schemas/pagination.schema";const n=e=>t.any().transform(r=>typeof r=="string"?r.trim():"").refine(r=>r.length>0,{message:`${e} is required`}),o=t.any().transform(e=>e==null||e===""?Number.NaN:Number(e)).refine(e=>Number.isFinite(e)&&e>0,{message:"Number of guests is required"}),s=t.any().refine(e=>e!=null&&e!=="",{message:"Reservation date is required"}).transform(e=>new Date(e)).refine(e=>!Number.isNaN(e.getTime()),{message:"Reservation date is required"});export const ReservationSchema=t.object({id:t.string().openapi({description:"Unique identifier for the order",example:"clj1234567890abcdef"}),firstname:t.string().openapi({description:"Customer's first name",example:"John"}),lastname:t.string().openapi({description:"Customer's last name",example:"Doe"}),guests:a,phone:t.string().openapi({description:"Customer's phone number",example:"+1234567890"}),date:t.coerce.date().openapi({description:"Reservation date and time",example:"2023-06-14T16:20:00Z"}),referenceId:t.string().openapi({description:"External reference ID for the order",example:"ORD-12345"}),acceptedAt:t.date().nullable().optional().openapi({description:"Date when the order was accepted",example:"2023-06-15T14:30:00Z"}),cancelledAt:t.date().nullable().optional().openapi({description:"Date when the order was cancelled",example:"2023-06-14T16:20:00Z"}),createdAt:t.date().nullable().optional().openapi({description:"Date when the order was created",example:"2023-06-14T16:20:00Z"})}).openapi("Reservation"),CreateReservationSchema=ReservationSchema.pick({firstname:!0,lastname:!0,guests:!0,phone:!0,date:!0}).extend({firstname:n("First name").openapi({description:"Customer's first name",example:"John"}),lastname:n("Last name").openapi({description:"Customer's last name",example:"Doe"}),guests:o.openapi({description:"Number of guests included in the reservation",example:2}),phone:n("Phone number").openapi({description:"Customer's phone number",example:"+1234567890"}),date:s.openapi({description:"Reservation date and time",example:"2023-06-14T16:20:00Z"})}).openapi("CreateReservation"),UpdateReservationSchema=CreateReservationSchema.pick({firstname:!0,lastname:!0,guests:!0,date:!0}).openapi("UpdateReservation"),ReservationListQuerySchema=i.extend({from:t.coerce.date().optional().openapi({description:"Filter reservations scheduled from this date and time",example:"2026-03-01T00:00:00.000Z"}),to:t.coerce.date().optional().openapi({description:"Filter reservations scheduled up to this date and time",example:"2026-03-31T23:59:59.999Z"})}).openapi("ReservationListQuery");
@@ -1 +1 @@
1
- const _0x11fd4f=_0x1412,_0x36e75f=_0x1412;(function(_0x6957bf,_0x279f42){const _0x5c9e0e=_0x1412,_0x24b53e=_0x1412,_0x2dd012=_0x6957bf();while(!![]){try{const _0xfabac8=-parseInt(_0x5c9e0e(0x113))/0x1*(parseInt(_0x5c9e0e(0x14d))/0x2)+-parseInt(_0x5c9e0e(0x14f))/0x3+-parseInt(_0x5c9e0e(0x12e))/0x4*(parseInt(_0x24b53e(0x10b))/0x5)+parseInt(_0x24b53e(0x11c))/0x6*(-parseInt(_0x5c9e0e(0x10e))/0x7)+-parseInt(_0x24b53e(0xfc))/0x8+-parseInt(_0x5c9e0e(0x122))/0x9*(parseInt(_0x24b53e(0x12a))/0xa)+parseInt(_0x5c9e0e(0x114))/0xb;if(_0xfabac8===_0x279f42)break;else _0x2dd012['push'](_0x2dd012['shift']());}catch(_0x742f35){_0x2dd012['push'](_0x2dd012['shift']());}}}(_0x40dc,0x2ff07));import{__awaiter as _0x44c6c0}from'tslib';import{z as _0x432670}from'@hono/zod-openapi';import{customAlphabet as _0x5af473}from'nanoid';import{HttpException as _0x56f9bc}from'../../core/exceptions/http-exception';import{logger as _0x36685f}from'../../core/logging/pino';import{PaginationMetaSchema as _0x1f288d,ReservationSchema as _0x5e43a7}from'../../schemas';const p=_0x5af473(_0x11fd4f(0x144)+_0x36e75f(0x105)+_0x11fd4f(0xfa)+'OPQRSTUV'+_0x11fd4f(0xf7),0x6);function _0x1412(_0x1c6571,_0x43909f){_0x1c6571=_0x1c6571-0xed;const _0x40dc6c=_0x40dc();let _0x141242=_0x40dc6c[_0x1c6571];if(_0x1412['szRUPd']===undefined){var _0x4f93dd=function(_0x40f03a){const _0x55ac08='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xf24c4d='',_0x173417='';for(let _0x54e57c=0x0,_0x95b2a,_0x4ba05f,_0x4247d1=0x0;_0x4ba05f=_0x40f03a['charAt'](_0x4247d1++);~_0x4ba05f&&(_0x95b2a=_0x54e57c%0x4?_0x95b2a*0x40+_0x4ba05f:_0x4ba05f,_0x54e57c++%0x4)?_0xf24c4d+=String['fromCharCode'](0xff&_0x95b2a>>(-0x2*_0x54e57c&0x6)):0x0){_0x4ba05f=_0x55ac08['indexOf'](_0x4ba05f);}for(let _0xc9442d=0x0,_0x7c5bf2=_0xf24c4d['length'];_0xc9442d<_0x7c5bf2;_0xc9442d++){_0x173417+='%'+('00'+_0xf24c4d['charCodeAt'](_0xc9442d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x173417);};_0x1412['oAJlFF']=_0x4f93dd,_0x1412['zKyEBo']={},_0x1412['szRUPd']=!![];}const _0x39f0ca=_0x40dc6c[0x0],_0x1ce5eb=_0x1c6571+_0x39f0ca,_0x14bac1=_0x1412['zKyEBo'][_0x1ce5eb];return!_0x14bac1?(_0x141242=_0x1412['oAJlFF'](_0x141242),_0x1412['zKyEBo'][_0x1ce5eb]=_0x141242):_0x141242=_0x14bac1,_0x141242;}class g{constructor(_0x5d1349,_0x34b7be){const _0x5e67f1=_0x11fd4f,_0x1564bc=_0x11fd4f;this[_0x5e67f1(0x11a)]=_0x5d1349,this[_0x1564bc(0x137)+_0x5e67f1(0x13e)]=_0x34b7be;}[_0x36e75f(0x124)+'ndEmail'](_0xe18cc5,_0x47297d){return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x4e86e5=_0x1412,_0x768a05=_0x1412;try{yield _0x47297d();}catch(_0x28ca26){_0x36685f[_0x4e86e5(0xef)](Object[_0x768a05(0xf6)]({'err':_0x28ca26},_0xe18cc5),_0x4e86e5(0xf0)+_0x4e86e5(0x139)+_0x4e86e5(0x149));}});}['createRe'+_0x11fd4f(0x12c)+'n'](_0x5b1249,_0x34d966,_0x562be9){const _0x43b501=_0x36e75f,_0x4533b4=_0x36e75f,_0xf7533c={'SbqAl':_0x43b501(0x11e)+_0x4533b4(0xf3)+_0x43b501(0x141)};return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x495dbd=_0x43b501,_0x225c63=_0x43b501;var _0x210f74;const _0x22ec16=yield this[_0x495dbd(0x11a)][_0x495dbd(0x130)+_0x495dbd(0x148)][_0x225c63(0x121)+'t']({'where':{'id':_0x5b1249},'include':{'configuration':!0x0}});if(!_0x22ec16)throw new _0x56f9bc(0x194,_0x495dbd(0x140)+_0x495dbd(0x126)+_0x225c63(0x119));if(!(!((_0x210f74=_0x22ec16['configur'+_0x225c63(0x117)])===null||_0x210f74===void 0x0)&&_0x210f74[_0x495dbd(0x11b)+_0x225c63(0x14a)+_0x495dbd(0x150)]))throw new _0x56f9bc(0x190,'This\x20org'+'anizatio'+_0x225c63(0x102)+_0x495dbd(0x132)+_0x225c63(0x111)+_0x225c63(0x152)+_0x495dbd(0xff)+_0x495dbd(0xee));const _0x6c48b3=yield this[_0x225c63(0x11a)][_0x495dbd(0x11e)+_0x225c63(0x10a)][_0x225c63(0x136)]({'data':Object[_0x225c63(0xf6)]({'referenceId':p(),'firstname':_0x562be9['firstnam'+'e'],'lastname':_0x562be9['lastname'],'guests':_0x562be9[_0x495dbd(0xf5)],'phone':_0x562be9[_0x225c63(0x115)],'date':_0x562be9[_0x495dbd(0x116)],'organization':{'connect':{'id':_0x5b1249}}},_0x34d966?{'user':{'connect':{'id':_0x34d966['id']}}}:{}),'include':{'organization':{'include':{'address':!0x0,'configuration':!0x0,'logoFile':!0x0,'members':{'include':{'user':!0x0}}}},'user':!0x0}});for(const _0xb0aab of _0x6c48b3['organiza'+_0x225c63(0x148)][_0x495dbd(0x13d)])yield this[_0x495dbd(0x124)+_0x495dbd(0x147)]({'emailType':_0xf7533c[_0x225c63(0x13a)],'memberId':_0xb0aab[_0x495dbd(0x151)]['id'],'organizationId':_0x5b1249,'reservationId':_0x6c48b3['id']},()=>this[_0x225c63(0x137)+_0x225c63(0x13e)][_0x495dbd(0x112)+'rvationN'+_0x225c63(0x109)+_0x495dbd(0xf1)](_0x5b1249,_0xb0aab[_0x495dbd(0x151)],_0x6c48b3));return _0x5e43a7['parse'](_0x6c48b3);});}[_0x11fd4f(0x12b)+_0x36e75f(0x145)](_0x33fbd5,_0x3d6316,_0x3f3972){return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x3cbea6=_0x1412,_0x33ead6=_0x1412,_0x21387f=yield this[_0x3cbea6(0x11a)][_0x33ead6(0x11e)+_0x33ead6(0x10a)]['findUniq'+'ue']({'where':{'id':_0x3f3972,'organizationId':_0x3d6316,'user':{'id':_0x33fbd5['id']}}});if(!_0x21387f)throw new _0x56f9bc(0x194,_0x3cbea6(0x108)+_0x33ead6(0x11d)+_0x3cbea6(0x13c));return _0x5e43a7[_0x33ead6(0x10c)](_0x21387f);});}['getReser'+_0x11fd4f(0x150)](_0x2155fd,_0xe813c0){const _0x58be8c={'WQeBY':function(_0x2139bf,_0x52af97){return _0x2139bf||_0x52af97;}};return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x2d9946=_0x1412,_0x408714=_0x1412,{page:_0x13ffe0=0x1,limit:_0x52edce=0xa,search:_0x1694b4,from:_0x2a09de,to:_0x3f8b1e}=_0xe813c0,[_0x21377e,_0x37f735]=yield this['prisma'][_0x2d9946(0x11e)+_0x2d9946(0x10a)][_0x2d9946(0xf2)]({'orderBy':{'createdAt':_0x408714(0xfd)},'where':Object[_0x408714(0xf6)](Object['assign']({'organizationId':_0x2155fd},_0x58be8c[_0x408714(0x135)](_0x2a09de,_0x3f8b1e)?{'date':Object[_0x408714(0xf6)](Object['assign']({},_0x2a09de?{'gte':_0x2a09de}:{}),_0x3f8b1e?{'lte':_0x3f8b1e}:{})}:{}),_0x1694b4&&{'OR':[{'firstname':{'contains':_0x1694b4,'mode':_0x408714(0x12d)+_0x408714(0x14e)}},{'lastname':{'contains':_0x1694b4,'mode':_0x2d9946(0x12d)+_0x2d9946(0x14e)}},{'referenceId':{'contains':_0x1694b4,'mode':_0x2d9946(0x12d)+_0x408714(0x14e)}}]}),'include':{'user':!0x0}})[_0x2d9946(0x103)+'s']({'page':_0x13ffe0,'limit':_0x52edce});return _0x432670['object']({'meta':_0x1f288d,'list':_0x432670[_0x2d9946(0x125)](_0x5e43a7)})[_0x2d9946(0x10c)]({'meta':_0x37f735,'list':_0x21377e});});}[_0x11fd4f(0x11f)+'ervation'+'s'](_0x56c147,_0x212791,_0x58f090){const _0x299929={'lMxKL':function(_0x1b8795,_0x4f6e2f){return _0x1b8795&&_0x4f6e2f;}};return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x4a5609=_0x1412,_0x205de9=_0x1412,{page:_0x49b213=0x1,limit:_0x3a8ef1=0xa,search:_0x46d15a}=_0x58f090,[_0x2d9ee9,_0x9770a]=yield this['prisma'][_0x4a5609(0x11e)+'ion']['paginate']({'orderBy':{'createdAt':'desc'},'where':Object[_0x205de9(0xf6)]({'organizationId':_0x212791,'userId':_0x56c147},_0x299929[_0x205de9(0x110)](_0x46d15a,{'referenceId':{'contains':_0x46d15a,'mode':_0x4a5609(0x12d)+_0x4a5609(0x14e)}}))})[_0x205de9(0x103)+'s']({'page':_0x49b213,'limit':_0x3a8ef1});return _0x432670[_0x4a5609(0x133)]({'meta':_0x1f288d,'list':_0x432670[_0x4a5609(0x125)](_0x5e43a7)})[_0x4a5609(0x10c)]({'meta':_0x9770a,'list':_0x2d9ee9});});}[_0x36e75f(0x131)+'eservati'+_0x36e75f(0x13b)](_0x4964fd,_0x11c947){return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x304b4c=_0x1412,_0x4d852a=_0x1412,_0x5d51cc=yield this[_0x304b4c(0x11a)][_0x4d852a(0x11e)+_0x304b4c(0x10a)][_0x304b4c(0xfb)]({'where':{'organizationId':_0x11c947,'userId':_0x4964fd}});return _0x432670[_0x4d852a(0x125)](_0x5e43a7)[_0x304b4c(0x10c)](_0x5d51cc);});}[_0x36e75f(0x129)+_0x11fd4f(0x12c)+'n'](_0xd318b5,_0x15bec9,_0x20eb71){return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0xeea994=_0x1412,_0x189b11=_0x1412,_0x5c5f89=yield this['prisma'][_0xeea994(0x11e)+'ion'][_0x189b11(0x100)+'ue']({'where':{'id':_0x15bec9,'organizationId':_0xd318b5}});if(!_0x5c5f89)throw new _0x56f9bc(0x194,_0x189b11(0x108)+_0x189b11(0x11d)+_0xeea994(0x13c));if(_0x5c5f89[_0x189b11(0x118)+_0x189b11(0x101)])throw new _0x56f9bc(0x190,_0x189b11(0xfe)+_0x189b11(0xf8)+'ations\x20c'+_0x189b11(0x128)+_0x189b11(0x120));const _0x28e5ea=yield this[_0xeea994(0x11a)][_0x189b11(0x11e)+_0xeea994(0x10a)][_0xeea994(0x146)]({'where':{'id':_0x15bec9},'data':{'firstname':_0x20eb71[_0x189b11(0x138)+'e'],'lastname':_0x20eb71[_0xeea994(0x10d)],'guests':_0x20eb71['guests'],'date':_0x20eb71[_0x189b11(0x116)]},'include':{'organization':{'include':{'address':!0x0,'configuration':!0x0,'logoFile':!0x0,'members':{'include':{'user':!0x0}}}},'user':!0x0}});return yield this[_0x189b11(0x124)+'ndEmail']({'emailType':_0x189b11(0x11e)+_0x189b11(0x104)+_0x189b11(0xf9),'organizationId':_0xd318b5,'reservationId':_0x28e5ea['id']},()=>this[_0xeea994(0x137)+_0xeea994(0x13e)][_0x189b11(0x112)+_0xeea994(0xed)+_0x189b11(0x127)+'ail'](_0xd318b5,_0x28e5ea)),_0x5e43a7['parse'](_0x28e5ea);});}[_0x36e75f(0x12f)+_0x11fd4f(0x14c)](_0x2aaa01,_0x40130e,_0x22d8ea){return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x358178=_0x1412,_0x1c4d49=_0x1412;if(!(yield this['prisma'][_0x358178(0x11e)+_0x358178(0x10a)][_0x358178(0x100)+'ue']({'where':{'id':_0x40130e,'organizationId':_0x2aaa01}})))throw new _0x56f9bc(0x194,_0x358178(0x108)+_0x1c4d49(0x11d)+_0x358178(0x13c));let _0x4f6db5={};switch(_0x22d8ea){case _0x1c4d49(0x14b):_0x4f6db5={'acceptedAt':new Date()};break;case _0x358178(0x10f):_0x4f6db5={'cancelledAt':new Date()};break;}const _0x4ab8f9=yield this[_0x1c4d49(0x11a)][_0x358178(0x11e)+_0x358178(0x10a)][_0x358178(0x146)]({'where':{'id':_0x40130e},'data':_0x4f6db5,'include':{'organization':{'include':{'address':!0x0,'configuration':!0x0,'logoFile':!0x0,'members':{'include':{'user':!0x0}}}},'user':!0x0}});return _0x22d8ea===_0x1c4d49(0x10f)&&(yield this[_0x1c4d49(0x124)+_0x1c4d49(0x147)]({'emailType':_0x1c4d49(0x11e)+_0x358178(0x142)+_0x358178(0xf4),'organizationId':_0x2aaa01,'reservationId':_0x4ab8f9['id']},()=>this[_0x1c4d49(0x137)+_0x358178(0x13e)][_0x1c4d49(0x112)+_0x1c4d49(0x143)+_0x1c4d49(0x107)+_0x1c4d49(0xf1)](_0x2aaa01,_0x4ab8f9))),_0x22d8ea===_0x1c4d49(0x14b)&&(yield this[_0x1c4d49(0x124)+_0x1c4d49(0x147)]({'emailType':_0x358178(0x11e)+_0x1c4d49(0x123)+_0x358178(0x134),'organizationId':_0x2aaa01,'reservationId':_0x4ab8f9['id']},()=>this[_0x1c4d49(0x137)+_0x358178(0x13e)]['sendRese'+_0x1c4d49(0x143)+'onfirmat'+_0x358178(0xf1)](_0x2aaa01,_0x4ab8f9))),_0x5e43a7['parse'](_0x4ab8f9);});}[_0x11fd4f(0x13f)+_0x36e75f(0x12c)+'n'](_0x5cd7d6,_0x439b31){return _0x44c6c0(this,void 0x0,void 0x0,function*(){const _0x694aba=_0x1412,_0x4cd7cd=_0x1412;if(!(yield this[_0x694aba(0x11a)][_0x4cd7cd(0x11e)+_0x4cd7cd(0x10a)][_0x694aba(0x100)+'ue']({'where':{'id':_0x439b31,'organizationId':_0x5cd7d6}})))throw new _0x56f9bc(0x194,_0x694aba(0x108)+_0x694aba(0x11d)+_0x4cd7cd(0x13c));yield this[_0x694aba(0x11a)][_0x694aba(0x11e)+_0x4cd7cd(0x10a)][_0x4cd7cd(0x106)]({'where':{'id':_0x439b31}});});}}export{g as ReservationService};function _0x40dc(){const _0x163cdf=['mte2odmWmtjNvhjWCK4','CgHVBMu','zgf0zq','yxrPB24','y2fUy2vSBgu','igzVDw5K','ChjPC21H','Axnby2nLChq','mJrACePRDxG','Aw9Uig5VDca','CMvZzxj2yxq','z2v0txLszxm','igvKAxrLza','zMLUzezPCNm','ndi5m3LhBKLvwG','Aw9UlwnVBMy','C2fMzwX5u2u','yxjYyxK','DgLVBIbUB3q','CgrHDgvKrw0','yw5UB3qGyMu','DxbKyxrLuMu','mtG0meD1AMHJqG','z2v0uMvZzxi','C2vYDMf0Aw8','Aw5Zzw5ZAxq','otzvExrisKG','DxbKyxrLu3q','B3jNyw5PEMe','z2v0vxnLCLi','igfJy2vWDgK','B2jQzwn0','AxjTzwq','v1fLqLK','y3jLyxrL','zw1HAwXtzxi','zMLYC3rUyw0','BgL2zxj5igy','u2jXqwW','B25Z','zM91BMq','BwvTyMvYCW','DMLJzq','zgvSzxrLuMu','t3jNyw5PEMe','zMLJyxrPB24','Aw9UlwnHBMm','CNzHDgLVBKm','mtiZndu2nZG','DMf0Aw9U','DxbKyxrL','BMrfBwfPBa','DgLVBG','ywLSzwq','Aw5NuMvZzxi','ywnJzxb0','yxr1CW','mZrgy3PZqwq','AxzL','mZq0otK0AhnUz2Pm','DMf0Aw9UCW','DxnLCG','DMf0Aw9UCYa','CNzHDgLVBLu','B21LBNq','zxjYB3i','rw1HAwWGzgu','Aw9Urw1HAwW','CgfNAw5HDgu','Aw9Ulw5VDgK','zwXSzwq','z3vLC3rZ','yxnZAwDU','v1HzwG','zcbYzxnLCNy','DgvK','r0HjsKTmtu4','zMLUze1HBNK','mJi0oti4mfL5ywzira','zgvZyW','q2fUy2vSBgu','yxqGDgHLig0','zMLUzfvUAxe','zef0','BIbPCYbUB3q','D2L0AfbHz2u','Aw9UlxvWzge','otbbqKneruy','zgvSzxrL','yw5JzwXSyxq','uMvZzxj2yxq','B3rPzMLJyxq','Aw9U','mtqWnJvAqLzyzve','CgfYC2u','BgfZDg5HBwu','mtmXmtHHENjcD0K','y2fUy2vS','Be14s0W','BMCGCMvZzxi','C2vUzfjLC2u','mtGWndD6thHLENi'];_0x40dc=function(){return _0x163cdf;};return _0x40dc();}
1
+ import{__awaiter as a}from"tslib";import{z as u}from"@hono/zod-openapi";import{customAlphabet as h}from"nanoid";import{HttpException as d}from"../../core/exceptions/http-exception";import{logger as f}from"../../core/logging/pino";import{PaginationMetaSchema as m,ReservationSchema as c}from"../../schemas";const p=h("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",6);class g{constructor(e,t){this.prisma=e,this.emailService=t}safelySendEmail(e,t){return a(this,void 0,void 0,function*(){try{yield t()}catch(i){f.error(Object.assign({err:i},e),"Email delivery failed")}})}createReservation(e,t,i){return a(this,void 0,void 0,function*(){var s;const r=yield this.prisma.organization.findFirst({where:{id:e},include:{configuration:!0}});if(!r)throw new d(404,"Organization not found");if(!(!((s=r.configuration)===null||s===void 0)&&s.isAcceptingReservations))throw new d(400,"This organization is not accepting reservations at the moment");const n=yield this.prisma.reservation.create({data:Object.assign({referenceId:p(),firstname:i.firstname,lastname:i.lastname,guests:i.guests,phone:i.phone,date:i.date,organization:{connect:{id:e}}},t?{user:{connect:{id:t.id}}}:{}),include:{organization:{include:{address:!0,configuration:!0,logoFile:!0,members:{include:{user:!0}}}},user:!0}});for(const o of n.organization.members)yield this.safelySendEmail({emailType:"reservation-notification",memberId:o.user.id,organizationId:e,reservationId:n.id},()=>this.emailService.sendReservationNotificationEmail(e,o.user,n));return c.parse(n)})}getReservation(e,t,i){return a(this,void 0,void 0,function*(){const s=yield this.prisma.reservation.findUnique({where:{id:i,organizationId:t,user:{id:e.id}}});if(!s)throw new d(404,"Reservation not found");return c.parse(s)})}getReservations(e,t){return a(this,void 0,void 0,function*(){const{page:i=1,limit:s=10,search:r,from:n,to:o}=t,[l,v]=yield this.prisma.reservation.paginate({orderBy:{createdAt:"desc"},where:Object.assign(Object.assign({organizationId:e},n||o?{date:Object.assign(Object.assign({},n?{gte:n}:{}),o?{lte:o}:{})}:{}),r&&{OR:[{firstname:{contains:r,mode:"insensitive"}},{lastname:{contains:r,mode:"insensitive"}},{referenceId:{contains:r,mode:"insensitive"}}]}),include:{user:!0}}).withPages({page:i,limit:s});return u.object({meta:m,list:u.array(c)}).parse({meta:v,list:l})})}getMyReservations(e,t,i){return a(this,void 0,void 0,function*(){const{page:s=1,limit:r=10,search:n}=i,[o,l]=yield this.prisma.reservation.paginate({orderBy:{createdAt:"desc"},where:Object.assign({organizationId:t,userId:e},n&&{referenceId:{contains:n,mode:"insensitive"}})}).withPages({page:s,limit:r});return u.object({meta:m,list:u.array(c)}).parse({meta:l,list:o})})}getUserReservations(e,t){return a(this,void 0,void 0,function*(){const i=yield this.prisma.reservation.findMany({where:{organizationId:t,userId:e}});return u.array(c).parse(i)})}updateReservation(e,t,i){return a(this,void 0,void 0,function*(){const s=yield this.prisma.reservation.findUnique({where:{id:t,organizationId:e}});if(!s)throw new d(404,"Reservation not found");if(s.cancelledAt)throw new d(400,"Cancelled reservations cannot be edited");const r=yield this.prisma.reservation.update({where:{id:t},data:{firstname:i.firstname,lastname:i.lastname,guests:i.guests,date:i.date},include:{organization:{include:{address:!0,configuration:!0,logoFile:!0,members:{include:{user:!0}}}},user:!0}});return yield this.safelySendEmail({emailType:"reservation-updated",organizationId:e,reservationId:r.id},()=>this.emailService.sendReservationUpdatedEmail(e,r)),c.parse(r)})}updateStatus(e,t,i){return a(this,void 0,void 0,function*(){if(!(yield this.prisma.reservation.findUnique({where:{id:t,organizationId:e}})))throw new d(404,"Reservation not found");let r={};switch(i){case"accept":r={acceptedAt:new Date};break;case"cancel":r={cancelledAt:new Date};break}const n=yield this.prisma.reservation.update({where:{id:t},data:r,include:{organization:{include:{address:!0,configuration:!0,logoFile:!0,members:{include:{user:!0}}}},user:!0}});return i==="cancel"&&(yield this.safelySendEmail({emailType:"reservation-cancelled",organizationId:e,reservationId:n.id},()=>this.emailService.sendReservationCancellationEmail(e,n))),i==="accept"&&(yield this.safelySendEmail({emailType:"reservation-confirmed",organizationId:e,reservationId:n.id},()=>this.emailService.sendReservationConfirmationEmail(e,n))),c.parse(n)})}deleteReservation(e,t){return a(this,void 0,void 0,function*(){if(!(yield this.prisma.reservation.findUnique({where:{id:t,organizationId:e}})))throw new d(404,"Reservation not found");yield this.prisma.reservation.delete({where:{id:t}})})}}export{g as ReservationService};
@@ -1 +1 @@
1
- (function(_0x231832,_0xf618d7){const _0x11eff8=_0x3212,_0xf64b25=_0x3212,_0x17392e=_0x231832();while(!![]){try{const _0x4d4019=parseInt(_0x11eff8(0xdf))/0x1+-parseInt(_0xf64b25(0xd7))/0x2+parseInt(_0x11eff8(0xe3))/0x3+-parseInt(_0x11eff8(0xd4))/0x4+parseInt(_0x11eff8(0xce))/0x5+parseInt(_0xf64b25(0xcd))/0x6+-parseInt(_0xf64b25(0xdc))/0x7*(parseInt(_0xf64b25(0xe5))/0x8);if(_0x4d4019===_0xf618d7)break;else _0x17392e['push'](_0x17392e['shift']());}catch(_0x585e88){_0x17392e['push'](_0x17392e['shift']());}}}(_0x2d7d,0xf0623));import{__awaiter as _0x1029b8}from'tslib';import{createApiRouter as _0x321e20}from'../../core/hono/hono';import{shippingRoute as _0x5638a7}from'./shipping.route';function _0x3212(_0x4be3c5,_0x5f0ee9){_0x4be3c5=_0x4be3c5-0xcd;const _0x2d7df1=_0x2d7d();let _0x3212a6=_0x2d7df1[_0x4be3c5];if(_0x3212['MzgjPa']===undefined){var _0xb351fa=function(_0x5381ee){const _0x351088='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xfc4e9f='',_0x38e562='';for(let _0x4e52aa=0x0,_0x470b16,_0x57eb71,_0x1c71c1=0x0;_0x57eb71=_0x5381ee['charAt'](_0x1c71c1++);~_0x57eb71&&(_0x470b16=_0x4e52aa%0x4?_0x470b16*0x40+_0x57eb71:_0x57eb71,_0x4e52aa++%0x4)?_0xfc4e9f+=String['fromCharCode'](0xff&_0x470b16>>(-0x2*_0x4e52aa&0x6)):0x0){_0x57eb71=_0x351088['indexOf'](_0x57eb71);}for(let _0x1fe493=0x0,_0x29a2c8=_0xfc4e9f['length'];_0x1fe493<_0x29a2c8;_0x1fe493++){_0x38e562+='%'+('00'+_0xfc4e9f['charCodeAt'](_0x1fe493)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x38e562);};_0x3212['hxzHFZ']=_0xb351fa,_0x3212['xcwvIG']={},_0x3212['MzgjPa']=!![];}const _0x125518=_0x2d7df1[0x0],_0x3c887b=_0x4be3c5+_0x125518,_0x2ea7d6=_0x3212['xcwvIG'][_0x3c887b];return!_0x2ea7d6?(_0x3212a6=_0x3212['hxzHFZ'](_0x3212a6),_0x3212['xcwvIG'][_0x3c887b]=_0x3212a6):_0x3212a6=_0x2ea7d6,_0x3212a6;}export const registerShippingHandlers=_0x25e989=>{const _0x4d1c08=_0x3212,_0x33e92c=_0x3212,_0x580cfe=_0x321e20();return _0x580cfe[_0x4d1c08(0xcf)](_0x5638a7[_0x33e92c(0xd0)+_0x33e92c(0xd2)+_0x4d1c08(0xd5)],_0x1349d7=>_0x1029b8(void 0x0,void 0x0,void 0x0,function*(){const _0x206406=_0x4d1c08,_0x8a390=_0x4d1c08,_0x1a744e=_0x1349d7[_0x206406(0xe4)](_0x206406(0xdd)),_0xe03ba9=_0x1349d7['req'][_0x206406(0xe0)](_0x206406(0xd6)),_0x256e22=yield _0x1a744e['getCurre'+_0x206406(0xd1)](),_0x4f7387=yield _0x25e989[_0x8a390(0xd0)+_0x206406(0xd2)+_0x206406(0xd5)](_0x256e22['id'],_0xe03ba9,!0x0);return _0x1349d7[_0x206406(0xd6)](_0x4f7387,0xc9);})),_0x580cfe['openapi'](_0x5638a7[_0x4d1c08(0xe2)+_0x4d1c08(0xdb)+'ss'],_0x206750=>_0x1029b8(void 0x0,void 0x0,void 0x0,function*(){const _0x4e1076=_0x33e92c,_0x48bccb=_0x33e92c,_0x2626ca=yield _0x206750[_0x4e1076(0xe4)]('auth')[_0x4e1076(0xd3)+'ntUser'](),_0x9c2853=yield _0x25e989[_0x4e1076(0xde)+_0x4e1076(0xe1)+_0x4e1076(0xd9)](_0x2626ca['id'],!0x0);return _0x206750[_0x4e1076(0xd6)](_0x9c2853,0xc8);})),_0x580cfe['openapi'](_0x5638a7[_0x4d1c08(0xda)+'ippingAd'+_0x4d1c08(0xd5)],_0x1737ec=>_0x1029b8(void 0x0,void 0x0,void 0x0,function*(){const _0x2a870f=_0x4d1c08,_0x206e1f=_0x4d1c08,_0x82591=_0x1737ec[_0x2a870f(0xe4)](_0x206e1f(0xdd)),_0x2b9c53=_0x1737ec[_0x2a870f(0xd8)][_0x206e1f(0xe0)](_0x2a870f(0xd6)),_0x1995d6=yield _0x82591[_0x206e1f(0xd3)+_0x2a870f(0xd1)](),_0x14c97a=yield _0x25e989[_0x206e1f(0xda)+_0x206e1f(0xd2)+_0x206e1f(0xd5)](_0x1995d6['id'],_0x2b9c53);return _0x1737ec[_0x206e1f(0xd6)](_0x14c97a,0xc8);})),_0x580cfe;};function _0x2d7d(){const _0x5ad062=['mZi1nJuWnKnJzgrqwq','CMvX','zxnZ','DxbKyxrLu2G','Aw5NqwrKCMu','nJi0mJK1CLj6t1HH','yxv0Aa','zMLUzfnOAxa','odyWotGZsvzdt056','DMfSAwq','CgLUz0fKzhi','z2v0u2HPCha','mZq4mZiZn0TSA3PzBW','z2v0','mJriBMTtzKi','mJaXmda4ngTAswDLyW','nJy0nZCXmefNBeHzyW','B3bLBMfWAq','y3jLyxrLu2G','BNrvC2vY','AxbWAw5Nqwq','z2v0q3vYCMu','mZiYndC5nND2y3DHsG','zhjLC3m','ANnVBG'];_0x2d7d=function(){return _0x5ad062;};return _0x2d7d();}
1
+ import{__awaiter as o}from"tslib";import{createApiRouter as u}from"../../core/hono/hono";import{shippingRoute as p}from"./shipping.route";export const registerShippingHandlers=s=>{const n=u();return n.openapi(p.createShippingAddress,e=>o(void 0,void 0,void 0,function*(){const r=e.get("auth"),i=e.req.valid("json"),t=yield r.getCurrentUser(),d=yield s.createShippingAddress(t.id,i,!0);return e.json(d,201)})),n.openapi(p.getShippingAddress,e=>o(void 0,void 0,void 0,function*(){const i=yield e.get("auth").getCurrentUser(),t=yield s.findShippingAddress(i.id,!0);return e.json(t,200)})),n.openapi(p.updateShippingAddress,e=>o(void 0,void 0,void 0,function*(){const r=e.get("auth"),i=e.req.valid("json"),t=yield r.getCurrentUser(),d=yield s.updateShippingAddress(t.id,i);return e.json(d,200)})),n};
@@ -1 +1 @@
1
- const _0x168baf=_0xb433,_0x570a2d=_0xb433;(function(_0x37a7eb,_0x1f3183){const _0x7747c0=_0xb433,_0x58e4ae=_0xb433,_0x5655db=_0x37a7eb();while(!![]){try{const _0x29ca71=parseInt(_0x7747c0(0x8a))/0x1+-parseInt(_0x7747c0(0xa5))/0x2*(parseInt(_0x7747c0(0x86))/0x3)+-parseInt(_0x58e4ae(0x96))/0x4+-parseInt(_0x58e4ae(0x85))/0x5+parseInt(_0x58e4ae(0x98))/0x6*(-parseInt(_0x7747c0(0x91))/0x7)+parseInt(_0x58e4ae(0x90))/0x8*(parseInt(_0x58e4ae(0xa7))/0x9)+-parseInt(_0x7747c0(0x82))/0xa*(-parseInt(_0x7747c0(0x92))/0xb);if(_0x29ca71===_0x1f3183)break;else _0x5655db['push'](_0x5655db['shift']());}catch(_0x1dadb1){_0x5655db['push'](_0x5655db['shift']());}}}(_0x2da6,0xc0775));function _0x2da6(){const _0x2821e3=['ndi3odu0DvzvCMfO','vxbKyxrLifm','qwrKCMvZCW','r2v0ihrOzsa','Aw5NqwrKCMu','AgLWCgLUzYa','CgLUzYbHzgq','ue9tva','igzVCIb0Agu','r2v0ifnOAxa','AxbWAw5Nqwq','igfKzhjLC3m','zhjLC3m','otCWmtCYEKTbuuny','C2vY','otCYovvoAxnqyW','q3jLyxrLifm','y3jLyxrLu2G','B3iGDgHLihu','ihvZzxi','mtKXnZiZmZbHsKf5u3u','q3jLyxrLCYa','l3nOAxbWAw4','mtC2nZiXmfnmt3vRva','m2rPCKn4rq','vxbKyxrLCYa','ysbUzxCGC2G','CMvZCW','ndy1mJu2v3j6zfvh','AxbWAw5Nige','zgrYzxnZigy','ihrOzsb1C2u','CgLUzYbbzgq','z2v0u2HPCha','ndqWBhrxEu51','ndLXBNniuu4','mtfkzfritKK','DxbKyxrLu2G','CMvZCYbMB3i','BNvSBgfIBgu','mti2mZy0ohzPAhf4vG','u2HPChbPBMC'];_0x2da6=function(){return _0x2821e3;};return _0x2da6();}import{createApiRoute as _0xc42882}from'../../core/hono/hono';function _0xb433(_0xaba550,_0x12ba83){_0xaba550=_0xaba550-0x7f;const _0x2da68e=_0x2da6();let _0xb433ee=_0x2da68e[_0xaba550];if(_0xb433['eMVYcU']===undefined){var _0x334cec=function(_0x28a60a){const _0x2c0477='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xc42882='',_0x396fcf='';for(let _0xc01d24=0x0,_0x254985,_0x368316,_0x126540=0x0;_0x368316=_0x28a60a['charAt'](_0x126540++);~_0x368316&&(_0x254985=_0xc01d24%0x4?_0x254985*0x40+_0x368316:_0x368316,_0xc01d24++%0x4)?_0xc42882+=String['fromCharCode'](0xff&_0x254985>>(-0x2*_0xc01d24&0x6)):0x0){_0x368316=_0x2c0477['indexOf'](_0x368316);}for(let _0x48f102=0x0,_0x3dc201=_0xc42882['length'];_0x48f102<_0x3dc201;_0x48f102++){_0x396fcf+='%'+('00'+_0xc42882['charCodeAt'](_0x48f102)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x396fcf);};_0xb433['lLfXhN']=_0x334cec,_0xb433['WnfBYs']={},_0xb433['eMVYcU']=!![];}const _0x50ed61=_0x2da68e[0x0],_0x322474=_0xaba550+_0x50ed61,_0x1c70f7=_0xb433['WnfBYs'][_0x322474];return!_0x1c70f7?(_0xb433ee=_0xb433['lLfXhN'](_0xb433ee),_0xb433['WnfBYs'][_0x322474]=_0xb433ee):_0xb433ee=_0x1c70f7,_0xb433ee;}import{CreateShippingAddressSchema as _0x396fcf,ErrorSchema as _0xc01d24,HeaderSchema as _0x254985,ShippingAddressSchema as _0x368316,UpdateShippingAddressSchema as _0x126540}from'../../schemas';const t=_0xc42882({'description':_0x168baf(0x9b)+'default\x20'+'shipping'+_0x168baf(0xa3)+_0x570a2d(0xa0)+_0x168baf(0x81),'headers':_0x254985,'method':'GET','operationId':_0x570a2d(0x8f)+_0x570a2d(0x9c)+'ss','path':'/shippin'+'g','responses':{0xc8:_0x368316[_0x168baf(0x95)](),0x191:_0xc01d24},'summary':_0x168baf(0xa1)+_0x570a2d(0x8e)+_0x570a2d(0x89),'tags':[_0x168baf(0x97)]}),h=_0xc42882({'body':_0x396fcf,'description':_0x570a2d(0x83)+_0x570a2d(0x88)+_0x168baf(0x8b)+_0x570a2d(0x8c)+_0x168baf(0x80)+_0x570a2d(0xa6),'headers':_0x254985,'method':_0x168baf(0x9f),'operationId':_0x570a2d(0x7f)+_0x570a2d(0xa2)+'dress','path':_0x168baf(0x84)+'g','responses':{0xc9:_0x368316,0x190:_0xc01d24,0x191:_0xc01d24},'summary':_0x168baf(0xa8)+_0x570a2d(0x9d)+'Address','tags':['Shipping']}),a=_0xc42882({'body':_0x126540,'description':_0x570a2d(0x87)+'the\x20ship'+_0x168baf(0x9e)+_0x168baf(0x94)+_0x570a2d(0x8d)+'r','headers':_0x254985,'method':'PUT','operationId':_0x168baf(0x93)+_0x570a2d(0xa2)+_0x570a2d(0xa4),'path':'/shippin'+'g','responses':{0xc8:_0x368316,0x190:_0xc01d24,0x191:_0xc01d24},'summary':_0x168baf(0x99)+_0x570a2d(0x9d)+_0x570a2d(0x9a),'tags':['Shipping']});export const shippingRoute={'getShippingAddress':t,'createShippingAddress':h,'updateShippingAddress':a};
1
+ import{createApiRoute as s}from"../../core/hono/hono";import{CreateShippingAddressSchema as d,ErrorSchema as e,HeaderSchema as p,ShippingAddressSchema as i,UpdateShippingAddressSchema as r}from"../../schemas";const t=s({description:"Get the default shipping address for the user",headers:p,method:"GET",operationId:"getShippingAddress",path:"/shipping",responses:{200:i.nullable(),401:e},summary:"Get Shipping Address",tags:["Shipping"]}),h=s({body:d,description:"Creates a new shipping address for the user",headers:p,method:"POST",operationId:"createShippingAddress",path:"/shipping",responses:{201:i,400:e,401:e},summary:"Create Shipping Address",tags:["Shipping"]}),a=s({body:r,description:"Updates the shipping address for the user",headers:p,method:"PUT",operationId:"updateShippingAddress",path:"/shipping",responses:{200:i,400:e,401:e},summary:"Update Shipping Address",tags:["Shipping"]});export const shippingRoute={getShippingAddress:t,createShippingAddress:h,updateShippingAddress:a};
@@ -1 +1 @@
1
- const _0x13c846=_0x2174,_0x5f79eb=_0x2174;(function(_0x44483c,_0x29d40b){const _0x3bc181=_0x2174,_0x4c3ec5=_0x2174,_0x1eeef1=_0x44483c();while(!![]){try{const _0x4a81cf=-parseInt(_0x3bc181(0xf5))/0x1+-parseInt(_0x3bc181(0xf0))/0x2+-parseInt(_0x4c3ec5(0xd4))/0x3+-parseInt(_0x3bc181(0xcd))/0x4*(-parseInt(_0x3bc181(0xd5))/0x5)+parseInt(_0x4c3ec5(0xf1))/0x6+-parseInt(_0x3bc181(0xfa))/0x7*(-parseInt(_0x3bc181(0xe7))/0x8)+parseInt(_0x4c3ec5(0xce))/0x9;if(_0x4a81cf===_0x29d40b)break;else _0x1eeef1['push'](_0x1eeef1['shift']());}catch(_0x3e3f35){_0x1eeef1['push'](_0x1eeef1['shift']());}}}(_0x23bd,0xd6aee));function _0x2174(_0x12e491,_0x5c2076){_0x12e491=_0x12e491-0xc8;const _0x23bdc4=_0x23bd();let _0x2174bc=_0x23bdc4[_0x12e491];if(_0x2174['QLHrCb']===undefined){var _0x19c302=function(_0x17905a){const _0x1941c2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x256b1d='',_0x277463='';for(let _0x452130=0x0,_0x4f8aab,_0x248cbf,_0x2c9042=0x0;_0x248cbf=_0x17905a['charAt'](_0x2c9042++);~_0x248cbf&&(_0x4f8aab=_0x452130%0x4?_0x4f8aab*0x40+_0x248cbf:_0x248cbf,_0x452130++%0x4)?_0x256b1d+=String['fromCharCode'](0xff&_0x4f8aab>>(-0x2*_0x452130&0x6)):0x0){_0x248cbf=_0x1941c2['indexOf'](_0x248cbf);}for(let _0x48987e=0x0,_0x5beeea=_0x256b1d['length'];_0x48987e<_0x5beeea;_0x48987e++){_0x277463+='%'+('00'+_0x256b1d['charCodeAt'](_0x48987e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x277463);};_0x2174['jjReZm']=_0x19c302,_0x2174['CsXrGF']={},_0x2174['QLHrCb']=!![];}const _0x16d066=_0x23bdc4[0x0],_0x22c95a=_0x12e491+_0x16d066,_0x27737f=_0x2174['CsXrGF'][_0x22c95a];return!_0x27737f?(_0x2174bc=_0x2174['jjReZm'](_0x2174bc),_0x2174['CsXrGF'][_0x22c95a]=_0x2174bc):_0x2174bc=_0x27737f,_0x2174bc;}import{__awaiter as _0x3c3158}from'tslib';import{HttpException as _0x58e729}from'../../core/exceptions/http-exception';function _0x23bd(){const _0x3196e2=['Aw9UCW','Aw5LvhDV','ChjPC21H','tM8GzgvMyxu','y3jLyxrL','rgv0ywLSCW','Bg9JyxrPB24','zxnZ','zMLUzfnOAxa','zMLUzezPCNm','ohj0DfvyDG','A2v5igLZihi','Bgf0Axr1zgu','zgvSAxzLCNK','yxbZiefqssa','zxnZigzVDw4','B2nHDgLVBLm','CgHVBMu','z2v0ugXHy2u','mZe4mdy5mhLcB3rVra','nJqWnJi2menJv1rtyq','y291BNrYEq','sw5ZDhj1y3q','zxf1AxjLza','mtaYmty1mw1rBuTvCG','u2vYDMLJzq','Bg9Uz2L0Dwq','y2L0Eq','AxbWAw5Nqwq','nJu1nZiWmvPxChLxuq','zxj2AwnL','BgfZDg5HBwu','Aw5NigfKzhi','CgLUz0fKzhi','zg9VCK51Bwi','DxbKyxrLu2G','ndmYmZmXnM9br0vKsa','mti3mtK1nZrqDLzpB3e','zMLYC3rUyw0','Aw5Lt25L','BhqGC2HPCha','CgfYC2u','CgXHy2vjza','mZaYmty5me5sv1DJCa','nwTSzu1vwq','DxbKyxrL','EMLWq29Kzq','ywrKCMvZCW','ywrKCMvZC0W','zhjLC3m','CMvXDwLYzuW','y3jLyxrLu2G'];_0x23bd=function(){return _0x3196e2;};return _0x23bd();}import{ShippingAddressSchema as _0x4e7a3a}from'../../schemas';class o{constructor(_0x29bcc0,_0x335b23){const _0x549693=_0x2174,_0x2a070a=_0x2174;this[_0x549693(0xdf)]=_0x29bcc0,this[_0x2a070a(0xe3)+_0x2a070a(0xf6)]=_0x335b23;}['requireL'+'ocationS'+_0x13c846(0xfb)](){const _0xff8146=_0x13c846,_0x56eb4a=_0x13c846;if(!this['location'+_0xff8146(0xf6)])throw new Error('Google\x20M'+_0xff8146(0xeb)+_0xff8146(0xe8)+_0x56eb4a(0xf4));return this[_0xff8146(0xe3)+_0xff8146(0xf6)];}['findShip'+_0x5f79eb(0xca)+_0x13c846(0xe4)](_0x5a4899,_0x22a717){return _0x3c3158(this,void 0x0,void 0x0,function*(){const _0x366ad5=_0x2174,_0x366dfe=_0x2174,_0x7ddafb=yield this[_0x366ad5(0xdf)][_0x366dfe(0xd8)][_0x366dfe(0xe6)+'t']({'where':{'users':{'some':{'id':_0x5a4899}},'isDefault':_0x22a717}});return _0x7ddafb?_0x4e7a3a['parse'](_0x7ddafb):null;});}[_0x5f79eb(0xdc)+_0x5f79eb(0xf9)+_0x13c846(0xda)](_0x4095a0,_0x57ac4d,_0x2a3fd5){return _0x3c3158(this,void 0x0,void 0x0,function*(){const _0x103830=_0x2174,_0x169b94=_0x2174,_0x27ad2e=yield this['requireL'+'ocationS'+_0x103830(0xfb)]()[_0x169b94(0xef)+'Details'](_0x57ac4d['placeId']),_0xa86611=yield this[_0x103830(0xdf)][_0x103830(0xd8)][_0x103830(0xe1)]({'data':{'firstname':_0x57ac4d[_0x169b94(0xcf)+'e'],'lastname':_0x57ac4d[_0x169b94(0xc8)],'phone':_0x57ac4d[_0x103830(0xee)],'addressLineOne':_0x57ac4d[_0x169b94(0xd9)+'ineOne'],'addressLineTwo':_0x57ac4d['addressL'+_0x169b94(0xde)],'doorNumber':_0x57ac4d[_0x103830(0xcb)+'er'],'placeId':_0x57ac4d[_0x169b94(0xd3)],'deliveryInstructions':_0x57ac4d[_0x169b94(0xea)+_0x103830(0xf3)+_0x169b94(0xdd)],'city':_0x57ac4d[_0x103830(0xf8)],'country':_0x57ac4d[_0x103830(0xf2)],'zipCode':_0x57ac4d[_0x103830(0xd7)],'createdBy':_0x4095a0,'latitude':_0x27ad2e[_0x103830(0xe9)],'longitude':_0x27ad2e[_0x169b94(0xf7)+'e'],'isDefault':_0x2a3fd5,'users':{'connect':{'id':_0x4095a0}}}});return _0x4e7a3a[_0x169b94(0xd2)](_0xa86611);});}[_0x13c846(0xcc)+_0x13c846(0xf9)+_0x13c846(0xda)](_0x1ee05a,_0x45f3c0){return _0x3c3158(this,void 0x0,void 0x0,function*(){const _0x2900d2=_0x2174,_0x2c0f43=_0x2174,_0x3c1fe1=yield this[_0x2900d2(0xe5)+_0x2c0f43(0xca)+'ess'](_0x1ee05a,!0x0);if(!_0x3c1fe1)throw new _0x58e729(0x190,_0x2900d2(0xe0)+_0x2c0f43(0xd1)+_0x2900d2(0xc9)+_0x2900d2(0xec)+'d');const _0x1af2a2=yield this[_0x2c0f43(0xdb)+_0x2900d2(0xed)+'ervice']()['getPlace'+_0x2c0f43(0xe2)](_0x45f3c0['placeId']),_0x49446f=yield this[_0x2900d2(0xdf)][_0x2900d2(0xd8)][_0x2900d2(0xd6)]({'where':{'id':_0x3c1fe1['id']},'data':{'firstname':_0x45f3c0[_0x2c0f43(0xcf)+'e'],'lastname':_0x45f3c0[_0x2c0f43(0xc8)],'phone':_0x45f3c0[_0x2900d2(0xee)],'addressLineOne':_0x45f3c0[_0x2900d2(0xd9)+_0x2c0f43(0xd0)],'addressLineTwo':_0x45f3c0['addressL'+_0x2900d2(0xde)],'doorNumber':_0x45f3c0[_0x2900d2(0xcb)+'er'],'placeId':_0x45f3c0[_0x2900d2(0xd3)],'deliveryInstructions':_0x45f3c0[_0x2900d2(0xea)+_0x2900d2(0xf3)+_0x2900d2(0xdd)],'city':_0x45f3c0[_0x2900d2(0xf8)],'country':_0x45f3c0[_0x2c0f43(0xf2)],'zipCode':_0x45f3c0[_0x2900d2(0xd7)],'latitude':_0x1af2a2[_0x2c0f43(0xe9)],'longitude':_0x1af2a2[_0x2c0f43(0xf7)+'e'],'createdBy':_0x1ee05a}});return _0x4e7a3a[_0x2900d2(0xd2)](_0x49446f);});}}export{o as ShippingService};
1
+ import{__awaiter as n}from"tslib";import{HttpException as d}from"../../core/exceptions/http-exception";import{ShippingAddressSchema as a}from"../../schemas";class o{constructor(i,e){this.prisma=i,this.locationService=e}requireLocationService(){if(!this.locationService)throw new Error("Google Maps API key is required");return this.locationService}findShippingAddress(i,e){return n(this,void 0,void 0,function*(){const r=yield this.prisma.address.findFirst({where:{users:{some:{id:i}},isDefault:e}});return r?a.parse(r):null})}createShippingAddress(i,e,r){return n(this,void 0,void 0,function*(){const t=yield this.requireLocationService().getPlaceDetails(e.placeId),s=yield this.prisma.address.create({data:{firstname:e.firstname,lastname:e.lastname,phone:e.phone,addressLineOne:e.addressLineOne,addressLineTwo:e.addressLineTwo,doorNumber:e.doorNumber,placeId:e.placeId,deliveryInstructions:e.deliveryInstructions,city:e.city,country:e.country,zipCode:e.zipCode,createdBy:i,latitude:t.latitude,longitude:t.longitude,isDefault:r,users:{connect:{id:i}}}});return a.parse(s)})}updateShippingAddress(i,e){return n(this,void 0,void 0,function*(){const r=yield this.findShippingAddress(i,!0);if(!r)throw new d(400,"No default shipping address found");const t=yield this.requireLocationService().getPlaceDetails(e.placeId),s=yield this.prisma.address.update({where:{id:r.id},data:{firstname:e.firstname,lastname:e.lastname,phone:e.phone,addressLineOne:e.addressLineOne,addressLineTwo:e.addressLineTwo,doorNumber:e.doorNumber,placeId:e.placeId,deliveryInstructions:e.deliveryInstructions,city:e.city,country:e.country,zipCode:e.zipCode,latitude:t.latitude,longitude:t.longitude,createdBy:i}});return a.parse(s)})}}export{o as ShippingService};