bitsnap-react 1.0.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/checkout/ApplePay.tsx","../src/public.api.client.ts","../src/gen/proto/public/v1/public_api_pb.ts","../src/gen/proto/common/v1/gateway_pb.ts","../src/gen/proto/common/v1/address_pb.ts","../src/gen/proto/common/v1/push_notifications_pb.ts","../src/gen/proto/dashboard/v1/audiobooks_pb.ts","../src/components/checkout/CartProvider.tsx","../src/components/checkout/constants.ts","../src/components/checkout/helper.methods.ts","../src/components/checkout/lib/err.ts","../src/components/checkout/lib/round.number.ts","../src/components/checkout/state.ts","../src/components/checkout/methods.ts","../src/components/checkout/google.pay.mapper.ts","../src/components/checkout/GooglePay.tsx","../src/components/checkout/BitsnapCart.tsx","../src/components/checkout/CartComponent.tsx","../src/components/checkout/CartComponentContent.tsx","../src/components/checkout/CountrySelector.tsx","../src/components/checkout/SingleProduct.tsx","../src/components/checkout/Skeleton.tsx"],"sourcesContent":["import ApplePayButton from \"apple-pay-button\";\nimport { PublicApiClient } from \"src/public.api.client\";\nimport CartProvider, { getProjectID, useCartProvider } from \"./CartProvider\";\nimport { HOST } from \"./constants\";\nimport { isErr } from \"./lib/err\";\nimport { round } from \"./lib/round.number\";\nimport { useQuery } from \"react-query\";\n\ntype AppleButtonType = 'plain' | 'add-money' | 'book' | 'buy' | 'check-out' | 'continue' | 'contribute' | 'donate' | 'order' | 'pay' | 'reload' | 'rent' | 'set-up' | 'subscribe' | 'support' | 'tip' | 'top-up';\ntype ColorType = 'black' | 'white' | 'white-outline';\n\ntype Props = {\n style?: {\n width?: string;\n height?: string;\n borderRadius?: string;\n padding?: string;\n boxSizing?: string;\n };\n buttonType?: AppleButtonType;\n colorType?: ColorType;\n items: { name: string; id: string; price: number; quantity: number; isDeliverable?: boolean; metadata?: { [key: string]: string | undefined } }[];\n onClick?: () => Promise<void>;\n};\n\nfunction ApplePayButtonComponent({ style, buttonType, colorType, items, onClick }: Props) {\n const {\n checkIfApplePayIsAvailable,\n getApplePayPaymentRequest,\n completeApplePayPayment,\n setCountry,\n setCouponCodeIfPossible,\n setDeliveryMethod,\n setEmail,\n setPostalCode,\n clearCart,\n } = useCartProvider();\n const { data: isApplePayAvailable } = useQuery(\"is-apple-pay-available\", checkIfApplePayIsAvailable);\n if (isApplePayAvailable != true) {\n return null;\n }\n\n const expectedItems = items.map(el => ({\n productID: el.id,\n quantity: el.quantity,\n metadata: el.metadata,\n }));\n\n async function beginSession() {\n const requiresShipping = items.find(el => el.isDeliverable === true) != null;\n const session = new ApplePaySession(14, {\n countryCode: \"PL\",\n merchantCapabilities: [\"supports3DS\"],\n supportedNetworks: [\"visa\", \"masterCard\"],\n currencyCode: \"PLN\",\n total: {\n amount: `${round(items.reduce((acc, item) => acc + item.price * item.quantity, 0) / 100, 2)}`,\n label: \"Płatność za koszyk\",\n type: \"pending\",\n },\n lineItems: [\n ...items.map((item) => ({\n amount: `${round((item.price * item.quantity) / 100, 2)}`,\n label: item.name,\n type: \"final\",\n } as ApplePayJS.ApplePayLineItem)),\n requiresShipping ? {\n amount: `16.99`,\n type: \"pending\",\n label: \"Dostawa\",\n } as ApplePayJS.ApplePayLineItem : undefined\n ].filter(el => el != null),\n ...(\n requiresShipping ? {\n shippingMethods: [],\n supportsCouponCode: true,\n requiredBillingContactFields: [\"name\", \"email\", \"postalAddress\", \"phone\"],\n requiredShippingContactFields: [\"name\", \"email\", \"postalAddress\", \"phone\"],\n } : {}\n ),\n });\n await onClick?.();\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n console.error(\"Error creating ApplePaySession:\", apRequest.error);\n return;\n }\n\n session.oncancel = (event) => {\n console.log(\"ApplePaySession cancelled\", event);\n };\n\n session.onvalidatemerchant = async (event) => {\n try {\n const result = await PublicApiClient.get(HOST).applePayValidateMerchant(\n {\n validationUrl: event.validationURL,\n projectId: getProjectID(),\n },\n );\n console.log(\"merchantSession\", result.merchantSession);\n if (result.merchantSession.length > 0) {\n console.log('completing merchant session');\n session.completeMerchantValidation(\n JSON.parse(result.merchantSession),\n );\n } else {\n session.abort();\n }\n } catch (error) {\n session.abort;\n }\n };\n\n session.onshippingmethodselected = async (event) => {\n console.log(\"shipping method selected\", event);\n await setDeliveryMethod(event.shippingMethod.identifier);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeShippingMethodSelection({\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n };\n session.onshippingcontactselected = async (event) => {\n try {\n if (event.shippingContact.countryCode != null) {\n await setCountry(event.shippingContact.countryCode);\n }\n if (event.shippingContact.postalCode != null) {\n await setPostalCode(event.shippingContact.postalCode);\n }\n if (event.shippingContact.phoneNumber != null) {\n await setEmail(event.shippingContact.emailAddress);\n }\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n console.log('apRequest', apRequest);\n session.completeShippingContactSelection({\n newLineItems: apRequest.lineItems,\n newTotal: apRequest.total,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"shipping contact selected error\", error);\n session.abort();\n }\n };\n\n session.oncouponcodechanged = async (event) => {\n try {\n console.log(\"coupon code changed\", event);\n const result = await setCouponCodeIfPossible(event.couponCode);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeCouponCodeChange({\n errors: isErr(result)\n ? [new ApplePayError(\"couponCodeInvalid\")]\n : undefined,\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"coupon code changed error\", error);\n session.abort();\n }\n };\n\n session.onpaymentauthorized = async (event) => {\n try {\n const result = await completeApplePayPayment({\n token: event.payment.token,\n billingContact: event.payment.billingContact,\n shippingContact: event.payment.shippingContact,\n });\n if (isErr(result)) {\n console.log(\"apple pay error\", result);\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n return;\n }\n\n if (result.redirectURL) {\n setTimeout(() => {\n open(result.redirectURL, \"_self\");\n }, 2000);\n }\n session.completePayment({\n status: result.isSuccess ? ApplePaySession.STATUS_SUCCESS : ApplePaySession.STATUS_FAILURE,\n });\n\n result.isSuccess && clearCart();\n } catch (e) {\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n }\n // event.complete(ApplePaySession.STATUS_SUCCESS);\n };\n\n session.begin();\n }\n\n return <ApplePayButton style={style} buttonStyle={colorType} type={buttonType} onClick={beginSession} />;\n}\n\nfunction Wrapper(props: Props) {\n return (\n <>\n <CartProvider>\n <ApplePayButtonComponent {...props} />\n </CartProvider>\n </>\n );\n}\nexport default Wrapper;\n","import type { Transport } from \"@connectrpc/connect\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport { createConnectTransport } from \"@connectrpc/connect-web\";\nimport { PublicApiService } from \"./gen/proto/public/v1/public_api_pb\";\n\nexport namespace PublicApiClient {\n export function get(host: string): Client<typeof PublicApiService> {\n return createClient(PublicApiService, getTransport(host));\n }\n\n let transport: Transport | undefined;\n function getTransport(host: string): Transport {\n if (transport == null) {\n transport = createConnectTransport({\n useBinaryFormat: true,\n baseUrl: host + \"/api/rpc\",\n });\n }\n return transport;\n }\n}\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file public/v1/public_api.proto (package public_api.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Empty, EmptySchema, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Gateway } from \"../../common/v1/gateway_pb\";\nimport { file_common_v1_gateway } from \"../../common/v1/gateway_pb\";\nimport type { Address, BillingAddress } from \"../../common/v1/address_pb\";\nimport { file_common_v1_address } from \"../../common/v1/address_pb\";\nimport type { NotificationEvent, NotificationGroupHowOften, PushNotificationDeviceToken } from \"../../common/v1/push_notifications_pb\";\nimport { file_common_v1_push_notifications } from \"../../common/v1/push_notifications_pb\";\nimport type { Audiobook as Audiobook$1 } from \"../../dashboard/v1/audiobooks_pb\";\nimport { file_dashboard_v1_audiobooks } from \"../../dashboard/v1/audiobooks_pb\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file public/v1/public_api.proto.\n */\nexport const file_public_v1_public_api: GenFile = /*@__PURE__*/\n fileDesc(\"ChpwdWJsaWMvdjEvcHVibGljX2FwaS5wcm90bxINcHVibGljX2FwaS52MSI3CiFJc09uZUNsaWNrUGF5bWVudEF2YWlsYWJsZVJlcXVlc3QSEgoKcHJvamVjdF9pZBgBIAEoCSLFAgoiSXNPbmVDbGlja1BheW1lbnRBdmFpbGFibGVSZXNwb25zZRISCgppbnBvc3RfcGF5GAEgASgIEhEKCWFwcGxlX3BheRgCIAEoCBISCgpnb29nbGVfcGF5GAMgASgIEmEKEWdvb2dsZV9wYXlfY29uZmlnGAQgASgLMkEucHVibGljX2FwaS52MS5Jc09uZUNsaWNrUGF5bWVudEF2YWlsYWJsZVJlc3BvbnNlLkdvb2dsZVBheUNvbmZpZ0gAiAEBGmsKD0dvb2dsZVBheUNvbmZpZxITCgttZXJjaGFudF9pZBgBIAEoCRIVCg1tZXJjaGFudF9uYW1lGAIgASgJEg8KB2dhdGV3YXkYAyABKAkSGwoTZ2F0ZXdheV9tZXJjaGFudF9p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9yUHJvZHVjdBIxLnB1YmxpY19hcGkudjEuR2V0QXZhaWxhYmxlQ291bnRGb3JQcm9kdWN0UmVxdWVzdBoyLnB1YmxpY19hcGkudjEuR2V0QXZhaWxhYmxlQ291bnRGb3JQcm9kdWN0UmVzcG9uc2USgQEKGklzT25lQ2xpY2tQYXltZW50QXZhaWxhYmxlEjAucHVibGljX2FwaS52MS5Jc09uZUNsaWNrUGF5bWVudEF2YWlsYWJsZVJlcXVlc3QaMS5wdWJsaWNfYXBpLnYxLklzT25lQ2xpY2tQYXltZW50QXZhaWxhYmxlUmVzcG9uc2USaQoSR2V0UHJlT3JkZXJEZXRhaWxzEigucHVibGljX2FwaS52MS5HZXRQcmVPcmRlckRldGFpbHNSZXF1ZXN0GikucHVibGljX2FwaS52MS5HZXRQcmVPcmRlckRldGFpbHNSZXNwb25zZRJ7ChhBcHBsZVBheVZhbGlkYXRlTWVyY2hhbnQSLi5wdWJsaWNfYXBpLnYxLkFwcGxlUGF5VmFsaWRhdGVNZXJjaGFudFJlcXVlc3QaLy5wdWJsaWNfYXBpLnYxLkFwcGxlUGF5VmFsaWRhdGVNZXJjaGFudFJlc3BvbnNlEnsKGEF1dGhvcml6ZU9uZUNsaWNrUGF5bWVudBIuLnB1YmxpY19hcGkudjEuT25lQ2xpY2tBdXRob3JpemVQYXltZW50UmVxdWVzdBovLnB1YmxpY19hcGkudjEuT25lQ2xpY2tBdXRob3JpemVQYXltZW50UmVzcG9uc2USdgoiTm90aWZ5VXNlckFib3V0UHJvZHVjdEF2YWlsYWJpbGl0eRI4LnB1YmxpY19hcGkudjEuTm90aWZ5VXNlckFib3V0UHJvZHVjdEF2YWlsYWJpbGl0eVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHliBnByb3RvMw\", [file_google_protobuf_timestamp, file_common_v1_gateway, file_common_v1_address, file_common_v1_push_notifications, file_google_protobuf_empty, file_dashboard_v1_audiobooks]);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableRequest\n */\nexport type IsOneClickPaymentAvailableRequest = Message<\"public_api.v1.IsOneClickPaymentAvailableRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableRequest.\n * Use `create(IsOneClickPaymentAvailableRequestSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableRequestSchema: GenMessage<IsOneClickPaymentAvailableRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 0);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableResponse\n */\nexport type IsOneClickPaymentAvailableResponse = Message<\"public_api.v1.IsOneClickPaymentAvailableResponse\"> & {\n /**\n * @generated from field: bool inpost_pay = 1;\n */\n inpostPay: boolean;\n\n /**\n * @generated from field: bool apple_pay = 2;\n */\n applePay: boolean;\n\n /**\n * @generated from field: bool google_pay = 3;\n */\n googlePay: boolean;\n\n /**\n * @generated from field: optional public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig google_pay_config = 4;\n */\n googlePayConfig?: IsOneClickPaymentAvailableResponse_GooglePayConfig;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableResponse.\n * Use `create(IsOneClickPaymentAvailableResponseSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableResponseSchema: GenMessage<IsOneClickPaymentAvailableResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 1);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig\n */\nexport type IsOneClickPaymentAvailableResponse_GooglePayConfig = Message<\"public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig\"> & {\n /**\n * @generated from field: string merchant_id = 1;\n */\n merchantId: string;\n\n /**\n * @generated from field: string merchant_name = 2;\n */\n merchantName: string;\n\n /**\n * @generated from field: string gateway = 3;\n */\n gateway: string;\n\n /**\n * @generated from field: string gateway_merchant_id = 4;\n */\n gatewayMerchantId: string;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig.\n * Use `create(IsOneClickPaymentAvailableResponse_GooglePayConfigSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableResponse_GooglePayConfigSchema: GenMessage<IsOneClickPaymentAvailableResponse_GooglePayConfig> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 1, 0);\n\n/**\n * @generated from message public_api.v1.OneClickAuthorizePaymentRequest\n */\nexport type OneClickAuthorizePaymentRequest = Message<\"public_api.v1.OneClickAuthorizePaymentRequest\"> & {\n /**\n * @generated from field: public_api.v1.OneClickAuthorizePaymentRequest.Gateway gateway = 1;\n */\n gateway: OneClickAuthorizePaymentRequest_Gateway;\n\n /**\n * @generated from field: string paymentData = 2;\n */\n paymentData: string;\n\n /**\n * @generated from field: string paymentMethod = 3;\n */\n paymentMethod: string;\n\n /**\n * @generated from field: string transactionIdentifier = 4;\n */\n transactionIdentifier: string;\n\n /**\n * @generated from field: public_api.v1.GetPreOrderDetailsRequest order = 5;\n */\n order?: GetPreOrderDetailsRequest;\n\n /**\n * @generated from field: optional common.v1.Address shipping_address = 6;\n */\n shippingAddress?: Address;\n\n /**\n * @generated from field: optional common.v1.BillingAddress billing_address = 7;\n */\n billingAddress?: BillingAddress;\n\n /**\n * @generated from field: optional string metadata = 8;\n */\n metadata?: string;\n};\n\n/**\n * Describes the message public_api.v1.OneClickAuthorizePaymentRequest.\n * Use `create(OneClickAuthorizePaymentRequestSchema)` to create a new message.\n */\nexport const OneClickAuthorizePaymentRequestSchema: GenMessage<OneClickAuthorizePaymentRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 2);\n\n/**\n * @generated from enum public_api.v1.OneClickAuthorizePaymentRequest.Gateway\n */\nexport enum OneClickAuthorizePaymentRequest_Gateway {\n /**\n * @generated from enum value: APPLE_PAY = 0;\n */\n APPLE_PAY = 0,\n\n /**\n * @generated from enum value: GOOGLE_PAY = 1;\n */\n GOOGLE_PAY = 1,\n}\n\n/**\n * Describes the enum public_api.v1.OneClickAuthorizePaymentRequest.Gateway.\n */\nexport const OneClickAuthorizePaymentRequest_GatewaySchema: GenEnum<OneClickAuthorizePaymentRequest_Gateway> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 2, 0);\n\n/**\n * @generated from message public_api.v1.OneClickAuthorizePaymentResponse\n */\nexport type OneClickAuthorizePaymentResponse = Message<\"public_api.v1.OneClickAuthorizePaymentResponse\"> & {\n /**\n * @generated from field: bool is_success = 1;\n */\n isSuccess: boolean;\n\n /**\n * @generated from field: string redirect_url = 2;\n */\n redirectUrl: string;\n\n /**\n * @generated from field: string transaction_id = 3;\n */\n transactionId: string;\n\n /**\n * @generated from field: optional string apple_pay_tracking_url = 4;\n */\n applePayTrackingUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.OneClickAuthorizePaymentResponse.\n * Use `create(OneClickAuthorizePaymentResponseSchema)` to create a new message.\n */\nexport const OneClickAuthorizePaymentResponseSchema: GenMessage<OneClickAuthorizePaymentResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 3);\n\n/**\n * @generated from message public_api.v1.PreOrderItem\n */\nexport type PreOrderItem = Message<\"public_api.v1.PreOrderItem\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: int32 quantity = 2;\n */\n quantity: number;\n};\n\n/**\n * Describes the message public_api.v1.PreOrderItem.\n * Use `create(PreOrderItemSchema)` to create a new message.\n */\nexport const PreOrderItemSchema: GenMessage<PreOrderItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 4);\n\n/**\n * @generated from message public_api.v1.GetPreOrderDetailsRequest\n */\nexport type GetPreOrderDetailsRequest = Message<\"public_api.v1.GetPreOrderDetailsRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated public_api.v1.PreOrderItem items = 2;\n */\n items: PreOrderItem[];\n\n /**\n * @generated from field: optional string country_code = 3;\n */\n countryCode?: string;\n\n /**\n * @generated from field: optional string post_code = 4;\n */\n postCode?: string;\n\n /**\n * We can check if coupon code is available.\n *\n * @generated from field: optional string couponCode = 5;\n */\n couponCode?: string;\n\n /**\n * @generated from field: optional string email = 6;\n */\n email?: string;\n\n /**\n * @generated from field: optional string selected_delivery_method = 7;\n */\n selectedDeliveryMethod?: string;\n\n /**\n * @generated from field: optional string phone = 8;\n */\n phone?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetPreOrderDetailsRequest.\n * Use `create(GetPreOrderDetailsRequestSchema)` to create a new message.\n */\nexport const GetPreOrderDetailsRequestSchema: GenMessage<GetPreOrderDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 5);\n\n/**\n * @generated from message public_api.v1.DeliveryMethod\n */\nexport type DeliveryMethod = Message<\"public_api.v1.DeliveryMethod\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: int32 amount = 2;\n */\n amount: number;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 4;\n */\n description?: string;\n\n /**\n * @generated from field: optional int32 min_days = 5;\n */\n minDays?: number;\n\n /**\n * @generated from field: optional int32 max_days = 6;\n */\n maxDays?: number;\n};\n\n/**\n * Describes the message public_api.v1.DeliveryMethod.\n * Use `create(DeliveryMethodSchema)` to create a new message.\n */\nexport const DeliveryMethodSchema: GenMessage<DeliveryMethod> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 6);\n\n/**\n * @generated from message public_api.v1.GetPreOrderDetailsResponse\n */\nexport type GetPreOrderDetailsResponse = Message<\"public_api.v1.GetPreOrderDetailsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.DeliveryMethod methods = 1;\n */\n methods: DeliveryMethod[];\n\n /**\n * @generated from field: optional string couponCode = 2;\n */\n couponCode?: string;\n\n /**\n * @generated from field: optional string selected_delivery_method = 3;\n */\n selectedDeliveryMethod?: string;\n\n /**\n * @generated from field: optional int32 total_amount = 4;\n */\n totalAmount?: number;\n\n /**\n * @generated from field: optional int32 coupon_value = 5;\n */\n couponValue?: number;\n\n /**\n * Mainly use for Google Pay\n *\n * @generated from field: string currency = 6;\n */\n currency: string;\n\n /**\n * @generated from field: string country = 7;\n */\n country: string;\n};\n\n/**\n * Describes the message public_api.v1.GetPreOrderDetailsResponse.\n * Use `create(GetPreOrderDetailsResponseSchema)` to create a new message.\n */\nexport const GetPreOrderDetailsResponseSchema: GenMessage<GetPreOrderDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 7);\n\n/**\n * @generated from message public_api.v1.NotifyUserAboutProductAvailabilityRequest\n */\nexport type NotifyUserAboutProductAvailabilityRequest = Message<\"public_api.v1.NotifyUserAboutProductAvailabilityRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n\n /**\n * @generated from field: string email = 3;\n */\n email: string;\n};\n\n/**\n * Describes the message public_api.v1.NotifyUserAboutProductAvailabilityRequest.\n * Use `create(NotifyUserAboutProductAvailabilityRequestSchema)` to create a new message.\n */\nexport const NotifyUserAboutProductAvailabilityRequestSchema: GenMessage<NotifyUserAboutProductAvailabilityRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 8);\n\n/**\n * @generated from message public_api.v1.ApplePayValidateMerchantRequest\n */\nexport type ApplePayValidateMerchantRequest = Message<\"public_api.v1.ApplePayValidateMerchantRequest\"> & {\n /**\n * @generated from field: string validation_url = 1;\n */\n validationUrl: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.ApplePayValidateMerchantRequest.\n * Use `create(ApplePayValidateMerchantRequestSchema)` to create a new message.\n */\nexport const ApplePayValidateMerchantRequestSchema: GenMessage<ApplePayValidateMerchantRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 9);\n\n/**\n * @generated from message public_api.v1.ApplePayValidateMerchantResponse\n */\nexport type ApplePayValidateMerchantResponse = Message<\"public_api.v1.ApplePayValidateMerchantResponse\"> & {\n /**\n * @generated from field: string merchant_session = 1;\n */\n merchantSession: string;\n};\n\n/**\n * Describes the message public_api.v1.ApplePayValidateMerchantResponse.\n * Use `create(ApplePayValidateMerchantResponseSchema)` to create a new message.\n */\nexport const ApplePayValidateMerchantResponseSchema: GenMessage<ApplePayValidateMerchantResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 10);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductRequest\n */\nexport type GetAvailableCountForProductRequest = Message<\"public_api.v1.GetAvailableCountForProductRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated string all_variants = 2;\n */\n allVariants: string[];\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductRequest.\n * Use `create(GetAvailableCountForProductRequestSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductRequestSchema: GenMessage<GetAvailableCountForProductRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 11);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductResponse\n */\nexport type GetAvailableCountForProductResponse = Message<\"public_api.v1.GetAvailableCountForProductResponse\"> & {\n /**\n * @generated from field: map<string, public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct> available_counts = 1;\n */\n availableCounts: { [key: string]: GetAvailableCountForProductResponse_AvailableCountForProduct };\n\n /**\n * @generated from field: optional public_api.v1.GetAvailableCountForProductResponse.Error error = 2;\n */\n error?: GetAvailableCountForProductResponse_Error;\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductResponse.\n * Use `create(GetAvailableCountForProductResponseSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductResponseSchema: GenMessage<GetAvailableCountForProductResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 12);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct\n */\nexport type GetAvailableCountForProductResponse_AvailableCountForProduct = Message<\"public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct\"> & {\n /**\n * @generated from field: int32 available_quantity_to_order = 1;\n */\n availableQuantityToOrder: number;\n\n /**\n * @generated from field: bool can_back = 2;\n */\n canBack: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct.\n * Use `create(GetAvailableCountForProductResponse_AvailableCountForProductSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductResponse_AvailableCountForProductSchema: GenMessage<GetAvailableCountForProductResponse_AvailableCountForProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 12, 0);\n\n/**\n * @generated from enum public_api.v1.GetAvailableCountForProductResponse.Error\n */\nexport enum GetAvailableCountForProductResponse_Error {\n /**\n * @generated from enum value: ERROR_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: ERROR_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: ERROR_PRODUCT_NOT_AVAILABLE = 2;\n */\n PRODUCT_NOT_AVAILABLE = 2,\n\n /**\n * @generated from enum value: ERROR_PRODUCT_NOT_AVAILABLE_BUT_CAN_BACK = 3;\n */\n PRODUCT_NOT_AVAILABLE_BUT_CAN_BACK = 3,\n}\n\n/**\n * Describes the enum public_api.v1.GetAvailableCountForProductResponse.Error.\n */\nexport const GetAvailableCountForProductResponse_ErrorSchema: GenEnum<GetAvailableCountForProductResponse_Error> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 12, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelDeleteAccountRequest\n */\nexport type UserPanelDeleteAccountRequest = Message<\"public_api.v1.UserPanelDeleteAccountRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelDeleteAccountRequest.\n * Use `create(UserPanelDeleteAccountRequestSchema)` to create a new message.\n */\nexport const UserPanelDeleteAccountRequestSchema: GenMessage<UserPanelDeleteAccountRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 13);\n\n/**\n * @generated from message public_api.v1.DidBuyProductRequest\n */\nexport type DidBuyProductRequest = Message<\"public_api.v1.DidBuyProductRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n};\n\n/**\n * Describes the message public_api.v1.DidBuyProductRequest.\n * Use `create(DidBuyProductRequestSchema)` to create a new message.\n */\nexport const DidBuyProductRequestSchema: GenMessage<DidBuyProductRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 14);\n\n/**\n * @generated from message public_api.v1.UpdateNotificationSettingsRequest\n */\nexport type UpdateNotificationSettingsRequest = Message<\"public_api.v1.UpdateNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated public_api.v1.UpdateNotificationSettingsRequest.Group modifications = 3;\n */\n modifications: UpdateNotificationSettingsRequest_Group[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod enabled_methods = 4;\n */\n enabledMethods: NotificationMethod[];\n};\n\n/**\n * Describes the message public_api.v1.UpdateNotificationSettingsRequest.\n * Use `create(UpdateNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationSettingsRequestSchema: GenMessage<UpdateNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 15);\n\n/**\n * @generated from message public_api.v1.UpdateNotificationSettingsRequest.Group\n */\nexport type UpdateNotificationSettingsRequest_Group = Message<\"public_api.v1.UpdateNotificationSettingsRequest.Group\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: bool enabled = 2;\n */\n enabled: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UpdateNotificationSettingsRequest.Group.\n * Use `create(UpdateNotificationSettingsRequest_GroupSchema)` to create a new message.\n */\nexport const UpdateNotificationSettingsRequest_GroupSchema: GenMessage<UpdateNotificationSettingsRequest_Group> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 15, 0);\n\n/**\n * @generated from message public_api.v1.UpdateGlobalNotificationSettingsRequest\n */\nexport type UpdateGlobalNotificationSettingsRequest = Message<\"public_api.v1.UpdateGlobalNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: bool is_muted = 2;\n */\n isMuted: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UpdateGlobalNotificationSettingsRequest.\n * Use `create(UpdateGlobalNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const UpdateGlobalNotificationSettingsRequestSchema: GenMessage<UpdateGlobalNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 16);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsDetailsRequest\n */\nexport type GetNotificationSettingsDetailsRequest = Message<\"public_api.v1.GetNotificationSettingsDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsDetailsRequest.\n * Use `create(GetNotificationSettingsDetailsRequestSchema)` to create a new message.\n */\nexport const GetNotificationSettingsDetailsRequestSchema: GenMessage<GetNotificationSettingsDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 17);\n\n/**\n * @generated from message public_api.v1.NotificationGroup\n */\nexport type NotificationGroup = Message<\"public_api.v1.NotificationGroup\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: bool enabled = 4;\n */\n enabled: boolean;\n\n /**\n * @generated from field: common.v1.NotificationGroupHowOften how_often = 5;\n */\n howOften: NotificationGroupHowOften;\n};\n\n/**\n * Describes the message public_api.v1.NotificationGroup.\n * Use `create(NotificationGroupSchema)` to create a new message.\n */\nexport const NotificationGroupSchema: GenMessage<NotificationGroup> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 18);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsDetailsResponse\n */\nexport type GetNotificationSettingsDetailsResponse = Message<\"public_api.v1.GetNotificationSettingsDetailsResponse\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme theme = 3;\n */\n theme?: ProjectTheme;\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod available_methods = 4;\n */\n availableMethods: NotificationMethod[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod enabled_methods = 5;\n */\n enabledMethods: NotificationMethod[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationGroup groups = 6;\n */\n groups: NotificationGroup[];\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsDetailsResponse.\n * Use `create(GetNotificationSettingsDetailsResponseSchema)` to create a new message.\n */\nexport const GetNotificationSettingsDetailsResponseSchema: GenMessage<GetNotificationSettingsDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 19);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsRequest\n */\nexport type GetNotificationSettingsRequest = Message<\"public_api.v1.GetNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: bool all = 2;\n */\n all: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsRequest.\n * Use `create(GetNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const GetNotificationSettingsRequestSchema: GenMessage<GetNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 20);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsResponse\n */\nexport type GetNotificationSettingsResponse = Message<\"public_api.v1.GetNotificationSettingsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetNotificationSettingsResponse.Project projects = 1;\n */\n projects: GetNotificationSettingsResponse_Project[];\n\n /**\n * @generated from field: bool is_muted = 2;\n */\n isMuted: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsResponse.\n * Use `create(GetNotificationSettingsResponseSchema)` to create a new message.\n */\nexport const GetNotificationSettingsResponseSchema: GenMessage<GetNotificationSettingsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 21);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsResponse.Project\n */\nexport type GetNotificationSettingsResponse_Project = Message<\"public_api.v1.GetNotificationSettingsResponse.Project\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: public_api.v1.GetNotificationSettingsResponse.Status status = 3;\n */\n status: GetNotificationSettingsResponse_Status;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme theme = 4;\n */\n theme?: ProjectTheme;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsResponse.Project.\n * Use `create(GetNotificationSettingsResponse_ProjectSchema)` to create a new message.\n */\nexport const GetNotificationSettingsResponse_ProjectSchema: GenMessage<GetNotificationSettingsResponse_Project> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 21, 0);\n\n/**\n * @generated from enum public_api.v1.GetNotificationSettingsResponse.Status\n */\nexport enum GetNotificationSettingsResponse_Status {\n /**\n * @generated from enum value: STATUS_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: STATUS_ENABLED = 1;\n */\n ENABLED = 1,\n\n /**\n * @generated from enum value: STATUS_DISABLED = 2;\n */\n DISABLED = 2,\n}\n\n/**\n * Describes the enum public_api.v1.GetNotificationSettingsResponse.Status.\n */\nexport const GetNotificationSettingsResponse_StatusSchema: GenEnum<GetNotificationSettingsResponse_Status> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 21, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesRequest\n */\nexport type UserPanelPushGetAvailableCompaniesRequest = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesRequest.\n * Use `create(UserPanelPushGetAvailableCompaniesRequestSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesRequestSchema: GenMessage<UserPanelPushGetAvailableCompaniesRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 22);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse\n */\nexport type UserPanelPushGetAvailableCompaniesResponse = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company companies = 1;\n */\n companies: UserPanelPushGetAvailableCompaniesResponse_Company[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.\n * Use `create(UserPanelPushGetAvailableCompaniesResponseSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponseSchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 23);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group\n */\nexport type UserPanelPushGetAvailableCompaniesResponse_Group = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional string how_often = 4;\n */\n howOften?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group.\n * Use `create(UserPanelPushGetAvailableCompaniesResponse_GroupSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponse_GroupSchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse_Group> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 23, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company\n */\nexport type UserPanelPushGetAvailableCompaniesResponse_Company = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: repeated public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group groups = 3;\n */\n groups: UserPanelPushGetAvailableCompaniesResponse_Group[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company.\n * Use `create(UserPanelPushGetAvailableCompaniesResponse_CompanySchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponse_CompanySchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse_Company> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 23, 1);\n\n/**\n * @generated from message public_api.v1.ShouldShopProductsResponse\n */\nexport type ShouldShopProductsResponse = Message<\"public_api.v1.ShouldShopProductsResponse\"> & {\n /**\n * @generated from field: bool is_visible = 1;\n */\n isVisible: boolean;\n};\n\n/**\n * Describes the message public_api.v1.ShouldShopProductsResponse.\n * Use `create(ShouldShopProductsResponseSchema)` to create a new message.\n */\nexport const ShouldShopProductsResponseSchema: GenMessage<ShouldShopProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 24);\n\n/**\n * @generated from message public_api.v1.GetShopProductsRequest\n */\nexport type GetShopProductsRequest = Message<\"public_api.v1.GetShopProductsRequest\"> & {\n /**\n * @generated from field: optional string access_token = 1;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsRequest.\n * Use `create(GetShopProductsRequestSchema)` to create a new message.\n */\nexport const GetShopProductsRequestSchema: GenMessage<GetShopProductsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 25);\n\n/**\n * @generated from message public_api.v1.GetShopProductsResponse\n */\nexport type GetShopProductsResponse = Message<\"public_api.v1.GetShopProductsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetShopProductsResponse.Product products = 5;\n */\n products: GetShopProductsResponse_Product[];\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsResponse.\n * Use `create(GetShopProductsResponseSchema)` to create a new message.\n */\nexport const GetShopProductsResponseSchema: GenMessage<GetShopProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 26);\n\n/**\n * @generated from message public_api.v1.GetShopProductsResponse.Product\n */\nexport type GetShopProductsResponse_Product = Message<\"public_api.v1.GetShopProductsResponse.Product\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string image_url = 3;\n */\n imageUrl: string;\n\n /**\n * @generated from field: string price = 4;\n */\n price: string;\n\n /**\n * @generated from field: optional bool is_already_bought = 5;\n */\n isAlreadyBought?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsResponse.Product.\n * Use `create(GetShopProductsResponse_ProductSchema)` to create a new message.\n */\nexport const GetShopProductsResponse_ProductSchema: GenMessage<GetShopProductsResponse_Product> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 26, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsResponse\n */\nexport type UserPanelGetFileDetailsResponse = Message<\"public_api.v1.UserPanelGetFileDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetFileDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetFileDetailsResponse.Result success = 1;\n */\n value: UserPanelGetFileDetailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsResponse.\n * Use `create(UserPanelGetFileDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsResponseSchema: GenMessage<UserPanelGetFileDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 27);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsResponse.Result\n */\nexport type UserPanelGetFileDetailsResponse_Result = Message<\"public_api.v1.UserPanelGetFileDetailsResponse.Result\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated string files = 2;\n */\n files: string[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsResponse.Result.\n * Use `create(UserPanelGetFileDetailsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsResponse_ResultSchema: GenMessage<UserPanelGetFileDetailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 27, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsRequest\n */\nexport type UserPanelGetFileDetailsRequest = Message<\"public_api.v1.UserPanelGetFileDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsRequest.\n * Use `create(UserPanelGetFileDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsRequestSchema: GenMessage<UserPanelGetFileDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 28);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsResponse\n */\nexport type UserPanelGetTicketDetailsResponse = Message<\"public_api.v1.UserPanelGetTicketDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetTicketDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetTicketDetailsResponse.Result success = 1;\n */\n value: UserPanelGetTicketDetailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsResponse.\n * Use `create(UserPanelGetTicketDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsResponseSchema: GenMessage<UserPanelGetTicketDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 29);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsResponse.Result\n */\nexport type UserPanelGetTicketDetailsResponse_Result = Message<\"public_api.v1.UserPanelGetTicketDetailsResponse.Result\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string ticket_url = 2;\n */\n ticketUrl: string;\n\n /**\n * @generated from field: string product_name = 3;\n */\n productName: string;\n\n /**\n * @generated from field: string product_image_url = 4;\n */\n productImageUrl: string;\n\n /**\n * @generated from field: optional string google_wallet_url = 5;\n */\n googleWalletUrl?: string;\n\n /**\n * @generated from field: optional string apple_wallet_url = 6;\n */\n appleWalletUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsResponse.Result.\n * Use `create(UserPanelGetTicketDetailsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsResponse_ResultSchema: GenMessage<UserPanelGetTicketDetailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 29, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsRequest\n */\nexport type UserPanelGetTicketDetailsRequest = Message<\"public_api.v1.UserPanelGetTicketDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsRequest.\n * Use `create(UserPanelGetTicketDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsRequestSchema: GenMessage<UserPanelGetTicketDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 30);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result success = 1;\n */\n value: UserPanelGetAudiobookDetailsDownloadURLsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponseSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 31);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails\"> & {\n /**\n * @generated from field: string chapter_id = 1;\n */\n chapterId: string;\n\n /**\n * @generated from field: string public_url = 2;\n */\n publicUrl: string;\n\n /**\n * @generated from field: optional string downloadable_url = 3;\n */\n downloadableUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetailsSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetailsSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 31, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse_Result = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails audiobook_download_details = 1;\n */\n audiobookDownloadDetails: UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails[];\n\n /**\n * @generated from field: optional bool is_available_to_download_in_mobile_app = 2;\n */\n isAvailableToDownloadInMobileApp?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponse_ResultSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 31, 1);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsRequest = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n\n /**\n * @generated from field: optional bool is_browser = 3;\n */\n isBrowser?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsRequestSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 32);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsResponse\n */\nexport type UserPanelGetAudiobookDetailsResponse = Message<\"public_api.v1.UserPanelGetAudiobookDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetAudiobookDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n value: Audiobook$1;\n case: \"audiobook\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsResponse.\n * Use `create(UserPanelGetAudiobookDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsResponseSchema: GenMessage<UserPanelGetAudiobookDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 33);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsRequest\n */\nexport type UserPanelGetAudiobookDetailsRequest = Message<\"public_api.v1.UserPanelGetAudiobookDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsRequest.\n * Use `create(UserPanelGetAudiobookDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsRequestSchema: GenMessage<UserPanelGetAudiobookDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 34);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsRequest\n */\nexport type UserPanelGetProductsRequest = Message<\"public_api.v1.UserPanelGetProductsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsRequest.\n * Use `create(UserPanelGetProductsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetProductsRequestSchema: GenMessage<UserPanelGetProductsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 35);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsResponse\n */\nexport type UserPanelGetProductsResponse = Message<\"public_api.v1.UserPanelGetProductsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetProductsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetProductsResponse.Result success = 1;\n */\n value: UserPanelGetProductsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsResponse.\n * Use `create(UserPanelGetProductsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetProductsResponseSchema: GenMessage<UserPanelGetProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 36);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsResponse.Result\n */\nexport type UserPanelGetProductsResponse_Result = Message<\"public_api.v1.UserPanelGetProductsResponse.Result\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserProduct products = 1;\n */\n products: UserProduct[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsResponse.Result.\n * Use `create(UserPanelGetProductsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetProductsResponse_ResultSchema: GenMessage<UserPanelGetProductsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 36, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelLogoutRequest\n */\nexport type UserPanelLogoutRequest = Message<\"public_api.v1.UserPanelLogoutRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLogoutRequest.\n * Use `create(UserPanelLogoutRequestSchema)` to create a new message.\n */\nexport const UserPanelLogoutRequestSchema: GenMessage<UserPanelLogoutRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 37);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginWithCodeResponse\n */\nexport type UserPanelLoginWithCodeResponse = Message<\"public_api.v1.UserPanelLoginWithCodeResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelLoginWithCodeResponse.result\n */\n result: {\n /**\n * @generated from field: string access_token = 1;\n */\n value: string;\n case: \"accessToken\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n\n /**\n * @generated from field: optional string email = 3;\n */\n email?: string;\n\n /**\n * @generated from field: optional string user_id = 4;\n */\n userId?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginWithCodeResponse.\n * Use `create(UserPanelLoginWithCodeResponseSchema)` to create a new message.\n */\nexport const UserPanelLoginWithCodeResponseSchema: GenMessage<UserPanelLoginWithCodeResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 38);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginWithCodeRequest\n */\nexport type UserPanelLoginWithCodeRequest = Message<\"public_api.v1.UserPanelLoginWithCodeRequest\"> & {\n /**\n * @generated from field: int32 code = 1;\n */\n code: number;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginWithCodeRequest.\n * Use `create(UserPanelLoginWithCodeRequestSchema)` to create a new message.\n */\nexport const UserPanelLoginWithCodeRequestSchema: GenMessage<UserPanelLoginWithCodeRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 39);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginResponse\n */\nexport type UserPanelLoginResponse = Message<\"public_api.v1.UserPanelLoginResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelLoginResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelLoginResponse.Result success = 1;\n */\n value: UserPanelLoginResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginResponse.\n * Use `create(UserPanelLoginResponseSchema)` to create a new message.\n */\nexport const UserPanelLoginResponseSchema: GenMessage<UserPanelLoginResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 40);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginResponse.Result\n */\nexport type UserPanelLoginResponse_Result = Message<\"public_api.v1.UserPanelLoginResponse.Result\"> & {\n /**\n * @generated from field: int32 retry_in = 1;\n */\n retryIn: number;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginResponse.Result.\n * Use `create(UserPanelLoginResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelLoginResponse_ResultSchema: GenMessage<UserPanelLoginResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 40, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginRequest\n */\nexport type UserPanelLoginRequest = Message<\"public_api.v1.UserPanelLoginRequest\"> & {\n /**\n * @generated from field: string email = 1;\n */\n email: string;\n\n /**\n * @generated from field: optional bool regulations_accept = 2;\n */\n regulationsAccept?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginRequest.\n * Use `create(UserPanelLoginRequestSchema)` to create a new message.\n */\nexport const UserPanelLoginRequestSchema: GenMessage<UserPanelLoginRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 41);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlRequest\n */\nexport type GetOrderRetryUrlRequest = Message<\"public_api.v1.GetOrderRetryUrlRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlRequest.\n * Use `create(GetOrderRetryUrlRequestSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlRequestSchema: GenMessage<GetOrderRetryUrlRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 42);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlResponse\n */\nexport type GetOrderRetryUrlResponse = Message<\"public_api.v1.GetOrderRetryUrlResponse\"> & {\n /**\n * @generated from oneof public_api.v1.GetOrderRetryUrlResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.GetOrderRetryUrlResponse.Success url = 1;\n */\n value: GetOrderRetryUrlResponse_Success;\n case: \"url\";\n } | {\n /**\n * @generated from field: string failure = 2;\n */\n value: string;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlResponse.\n * Use `create(GetOrderRetryUrlResponseSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlResponseSchema: GenMessage<GetOrderRetryUrlResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 43);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlResponse.Success\n */\nexport type GetOrderRetryUrlResponse_Success = Message<\"public_api.v1.GetOrderRetryUrlResponse.Success\"> & {\n /**\n * @generated from field: string url = 1;\n */\n url: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlResponse.Success.\n * Use `create(GetOrderRetryUrlResponse_SuccessSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlResponse_SuccessSchema: GenMessage<GetOrderRetryUrlResponse_Success> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 43, 0);\n\n/**\n * @generated from message public_api.v1.GetOrderRequest\n */\nexport type GetOrderRequest = Message<\"public_api.v1.GetOrderRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRequest.\n * Use `create(GetOrderRequestSchema)` to create a new message.\n */\nexport const GetOrderRequestSchema: GenMessage<GetOrderRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 44);\n\n/**\n * @generated from message public_api.v1.GetOrderResponse\n */\nexport type GetOrderResponse = Message<\"public_api.v1.GetOrderResponse\"> & {\n /**\n * @generated from field: optional string id = 1;\n */\n id?: string;\n\n /**\n * @generated from field: repeated public_api.v1.Item items = 2;\n */\n items: Item[];\n\n /**\n * @generated from field: public_api.v1.OrderDetails details = 3;\n */\n details?: OrderDetails;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderResponse.\n * Use `create(GetOrderResponseSchema)` to create a new message.\n */\nexport const GetOrderResponseSchema: GenMessage<GetOrderResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 45);\n\n/**\n * @generated from message public_api.v1.OrderDetails\n */\nexport type OrderDetails = Message<\"public_api.v1.OrderDetails\"> & {\n /**\n * @generated from field: repeated public_api.v1.OrderDetails.SingleItem items = 1;\n */\n items: OrderDetails_SingleItem[];\n\n /**\n * @generated from field: common.v1.Gateway gateway = 2;\n */\n gateway: Gateway;\n};\n\n/**\n * Describes the message public_api.v1.OrderDetails.\n * Use `create(OrderDetailsSchema)` to create a new message.\n */\nexport const OrderDetailsSchema: GenMessage<OrderDetails> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 46);\n\n/**\n * @generated from message public_api.v1.OrderDetails.SingleItem\n */\nexport type OrderDetails_SingleItem = Message<\"public_api.v1.OrderDetails.SingleItem\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: optional string image_url = 2;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: int32 quantity = 4;\n */\n quantity: number;\n\n /**\n * @generated from field: int64 price_amount = 5;\n */\n priceAmount: bigint;\n\n /**\n * @generated from field: string price_currency = 6;\n */\n priceCurrency: string;\n};\n\n/**\n * Describes the message public_api.v1.OrderDetails.SingleItem.\n * Use `create(OrderDetails_SingleItemSchema)` to create a new message.\n */\nexport const OrderDetails_SingleItemSchema: GenMessage<OrderDetails_SingleItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 46, 0);\n\n/**\n * @generated from message public_api.v1.Item\n */\nexport type Item = Message<\"public_api.v1.Item\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string image_url = 3;\n */\n imageUrl: string;\n\n /**\n * @generated from oneof public_api.v1.Item.item\n */\n item: {\n /**\n * @generated from field: public_api.v1.FileDownloadable file_downloadable = 4;\n */\n value: FileDownloadable;\n case: \"fileDownloadable\";\n } | {\n /**\n * @generated from field: public_api.v1.Audiobook audiobook = 5;\n */\n value: Audiobook;\n case: \"audiobook\";\n } | {\n /**\n * @generated from field: public_api.v1.Ticket ticket = 6;\n */\n value: Ticket;\n case: \"ticket\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.Item.\n * Use `create(ItemSchema)` to create a new message.\n */\nexport const ItemSchema: GenMessage<Item> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 47);\n\n/**\n * @generated from message public_api.v1.FileDownloadable\n */\nexport type FileDownloadable = Message<\"public_api.v1.FileDownloadable\"> & {\n /**\n * @generated from field: string file_url = 1;\n */\n fileUrl: string;\n};\n\n/**\n * Describes the message public_api.v1.FileDownloadable.\n * Use `create(FileDownloadableSchema)` to create a new message.\n */\nexport const FileDownloadableSchema: GenMessage<FileDownloadable> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 48);\n\n/**\n * @generated from message public_api.v1.Audiobook\n */\nexport type Audiobook = Message<\"public_api.v1.Audiobook\"> & {\n /**\n * @generated from field: string app_download_url = 1;\n */\n appDownloadUrl: string;\n};\n\n/**\n * Describes the message public_api.v1.Audiobook.\n * Use `create(AudiobookSchema)` to create a new message.\n */\nexport const AudiobookSchema: GenMessage<Audiobook> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 49);\n\n/**\n * @generated from message public_api.v1.Ticket\n */\nexport type Ticket = Message<\"public_api.v1.Ticket\"> & {\n /**\n * @generated from field: string ticket_id = 1;\n */\n ticketId: string;\n\n /**\n * @generated from field: optional string apple_pass_url = 2;\n */\n applePassUrl?: string;\n\n /**\n * @generated from field: optional string google_ticket_url = 3;\n */\n googleTicketUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.Ticket.\n * Use `create(TicketSchema)` to create a new message.\n */\nexport const TicketSchema: GenMessage<Ticket> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 50);\n\n/**\n * @generated from message public_api.v1.UserProduct\n */\nexport type UserProduct = Message<\"public_api.v1.UserProduct\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string project_name = 2;\n */\n projectName: string;\n\n /**\n * @generated from field: string product_id = 3;\n */\n productId: string;\n\n /**\n * @generated from field: string product_name = 4;\n */\n productName: string;\n\n /**\n * @generated from field: string product_description = 5;\n */\n productDescription: string;\n\n /**\n * @generated from field: string product_image_url = 6;\n */\n productImageUrl: string;\n\n /**\n * @generated from field: public_api.v1.UserProductType product_type = 7;\n */\n productType: UserProductType;\n\n /**\n * @generated from field: string access_id = 8;\n */\n accessId: string;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme project_theme = 9;\n */\n projectTheme?: ProjectTheme;\n};\n\n/**\n * Describes the message public_api.v1.UserProduct.\n * Use `create(UserProductSchema)` to create a new message.\n */\nexport const UserProductSchema: GenMessage<UserProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 51);\n\n/**\n * @generated from message public_api.v1.BoolResponse\n */\nexport type BoolResponse = Message<\"public_api.v1.BoolResponse\"> & {\n /**\n * @generated from oneof public_api.v1.BoolResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.BoolResponse.\n * Use `create(BoolResponseSchema)` to create a new message.\n */\nexport const BoolResponseSchema: GenMessage<BoolResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 52);\n\n/**\n * @generated from message public_api.v1.PushEventRequest\n */\nexport type PushEventRequest = Message<\"public_api.v1.PushEventRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string notification_id = 2;\n */\n notificationId: string;\n\n /**\n * @generated from field: common.v1.NotificationEvent event = 3;\n */\n event: NotificationEvent;\n};\n\n/**\n * Describes the message public_api.v1.PushEventRequest.\n * Use `create(PushEventRequestSchema)` to create a new message.\n */\nexport const PushEventRequestSchema: GenMessage<PushEventRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 53);\n\n/**\n * @generated from message public_api.v1.PushSendDeviceTokenRequest\n */\nexport type PushSendDeviceTokenRequest = Message<\"public_api.v1.PushSendDeviceTokenRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: common.v1.PushNotificationDeviceToken payload = 2;\n */\n payload?: PushNotificationDeviceToken;\n\n /**\n * @generated from field: optional bool is_notification_granted = 3;\n */\n isNotificationGranted?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.PushSendDeviceTokenRequest.\n * Use `create(PushSendDeviceTokenRequestSchema)` to create a new message.\n */\nexport const PushSendDeviceTokenRequestSchema: GenMessage<PushSendDeviceTokenRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 54);\n\n/**\n * @generated from message public_api.v1.ProjectTheme\n */\nexport type ProjectTheme = Message<\"public_api.v1.ProjectTheme\"> & {\n /**\n * @generated from field: optional string image_url = 1;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: optional string image_dark_url = 2;\n */\n imageDarkUrl?: string;\n\n /**\n * @generated from field: optional string brand_color = 3;\n */\n brandColor?: string;\n\n /**\n * @generated from field: optional string brand_color_dark = 4;\n */\n brandColorDark?: string;\n};\n\n/**\n * Describes the message public_api.v1.ProjectTheme.\n * Use `create(ProjectThemeSchema)` to create a new message.\n */\nexport const ProjectThemeSchema: GenMessage<ProjectTheme> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 55);\n\n/**\n * @generated from enum public_api.v1.UserProductType\n */\nexport enum UserProductType {\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_AUDIO = 1;\n */\n AUDIO = 1,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_FILE = 2;\n */\n FILE = 2,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_TICKET = 3;\n */\n TICKET = 3,\n}\n\n/**\n * Describes the enum public_api.v1.UserProductType.\n */\nexport const UserProductTypeSchema: GenEnum<UserProductType> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 0);\n\n/**\n * @generated from enum public_api.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_EMAIL_NOT_FOUND = 1;\n */\n EMAIL_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_EMAIL = 2;\n */\n INCORRECT_EMAIL = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_CODE = 3;\n */\n INCORRECT_CODE = 3,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_GENERATE_ACCESS_TOKEN_FAILED = 4;\n */\n GENERATE_ACCESS_TOKEN_FAILED = 4,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_LOGOUT_FAILED = 5;\n */\n LOGOUT_FAILED = 5,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PRDUCTS_NOT_FOUND = 6;\n */\n PRDUCTS_NOT_FOUND = 6,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_AUDIOBOOK_NOT_FOUND = 7;\n */\n AUDIOBOOK_NOT_FOUND = 7,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_AUDIOBOOK = 8;\n */\n INCORRECT_AUDIOBOOK = 8,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNAUTHORIZED = 9;\n */\n UNAUTHORIZED = 9,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_TICKET_NOT_FOUND = 10;\n */\n TICKET_NOT_FOUND = 10,\n}\n\n/**\n * Describes the enum public_api.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 1);\n\n/**\n * @generated from enum public_api.v1.NotificationMethod\n */\nexport enum NotificationMethod {\n /**\n * @generated from enum value: NOTIFICATION_METHOD_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_EMAIL = 1;\n */\n EMAIL = 1,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_SMS = 2;\n */\n SMS = 2,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_PUSH = 3;\n */\n PUSH = 3,\n}\n\n/**\n * Describes the enum public_api.v1.NotificationMethod.\n */\nexport const NotificationMethodSchema: GenEnum<NotificationMethod> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 2);\n\n/**\n * @generated from service public_api.v1.PublicApiService\n */\nexport const PublicApiService: GenService<{\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetOrder\n */\n getOrder: {\n methodKind: \"unary\";\n input: typeof GetOrderRequestSchema;\n output: typeof GetOrderResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetOrderRetryUrl\n */\n getOrderRetryUrl: {\n methodKind: \"unary\";\n input: typeof GetOrderRetryUrlRequestSchema;\n output: typeof GetOrderRetryUrlResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogin\n */\n userPanelLogin: {\n methodKind: \"unary\";\n input: typeof UserPanelLoginRequestSchema;\n output: typeof UserPanelLoginResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLoginWithCode\n */\n userPanelLoginWithCode: {\n methodKind: \"unary\";\n input: typeof UserPanelLoginWithCodeRequestSchema;\n output: typeof UserPanelLoginWithCodeResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogout\n */\n userPanelLogout: {\n methodKind: \"unary\";\n input: typeof UserPanelLogoutRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelDeleteAccount\n */\n userPanelDeleteAccount: {\n methodKind: \"unary\";\n input: typeof UserPanelDeleteAccountRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetProducts\n */\n userPanelGetProducts: {\n methodKind: \"unary\";\n input: typeof UserPanelGetProductsRequestSchema;\n output: typeof UserPanelGetProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetails\n */\n userPanelGetAudiobookDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetAudiobookDetailsRequestSchema;\n output: typeof UserPanelGetAudiobookDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetailsDownloadURLs\n */\n userPanelGetAudiobookDetailsDownloadURLs: {\n methodKind: \"unary\";\n input: typeof UserPanelGetAudiobookDetailsDownloadURLsRequestSchema;\n output: typeof UserPanelGetAudiobookDetailsDownloadURLsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetFileDetails\n */\n userPanelGetFileDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetFileDetailsRequestSchema;\n output: typeof UserPanelGetFileDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetTicketDetails\n */\n userPanelGetTicketDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetTicketDetailsRequestSchema;\n output: typeof UserPanelGetTicketDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.PushSendDeviceToken\n */\n pushSendDeviceToken: {\n methodKind: \"unary\";\n input: typeof PushSendDeviceTokenRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.PushEvent\n */\n pushEvent: {\n methodKind: \"unary\";\n input: typeof PushEventRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * iOS SHOP methods\n *\n * @generated from rpc public_api.v1.PublicApiService.ShouldShopProducts\n */\n shouldShopProducts: {\n methodKind: \"unary\";\n input: typeof EmptySchema;\n output: typeof ShouldShopProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetShopProducts\n */\n getShopProducts: {\n methodKind: \"unary\";\n input: typeof GetShopProductsRequestSchema;\n output: typeof GetShopProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.DidBuyProduct\n */\n didBuyProduct: {\n methodKind: \"unary\";\n input: typeof DidBuyProductRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * Notification settings\n *\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettings\n */\n getNotificationSettings: {\n methodKind: \"unary\";\n input: typeof GetNotificationSettingsRequestSchema;\n output: typeof GetNotificationSettingsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettingsDetails\n */\n getNotificationSettingsDetails: {\n methodKind: \"unary\";\n input: typeof GetNotificationSettingsDetailsRequestSchema;\n output: typeof GetNotificationSettingsDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UpdateGlobalNotificationSettings\n */\n updateGlobalNotificationSettings: {\n methodKind: \"unary\";\n input: typeof UpdateGlobalNotificationSettingsRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UpdateNotificationSettings\n */\n updateNotificationSettings: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationSettingsRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * Product V2 requests\n *\n * @generated from rpc public_api.v1.PublicApiService.GetAvailableCountForProduct\n */\n getAvailableCountForProduct: {\n methodKind: \"unary\";\n input: typeof GetAvailableCountForProductRequestSchema;\n output: typeof GetAvailableCountForProductResponseSchema;\n },\n /**\n * Checkout requests\n *\n * @generated from rpc public_api.v1.PublicApiService.IsOneClickPaymentAvailable\n */\n isOneClickPaymentAvailable: {\n methodKind: \"unary\";\n input: typeof IsOneClickPaymentAvailableRequestSchema;\n output: typeof IsOneClickPaymentAvailableResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetPreOrderDetails\n */\n getPreOrderDetails: {\n methodKind: \"unary\";\n input: typeof GetPreOrderDetailsRequestSchema;\n output: typeof GetPreOrderDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.ApplePayValidateMerchant\n */\n applePayValidateMerchant: {\n methodKind: \"unary\";\n input: typeof ApplePayValidateMerchantRequestSchema;\n output: typeof ApplePayValidateMerchantResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.AuthorizeOneClickPayment\n */\n authorizeOneClickPayment: {\n methodKind: \"unary\";\n input: typeof OneClickAuthorizePaymentRequestSchema;\n output: typeof OneClickAuthorizePaymentResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.NotifyUserAboutProductAvailability\n */\n notifyUserAboutProductAvailability: {\n methodKind: \"unary\";\n input: typeof NotifyUserAboutProductAvailabilityRequestSchema;\n output: typeof EmptySchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_public_v1_public_api, 0);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file common/v1/gateway.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc } from \"@bufbuild/protobuf/codegenv2\";\n\n/**\n * Describes the file common/v1/gateway.proto.\n */\nexport const file_common_v1_gateway: GenFile = /*@__PURE__*/\n fileDesc(\"Chdjb21tb24vdjEvZ2F0ZXdheS5wcm90bxIJY29tbW9uLnYxKrMBCgdHYXRld2F5Eg8KC0dBVEVXQVlfQUxMEAASFwoTR0FURVdBWV9QUlpFTEVXWV8yNBABEhIKDkdBVEVXQVlfU1RSSVBFEAISEAoMR0FURVdBWV9UUEFZEAMSHAoYR0FURVdBWV9DQVNIX09OX0RFTElWRVJZEAQSEAoMR0FURVdBWV9GUkVFEAUSFgoSR0FURVdBWV9JTlBPU1RfUEFZEAYSEAoMR0FURVdBWV9QQVlVEAdCTlpMZ2l0aHViLmNvbS9lbW1lbXMvc3VwZXItY2FydC9hcHBzL3Nydi13b3JrZXIvdXRpbHMvbW9kZWxzL2NvbW1vbi92MTtjb21tb252MWIGcHJvdG8z\");\n\n/**\n * @generated from enum common.v1.Gateway\n */\nexport enum Gateway {\n /**\n * @generated from enum value: GATEWAY_ALL = 0;\n */\n ALL = 0,\n\n /**\n * @generated from enum value: GATEWAY_PRZELEWY_24 = 1;\n */\n PRZELEWY_24 = 1,\n\n /**\n * @generated from enum value: GATEWAY_STRIPE = 2;\n */\n STRIPE = 2,\n\n /**\n * @generated from enum value: GATEWAY_TPAY = 3;\n */\n TPAY = 3,\n\n /**\n * @generated from enum value: GATEWAY_CASH_ON_DELIVERY = 4;\n */\n CASH_ON_DELIVERY = 4,\n\n /**\n * @generated from enum value: GATEWAY_FREE = 5;\n */\n FREE = 5,\n\n /**\n * @generated from enum value: GATEWAY_INPOST_PAY = 6;\n */\n INPOST_PAY = 6,\n\n /**\n * @generated from enum value: GATEWAY_PAYU = 7;\n */\n PAYU = 7,\n}\n\n/**\n * Describes the enum common.v1.Gateway.\n */\nexport const GatewaySchema: GenEnum<Gateway> = /*@__PURE__*/\n enumDesc(file_common_v1_gateway, 0);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file common/v1/address.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file common/v1/address.proto.\n */\nexport const file_common_v1_address: GenFile = /*@__PURE__*/\n fileDesc(\"Chdjb21tb24vdjEvYWRkcmVzcy5wcm90bxIJY29tbW9uLnYxIocBCgdBZGRyZXNzEgwKBG5hbWUYASABKAkSDQoFbGluZTEYAiABKAkSEgoFbGluZTIYAyABKAlIAIgBARIMCgRjaXR5GAQgASgJEg8KB2NvdW50cnkYBSABKAkSFQoIemlwX2NvZGUYBiABKAlIAYgBAUIICgZfbGluZTJCCwoJX3ppcF9jb2RlIq4BCg5CaWxsaW5nQWRkcmVzcxIMCgRuYW1lGAEgASgJEg0KBWxpbmUxGAIgASgJEhIKBWxpbmUyGAMgASgJSACIAQESDAoEY2l0eRgEIAEoCRIPCgdjb3VudHJ5GAUgASgJEhUKCHppcF9jb2RlGAYgASgJSAGIAQESEwoGdGF4X2lkGAcgASgJSAKIAQFCCAoGX2xpbmUyQgsKCV96aXBfY29kZUIJCgdfdGF4X2lkQk5aTGdpdGh1Yi5jb20vZW1tZW1zL3N1cGVyLWNhcnQvYXBwcy9zcnYtd29ya2VyL3V0aWxzL21vZGVscy9jb21tb24vdjE7Y29tbW9udjFiBnByb3RvMw\");\n\n/**\n * @generated from message common.v1.Address\n */\nexport type Address = Message<\"common.v1.Address\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: string line1 = 2;\n */\n line1: string;\n\n /**\n * @generated from field: optional string line2 = 3;\n */\n line2?: string;\n\n /**\n * @generated from field: string city = 4;\n */\n city: string;\n\n /**\n * @generated from field: string country = 5;\n */\n country: string;\n\n /**\n * @generated from field: optional string zip_code = 6;\n */\n zipCode?: string;\n};\n\n/**\n * Describes the message common.v1.Address.\n * Use `create(AddressSchema)` to create a new message.\n */\nexport const AddressSchema: GenMessage<Address> = /*@__PURE__*/\n messageDesc(file_common_v1_address, 0);\n\n/**\n * @generated from message common.v1.BillingAddress\n */\nexport type BillingAddress = Message<\"common.v1.BillingAddress\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: string line1 = 2;\n */\n line1: string;\n\n /**\n * @generated from field: optional string line2 = 3;\n */\n line2?: string;\n\n /**\n * @generated from field: string city = 4;\n */\n city: string;\n\n /**\n * @generated from field: string country = 5;\n */\n country: string;\n\n /**\n * @generated from field: optional string zip_code = 6;\n */\n zipCode?: string;\n\n /**\n * @generated from field: optional string tax_id = 7;\n */\n taxId?: string;\n};\n\n/**\n * Describes the message common.v1.BillingAddress.\n * Use `create(BillingAddressSchema)` to create a new message.\n */\nexport const BillingAddressSchema: GenMessage<BillingAddress> = /*@__PURE__*/\n messageDesc(file_common_v1_address, 1);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file common/v1/push_notifications.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file common/v1/push_notifications.proto.\n */\nexport const file_common_v1_push_notifications: GenFile = /*@__PURE__*/\n fileDesc(\"CiJjb21tb24vdjEvcHVzaF9ub3RpZmljYXRpb25zLnByb3RvEgljb21tb24udjEi9gEKG1B1c2hOb3RpZmljYXRpb25EZXZpY2VUb2tlbhIXCgpwdXNoX3Rva2VuGAIgASgJSACIAQESNAoLZXhwaXJlX3RpbWUYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wSAGIAQESEwoGcDI1NmRoGAQgASgJSAKIAQESFQoIZW5kcG9pbnQYBSABKAlIA4gBARIlCghwbGF0Zm9ybRgGIAEoDjITLmNvbW1vbi52MS5QbGF0Zm9ybUINCgtfcHVzaF90b2tlbkIOCgxfZXhwaXJlX3RpbWVCCQoHX3AyNTZkaEILCglfZW5kcG9pbnQiZwoXUHVzaE5vdGlmaWNhdGlvblBheWxvYWQSDQoFdGl0bGUYAiABKAkSFQoIb3Blbl91cmwYAyABKAlIAYgBARIOCgRib2R5GAQgASgJSABCCQoHbWVzc2FnZUILCglfb3Blbl91cmwqeAoIUGxhdGZvcm0SGAoUUExBVEZPUk1fVU5TUEVDSUZJRUQQABIQCgxQTEFURk9STV9XRUIQARIYChRQTEFURk9STV9JT1NfU0FOREJPWBACEhAKDFBMQVRGT1JNX0lPUxADEhQKEFBMQVRGT1JNX0FORFJPSUQQBCp0ChFOb3RpZmljYXRpb25FdmVudBIRCg1FVkVOVF9VTktOT1dOEAASEgoORVZFTlRfUkVDRUlWRUQQARIQCgxFVkVOVF9PUEVORUQQAhIRCg1FVkVOVF9DTElDS0VEEAMSEwoPRVZFTlRfRElTTUlTU0VEEAQqmQEKGU5vdGlmaWNhdGlvbkdyb3VwSG93T2Z0ZW4SJwojTk9USUZJQ0FUSU9OX0dST1VQX0hPV19PRlRFTl9SQVJFTFkQABImCiJOT1RJRklDQVRJT05fR1JPVVBfSE9XX09GVEVOX09GVEVOEAESKwonTk9USUZJQ0FUSU9OX0dST1VQX0hPV19PRlRFTl9WRVJZX09GVEVOEAJCTlpMZ2l0aHViLmNvbS9lbW1lbXMvc3VwZXItY2FydC9hcHBzL3Nydi13b3JrZXIvdXRpbHMvbW9kZWxzL2NvbW1vbi92MTtjb21tb252MWIGcHJvdG8z\", [file_google_protobuf_timestamp]);\n\n/**\n * @generated from message common.v1.PushNotificationDeviceToken\n */\nexport type PushNotificationDeviceToken = Message<\"common.v1.PushNotificationDeviceToken\"> & {\n /**\n * @generated from field: optional string push_token = 2;\n */\n pushToken?: string;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp expire_time = 3;\n */\n expireTime?: Timestamp;\n\n /**\n * @generated from field: optional string p256dh = 4;\n */\n p256dh?: string;\n\n /**\n * @generated from field: optional string endpoint = 5;\n */\n endpoint?: string;\n\n /**\n * @generated from field: common.v1.Platform platform = 6;\n */\n platform: Platform;\n};\n\n/**\n * Describes the message common.v1.PushNotificationDeviceToken.\n * Use `create(PushNotificationDeviceTokenSchema)` to create a new message.\n */\nexport const PushNotificationDeviceTokenSchema: GenMessage<PushNotificationDeviceToken> = /*@__PURE__*/\n messageDesc(file_common_v1_push_notifications, 0);\n\n/**\n * @generated from message common.v1.PushNotificationPayload\n */\nexport type PushNotificationPayload = Message<\"common.v1.PushNotificationPayload\"> & {\n /**\n * @generated from field: string title = 2;\n */\n title: string;\n\n /**\n * @generated from field: optional string open_url = 3;\n */\n openUrl?: string;\n\n /**\n * @generated from oneof common.v1.PushNotificationPayload.message\n */\n message: {\n /**\n * @generated from field: string body = 4;\n */\n value: string;\n case: \"body\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message common.v1.PushNotificationPayload.\n * Use `create(PushNotificationPayloadSchema)` to create a new message.\n */\nexport const PushNotificationPayloadSchema: GenMessage<PushNotificationPayload> = /*@__PURE__*/\n messageDesc(file_common_v1_push_notifications, 1);\n\n/**\n * @generated from enum common.v1.Platform\n */\nexport enum Platform {\n /**\n * @generated from enum value: PLATFORM_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: PLATFORM_WEB = 1;\n */\n WEB = 1,\n\n /**\n * @generated from enum value: PLATFORM_IOS_SANDBOX = 2;\n */\n IOS_SANDBOX = 2,\n\n /**\n * @generated from enum value: PLATFORM_IOS = 3;\n */\n IOS = 3,\n\n /**\n * @generated from enum value: PLATFORM_ANDROID = 4;\n */\n ANDROID = 4,\n}\n\n/**\n * Describes the enum common.v1.Platform.\n */\nexport const PlatformSchema: GenEnum<Platform> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 0);\n\n/**\n * @generated from enum common.v1.NotificationEvent\n */\nexport enum NotificationEvent {\n /**\n * @generated from enum value: EVENT_UNKNOWN = 0;\n */\n EVENT_UNKNOWN = 0,\n\n /**\n * @generated from enum value: EVENT_RECEIVED = 1;\n */\n EVENT_RECEIVED = 1,\n\n /**\n * @generated from enum value: EVENT_OPENED = 2;\n */\n EVENT_OPENED = 2,\n\n /**\n * @generated from enum value: EVENT_CLICKED = 3;\n */\n EVENT_CLICKED = 3,\n\n /**\n * @generated from enum value: EVENT_DISMISSED = 4;\n */\n EVENT_DISMISSED = 4,\n}\n\n/**\n * Describes the enum common.v1.NotificationEvent.\n */\nexport const NotificationEventSchema: GenEnum<NotificationEvent> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 1);\n\n/**\n * @generated from enum common.v1.NotificationGroupHowOften\n */\nexport enum NotificationGroupHowOften {\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_RARELY = 0;\n */\n RARELY = 0,\n\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_OFTEN = 1;\n */\n OFTEN = 1,\n\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_VERY_OFTEN = 2;\n */\n VERY_OFTEN = 2,\n}\n\n/**\n * Describes the enum common.v1.NotificationGroupHowOften.\n */\nexport const NotificationGroupHowOftenSchema: GenEnum<NotificationGroupHowOften> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 2);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file dashboard/v1/audiobooks.proto (package dashboard.audiobooks.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Empty, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file dashboard/v1/audiobooks.proto.\n */\nexport const file_dashboard_v1_audiobooks: GenFile = /*@__PURE__*/\n fileDesc(\"Ch1kYXNoYm9hcmQvdjEvYXVkaW9ib29rcy5wcm90bxIXZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEiFgoUR2V0QXVkaW9ib29rc1JlcXVlc3QiIQoTR2V0QXVkaW9ib29rUmVxdWVzdBIKCgJpZBgBIAEoCSKrAQoHQ2hhcHRlchIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEhgKC2Rlc2NyaXB0aW9uGAMgASgJSACIAQESGgoNbXVsdGltZWRpYV9pZBgEIAEoCUgBiAEBEi4KCmNyZWF0ZWRfYXQYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQg4KDF9kZXNjcmlwdGlvbkIQCg5fbXVsdGltZWRpYV9pZCLzAgoJQXVkaW9ib29rEg8KAmlkGAEgASgJSACIAQESEgoKcHJvamVjdF9pZBgCIAEoCRIMCgRuYW1lGAMgASgJEhMKC2Rlc2NyaXB0aW9uGAQgASgJEhMKC2N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jUuZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEuQ3JlYXRlQXVkaW9ib29rQWNjZXNzUmVxdWVzdBolLmRhc2hib2FyZC5hdWRpb2Jvb2tzLnYxLkJvb2xSZXNwb25zZRJ1ChVEZWxldGVBdWRpb2Jvb2tBY2Nlc3MSNS5kYXNoYm9hcmQuYXVkaW9ib29rcy52MS5EZWxldGVBdWRpb2Jvb2tBY2Nlc3NSZXF1ZXN0GiUuZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEuQm9vbFJlc3BvbnNlYgZwcm90bzM\", [file_google_protobuf_timestamp, file_google_protobuf_empty]);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobooksRequest\n */\nexport type GetAudiobooksRequest = Message<\"dashboard.audiobooks.v1.GetAudiobooksRequest\"> & {\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobooksRequest.\n * Use `create(GetAudiobooksRequestSchema)` to create a new message.\n */\nexport const GetAudiobooksRequestSchema: GenMessage<GetAudiobooksRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookRequest\n */\nexport type GetAudiobookRequest = Message<\"dashboard.audiobooks.v1.GetAudiobookRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookRequest.\n * Use `create(GetAudiobookRequestSchema)` to create a new message.\n */\nexport const GetAudiobookRequestSchema: GenMessage<GetAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 1);\n\n/**\n * @generated from message dashboard.audiobooks.v1.Chapter\n */\nexport type Chapter = Message<\"dashboard.audiobooks.v1.Chapter\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional string multimedia_id = 4;\n */\n multimediaId?: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 5;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.Chapter.\n * Use `create(ChapterSchema)` to create a new message.\n */\nexport const ChapterSchema: GenMessage<Chapter> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 2);\n\n/**\n * @generated from message dashboard.audiobooks.v1.Audiobook\n */\nexport type Audiobook = Message<\"dashboard.audiobooks.v1.Audiobook\"> & {\n /**\n * @generated from field: optional string id = 1;\n */\n id?: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: string description = 4;\n */\n description: string;\n\n /**\n * @generated from field: string cover_image = 5;\n */\n coverImage: string;\n\n /**\n * @generated from field: string thumbnail_image = 6;\n */\n thumbnailImage: string;\n\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.Chapter chapters = 7;\n */\n chapters: Chapter[];\n\n /**\n * @generated from field: bool is_downloadable = 8;\n */\n isDownloadable: boolean;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 9;\n */\n createdAt?: Timestamp;\n\n /**\n * @generated from field: optional bool is_browser_downloadable = 10;\n */\n isBrowserDownloadable?: boolean;\n\n /**\n * @generated from field: optional string accent_color = 11;\n */\n accentColor?: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.Audiobook.\n * Use `create(AudiobookSchema)` to create a new message.\n */\nexport const AudiobookSchema: GenMessage<Audiobook> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 3);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobooksResponse\n */\nexport type GetAudiobooksResponse = Message<\"dashboard.audiobooks.v1.GetAudiobooksResponse\"> & {\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.Audiobook audiobooks = 1;\n */\n audiobooks: Audiobook[];\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobooksResponse.\n * Use `create(GetAudiobooksResponseSchema)` to create a new message.\n */\nexport const GetAudiobooksResponseSchema: GenMessage<GetAudiobooksResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 4);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookResponse\n */\nexport type GetAudiobookResponse = Message<\"dashboard.audiobooks.v1.GetAudiobookResponse\"> & {\n /**\n * @generated from field: optional dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n audiobook?: Audiobook;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookResponse.\n * Use `create(GetAudiobookResponseSchema)` to create a new message.\n */\nexport const GetAudiobookResponseSchema: GenMessage<GetAudiobookResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 5);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest\n */\nexport type CreateOrUpdateAudiobookRequest = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest\"> & {\n /**\n * @generated from field: dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n audiobook?: Audiobook;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest.\n * Use `create(CreateOrUpdateAudiobookRequestSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookRequestSchema: GenMessage<CreateOrUpdateAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 6);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse\n */\nexport type CreateOrUpdateAudiobookResponse = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result success = 1;\n */\n value: CreateOrUpdateAudiobookResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.\n * Use `create(CreateOrUpdateAudiobookResponseSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookResponseSchema: GenMessage<CreateOrUpdateAudiobookResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 7);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result\n */\nexport type CreateOrUpdateAudiobookResponse_Result = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result.\n * Use `create(CreateOrUpdateAudiobookResponse_ResultSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookResponse_ResultSchema: GenMessage<CreateOrUpdateAudiobookResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 7, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.DeleteAudiobookRequest\n */\nexport type DeleteAudiobookRequest = Message<\"dashboard.audiobooks.v1.DeleteAudiobookRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.DeleteAudiobookRequest.\n * Use `create(DeleteAudiobookRequestSchema)` to create a new message.\n */\nexport const DeleteAudiobookRequestSchema: GenMessage<DeleteAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 8);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest\n */\nexport type GetAudiobookAccessEmailsRequest = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest\"> & {\n /**\n * @generated from field: string audiobook_id = 1;\n */\n audiobookId: string;\n\n /**\n * @generated from field: optional string email = 2;\n */\n email?: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest.\n * Use `create(GetAudiobookAccessEmailsRequestSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsRequestSchema: GenMessage<GetAudiobookAccessEmailsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 9);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse\n */\nexport type GetAudiobookAccessEmailsResponse = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result success = 1;\n */\n value: GetAudiobookAccessEmailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.\n * Use `create(GetAudiobookAccessEmailsResponseSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponseSchema: GenMessage<GetAudiobookAccessEmailsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail\n */\nexport type GetAudiobookAccessEmailsResponse_AccessEmail = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 3;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail.\n * Use `create(GetAudiobookAccessEmailsResponse_AccessEmailSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponse_AccessEmailSchema: GenMessage<GetAudiobookAccessEmailsResponse_AccessEmail> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result\n */\nexport type GetAudiobookAccessEmailsResponse_Result = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail emails = 1;\n */\n emails: GetAudiobookAccessEmailsResponse_AccessEmail[];\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result.\n * Use `create(GetAudiobookAccessEmailsResponse_ResultSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponse_ResultSchema: GenMessage<GetAudiobookAccessEmailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10, 1);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateAudiobookAccessRequest\n */\nexport type CreateAudiobookAccessRequest = Message<\"dashboard.audiobooks.v1.CreateAudiobookAccessRequest\"> & {\n /**\n * @generated from field: string audiobook_id = 1;\n */\n audiobookId: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateAudiobookAccessRequest.\n * Use `create(CreateAudiobookAccessRequestSchema)` to create a new message.\n */\nexport const CreateAudiobookAccessRequestSchema: GenMessage<CreateAudiobookAccessRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 11);\n\n/**\n * @generated from message dashboard.audiobooks.v1.DeleteAudiobookAccessRequest\n */\nexport type DeleteAudiobookAccessRequest = Message<\"dashboard.audiobooks.v1.DeleteAudiobookAccessRequest\"> & {\n /**\n * @generated from field: string system_access_id = 1;\n */\n systemAccessId: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.DeleteAudiobookAccessRequest.\n * Use `create(DeleteAudiobookAccessRequestSchema)` to create a new message.\n */\nexport const DeleteAudiobookAccessRequestSchema: GenMessage<DeleteAudiobookAccessRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 12);\n\n/**\n * @generated from message dashboard.audiobooks.v1.BoolResponse\n */\nexport type BoolResponse = Message<\"dashboard.audiobooks.v1.BoolResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.BoolResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.BoolResponse.\n * Use `create(BoolResponseSchema)` to create a new message.\n */\nexport const BoolResponseSchema: GenMessage<BoolResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 13);\n\n/**\n * @generated from enum dashboard.audiobooks.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CHAPTER_NOT_FOUND = 2;\n */\n CHAPTER_NOT_FOUND = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_CHAPTER_FORMAT = 3;\n */\n INCORRECT_CHAPTER_FORMAT = 3,\n}\n\n/**\n * Describes the enum dashboard.audiobooks.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_audiobooks, 0);\n\n/**\n * @generated from service dashboard.audiobooks.v1.AudiobooksService\n */\nexport const AudiobooksService: GenService<{\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobooks\n */\n getAudiobooks: {\n methodKind: \"unary\";\n input: typeof GetAudiobooksRequestSchema;\n output: typeof GetAudiobooksResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobook\n */\n getAudiobook: {\n methodKind: \"unary\";\n input: typeof GetAudiobookRequestSchema;\n output: typeof GetAudiobookResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.CreateOrUpdateAudiobook\n */\n createOrUpdateAudiobook: {\n methodKind: \"unary\";\n input: typeof CreateOrUpdateAudiobookRequestSchema;\n output: typeof CreateOrUpdateAudiobookResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.DeleteAudiobook\n */\n deleteAudiobook: {\n methodKind: \"unary\";\n input: typeof DeleteAudiobookRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobookAccessEmails\n */\n getAudiobookAccessEmails: {\n methodKind: \"unary\";\n input: typeof GetAudiobookAccessEmailsRequestSchema;\n output: typeof GetAudiobookAccessEmailsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.CreateAudiobookAccess\n */\n createAudiobookAccess: {\n methodKind: \"unary\";\n input: typeof CreateAudiobookAccessRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.DeleteAudiobookAccess\n */\n deleteAudiobookAccess: {\n methodKind: \"unary\";\n input: typeof DeleteAudiobookAccessRequestSchema;\n output: typeof BoolResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_dashboard_v1_audiobooks, 0);\n\n","import { create } from \"@bufbuild/protobuf\";\nimport { createContext, useContext } from \"react\";\nimport { QueryClient, QueryClientProvider } from \"react-query\";\nimport {\n AddressSchema,\n BillingAddressSchema,\n} from \"src/gen/proto/common/v1/address_pb\";\nimport {\n GetPreOrderDetailsRequestSchema,\n OneClickAuthorizePaymentRequest_Gateway,\n PreOrderItemSchema,\n} from \"src/gen/proto/public/v1/public_api_pb\";\nimport { PublicApiClient } from \"src/public.api.client\";\nimport zod from \"zod\";\nimport { HOST, setCustomHost } from \"./constants\";\nimport { buildURL } from \"./helper.methods\";\nimport { Err, isErr } from \"./lib/err\";\nimport { formatCurrency, round } from \"./lib/round.number\";\nimport { LinkRequest } from \"./link.request.schema\";\nimport { createPaymentURL, getReferenceIfPossible, injectReferenceToRequestIfNeeded } from \"./methods\";\nimport { SingleProduct } from \"./product.details.model\";\nimport { mapGooglePayConfiguration } from \"./google.pay.mapper\";\n\nexport const MARKETING_AGREEMENT_ID = \"__m_a\";\n\ntype CartProduct = {\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n}\n\nexport interface CartMethods {\n checkIfApplePayIsAvailable(): Promise<boolean>;\n getGooglePayConfiguration(args: { items: CartProduct[] }): Promise<{\n isAvailable: true;\n config: google.payments.api.PaymentDataRequest;\n } | {\n isAvailable: false;\n }>;\n\n addProduct(args: CartProduct): Promise<Err | void>;\n\n getProducts: () => Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details?: SingleProduct;\n }[]\n >;\n\n updateQuantity(args: { id: string; quantity: number }): Promise<Err | void>;\n\n removeProductFromCart: (args: { id: string }) => Promise<Err | void>;\n\n clearCart: () => Promise<Err | void>;\n\n getNumberOfElementsInCart: () => Promise<number>;\n\n setCouponCodeIfPossible: (couponCode?: string) => Promise<Err | void>;\n setDeliveryMethod: (deliveryMethod?: string) => Promise<Err | void>;\n setPostalCode: (postalCode?: string) => Promise<Err | void>;\n setEmail: (email?: string) => Promise<Err | void>;\n setCountry: (country: string) => Promise<Err | void>;\n getCountry: () => Promise<Err | string>;\n getAvailableCountries: () => Promise<Err | { name: string; code: string }[]>;\n\n redirectToNextStep: () => Promise<Err | { url: string }>;\n\n getApplePayPaymentRequest: (args?: { expectedItems?: CartProduct[]; }) => Promise<\n Err | ApplePayJS.ApplePayPaymentRequest\n >;\n completeApplePayPayment: (args: {\n token: ApplePayJS.ApplePayPaymentToken;\n shippingContact?: ApplePayJS.ApplePayPaymentContact;\n billingContact?: ApplePayJS.ApplePayPaymentContact;\n }) => Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n >;\n completeGooglePayPayment: (args: {\n paymentData: google.payments.api.PaymentData\n }) => Promise<Err | {\n isSuccess: boolean;\n redirectURL?: string;\n }>;\n\n justRedirectToPayment: (args: {\n email?: string;\n productID: string;\n name?: string;\n country?: string;\n marketingAgreement?: boolean;\n }) => Promise<\n | Err\n | {\n url: string;\n }\n >;\n}\n\nconst CartProviderContext = createContext<CartMethods | undefined>(undefined);\n\nexport var bitsnapProjectID: string | undefined = undefined;\nexport function setProjectID(projectID: string) {\n bitsnapProjectID = projectID;\n}\n\nexport function getProjectID(): string | undefined {\n if (bitsnapProjectID != null) {\n return bitsnapProjectID;\n }\n const me = document.querySelector(\n 'script[data-id][data-name=\"internal-cart\"]',\n );\n const projectID = me?.getAttribute(\"data-id\");\n return projectID ?? undefined;\n}\n\nfunction getNewHostIfExist(): string | undefined {\n const me = document.querySelector(\n 'script[data-id][data-name=\"internal-cart\"]',\n );\n const customHost = me?.getAttribute(\"data-custom-host\");\n return customHost ?? undefined;\n}\n\nconst CartProvider = ({ children }: { children: React.ReactNode }) => {\n const queryClient = new QueryClient();\n\n const projectID = getProjectID();\n if (projectID == null) {\n return <></>;\n }\n\n const checkoutMethods = getCheckoutMethods(projectID);\n\n return (\n <QueryClientProvider client={queryClient}>\n <CartProviderContext.Provider value={checkoutMethods}>\n {children}\n </CartProviderContext.Provider>\n </QueryClientProvider>\n );\n};\n\n// @ts-ignore\nconst getProducts: (projectID: string) => Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details?: SingleProduct;\n }[]\n> = async (projectID: string) => {\n const products = getCheckout()?.products ?? [];\n\n const productIds = Array.from(\n new Set(products.map((product) => product.productID)),\n );\n\n const params = new URLSearchParams();\n params.set(\"ids\", productIds.join(\",\"));\n\n const result = await fetch(\n buildURL(projectID, `/products?${params.toString()}`),\n {\n method: \"GET\",\n },\n );\n\n if (result.status != 200) {\n return [];\n }\n\n const payload: {\n success: boolean;\n message?: string | undefined;\n result?: SingleProduct[] | undefined;\n } = await result.json();\n\n products.forEach((product) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n product[\"details\"] = payload.result?.find((el) => {\n if (el.id === product.productID) {\n return true;\n }\n if (el.variants != null && el.variants.length > 0) {\n const index = el.variants.findIndex(\n (variant) => variant.id === product.productID,\n );\n return index !== -1;\n }\n return false;\n });\n });\n\n // @ts-ignore\n return products\n .filter((el) => \"details\" in el)\n .map((el) => {\n el.details = resolveProductDetailsFromSingleProduct(\n el.productID,\n el.details as SingleProduct,\n );\n return el;\n });\n};\n\nexport const useCartProvider = () => {\n const context = useContext(CartProviderContext);\n\n if (context === undefined) {\n throw new Error(\"useCartProvider must be used within a CartProvider\");\n }\n\n return context;\n};\n\nexport default CartProvider;\n\nconst googlePayConfigSchema = zod.object({\n isAvailable: zod.boolean(),\n merchantId: zod.string(),\n merchantName: zod.string(),\n gateway: zod.string(),\n gatewayId: zod.string(),\n});\nconst checkoutSchema = zod.object({\n country: zod.string().optional(),\n couponCode: zod.string().optional(),\n selectedDeliveryMethod: zod.string().optional(),\n postalCode: zod.string().optional(),\n email: zod.string().optional(),\n products: zod\n .array(\n zod.object({\n id: zod.string(),\n productID: zod.string(),\n quantity: zod.number(),\n metadata: zod.record(zod.string(), zod.string().optional()).optional(),\n }),\n )\n .optional(),\n googlePayConfig: googlePayConfigSchema.optional(),\n});\nexport type GooglePayConfig = zod.infer<typeof googlePayConfigSchema>;\nconst emptyCheckout: Checkout = {\n country: undefined,\n couponCode: undefined,\n email: undefined,\n selectedDeliveryMethod: undefined,\n postalCode: undefined,\n products: [],\n googlePayConfig: undefined,\n};\nexport type Checkout = zod.infer<typeof checkoutSchema>;\n\nconst checkoutKey = \"checkout\";\n\nfunction getCheckout(): Checkout {\n try {\n const value = localStorage.getItem(checkoutKey);\n if (value == null) {\n return emptyCheckout;\n }\n return checkoutSchema.parse(JSON.parse(value));\n } catch (e) {\n return emptyCheckout;\n }\n}\n\nfunction addProducts(products: CartProduct[]) {\n const checkout = getCheckout();\n if (checkout.products == null) {\n checkout.products = [];\n }\n checkout.products.push(...products.map(el => ({\n id: Math.random().toString(36).substring(7),\n productID: el.productID,\n quantity: el.quantity,\n metadata: el.metadata,\n })));\n saveCheckout(checkout);\n}\n\nfunction removeProductFromCheckout(ids: string[]) {\n const checkout = getCheckout();\n const newCheckout = {\n ...checkout,\n products: checkout?.products?.filter(\n (product) => !ids.includes(product.productID) && !ids.includes(product.id),\n ),\n };\n saveCheckout(newCheckout);\n}\n\nfunction saveCheckout(model: Checkout) {\n localStorage.setItem(checkoutKey, JSON.stringify(model));\n}\n\nexport const getCheckoutMethods: (projectID: string) => CartMethods = (\n projectID,\n) => {\n const newHost = getNewHostIfExist();\n if (newHost != null) {\n setCustomHost(newHost);\n }\n return {\n async checkIfApplePayIsAvailable(): Promise<boolean> {\n if (typeof window == \"undefined\" || typeof document == 'undefined') {\n return false;\n }\n if (\"ApplePaySession\" in window === false) {\n return false;\n }\n\n try {\n const result = await PublicApiClient.get(HOST).isOneClickPaymentAvailable({\n projectId: projectID,\n });\n\n return result.applePay;\n } catch (e) {\n console.error(\"Error checking if Apple Pay is available\", e);\n return false;\n }\n },\n async getGooglePayConfiguration(args: { items: CartProduct[] }): Promise<{\n isAvailable: true;\n config: google.payments.api.PaymentDataRequest;\n } | {\n isAvailable: false;\n }> {\n if (typeof window == \"undefined\" || typeof document == 'undefined') {\n return {\n isAvailable: false,\n }\n }\n\n try {\n const googlePayConfig = await resolveGooglePayConfiguration(projectID);\n if (googlePayConfig?.isAvailable != true) {\n return {\n isAvailable: false,\n }\n }\n\n const checkout = getCheckout();\n if (checkout == null) {\n console.log('checkout is null');\n return {\n isAvailable: false,\n }\n }\n if (args && args.items != null && args.items.length > 0) {\n if (checkout.products) {\n removeProductFromCheckout(checkout.products.map(el => el.productID));\n }\n addProducts(args.items);\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return {\n isAvailable: false,\n };\n }\n const result = await PublicApiClient.get(HOST).getPreOrderDetails({\n items: products.map((el) =>\n create(PreOrderItemSchema, { id: el.productID, quantity: el.quantity }),\n ),\n projectId: projectID,\n // we can detect 5 the closest inpost pickup point based on shipping address.\n postCode: checkout.postalCode,\n couponCode: checkout.couponCode,\n countryCode: checkout.country,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n });\n if (result.totalAmount == null) {\n return {\n isAvailable: false,\n }\n }\n const cartRequiresShipping = products.find(el => el.details?.isDeliverable == true) != null;\n\n const mappedPaymentRequest = await mapGooglePayConfiguration({\n items: products,\n googlePayConfig: googlePayConfig,\n checkout: checkout,\n cartRequiresShipping: cartRequiresShipping,\n result: result,\n });\n if (mappedPaymentRequest == null) {\n return {\n isAvailable: false,\n }\n }\n\n return {\n isAvailable: true,\n config: mappedPaymentRequest,\n }\n } catch (e) {\n console.error(\"Error resolving Google Pay configuration\", e);\n return {\n isAvailable: false,\n }\n }\n },\n async clearCart(): Promise<Err | void> {\n const empty = structuredClone(emptyCheckout);\n empty.country = getCheckout()?.country;\n saveCheckout(empty);\n },\n\n async getAvailableCountries(): Promise<\n Err | { name: string; code: string }[]\n > {\n const result = await fetch(buildURL(projectID, \"/countries\"), {\n method: \"GET\",\n });\n\n if (result.status != 200) {\n return [];\n }\n\n try {\n return zod\n .array(\n zod.object({\n name: zod.string(),\n code: zod.string(),\n }),\n )\n .parse(await result.json());\n } catch (e) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n return Err(e.toString(), \"internal\");\n }\n },\n\n async getCountry(): Promise<Err | string> {\n let country = getCheckout()?.country;\n if (country == null) {\n country = \"PL\";\n const checkout = getCheckout();\n checkout.country = country;\n saveCheckout(checkout);\n }\n\n return country;\n },\n\n async getNumberOfElementsInCart(): Promise<number> {\n return (\n getCheckout()?.products?.reduce(\n (acc, product) => acc + product.quantity,\n 0,\n ) ?? 0\n );\n },\n\n async getProducts(): Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [p: string]: string | undefined\n };\n details?: SingleProduct;\n }[]\n > {\n return await getProducts(projectID);\n },\n\n async removeProductFromCart(args: { id: string }): Promise<Err | void> {\n return removeProductFromCheckout([args.id]);\n },\n\n async setCountry(country: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.country = country;\n saveCheckout(checkout);\n },\n\n async setCouponCodeIfPossible(couponCode?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.couponCode = couponCode;\n saveCheckout(checkout);\n },\n\n async setPostalCode(postalCode?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.postalCode = postalCode;\n saveCheckout(checkout);\n },\n\n async setDeliveryMethod(deliveryMethod?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.selectedDeliveryMethod = deliveryMethod;\n saveCheckout(checkout);\n },\n\n async setEmail(email?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.email = email;\n saveCheckout(checkout);\n },\n\n async addProduct(args: CartProduct): Promise<Err | void> {\n return addProducts([args]);\n },\n\n async updateQuantity(args: {\n id: string;\n quantity: number;\n }): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.products = checkout.products?.map((product) => {\n if (product.id === args.id) {\n product.quantity = args.quantity;\n }\n return product;\n });\n saveCheckout(checkout);\n },\n\n async redirectToNextStep(): Promise<Err | { url: string }> {\n const checkout = getCheckout();\n\n if (checkout.products == null || checkout.products.length == 0) {\n return Err(\"cart-is-empty\", \"badInput\");\n }\n const mergedMetadata = checkout.products.reduce(\n (acc, product) => {\n if (product.metadata != null) {\n Object.keys(product.metadata).forEach((key) => {\n const value = product.metadata?.[key];\n if (value != null) {\n acc[key] = value;\n }\n });\n }\n return acc;\n },\n {} as Record<string, string>,\n );\n\n const payload: LinkRequest = {\n items: checkout.products.map((el) => {\n return {\n id: el.productID,\n quantity: el.quantity,\n };\n }),\n askForNote: true,\n countries: checkout.country ? [checkout.country] : undefined,\n metadata: mergedMetadata,\n };\n\n const paymentResponse = await createPaymentURL(payload);\n\n if (isErr(paymentResponse)) {\n console.warn(\"cannot create payment URL\", paymentResponse.error);\n return paymentResponse;\n }\n\n return {\n url: paymentResponse.url,\n };\n },\n\n async justRedirectToPayment(args: {\n email?: string;\n productID: string;\n name?: string;\n country?: string;\n marketingAgreement?: boolean;\n }): Promise<Err | { url: string }> {\n let payload: LinkRequest = {\n items: [\n {\n id: args.productID,\n quantity: 1,\n },\n ],\n askForNote: false,\n details:\n args.email || args.name\n ? {\n name: args.name,\n email: args.email,\n }\n : undefined,\n };\n\n payload = injectReferenceToRequestIfNeeded(payload);\n\n if (args.country == null) {\n args.country = \"pl\";\n }\n\n if (payload.details == null) {\n payload.details = {};\n }\n if (payload.details.address == null) {\n payload.details.address = {};\n }\n payload.details.address.country = args.country;\n\n if (args.marketingAgreement === true) {\n payload.additionalAgreements = [\n {\n id: MARKETING_AGREEMENT_ID,\n name: \"\",\n required: true,\n answer: true,\n },\n ];\n }\n\n const result = await fetch(buildURL(projectID, \"/buy\"), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(payload),\n });\n console.log(\"CODE\", result.status);\n\n if (result.status != 200) {\n console.warn(\n \"result\",\n await result.text(),\n result.status,\n result.statusText,\n );\n return Err(\"internal-error\", \"internal\");\n }\n\n const response: { url: string; sessionID: string } = await result.json();\n\n console.log(response.url);\n return {\n url: response.url,\n };\n },\n\n async completeApplePayPayment(args: {\n token: ApplePayJS.ApplePayPaymentToken;\n shippingContact?: ApplePayJS.ApplePayPaymentContact;\n billingContact?: ApplePayJS.ApplePayPaymentContact;\n }): Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n > {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return products;\n }\n\n try {\n let shippingName = args.shippingContact?.givenName;\n if (args.shippingContact?.familyName != null) {\n shippingName += ' ' + args.shippingContact?.familyName;\n } else if (args.billingContact?.familyName != null) {\n shippingName += ' ' + args.billingContact?.familyName;\n }\n\n let metadata: Record<string, string> = {};\n\n const ref = getReferenceIfPossible();\n if (ref != null) {\n metadata[\"ref\"] = ref;\n }\n\n const result = await PublicApiClient.get(HOST).authorizeOneClickPayment(\n {\n gateway: OneClickAuthorizePaymentRequest_Gateway.APPLE_PAY,\n paymentData: JSON.stringify(args.token.paymentData),\n paymentMethod: JSON.stringify(args.token.paymentMethod),\n transactionIdentifier: args.token.transactionIdentifier,\n order: create(GetPreOrderDetailsRequestSchema, {\n items: products.map((el) => ({\n id: el.productID,\n quantity: el.quantity,\n })),\n couponCode: checkout.couponCode,\n email: args.shippingContact?.emailAddress ?? args.billingContact?.emailAddress ?? checkout.email ?? undefined,\n phone: args.shippingContact?.phoneNumber ?? args.billingContact?.phoneNumber ?? undefined,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n postCode: checkout.postalCode,\n projectId: projectID,\n }),\n shippingAddress: create(AddressSchema, {\n line1: args.shippingContact?.addressLines?.[0] ?? \"\",\n city: args.shippingContact?.locality ?? \"\",\n country: args.shippingContact?.countryCode ?? \"\",\n zipCode: args.shippingContact?.postalCode ?? \"\",\n name: shippingName,\n }),\n billingAddress: create(BillingAddressSchema, {\n name: args.billingContact?.givenName ?? '' + ' ' + (args.billingContact?.familyName ?? ''),\n line1: args.billingContact?.addressLines?.[0] ?? \"\",\n city: args.billingContact?.locality ?? \"\",\n country: args.billingContact?.countryCode ?? \"\",\n zipCode: args.billingContact?.postalCode ?? \"\",\n }),\n metadata: Object.keys(metadata).length > 0 ? JSON.stringify(metadata) : undefined,\n },\n );\n\n return {\n isSuccess: result.isSuccess,\n redirectURL: result.redirectUrl,\n };\n } catch (error) {\n console.error(error);\n return Err(\"Failed to authorize payment\");\n }\n },\n\n async completeGooglePayPayment(args: {\n paymentData: google.payments.api.PaymentData\n }): Promise<Err | {\n isSuccess: boolean;\n redirectURL?: string;\n }> {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return products;\n }\n\n try {\n let shippingName = args.paymentData.shippingAddress?.name;\n\n let metadata: Record<string, string> = {};\n\n const ref = getReferenceIfPossible();\n if (ref != null) {\n metadata[\"ref\"] = ref;\n }\n\n const result = await PublicApiClient.get(HOST).authorizeOneClickPayment(\n {\n gateway: OneClickAuthorizePaymentRequest_Gateway.GOOGLE_PAY,\n paymentData: args.paymentData.paymentMethodData.tokenizationData.token,\n paymentMethod: args.paymentData.paymentMethodData.type,\n transactionIdentifier: '',\n order: create(GetPreOrderDetailsRequestSchema, {\n items: products.map((el) => ({\n id: el.productID,\n quantity: el.quantity,\n })),\n couponCode: checkout.couponCode,\n email: args.paymentData.email ?? undefined,\n phone: args.paymentData.shippingAddress?.phoneNumber ?? undefined,\n selectedDeliveryMethod: args.paymentData.shippingOptionData?.id ?? checkout.selectedDeliveryMethod,\n postCode: args.paymentData.shippingAddress?.postalCode,\n projectId: projectID,\n }),\n shippingAddress: create(AddressSchema, {\n line1: args.paymentData.shippingAddress?.address1 ?? \"\",\n city: args.paymentData.shippingAddress?.locality ?? \"\",\n country: args.paymentData.shippingAddress?.countryCode ?? \"\",\n zipCode: args.paymentData.shippingAddress?.postalCode ?? \"\",\n name: shippingName,\n }),\n billingAddress: create(BillingAddressSchema, {\n name: args.paymentData.paymentMethodData.info?.billingAddress?.name,\n line1: args.paymentData.paymentMethodData.info?.billingAddress?.address1 ?? \"\",\n city: args.paymentData.paymentMethodData.info?.billingAddress?.locality ?? \"\",\n country: args.paymentData.paymentMethodData.info?.billingAddress?.countryCode ?? \"\",\n zipCode: args.paymentData.paymentMethodData.info?.billingAddress?.postalCode ?? \"\",\n }),\n metadata: Object.keys(metadata).length > 0 ? JSON.stringify(metadata) : undefined,\n },\n );\n\n return {\n isSuccess: result.isSuccess,\n redirectURL: result.redirectUrl,\n };\n } catch (error) {\n console.error(error);\n return Err(\"Failed to authorize payment\");\n }\n\n return {\n isSuccess: true,\n }\n },\n\n async getApplePayPaymentRequest(args?: { expectedItems?: CartProduct[]; }): Promise<\n Err | ApplePayJS.ApplePayPaymentRequest\n > {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n if (args && args.expectedItems != null && args.expectedItems.length > 0) {\n if (checkout.products) {\n removeProductFromCheckout(checkout.products.map(el => el.productID));\n }\n addProducts(args.expectedItems);\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return products;\n }\n\n const result = await PublicApiClient.get(HOST).getPreOrderDetails({\n items: products.map((el) =>\n create(PreOrderItemSchema, { id: el.productID, quantity: el.quantity }),\n ),\n projectId: projectID,\n // we can detect 5 the closest inpost pickup point based on shipping address.\n postCode: checkout.postalCode,\n couponCode: checkout.couponCode,\n countryCode: checkout.country,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n });\n\n const items = products.map((el) => {\n return {\n amount: `${round((el.quantity * (el.details?.price ?? 0)) / 100, 2)}`,\n label: el.details?.name + \" - \" + el.quantity,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n };\n });\n\n if (result.selectedDeliveryMethod != null) {\n const deliveryMethod = result.methods.find(el => el.id == result.selectedDeliveryMethod);\n if (deliveryMethod != null) {\n items.push({\n amount: `${round(deliveryMethod.amount / 100, 2)}`,\n label: deliveryMethod.name,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n })\n }\n }\n\n if (result.couponCode != null && result.couponValue != null) {\n items.push({\n amount: `-${round(result.couponValue / 100, 2)}`,\n label: result.couponCode,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n });\n }\n\n return {\n countryCode: checkout.country ?? \"PL\",\n merchantCapabilities: [\n \"supports3DS\",\n \"supportsCredit\",\n \"supportsDebit\",\n ],\n supportedNetworks: [\"visa\", \"masterCard\"],\n total: {\n amount: `${round(((result.totalAmount ?? 0) / 100), 2)}`,\n label: \"Płatność za koszyk\",\n type: \"final\",\n },\n shippingMethods: result.methods.map((el) => ({\n amount: `${round(el.amount / 100, 2)}`,\n detail: el.description ?? \"\",\n identifier: el.id,\n label: el.name,\n dateComponentsRange: {\n startDateComponents: {\n days: el.minDays ?? 1,\n hours: 0,\n months: 0,\n years: 0,\n } satisfies ApplePayJS.ApplePayDateComponents,\n endDateComponents: {\n days: el.maxDays ?? 14,\n hours: 0,\n months: 0,\n years: 0,\n } satisfies ApplePayJS.ApplePayDateComponents,\n },\n })),\n lineItems: items,\n currencyCode: \"PLN\",\n };\n },\n };\n};\n\nasync function resolveGooglePayConfiguration(projectID: string) {\n const checkout = getCheckout();\n if (checkout.googlePayConfig?.isAvailable != true) {\n const result = await PublicApiClient.get(HOST).isOneClickPaymentAvailable({\n projectId: projectID,\n });\n if (result.googlePay == true && result.googlePayConfig != null) {\n checkout.googlePayConfig = {\n isAvailable: true,\n gateway: result.googlePayConfig.gateway,\n gatewayId: result.googlePayConfig.gatewayMerchantId,\n merchantName: result.googlePayConfig.merchantName,\n merchantId: result.googlePayConfig.merchantId,\n }\n } else {\n checkout.googlePayConfig = {\n isAvailable: false,\n gateway: '',\n gatewayId: '',\n merchantName: '',\n merchantId: '',\n }\n }\n }\n saveCheckout(checkout);\n return checkout.googlePayConfig;\n}\n\nfunction resolveProductDetailsFromSingleProduct(\n id: string,\n product: SingleProduct,\n) {\n if (id == product.id) {\n const variantIndex = product.variants?.findIndex((v) => v.id === id);\n if (variantIndex != null && variantIndex != -1) {\n const variant = product.variants![variantIndex];\n return {\n ...product,\n availableQuantity: variant.availableQuantity,\n isDeliverable: variant.isDeliverable,\n images: variant.images ?? product.images,\n name: product.name + \" \" + variant.name,\n price: variant.price,\n currency: variant.currency\n }\n }\n return product;\n }\n\n const variant = product.variants?.find((v) => v.id === id);\n if (variant == null) {\n return product;\n }\n\n return {\n ...product,\n id: variant.id,\n name: product.name + \" \" + variant.name,\n price: variant.price,\n currency: variant.currency,\n metadata: product.metadata,\n availableQuantity: variant.availableQuantity,\n isDeliverable: variant.isDeliverable,\n images: variant.images ?? product.images,\n };\n}\n\ntype ApplePaySessionArgs = {\n postCode?: string;\n email?: string;\n couponCode?: string;\n};\n","export let HOST = \"https://bitsnap.pl\";\n\nexport function setCustomHost(host: string) {\n HOST = host;\n}\n","import { HOST } from \"./constants\";\n\nexport function buildURL(projectID: string, path: string): string {\n return `${HOST}/api/integrations/${projectID}/public-commerce${path}`;\n}\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport type Err = {\n ERR: true\n error: unknown\n type?: ErrTypes\n}\n\ntype ErrTypes = 'internal' | 'badInput' | 'notFound';\n\nexport function isErr(x: unknown): x is Err {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return typeof x === 'object' && x != null && 'ERR' in x;\n}\n\nexport function Err(message: string, type?: ErrTypes): Err {\n return { ERR: true, error: message, type: type }\n}\n\nexport async function tryFail<T>(\n f: (() => Promise<T>) | (() => T)\n): Promise<T | Err> {\n try {\n return await f()\n } catch (e) {\n return { ERR: true, error: e }\n }\n}\n\nexport function assertOk<T>(x: T | Err) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isErr(x)) throw Error((x.error as any).toString());\n}\n","export function round(num: number, numberOfDecimals: number = 2): number {\n return Number(\n +(\n Math.round(Number(num + \"e+\" + numberOfDecimals)) +\n \"e-\" +\n numberOfDecimals\n )\n );\n}\n\nexport function formatCurrency(amount: number, currency: string): string {\n const formatter = Intl.NumberFormat(navigator.language, {\n style: \"currency\",\n currency: currency,\n currencyDisplay: 'symbol',\n });\n\n return formatter.format(amount / 100);\n}","import { create } from 'zustand';\n\ninterface CheckoutStore {\n isCartVisible: boolean;\n numberOfProductsInCart: number;\n showCart: () => void;\n hideCart: () => void;\n setNumberOfProductsInCart: (numberOfProductsInCart: number) => void;\n}\n\nexport const useCheckoutStore = create<CheckoutStore>((set) => ({\n isCartVisible: false,\n numberOfProductsInCart: 2,\n showCart: () => set((state) => ({ ...state, isCartVisible: true })),\n hideCart: () => set((state) => ({ ...state, isCartVisible: false })),\n setNumberOfProductsInCart: (numberOfProductsInCart: number) => set((state) => ({ ...state, numberOfProductsInCart: numberOfProductsInCart })),\n}))\n","import { getCheckoutMethods, getProjectID } from \"./CartProvider\";\nimport { HOST } from \"./constants\";\nimport { buildURL } from \"./helper.methods\";\nimport { Err } from \"./lib/err\";\nimport { LinkRequest } from \"./link.request.schema\";\nimport { useCheckoutStore } from \"./state\";\n\nexport namespace Bitsnap {\n export async function addProductToCart(\n id: string,\n quantity: number = 1,\n metadata?: Record<string, string | undefined>,\n ) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n const methods = getCheckoutMethods(projectID);\n\n const err = await methods.addProduct({\n productID: id,\n quantity: quantity,\n metadata: metadata,\n });\n if (err != null) {\n return err;\n }\n\n return undefined;\n }\n\n export function showCart() {\n useCheckoutStore.setState({ isCartVisible: true });\n }\n\n export function hideCart() {\n useCheckoutStore.setState({ isCartVisible: false });\n }\n}\n\nexport async function createPaymentURL(request: LinkRequest) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n request = injectReferenceToRequestIfNeeded(request);\n\n const result = await fetch(buildURL(projectID, \"/buy\"), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(request),\n });\n\n if (result.status != 200) {\n console.warn(\n \"result\",\n await result.text(),\n result.status,\n result.statusText,\n );\n return Err(\"internal-error\", \"internal\");\n }\n\n const response: { url: string; sessionID: string } = await result.json();\n\n return {\n url: response.url,\n };\n}\n\nexport async function createCheckout(\n request: LinkRequest & { apiKey?: string; testMode?: boolean },\n) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n const headers = {\n \"Content-Type\": \"application/json\",\n ...(request.apiKey != null\n ? { Authorization: `Bearer ${request.apiKey}` }\n : {}),\n };\n\n const path = request.testMode\n ? `/api/payment/link/auto/${projectID}/test`\n : `/api/payment/link/auto/${projectID}`;\n\n delete request.apiKey;\n delete request.testMode;\n\n const response = await fetch(HOST + path, {\n method: \"POST\",\n headers,\n body: JSON.stringify(request),\n });\n\n const payload: {\n url: string;\n } = await response.json();\n\n return {\n status: \"ok\",\n redirectURL: payload.url,\n };\n}\n\nexport function getReferenceIfPossible(): string | undefined {\n if (typeof localStorage == \"undefined\") {\n return undefined;\n }\n const refLink = localStorage.getItem(\"bitsnap-ref\");\n if (refLink == null) {\n return undefined;\n }\n return refLink;\n}\n\nexport function injectReferenceToRequestIfNeeded(\n request: LinkRequest,\n): LinkRequest {\n const ref = getReferenceIfPossible();\n if (ref == null) {\n return request;\n }\n\n if (request.metadata == null) {\n request.metadata = {};\n }\n request.metadata[\"ref\"] = ref;\n return request;\n}\n","import { GetPreOrderDetailsResponse } from \"src/gen/proto/public/v1/public_api_pb\";\nimport { Checkout, GooglePayConfig } from \"./CartProvider\";\nimport { formatCurrency, round } from \"./lib/round.number\";\nimport { SingleProduct } from \"./product.details.model\";\n\nexport function mapGooglePayConfiguration(args: {\n items: {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [key: string]: string | undefined;\n };\n details?: SingleProduct;\n }[];\n googlePayConfig: GooglePayConfig;\n checkout: Checkout;\n result: GetPreOrderDetailsResponse;\n cartRequiresShipping: boolean;\n}): google.payments.api.PaymentDataRequest | undefined {\n const { items, googlePayConfig, checkout, result, cartRequiresShipping } = args;\n if (result.totalAmount == null) {\n return undefined;\n }\n let intents: google.payments.api.CallbackIntent[] = [];\n if (cartRequiresShipping) {\n intents.push('SHIPPING_ADDRESS');\n intents.push('SHIPPING_OPTION');\n }\n\n const returnValue: google.payments.api.PaymentDataRequest = {\n apiVersion: 2,\n apiVersionMinor: 0,\n callbackIntents: intents,\n allowedPaymentMethods: [\n {\n type: 'CARD',\n parameters: {\n allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],\n allowedCardNetworks: ['MASTERCARD', 'VISA'],\n },\n tokenizationSpecification: {\n type: 'PAYMENT_GATEWAY',\n parameters: {\n gateway: googlePayConfig.gateway,\n gatewayMerchantId: googlePayConfig.gatewayId,\n },\n },\n },\n ],\n emailRequired: true,\n shippingAddressParameters: {\n phoneNumberRequired: cartRequiresShipping,\n },\n shippingAddressRequired: cartRequiresShipping,\n shippingOptionRequired: cartRequiresShipping,\n shippingOptionParameters: cartRequiresShipping ? {\n shippingOptions: result.methods.slice(0, 5).map(method => ({\n id: method.id,\n label: method.name + ' - ' + `${formatCurrency(method.amount, result.currency)}`,\n description: (method.description ?? ''),\n })),\n defaultSelectedOptionId: result.selectedDeliveryMethod,\n } : undefined,\n merchantInfo: {\n merchantId: googlePayConfig.merchantId + '',\n merchantName: googlePayConfig.merchantName,\n },\n transactionInfo: {\n totalPriceStatus: 'FINAL',\n totalPriceLabel: 'Płatność za koszyk',\n totalPrice: `${round(result.totalAmount / 100, 2)}`,\n currencyCode: result.currency,\n countryCode: result.country,\n checkoutOption: 'COMPLETE_IMMEDIATE_PURCHASE',\n displayItems: mapGooglePayDisplayItems(items, result.methods, result.selectedDeliveryMethod ?? (result.methods.length > 0 ? result.methods[0].id : undefined), checkout.couponCode, result.couponValue),\n },\n }\n console.log('returnValue', returnValue);\n return returnValue;\n}\n\nfunction mapGooglePayDisplayItems(items: {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [key: string]: string | undefined;\n };\n details?: SingleProduct;\n}[], methods: GetPreOrderDetailsResponse['methods'], deliveryMethod?: string, couponCode?: string, couponValue?: number): google.payments.api.DisplayItem[] {\n\n const displayItems: google.payments.api.DisplayItem[] = [];\n\n let subtotalAmount = 0;\n for (const item of items) {\n if (item.details == null) {\n continue;\n }\n subtotalAmount += item.details.price * item.quantity;\n displayItems.push({\n label: item.details.name + ' x ' + item.quantity,\n price: `${round((item.details.price) / 100, 2)}`,\n type: 'LINE_ITEM',\n status: 'FINAL',\n });\n }\n\n const selectedDeliveryMethod = methods.find(method => method.id === deliveryMethod);\n if (selectedDeliveryMethod != null) {\n displayItems.push({\n label: selectedDeliveryMethod.name,\n price: `${round(selectedDeliveryMethod.amount / 100, 2)}`,\n type: 'SHIPPING_OPTION',\n status: 'FINAL',\n });\n }\n\n if (couponCode != null && couponValue != null) {\n displayItems.push({\n label: `Kupon ${couponCode}`,\n price: `${round(couponValue / 100, 2)}`,\n type: 'DISCOUNT',\n status: 'FINAL',\n });\n }\n if (subtotalAmount > 0) {\n displayItems.push({\n label: 'Subtotal',\n price: `${round(subtotalAmount / 100, 2)}`,\n type: 'SUBTOTAL',\n status: 'FINAL',\n });\n }\n\n return displayItems;\n}","import GooglePayButton from '@google-pay/button-react';\nimport CartProvider, { getProjectID, useCartProvider } from \"./CartProvider\";\nimport { useMutation, useQuery } from \"react-query\";\nimport { isErr } from './lib/err';\n\ntype Props = {\n test?: boolean;\n buttonSizeMode?: 'static' | 'fill';\n buttonColor?: 'white' | 'black';\n style?: {\n width?: string;\n };\n items: { name: string; id: string; price: number; quantity: number; isDeliverable?: boolean; metadata?: { [key: string]: string | undefined } }[];\n};\n\nfunction GooglePayButtonComponent({ items, style, buttonColor, buttonSizeMode, test }: Props) {\n const {\n getGooglePayConfiguration,\n completeGooglePayPayment,\n setCountry,\n setCouponCodeIfPossible,\n setDeliveryMethod,\n setEmail,\n setPostalCode,\n clearCart,\n } = useCartProvider();\n const { data: googlePayConfiguration } = useQuery([\"get-google-pay-configuration\", items.map(el => el.id).join(',')], () => getGooglePayConfiguration({\n items: items.map(el => ({\n ...el,\n id: undefined,\n productID: el.id,\n }))\n }));\n const { mutateAsync: completeGooglePayPaymentAsync, isLoading } = useMutation(completeGooglePayPayment);\n if (googlePayConfiguration == null || googlePayConfiguration.isAvailable != true) {\n console.log('google pay configuration is not available', googlePayConfiguration);\n return null;\n }\n\n return (\n <>\n <GooglePayButton\n buttonSizeMode={buttonSizeMode}\n buttonColor={buttonColor}\n style={style}\n existingPaymentMethodRequired={true}\n environment={test === true ? 'TEST' : 'PRODUCTION'}\n onPaymentDataChanged={async (paymentData) => {\n console.log('payment data changed', paymentData);\n if (paymentData.shippingAddress?.postalCode != null) {\n await setPostalCode(paymentData.shippingAddress?.postalCode);\n }\n if (paymentData.shippingAddress?.countryCode != null) {\n await setCountry(paymentData.shippingAddress?.countryCode);\n }\n if (paymentData.shippingOptionData?.id != null) {\n await setDeliveryMethod(paymentData.shippingOptionData.id);\n }\n\n const config = await getGooglePayConfiguration({ items: [] });\n console.log('PAYMENT DATA CHANGED CONFIG', config);\n if (config.isAvailable) {\n return {\n error: undefined,\n newShippingOptionParameters: config.config.shippingOptionParameters,\n newTransactionInfo: config.config.transactionInfo,\n }\n }\n\n return {\n error: undefined,\n }\n }}\n paymentRequest={googlePayConfiguration.config}\n onLoadPaymentData={async (paymentRequest) => {\n try {\n const result = await completeGooglePayPaymentAsync({\n paymentData: paymentRequest\n });\n if (isErr(result)) {\n console.log(\"apple pay error\", result);\n return;\n }\n\n result.isSuccess && clearCart();\n if (result.redirectURL) {\n open(result.redirectURL, \"_self\");\n }\n } catch (e) {\n console.warn(\"error completing google pay payment\", e);\n }\n }}\n />\n {isLoading ? 'Ładowanie...' : null}\n </>\n );\n}\n\nfunction Wrapper(props: Props) {\n return (\n <>\n <CartProvider>\n <GooglePayButtonComponent {...props} />\n </CartProvider>\n </>\n );\n}\nexport default Wrapper;\n","import { useEffect } from \"react\";\nimport zod from \"zod\";\nimport CartComponent from \"./CartComponent\";\nimport { getCheckoutMethods, getProjectID, setProjectID } from \"./CartProvider\";\nimport { isErr } from \"./lib/err\";\nimport { useCheckoutStore } from \"./state\";\n\nenum CartEvent {\n ADD_TO_CART = \"ADD_TO_CART\",\n}\n\nconst cartAddToCartSchema = zod.object({\n id: zod.string(),\n isSubscription: zod.boolean().default(false),\n quantity: zod.number(),\n metadata: zod.record(zod.string(), zod.string().optional()).optional(),\n});\n\ntype CartAddToCartEvent = zod.infer<typeof cartAddToCartSchema>;\n\nfunction BitsnapCart({\n projectID,\n children,\n onVisibleChange,\n className,\n}: {\n projectID: string;\n children?: React.ReactNode;\n onVisibleChange?: (isVisible: boolean) => void;\n className?: string;\n}) {\n const { isCartVisible, showCart, hideCart } = useCheckoutStore();\n\n function sentPostMessageToIframe(msg: unknown) {\n const iframes = document.querySelectorAll(\"iframe\");\n\n iframes.forEach((iframe) => {\n iframe.contentWindow?.postMessage(msg, \"*\");\n });\n }\n\n useEffect(() => {\n onVisibleChange?.(isCartVisible);\n }, [isCartVisible]);\n\n useEffect(() => {\n setProjectID(projectID);\n }, [projectID]);\n\n useEffect(() => {\n if (!(\"cart\" in window)) {\n const projectID = getProjectID();\n if (projectID == null) {\n console.warn(\"There is no project ID configured.\");\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n window[\"cart\"] = {\n buyProduct: async (args: unknown) => {\n try {\n const payload = zod\n .object({\n productID: zod.string(),\n email: zod.string().optional(),\n name: zod.string().optional(),\n country: zod.string().optional(),\n marketingAgreement: zod.boolean().optional(),\n })\n .parse(args);\n\n const methods = getCheckoutMethods(projectID);\n\n const result = await methods.justRedirectToPayment(payload);\n\n console.log(\"result\", result);\n if (isErr(result) == false) {\n window.location.href = result.url;\n } else {\n alert(\n \"Nie udało się przekierować do płatności. Spróbuj ponownie później.\",\n );\n }\n } catch (e) {\n console.warn(e);\n }\n },\n };\n }\n }, []);\n\n async function handleAddingToCart(id: string, payload?: unknown) {\n const projectID = getProjectID();\n if (projectID == null) {\n console.warn(\"There is no project ID configured.\");\n return;\n }\n\n try {\n const data = cartAddToCartSchema.parse(payload);\n\n if (data.isSubscription) {\n await handleAddingSubscriptionToCart(projectID, data);\n return;\n }\n\n const methods = getCheckoutMethods(projectID);\n\n await methods.addProduct({\n productID: data.id,\n quantity: data.quantity,\n metadata: data.metadata,\n });\n\n sentPostMessageToIframe({\n id: id,\n type: CartEvent.ADD_TO_CART,\n success: true,\n });\n showCart();\n } catch (e) {\n console.warn(\"cannot add item to cart\", e);\n }\n }\n\n async function handleAddingSubscriptionToCart(\n projectID: string,\n event: CartAddToCartEvent,\n ) {\n alert(\n `TODO, nie jest to jeszcze zrobione ${projectID} ${event.id} ${event.quantity}`,\n );\n }\n\n function setupEventListener() {\n if (\"__cart_is_listening\" in window) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n window[\"__cart_is_listening\"] = true;\n window.addEventListener(\"message\", (event) => {\n if (\n typeof event.data[\"id\"] != \"undefined\" &&\n typeof event.data[\"type\"] != \"undefined\"\n ) {\n const { id, type } = event.data;\n switch (type) {\n case CartEvent.ADD_TO_CART.toString():\n handleAddingToCart(id, event.data[\"payload\"]).then().catch();\n break;\n default:\n break;\n }\n }\n });\n }\n\n useEffect(() => {\n setupEventListener();\n\n if (typeof window !== \"undefined\") {\n try {\n const parsedParams = new URLSearchParams(window.location.search);\n const refLink =\n parsedParams.get(\"ref\") ?? parsedParams.get(\"utm-source\");\n if (\n typeof localStorage != \"undefined\" &&\n refLink &&\n refLink.length > 0\n ) {\n localStorage.setItem(\"bitsnap-ref\", refLink);\n }\n } catch (e) {\n return;\n }\n }\n }, []);\n\n return (\n <span className=\"bitsnap-checkout\">\n <button\n onClick={() => (isCartVisible ? hideCart() : showCart())}\n className={\n className ??\n \"relative rounded-full hover:bg-neutral-300 transition p-1\"\n }\n >\n {children ? (\n <>{children}</>\n ) : (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"lucide lucide-shopping-cart\"\n >\n <circle cx=\"8\" cy=\"21\" r=\"1\" />\n <circle cx=\"19\" cy=\"21\" r=\"1\" />\n <path d=\"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12\" />\n </svg>\n )}\n </button>\n <CartComponent\n isVisible={isCartVisible}\n shouldHide={() => {\n hideCart();\n }}\n />\n </span>\n );\n}\n\nexport default BitsnapCart;\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { createPortal } from \"react-dom\";\nimport CartComponentContent from \"./CartComponentContent\";\nimport CartProvider from \"./CartProvider\";\n\ninterface Props {\n isVisible: boolean;\n shouldHide: () => void;\n}\n\nfunction CartComponent({ isVisible, shouldHide }: Props) {\n const [parent] = useAutoAnimate(/* optional config */);\n\n return (\n <div ref={parent} className={\"z-[999999]\"}>\n {isVisible && (\n <>\n <div\n className={\n \"fixed top-0 right-0 left-0 bottom-0 bg-black/30 cursor-pointer\"\n }\n onClick={shouldHide}\n ></div>\n <div\n className={\n \"fixed top-0 right-0 bottom-0 w-full md:w-[350px] xl:w-[420px] dark:bg-neutral-900 bg-neutral-300 dark:text-neutral-200 text-neutral-900 flex flex-col\"\n }\n >\n <div\n className={\n \"mx-3 mt-7 flex justify-between items-center\"\n }\n >\n <h1 className={\"text-2xl font-medium\"}>Koszyk</h1>\n <button\n className=\"rounded-full dark:hover:bg-neutral-700 hover:bg-neutral-400 p-2 transition\"\n onClick={shouldHide}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"lucide lucide-x\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n\n <CartComponentContent className={\"grow\"} />\n </div>\n </>\n )}\n </div>\n );\n}\n\nconst WrapperCartComponent = (props: Props) => {\n if (typeof window === \"undefined\") {\n return null;\n }\n\n return createPortal(\n <CartProvider>\n <CartComponent {...props} />\n </CartProvider>,\n document.body,\n );\n};\n\nexport default WrapperCartComponent;\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport React from \"react\";\nimport { useMutation, useQuery } from \"react-query\";\nimport { useCartProvider } from \"./CartProvider\";\nimport CountrySelector from \"./CountrySelector\";\nimport { isErr } from \"./lib/err\";\nimport { formatCurrency } from \"./lib/round.number\";\nimport LoadingIndicator from \"./LoadingIndicator\";\nimport SingleProduct from \"./SingleProduct\";\nimport { Skeleton } from \"./Skeleton\";\nimport { ApplePayButton, GooglePayButton } from \"..\";\n\nconst CartComponentContent = ({ className }: { className: string }) => {\n const provider = useCartProvider();\n const { mutateAsync: removeProduct } = useMutation(\n provider.removeProductFromCart,\n );\n const { mutateAsync: updateQuantity } = useMutation(provider.updateQuantity);\n const { mutateAsync: setCountryAsync } = useMutation(provider.setCountry);\n const { mutateAsync: clearCart } = useMutation(provider.clearCart);\n\n const [errMsg, setErrMsg] = React.useState(\"\");\n\n const [isCountryOpen, setIsCountryOpen] = React.useState(false);\n\n const {\n mutateAsync: continueToCheckoutAsync,\n isLoading: isContinueToCheckoutLoading,\n } = useMutation(provider.redirectToNextStep);\n\n const { data: availableCountries } = useQuery(\n \"cart-available-countries\",\n provider.getAvailableCountries,\n );\n const { data: isApplePayAvailable } = useQuery(\"cart-one-click-payment\", provider.checkIfApplePayIsAvailable);\n const { data, isLoading, refetch } = useQuery(\"cart\", provider.getProducts);\n const { data: countryData, refetch: refetchCountry } = useQuery(\n \"cart-country\",\n provider.getCountry,\n );\n\n const [productsParent] = useAutoAnimate(/* optional config */);\n\n const products = isErr(data) ? undefined : data;\n\n const countries = isErr(availableCountries) ? [] : availableCountries;\n\n const sumOfProducts =\n products?.reduce((prev, curr) => {\n if (curr.details == null) {\n return prev;\n }\n return prev + curr.details.price * curr.quantity;\n }, 0) ?? 0;\n const currency = products?.[0]?.details?.currency ?? \"PLN\";\n\n const isSomeProductDeliverable =\n products?.some((product) => product.details?.isDeliverable === true) ??\n false;\n\n const selectedCountry =\n countryData != null && !isErr(countryData) && countryData != \"\"\n ? countryData\n : undefined;\n\n async function shouldUpdate(id: string, newQuantity?: number) {\n if (newQuantity != null) {\n if (newQuantity <= 0) {\n await removeProduct({ id: id });\n await refetch();\n return;\n }\n\n await updateQuantity({\n id: id,\n quantity: newQuantity,\n });\n await refetch();\n return;\n }\n }\n\n async function continueToCheckout() {\n try {\n setErrMsg(\"\");\n\n const response = await continueToCheckoutAsync();\n\n if (isErr(response)) {\n setErrMsg(`${response.error}`);\n return;\n }\n\n await clearCart();\n window.location.href = response.url;\n } catch (e: unknown) {\n setErrMsg(`${e}`);\n }\n }\n\n return (\n <div className={`${className} flex flex-col`} ref={productsParent}>\n {isLoading && (\n <div className={\"relative flex w-full justify-center flex-col gap-4\"}>\n <Skeleton className={\"w-full h-32\"} />\n <Skeleton className={\"w-full h-32\"} />\n </div>\n )}\n\n {!isLoading && (products == null || products.length == 0) && (\n <div className={\"flex flex-col gap-4 p-4\"}>\n <p className={\"dark:text-neutral-400 text-neutral-700\"}>\n Brak produktów w koszyku.\n </p>\n </div>\n )}\n\n <div\n className={\"max-h-[70vh] overflow-clip overflow-y-scroll\"}\n >\n {products != null && products.length > 0 && (\n <ul className={\"mt-5\"}>\n {products.map((product) => (\n <React.Fragment key={product.id}>\n {product.details != null && (\n <li className={\"mb-3\"}>\n <SingleProduct\n quantity={product.quantity}\n details={product.details}\n shouldUpdate={(newQuantity) => {\n shouldUpdate(product.id, newQuantity).then().catch();\n }}\n />\n <hr className=\"h-1 dark:border-neutral-700 border-neutral-400\" />\n </li>\n )}\n </React.Fragment>\n ))}\n </ul>\n )}\n </div>\n\n <div className=\"grow\"></div>\n\n {sumOfProducts > 0 && currency != null && (\n <>\n <div className=\"mx-3 flex flex-col\">\n <div\n className={\n \"flex flex-row justify-between text-lg\"\n }\n >\n <p\n className={\n \"dark:text-neutral-200 text-neutral-800 text-xl\"\n }\n >\n Suma:\n </p>\n <div className={\"flex flex-col items-end\"}>\n <p\n className={\n \"dark:text-neutral-200 text-neutral-800 font-medium\"\n }\n >\n {formatCurrency(sumOfProducts, currency)}\n </p>\n {isSomeProductDeliverable && (\n <p className={\"opacity-70 text-right text-base\"}>\n + dostawa\n </p>\n )}\n </div>\n </div>\n </div>\n\n {countries && countries?.length > 1 && (\n <div>\n <h4\n className={\n \"ml-3 text-sm dark:text-neutral-400 text-neutral-700\"\n }\n >\n Wybierz kraj\n </h4>\n <CountrySelector\n id={Math.random().toString()}\n open={isCountryOpen}\n onToggle={() => {\n setIsCountryOpen(!isCountryOpen);\n }}\n onChange={(newValue) => {\n setCountryAsync(newValue).then(() => {\n refetchCountry().then().catch();\n });\n }}\n selectedValue={selectedCountry ?? \"\"}\n countries={countries}\n />\n </div>\n )}\n\n <div className={\"mb-3 flex flex-col\"}>\n {isApplePayAvailable && products != null && products.length > 0 && (\n <div className=\"w-full px-2\">\n <ApplePayButton colorType=\"white\" style={{ width: '100%' }} items={products?.map(el => ({\n name: el.details?.name ?? \"\",\n id: el.productID,\n price: el.details?.price ?? 0,\n quantity: el.quantity,\n isDeliverable: el.details?.isDeliverable ?? false,\n metadata: el.metadata,\n }))} />\n </div>\n )}\n {products != null && products.length > 0 && (\n <div className=\"w-full px-2\">\n <GooglePayButton buttonSizeMode=\"fill\" buttonColor=\"white\" style={{ width: '100%' }} items={products?.map(el => ({\n name: el.details?.name ?? \"\",\n id: el.productID,\n price: el.details?.price ?? 0,\n quantity: el.quantity,\n isDeliverable: el.details?.isDeliverable ?? false,\n metadata: el.metadata,\n }))} />\n </div>\n )}\n <button\n onClick={continueToCheckout}\n disabled={\n isLoading ||\n isContinueToCheckoutLoading ||\n selectedCountry == null\n }\n className={\n \"px-3 py-2 my-2 mx-2 rounded-md disabled:opacity-40 disabled:cursor-not-allowed dark:bg-neutral-300 dark:hover:bg-neutral-100 dark:text-neutral-800 hover:bg-neutral-900 text-neutral-200 bg-neutral-800 transition font-bold\"\n }\n >\n {isContinueToCheckoutLoading ? \"Ładowanie...\" : \"Następny krok\"}\n </button>\n {errMsg.length > 0 && (\n <p className={\"text-red-500 text-sm text-center\"}>\n {errMsg}\n </p>\n )}\n </div>\n </>\n )}\n </div>\n );\n};\n\nexport default CartComponentContent;\n","import { AnimatePresence, motion } from \"framer-motion\";\nimport { type MutableRefObject, useEffect, useRef, useState } from \"react\";\n\nexport interface CountrySelectorProps {\n id: string;\n open: boolean;\n disabled?: boolean;\n onToggle: () => void;\n onChange: (value: string) => void;\n selectedValue: string;\n countries: { name: string; code: string }[];\n}\n\nfunction CountrySelector(\n {\n id,\n open,\n disabled = false,\n onToggle,\n onChange,\n selectedValue,\n countries\n }: CountrySelectorProps) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const mutableRef = ref as MutableRefObject<HTMLDivElement | null>;\n\n const handleClickOutside = (event: MouseEvent) => {\n if (\n mutableRef.current &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n !mutableRef.current.contains(event.target) &&\n open\n ) {\n onToggle();\n setQuery(\"\");\n }\n };\n\n window.document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref]);\n\n useEffect(() => {\n if (selectedValue == null && countries.length > 0) {\n onChange(countries[0].code);\n }\n }, []);\n\n const [query, setQuery] = useState(\"\");\n\n return (\n <div ref={ref}>\n <div className=\"relative\">\n <button\n type=\"button\"\n className={`${disabled ? \"bg-neutral-100\" : \"bg-extra-light-white\"\n } relative w-full rounded-2xl shadow-sm pl-8 pr-10 py-3 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm`}\n aria-haspopup=\"listbox\"\n aria-expanded=\"true\"\n aria-labelledby=\"listbox-label\"\n onClick={onToggle}\n disabled={disabled}\n >\n <span className=\"truncate flex items-center\">\n <img\n alt={`${selectedValue}`}\n src={`https://purecatamphetamine.github.io/country-flag-icons/3x2/${selectedValue}.svg`}\n className={\"inline mr-2 h-4 rounded-sm\"}\n />\n {countries.find(el => el.code === selectedValue)?.name}\n </span>\n <span\n className={`absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none ${disabled ? \"hidden\" : \"\"\n }`}\n >\n <svg\n className=\"h-5 w-5 text-light-purple\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n </button>\n\n <AnimatePresence>\n {open && (\n <motion.ul\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.1 }}\n className=\"absolute z-10 -mt-80 w-full dark:bg-neutral-800 bg-white shadow-lg max-h-80 rounded-md text-body-regular ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-body-regular\"\n tabIndex={-1}\n role=\"listbox\"\n aria-labelledby=\"listbox-label\"\n aria-activedescendant=\"listbox-option-3\"\n >\n <div className=\"sticky top-0 z-10 bg-white dark:bg-neutral-800\">\n <li className=\"dark:text-neutral-200 text-neutral-900 cursor-default select-none relative py-2 px-3\">\n <input\n type=\"search\"\n name=\"search\"\n autoComplete={\"off\"}\n className=\"block w-full outline-none sm:text-body-regular dark:text-neutral-400 text-dark-blue bg-transparent border-light-purple rounded-md placeholder:text-light-purple\"\n placeholder={\"Znajdź kraj\"}\n onChange={(e) => setQuery(e.target.value)}\n />\n </li>\n <hr />\n </div>\n\n <div\n className={\n \"max-h-64 scrollbar scrollbar-track-gray-100 scrollbar-thumb-gray-300 hover:scrollbar-thumb-gray-600 scrollbar-thumb-rounded scrollbar-thin overflow-y-scroll\"\n }\n >\n {countries.filter((country) =>\n country.name.toLowerCase().startsWith(query.toLowerCase())\n ).length === 0 ? (\n <li className=\"text-light-purple cursor-default select-none relative py-2 pl-3 pr-9\">\n No countries found\n </li>\n ) : (\n countries.filter((country) =>\n country.name.toLowerCase().startsWith(query.toLowerCase())\n ).map((value, index) => {\n return (\n <li\n key={`${id}-${index}`}\n className=\"text-dark-blue cursor-default select-none relative py-2 pl-3 pr-9 flex items-center hover:bg-extra-light-white transition\"\n id=\"listbox-option-0\"\n role=\"option\"\n onClick={() => {\n onChange(value.code);\n setQuery(\"\");\n onToggle();\n }}\n >\n <img\n alt={`${value.code}`}\n src={`https://purecatamphetamine.github.io/country-flag-icons/3x2/${value.code}.svg`}\n className={\"inline mr-2 h-4 rounded-sm\"}\n />\n\n <span className=\"font-normal truncate\">\n {value.name}\n </span>\n {value.code === selectedValue ? (\n <span\n className=\"text-blue-600 absolute inset-y-0 right-0 flex items-center pr-8\">\n <svg\n className=\"h-5 w-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n ) : null}\n </li>\n );\n })\n )}\n </div>\n </motion.ul>\n )}\n </AnimatePresence>\n </div>\n </div>\n )\n}\n\n\nexport default CountrySelector","import { useEffect, useState } from \"react\";\nimport { formatCurrency } from \"./lib/round.number\";\nimport type { SingleProduct } from \"./product.details.model\";\n\n\nconst SingleProduct = ({ quantity, details, shouldUpdate }: {\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details: SingleProduct;\n shouldUpdate: (newQuantity?: number) => void;\n}) => {\n\n return (\n <div className={'flex items-center gap-3'}>\n <img className={'aspect-auto max-w-[30%] max-w-32 max-h-32'} src={details.image_url ?? ''} alt={details.name} />\n\n <div className={'flex flex-col'}>\n <p className={'font-medium'}>{details.name}</p>\n <p className={'text-sm'}>{formatCurrency(details.price, details.currency)}</p>\n <div className={'flex justify-between'}>\n <QuantityComponent className={\"\"} quantity={quantity} shouldUpdate={shouldUpdate} />\n <button className={'text-sm font-medium'} onClick={() => shouldUpdate(0)}>Usuń</button>\n </div>\n </div>\n </div>\n );\n}\n\nexport default SingleProduct;\n\nconst QuantityComponent = (\n {\n quantity,\n shouldUpdate,\n className\n }: {\n quantity: number;\n shouldUpdate: (newQuantity: number) => void;\n className: string;\n }) => {\n const [quantityString, setQuantityString] = useState(quantity.toString());\n const [quantityValue, setQuantityValue] = useState(quantity);\n\n useEffect(() => {\n shouldUpdate(quantityValue);\n }, [quantityValue]);\n\n function setNewQuantity(newQuantity: string) {\n setQuantityString(newQuantity);\n if (newQuantity.length == 0) {\n return;\n }\n const parsedInt = parseInt(newQuantity);\n if (isNaN(parsedInt)) {\n setQuantityValue(1);\n setQuantityString('');\n return;\n }\n if (parsedInt == 0 || parsedInt < 0) {\n setQuantityValue(1);\n setQuantityString(\"1\");\n return;\n }\n setQuantityValue(parsedInt);\n setQuantityString(parsedInt.toString());\n }\n\n function increaseQuantity() {\n setQuantityValue(quantity + 1);\n setQuantityString((quantity + 1).toString());\n }\n\n function decreaseQuantity() {\n if (quantity > 1) {\n setQuantityString((quantity - 1).toString());\n setQuantityValue(quantity - 1);\n return;\n }\n setQuantityString(quantity.toString());\n setQuantityValue(quantity);\n }\n\n return (\n <div className={`flex ${className} items-center border dark:border-neutral-400 border-neutral-700 rounded-md my-1`}>\n <button onClick={decreaseQuantity} className={'px-2 py-1'}>-</button>\n <input\n className={'w-8 bg-transparent text-center'}\n value={quantityString}\n onInput={(e) => { setNewQuantity(e.currentTarget.value) }}\n type=\"text\"\n />\n <button onClick={increaseQuantity} className={'px-2 py-1'}>+</button>\n </div>\n );\n}\n","function Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={\"bg-neutral-700 animate-pulse rounded-md\" + ' ' + className}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n"],"mappings":";;;AAAA,OAAO,oBAAoB;;;ACC3B,SAAS,oBAAiC;AAC1C,SAAS,8BAA8B;;;ACGvC,SAAS,YAAAA,WAAU,YAAAC,WAAU,eAAAC,cAAa,eAAAC,oBAAmB;AAE7D,SAAS,8BAAAC,6BAA4B,kCAAAC,uCAAsC;;;ACF3E,SAAS,UAAU,gBAAgB;AAK5B,IAAM,yBACX,yBAAS,0ZAA0Z;;;ACNra,SAAS,YAAAC,WAAU,mBAAmB;AAM/B,IAAM,yBACX,gBAAAA,UAAS,4kBAA4kB;AAyChlB,IAAM,gBACX,4BAAY,wBAAwB,CAAC;AA8ChC,IAAM,uBACX,4BAAY,wBAAwB,CAAC;;;AChGvC,SAAS,YAAAC,WAAU,YAAAC,WAAU,eAAAC,oBAAmB;AAEhD,SAAS,sCAAsC;AAMxC,IAAM,oCACX,gBAAAD,UAAS,gqCAAgqC,CAAC,8BAA8B,CAAC;;;ACT3sC,SAAS,YAAAE,WAAU,YAAAC,WAAU,eAAAC,cAAa,mBAAmB;AAE7D,SAAS,4BAA4B,kCAAAC,uCAAsC;AAMpE,IAAM,+BACX,gBAAAF,UAAS,+2HAA+2H,CAACE,iCAAgC,0BAA0B,CAAC;;;AJO/6H,IAAM,4BACX,gBAAAC,UAAS,0viBAA0viB,CAACC,iCAAgC,wBAAwB,wBAAwB,mCAAmCC,6BAA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AAS,MAAO,gBAAgB,SAAS,IAAI,SAAS;AAAA,QACtD,WACE,gCACA;AAAA,QAGD,qBACC,gBAAAA,KAAAC,WAAA,EAAG,UAAS,IAEZ,gBAAAF;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,OAAM;AAAA,YACN,QAAO;AAAA,YACP,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,QAAO;AAAA,YACP,aAAY;AAAA,YACZ,eAAc;AAAA,YACd,gBAAe;AAAA,YACf,WAAU;AAAA,YAEV;AAAA,8BAAAC,KAAC,YAAO,IAAG,KAAI,IAAG,MAAK,GAAE,KAAI;AAAA,cAC7B,gBAAAA,KAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,cAC9B,gBAAAA,KAAC,UAAK,GAAE,oFAAmF;AAAA;AAAA;AAAA,QAC7F;AAAA;AAAA,IAEJ;AAAA,IACA,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,QACX,YAAY,MAAM;AAChB,mBAAS;AAAA,QACX;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,sBAAQ;","names":["enumDesc","fileDesc","messageDesc","serviceDesc","file_google_protobuf_empty","file_google_protobuf_timestamp","fileDesc","enumDesc","fileDesc","messageDesc","enumDesc","fileDesc","messageDesc","file_google_protobuf_timestamp","fileDesc","file_google_protobuf_timestamp","file_google_protobuf_empty","messageDesc","serviceDesc","PublicApiClient","create","Bitsnap","_a","_a","create","_b","variant","Fragment","jsx","apRequest","useQuery","Fragment","jsx","useQuery","Wrapper","useEffect","zod","useAutoAnimate","useMutation","useQuery","jsx","jsxs","open","useEffect","useState","jsx","jsxs","useState","useEffect","jsx","Fragment","jsx","jsxs","useMutation","useQuery","_a","_b","_c","_d","_e","Fragment","jsx","jsxs","useAutoAnimate","Fragment","jsx","jsxs","zod","useEffect","projectID","jsxs","jsx","Fragment"]}
1
+ {"version":3,"sources":["../src/components/checkout/ApplePay.tsx","../src/public.api.client.ts","../src/gen/proto/public/v1/public_api_pb.ts","../src/gen/proto/common/v1/gateway_pb.ts","../src/gen/proto/common/v1/address_pb.ts","../src/gen/proto/common/v1/push_notifications_pb.ts","../src/gen/proto/dashboard/v1/audiobooks_pb.ts","../src/components/checkout/CartProvider.tsx","../src/components/checkout/constants.ts","../src/components/checkout/helper.methods.ts","../src/components/checkout/lib/err.ts","../src/components/checkout/lib/round.number.ts","../src/components/checkout/state.ts","../src/components/checkout/methods.ts","../src/components/checkout/google.pay.mapper.ts","../src/components/checkout/GooglePay.tsx","../src/ui/spinner.tsx","../src/lib/utils.ts","../src/components/checkout/BitsnapCart.tsx","../src/components/checkout/CartComponent.tsx","../src/components/checkout/CartComponentContent.tsx","../src/components/checkout/CountrySelector.tsx","../src/components/checkout/SingleProduct.tsx","../src/components/checkout/Skeleton.tsx"],"sourcesContent":["import ApplePayButton from \"apple-pay-button\";\nimport { PublicApiClient } from \"src/public.api.client\";\nimport CartProvider, { getProjectID, useCartProvider } from \"./CartProvider\";\nimport { HOST } from \"./constants\";\nimport { isErr } from \"./lib/err\";\nimport { round } from \"./lib/round.number\";\nimport { useQuery } from \"@tanstack/react-query\";\n\ntype AppleButtonType = 'plain' | 'add-money' | 'book' | 'buy' | 'check-out' | 'continue' | 'contribute' | 'donate' | 'order' | 'pay' | 'reload' | 'rent' | 'set-up' | 'subscribe' | 'support' | 'tip' | 'top-up';\ntype ColorType = 'black' | 'white' | 'white-outline';\n\ntype Props = {\n style?: {\n width?: string;\n height?: string;\n borderRadius?: string;\n padding?: string;\n boxSizing?: string;\n };\n buttonType?: AppleButtonType;\n colorType?: ColorType;\n items: { name: string; id: string; price: number; quantity: number; isDeliverable?: boolean; metadata?: { [key: string]: string | undefined } }[];\n onClick?: () => Promise<void>;\n};\n\nfunction ApplePayButtonComponent({ style, buttonType, colorType, items, onClick }: Props) {\n const {\n checkIfApplePayIsAvailable,\n getApplePayPaymentRequest,\n completeApplePayPayment,\n setCountry,\n setCouponCodeIfPossible,\n setDeliveryMethod,\n setEmail,\n setPostalCode,\n clearCart,\n } = useCartProvider();\n const { data: isApplePayAvailable } = useQuery({\n queryKey: [\"is-apple-pay-available\"],\n queryFn: checkIfApplePayIsAvailable,\n });\n if (isApplePayAvailable != true) {\n return null;\n }\n\n const expectedItems = items.map(el => ({\n productID: el.id,\n quantity: el.quantity,\n metadata: el.metadata,\n }));\n\n async function beginSession() {\n const requiresShipping = items.find(el => el.isDeliverable === true) != null;\n const session = new ApplePaySession(14, {\n countryCode: \"PL\",\n merchantCapabilities: [\"supports3DS\"],\n supportedNetworks: [\"visa\", \"masterCard\"],\n currencyCode: \"PLN\",\n total: {\n amount: `${round(items.reduce((acc, item) => acc + item.price * item.quantity, 0) / 100, 2)}`,\n label: \"Płatność za koszyk\",\n type: \"pending\",\n },\n lineItems: [\n ...items.map((item) => ({\n amount: `${round((item.price * item.quantity) / 100, 2)}`,\n label: item.name,\n type: \"final\",\n } as ApplePayJS.ApplePayLineItem)),\n requiresShipping ? {\n amount: `16.99`,\n type: \"pending\",\n label: \"Dostawa\",\n } as ApplePayJS.ApplePayLineItem : undefined\n ].filter(el => el != null),\n ...(\n requiresShipping ? {\n shippingMethods: [],\n supportsCouponCode: true,\n requiredBillingContactFields: [\"name\", \"email\", \"postalAddress\", \"phone\"],\n requiredShippingContactFields: [\"name\", \"email\", \"postalAddress\", \"phone\"],\n } : {}\n ),\n });\n await onClick?.();\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n console.error(\"Error creating ApplePaySession:\", apRequest.error);\n return;\n }\n\n session.oncancel = (event) => {\n console.log(\"ApplePaySession cancelled\", event);\n };\n\n session.onvalidatemerchant = async (event) => {\n try {\n const result = await PublicApiClient.get(HOST).applePayValidateMerchant(\n {\n validationUrl: event.validationURL,\n projectId: getProjectID(),\n },\n );\n console.log(\"merchantSession\", result.merchantSession);\n if (result.merchantSession.length > 0) {\n console.log('completing merchant session');\n session.completeMerchantValidation(\n JSON.parse(result.merchantSession),\n );\n } else {\n session.abort();\n }\n } catch (error) {\n session.abort;\n }\n };\n\n session.onshippingmethodselected = async (event) => {\n console.log(\"shipping method selected\", event);\n await setDeliveryMethod(event.shippingMethod.identifier);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeShippingMethodSelection({\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n };\n session.onshippingcontactselected = async (event) => {\n try {\n if (event.shippingContact.countryCode != null) {\n await setCountry(event.shippingContact.countryCode);\n }\n if (event.shippingContact.postalCode != null) {\n await setPostalCode(event.shippingContact.postalCode);\n }\n if (event.shippingContact.phoneNumber != null) {\n await setEmail(event.shippingContact.emailAddress);\n }\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n console.log('apRequest', apRequest);\n session.completeShippingContactSelection({\n newLineItems: apRequest.lineItems,\n newTotal: apRequest.total,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"shipping contact selected error\", error);\n session.abort();\n }\n };\n\n session.oncouponcodechanged = async (event) => {\n try {\n console.log(\"coupon code changed\", event);\n const result = await setCouponCodeIfPossible(event.couponCode);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeCouponCodeChange({\n errors: isErr(result)\n ? [new ApplePayError(\"couponCodeInvalid\")]\n : undefined,\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"coupon code changed error\", error);\n session.abort();\n }\n };\n\n session.onpaymentauthorized = async (event) => {\n try {\n const result = await completeApplePayPayment({\n token: event.payment.token,\n billingContact: event.payment.billingContact,\n shippingContact: event.payment.shippingContact,\n });\n if (isErr(result)) {\n console.log(\"apple pay error\", result);\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n return;\n }\n\n if (result.redirectURL) {\n setTimeout(() => {\n open(result.redirectURL, \"_self\");\n }, 2000);\n }\n session.completePayment({\n status: result.isSuccess ? ApplePaySession.STATUS_SUCCESS : ApplePaySession.STATUS_FAILURE,\n });\n\n result.isSuccess && clearCart();\n } catch (e) {\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n }\n // event.complete(ApplePaySession.STATUS_SUCCESS);\n };\n\n session.begin();\n }\n\n return <ApplePayButton style={style} buttonStyle={colorType} type={buttonType} onClick={beginSession} />;\n}\n\nfunction Wrapper(props: Props) {\n return (\n <>\n <CartProvider>\n <ApplePayButtonComponent {...props} />\n </CartProvider>\n </>\n );\n}\nexport default Wrapper;\n","import type { Transport } from \"@connectrpc/connect\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport { createConnectTransport } from \"@connectrpc/connect-web\";\nimport { PublicApiService } from \"./gen/proto/public/v1/public_api_pb\";\n\nexport namespace PublicApiClient {\n export function get(host: string): Client<typeof PublicApiService> {\n return createClient(PublicApiService, getTransport(host));\n }\n\n let transport: Transport | undefined;\n function getTransport(host: string): Transport {\n if (transport == null) {\n transport = createConnectTransport({\n useBinaryFormat: true,\n baseUrl: host + \"/api/rpc\",\n });\n }\n return transport;\n }\n}\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts,ts_nocheck=true\"\n// @generated from file public/v1/public_api.proto (package public_api.v1, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Empty, EmptySchema, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Gateway } from \"../../common/v1/gateway_pb\";\nimport { file_common_v1_gateway } from \"../../common/v1/gateway_pb\";\nimport type { Address, BillingAddress } from \"../../common/v1/address_pb\";\nimport { file_common_v1_address } from \"../../common/v1/address_pb\";\nimport type { NotificationEvent, NotificationGroupHowOften, PushNotificationDeviceToken } from \"../../common/v1/push_notifications_pb\";\nimport { file_common_v1_push_notifications } from \"../../common/v1/push_notifications_pb\";\nimport type { Audiobook as Audiobook$1 } from \"../../dashboard/v1/audiobooks_pb\";\nimport { file_dashboard_v1_audiobooks } from \"../../dashboard/v1/audiobooks_pb\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file public/v1/public_api.proto.\n */\nexport const file_public_v1_public_api: GenFile = /*@__PURE__*/\n fileDesc(\"ChpwdWJsaWMvdjEvcHVibGljX2FwaS5wcm90bxINcHVibGljX2FwaS52MSI3CiFJc09uZUNsaWNrUGF5bWVudEF2YWlsYWJsZVJlcXVlc3QSEgoKcHJvamVjdF9pZBgBIAEoCSLFAgoiSXNPbmVDbGlja1BheW1lbnRBdmFpbGFibGVSZXNwb25zZRISCgppbnBvc3RfcGF5GAEgASgIEhEKCWFwcGxlX3BheRgCIAEoCBISCgpnb29nbGVfcGF5GAMgASgIEmEKEWdvb2dsZV9wYXlfY29uZmlnGAQgASgLMkEucHVibGljX2FwaS52MS5Jc09uZUNsaWNrUGF5bWVudEF2YWlsYWJsZVJlc3BvbnNlLkdvb2dsZVBheUNvbmZpZ0gAiAEBGmsKD0dvb2dsZVBheUNvbmZpZxITCgttZXJjaGFudF9pZBgBIAEoCRIVCg1tZXJjaGFudF9uYW1lGAIgASgJEg8KB2dhdGV3YXkYAyABKAkSGwoTZ2F0ZXdheV9tZXJjaGFudF9pZBgEIAEoCUIUChJfZ29vZ2xlX3BheV9jb25maWci0QMKH09uZUNsaWNrQXV0aG9yaXplUGF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N0UmVxdWVzdBoyLnB1YmxpY19hcGkudjEuR2V0QXZhaWxhYmxlQ291bnRGb3JQcm9kdWN0UmVzcG9uc2USgQEKGklzT25lQ2xpY2tQYXltZW50QXZhaWxhYmxlEjAucHVibGljX2FwaS52MS5Jc09uZUNsaWNrUGF5bWVudEF2YWlsYWJsZVJlcXVlc3QaMS5wdWJsaWNfYXBpLnYxLklzT25lQ2xpY2tQYXltZW50QXZhaWxhYmxlUmVzcG9uc2USaQoSR2V0UHJlT3JkZXJEZXRhaWxzEigucHVibGljX2FwaS52MS5HZXRQcmVPcmRlckRldGFpbHNSZXF1ZXN0GikucHVibGljX2FwaS52MS5HZXRQcmVPcmRlckRldGFpbHNSZXNwb25zZRJ7ChhBcHBsZVBheVZhbGlkYXRlTWVyY2hhbnQSLi5wdWJsaWNfYXBpLnYxLkFwcGxlUGF5VmFsaWRhdGVNZXJjaGFudFJlcXVlc3QaLy5wdWJsaWNfYXBpLnYxLkFwcGxlUGF5VmFsaWRhdGVNZXJjaGFudFJlc3BvbnNlEnsKGEF1dGhvcml6ZU9uZUNsaWNrUGF5bWVudBIuLnB1YmxpY19hcGkudjEuT25lQ2xpY2tBdXRob3JpemVQYXltZW50UmVxdWVzdBovLnB1YmxpY19hcGkudjEuT25lQ2xpY2tBdXRob3JpemVQYXltZW50UmVzcG9uc2USdgoiTm90aWZ5VXNlckFib3V0UHJvZHVjdEF2YWlsYWJpbGl0eRI4LnB1YmxpY19hcGkudjEuTm90aWZ5VXNlckFib3V0UHJvZHVjdEF2YWlsYWJpbGl0eVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHliBnByb3RvMw\", [file_google_protobuf_timestamp, file_common_v1_gateway, file_common_v1_address, file_common_v1_push_notifications, file_google_protobuf_empty, file_dashboard_v1_audiobooks]);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableRequest\n */\nexport type IsOneClickPaymentAvailableRequest = Message<\"public_api.v1.IsOneClickPaymentAvailableRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableRequest.\n * Use `create(IsOneClickPaymentAvailableRequestSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableRequestSchema: GenMessage<IsOneClickPaymentAvailableRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 0);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableResponse\n */\nexport type IsOneClickPaymentAvailableResponse = Message<\"public_api.v1.IsOneClickPaymentAvailableResponse\"> & {\n /**\n * @generated from field: bool inpost_pay = 1;\n */\n inpostPay: boolean;\n\n /**\n * @generated from field: bool apple_pay = 2;\n */\n applePay: boolean;\n\n /**\n * @generated from field: bool google_pay = 3;\n */\n googlePay: boolean;\n\n /**\n * @generated from field: optional public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig google_pay_config = 4;\n */\n googlePayConfig?: IsOneClickPaymentAvailableResponse_GooglePayConfig;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableResponse.\n * Use `create(IsOneClickPaymentAvailableResponseSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableResponseSchema: GenMessage<IsOneClickPaymentAvailableResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 1);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig\n */\nexport type IsOneClickPaymentAvailableResponse_GooglePayConfig = Message<\"public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig\"> & {\n /**\n * @generated from field: string merchant_id = 1;\n */\n merchantId: string;\n\n /**\n * @generated from field: string merchant_name = 2;\n */\n merchantName: string;\n\n /**\n * @generated from field: string gateway = 3;\n */\n gateway: string;\n\n /**\n * @generated from field: string gateway_merchant_id = 4;\n */\n gatewayMerchantId: string;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig.\n * Use `create(IsOneClickPaymentAvailableResponse_GooglePayConfigSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableResponse_GooglePayConfigSchema: GenMessage<IsOneClickPaymentAvailableResponse_GooglePayConfig> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 1, 0);\n\n/**\n * @generated from message public_api.v1.OneClickAuthorizePaymentRequest\n */\nexport type OneClickAuthorizePaymentRequest = Message<\"public_api.v1.OneClickAuthorizePaymentRequest\"> & {\n /**\n * @generated from field: public_api.v1.OneClickAuthorizePaymentRequest.Gateway gateway = 1;\n */\n gateway: OneClickAuthorizePaymentRequest_Gateway;\n\n /**\n * @generated from field: string paymentData = 2;\n */\n paymentData: string;\n\n /**\n * @generated from field: string paymentMethod = 3;\n */\n paymentMethod: string;\n\n /**\n * @generated from field: string transactionIdentifier = 4;\n */\n transactionIdentifier: string;\n\n /**\n * @generated from field: public_api.v1.GetPreOrderDetailsRequest order = 5;\n */\n order?: GetPreOrderDetailsRequest;\n\n /**\n * @generated from field: optional common.v1.Address shipping_address = 6;\n */\n shippingAddress?: Address;\n\n /**\n * @generated from field: optional common.v1.BillingAddress billing_address = 7;\n */\n billingAddress?: BillingAddress;\n\n /**\n * @generated from field: optional string metadata = 8;\n */\n metadata?: string;\n};\n\n/**\n * Describes the message public_api.v1.OneClickAuthorizePaymentRequest.\n * Use `create(OneClickAuthorizePaymentRequestSchema)` to create a new message.\n */\nexport const OneClickAuthorizePaymentRequestSchema: GenMessage<OneClickAuthorizePaymentRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 2);\n\n/**\n * @generated from enum public_api.v1.OneClickAuthorizePaymentRequest.Gateway\n */\nexport enum OneClickAuthorizePaymentRequest_Gateway {\n /**\n * @generated from enum value: APPLE_PAY = 0;\n */\n APPLE_PAY = 0,\n\n /**\n * @generated from enum value: GOOGLE_PAY = 1;\n */\n GOOGLE_PAY = 1,\n}\n\n/**\n * Describes the enum public_api.v1.OneClickAuthorizePaymentRequest.Gateway.\n */\nexport const OneClickAuthorizePaymentRequest_GatewaySchema: GenEnum<OneClickAuthorizePaymentRequest_Gateway> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 2, 0);\n\n/**\n * @generated from message public_api.v1.OneClickAuthorizePaymentResponse\n */\nexport type OneClickAuthorizePaymentResponse = Message<\"public_api.v1.OneClickAuthorizePaymentResponse\"> & {\n /**\n * @generated from field: bool is_success = 1;\n */\n isSuccess: boolean;\n\n /**\n * @generated from field: string redirect_url = 2;\n */\n redirectUrl: string;\n\n /**\n * @generated from field: string transaction_id = 3;\n */\n transactionId: string;\n\n /**\n * @generated from field: optional string apple_pay_tracking_url = 4;\n */\n applePayTrackingUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.OneClickAuthorizePaymentResponse.\n * Use `create(OneClickAuthorizePaymentResponseSchema)` to create a new message.\n */\nexport const OneClickAuthorizePaymentResponseSchema: GenMessage<OneClickAuthorizePaymentResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 3);\n\n/**\n * @generated from message public_api.v1.PreOrderItem\n */\nexport type PreOrderItem = Message<\"public_api.v1.PreOrderItem\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: int32 quantity = 2;\n */\n quantity: number;\n};\n\n/**\n * Describes the message public_api.v1.PreOrderItem.\n * Use `create(PreOrderItemSchema)` to create a new message.\n */\nexport const PreOrderItemSchema: GenMessage<PreOrderItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 4);\n\n/**\n * @generated from message public_api.v1.GetPreOrderDetailsRequest\n */\nexport type GetPreOrderDetailsRequest = Message<\"public_api.v1.GetPreOrderDetailsRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated public_api.v1.PreOrderItem items = 2;\n */\n items: PreOrderItem[];\n\n /**\n * @generated from field: optional string country_code = 3;\n */\n countryCode?: string;\n\n /**\n * @generated from field: optional string post_code = 4;\n */\n postCode?: string;\n\n /**\n * We can check if coupon code is available.\n *\n * @generated from field: optional string couponCode = 5;\n */\n couponCode?: string;\n\n /**\n * @generated from field: optional string email = 6;\n */\n email?: string;\n\n /**\n * @generated from field: optional string selected_delivery_method = 7;\n */\n selectedDeliveryMethod?: string;\n\n /**\n * @generated from field: optional string phone = 8;\n */\n phone?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetPreOrderDetailsRequest.\n * Use `create(GetPreOrderDetailsRequestSchema)` to create a new message.\n */\nexport const GetPreOrderDetailsRequestSchema: GenMessage<GetPreOrderDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 5);\n\n/**\n * @generated from message public_api.v1.DeliveryMethod\n */\nexport type DeliveryMethod = Message<\"public_api.v1.DeliveryMethod\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: int32 amount = 2;\n */\n amount: number;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 4;\n */\n description?: string;\n\n /**\n * @generated from field: optional int32 min_days = 5;\n */\n minDays?: number;\n\n /**\n * @generated from field: optional int32 max_days = 6;\n */\n maxDays?: number;\n};\n\n/**\n * Describes the message public_api.v1.DeliveryMethod.\n * Use `create(DeliveryMethodSchema)` to create a new message.\n */\nexport const DeliveryMethodSchema: GenMessage<DeliveryMethod> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 6);\n\n/**\n * @generated from message public_api.v1.GetPreOrderDetailsResponse\n */\nexport type GetPreOrderDetailsResponse = Message<\"public_api.v1.GetPreOrderDetailsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.DeliveryMethod methods = 1;\n */\n methods: DeliveryMethod[];\n\n /**\n * @generated from field: optional string couponCode = 2;\n */\n couponCode?: string;\n\n /**\n * @generated from field: optional string selected_delivery_method = 3;\n */\n selectedDeliveryMethod?: string;\n\n /**\n * @generated from field: optional int32 total_amount = 4;\n */\n totalAmount?: number;\n\n /**\n * @generated from field: optional int32 coupon_value = 5;\n */\n couponValue?: number;\n\n /**\n * Mainly use for Google Pay\n *\n * @generated from field: string currency = 6;\n */\n currency: string;\n\n /**\n * @generated from field: string country = 7;\n */\n country: string;\n};\n\n/**\n * Describes the message public_api.v1.GetPreOrderDetailsResponse.\n * Use `create(GetPreOrderDetailsResponseSchema)` to create a new message.\n */\nexport const GetPreOrderDetailsResponseSchema: GenMessage<GetPreOrderDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 7);\n\n/**\n * @generated from message public_api.v1.NotifyUserAboutProductAvailabilityRequest\n */\nexport type NotifyUserAboutProductAvailabilityRequest = Message<\"public_api.v1.NotifyUserAboutProductAvailabilityRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n\n /**\n * @generated from field: string email = 3;\n */\n email: string;\n};\n\n/**\n * Describes the message public_api.v1.NotifyUserAboutProductAvailabilityRequest.\n * Use `create(NotifyUserAboutProductAvailabilityRequestSchema)` to create a new message.\n */\nexport const NotifyUserAboutProductAvailabilityRequestSchema: GenMessage<NotifyUserAboutProductAvailabilityRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 8);\n\n/**\n * @generated from message public_api.v1.ApplePayValidateMerchantRequest\n */\nexport type ApplePayValidateMerchantRequest = Message<\"public_api.v1.ApplePayValidateMerchantRequest\"> & {\n /**\n * @generated from field: string validation_url = 1;\n */\n validationUrl: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.ApplePayValidateMerchantRequest.\n * Use `create(ApplePayValidateMerchantRequestSchema)` to create a new message.\n */\nexport const ApplePayValidateMerchantRequestSchema: GenMessage<ApplePayValidateMerchantRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 9);\n\n/**\n * @generated from message public_api.v1.ApplePayValidateMerchantResponse\n */\nexport type ApplePayValidateMerchantResponse = Message<\"public_api.v1.ApplePayValidateMerchantResponse\"> & {\n /**\n * @generated from field: string merchant_session = 1;\n */\n merchantSession: string;\n};\n\n/**\n * Describes the message public_api.v1.ApplePayValidateMerchantResponse.\n * Use `create(ApplePayValidateMerchantResponseSchema)` to create a new message.\n */\nexport const ApplePayValidateMerchantResponseSchema: GenMessage<ApplePayValidateMerchantResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 10);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductRequest\n */\nexport type GetAvailableCountForProductRequest = Message<\"public_api.v1.GetAvailableCountForProductRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated string all_variants = 2;\n */\n allVariants: string[];\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductRequest.\n * Use `create(GetAvailableCountForProductRequestSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductRequestSchema: GenMessage<GetAvailableCountForProductRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 11);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductResponse\n */\nexport type GetAvailableCountForProductResponse = Message<\"public_api.v1.GetAvailableCountForProductResponse\"> & {\n /**\n * @generated from field: map<string, public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct> available_counts = 1;\n */\n availableCounts: { [key: string]: GetAvailableCountForProductResponse_AvailableCountForProduct };\n\n /**\n * @generated from field: optional public_api.v1.GetAvailableCountForProductResponse.Error error = 2;\n */\n error?: GetAvailableCountForProductResponse_Error;\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductResponse.\n * Use `create(GetAvailableCountForProductResponseSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductResponseSchema: GenMessage<GetAvailableCountForProductResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 12);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct\n */\nexport type GetAvailableCountForProductResponse_AvailableCountForProduct = Message<\"public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct\"> & {\n /**\n * @generated from field: int32 available_quantity_to_order = 1;\n */\n availableQuantityToOrder: number;\n\n /**\n * @generated from field: bool can_back = 2;\n */\n canBack: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct.\n * Use `create(GetAvailableCountForProductResponse_AvailableCountForProductSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductResponse_AvailableCountForProductSchema: GenMessage<GetAvailableCountForProductResponse_AvailableCountForProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 12, 0);\n\n/**\n * @generated from enum public_api.v1.GetAvailableCountForProductResponse.Error\n */\nexport enum GetAvailableCountForProductResponse_Error {\n /**\n * @generated from enum value: ERROR_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: ERROR_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: ERROR_PRODUCT_NOT_AVAILABLE = 2;\n */\n PRODUCT_NOT_AVAILABLE = 2,\n\n /**\n * @generated from enum value: ERROR_PRODUCT_NOT_AVAILABLE_BUT_CAN_BACK = 3;\n */\n PRODUCT_NOT_AVAILABLE_BUT_CAN_BACK = 3,\n}\n\n/**\n * Describes the enum public_api.v1.GetAvailableCountForProductResponse.Error.\n */\nexport const GetAvailableCountForProductResponse_ErrorSchema: GenEnum<GetAvailableCountForProductResponse_Error> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 12, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelDeleteAccountRequest\n */\nexport type UserPanelDeleteAccountRequest = Message<\"public_api.v1.UserPanelDeleteAccountRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelDeleteAccountRequest.\n * Use `create(UserPanelDeleteAccountRequestSchema)` to create a new message.\n */\nexport const UserPanelDeleteAccountRequestSchema: GenMessage<UserPanelDeleteAccountRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 13);\n\n/**\n * @generated from message public_api.v1.DidBuyProductRequest\n */\nexport type DidBuyProductRequest = Message<\"public_api.v1.DidBuyProductRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n};\n\n/**\n * Describes the message public_api.v1.DidBuyProductRequest.\n * Use `create(DidBuyProductRequestSchema)` to create a new message.\n */\nexport const DidBuyProductRequestSchema: GenMessage<DidBuyProductRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 14);\n\n/**\n * @generated from message public_api.v1.UpdateNotificationSettingsRequest\n */\nexport type UpdateNotificationSettingsRequest = Message<\"public_api.v1.UpdateNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated public_api.v1.UpdateNotificationSettingsRequest.Group modifications = 3;\n */\n modifications: UpdateNotificationSettingsRequest_Group[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod enabled_methods = 4;\n */\n enabledMethods: NotificationMethod[];\n};\n\n/**\n * Describes the message public_api.v1.UpdateNotificationSettingsRequest.\n * Use `create(UpdateNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationSettingsRequestSchema: GenMessage<UpdateNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 15);\n\n/**\n * @generated from message public_api.v1.UpdateNotificationSettingsRequest.Group\n */\nexport type UpdateNotificationSettingsRequest_Group = Message<\"public_api.v1.UpdateNotificationSettingsRequest.Group\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: bool enabled = 2;\n */\n enabled: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UpdateNotificationSettingsRequest.Group.\n * Use `create(UpdateNotificationSettingsRequest_GroupSchema)` to create a new message.\n */\nexport const UpdateNotificationSettingsRequest_GroupSchema: GenMessage<UpdateNotificationSettingsRequest_Group> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 15, 0);\n\n/**\n * @generated from message public_api.v1.UpdateGlobalNotificationSettingsRequest\n */\nexport type UpdateGlobalNotificationSettingsRequest = Message<\"public_api.v1.UpdateGlobalNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: bool is_muted = 2;\n */\n isMuted: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UpdateGlobalNotificationSettingsRequest.\n * Use `create(UpdateGlobalNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const UpdateGlobalNotificationSettingsRequestSchema: GenMessage<UpdateGlobalNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 16);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsDetailsRequest\n */\nexport type GetNotificationSettingsDetailsRequest = Message<\"public_api.v1.GetNotificationSettingsDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsDetailsRequest.\n * Use `create(GetNotificationSettingsDetailsRequestSchema)` to create a new message.\n */\nexport const GetNotificationSettingsDetailsRequestSchema: GenMessage<GetNotificationSettingsDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 17);\n\n/**\n * @generated from message public_api.v1.NotificationGroup\n */\nexport type NotificationGroup = Message<\"public_api.v1.NotificationGroup\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: bool enabled = 4;\n */\n enabled: boolean;\n\n /**\n * @generated from field: common.v1.NotificationGroupHowOften how_often = 5;\n */\n howOften: NotificationGroupHowOften;\n};\n\n/**\n * Describes the message public_api.v1.NotificationGroup.\n * Use `create(NotificationGroupSchema)` to create a new message.\n */\nexport const NotificationGroupSchema: GenMessage<NotificationGroup> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 18);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsDetailsResponse\n */\nexport type GetNotificationSettingsDetailsResponse = Message<\"public_api.v1.GetNotificationSettingsDetailsResponse\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme theme = 3;\n */\n theme?: ProjectTheme;\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod available_methods = 4;\n */\n availableMethods: NotificationMethod[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod enabled_methods = 5;\n */\n enabledMethods: NotificationMethod[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationGroup groups = 6;\n */\n groups: NotificationGroup[];\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsDetailsResponse.\n * Use `create(GetNotificationSettingsDetailsResponseSchema)` to create a new message.\n */\nexport const GetNotificationSettingsDetailsResponseSchema: GenMessage<GetNotificationSettingsDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 19);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsRequest\n */\nexport type GetNotificationSettingsRequest = Message<\"public_api.v1.GetNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: bool all = 2;\n */\n all: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsRequest.\n * Use `create(GetNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const GetNotificationSettingsRequestSchema: GenMessage<GetNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 20);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsResponse\n */\nexport type GetNotificationSettingsResponse = Message<\"public_api.v1.GetNotificationSettingsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetNotificationSettingsResponse.Project projects = 1;\n */\n projects: GetNotificationSettingsResponse_Project[];\n\n /**\n * @generated from field: bool is_muted = 2;\n */\n isMuted: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsResponse.\n * Use `create(GetNotificationSettingsResponseSchema)` to create a new message.\n */\nexport const GetNotificationSettingsResponseSchema: GenMessage<GetNotificationSettingsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 21);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsResponse.Project\n */\nexport type GetNotificationSettingsResponse_Project = Message<\"public_api.v1.GetNotificationSettingsResponse.Project\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: public_api.v1.GetNotificationSettingsResponse.Status status = 3;\n */\n status: GetNotificationSettingsResponse_Status;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme theme = 4;\n */\n theme?: ProjectTheme;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsResponse.Project.\n * Use `create(GetNotificationSettingsResponse_ProjectSchema)` to create a new message.\n */\nexport const GetNotificationSettingsResponse_ProjectSchema: GenMessage<GetNotificationSettingsResponse_Project> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 21, 0);\n\n/**\n * @generated from enum public_api.v1.GetNotificationSettingsResponse.Status\n */\nexport enum GetNotificationSettingsResponse_Status {\n /**\n * @generated from enum value: STATUS_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: STATUS_ENABLED = 1;\n */\n ENABLED = 1,\n\n /**\n * @generated from enum value: STATUS_DISABLED = 2;\n */\n DISABLED = 2,\n}\n\n/**\n * Describes the enum public_api.v1.GetNotificationSettingsResponse.Status.\n */\nexport const GetNotificationSettingsResponse_StatusSchema: GenEnum<GetNotificationSettingsResponse_Status> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 21, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesRequest\n */\nexport type UserPanelPushGetAvailableCompaniesRequest = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesRequest.\n * Use `create(UserPanelPushGetAvailableCompaniesRequestSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesRequestSchema: GenMessage<UserPanelPushGetAvailableCompaniesRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 22);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse\n */\nexport type UserPanelPushGetAvailableCompaniesResponse = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company companies = 1;\n */\n companies: UserPanelPushGetAvailableCompaniesResponse_Company[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.\n * Use `create(UserPanelPushGetAvailableCompaniesResponseSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponseSchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 23);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group\n */\nexport type UserPanelPushGetAvailableCompaniesResponse_Group = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional string how_often = 4;\n */\n howOften?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group.\n * Use `create(UserPanelPushGetAvailableCompaniesResponse_GroupSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponse_GroupSchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse_Group> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 23, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company\n */\nexport type UserPanelPushGetAvailableCompaniesResponse_Company = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: repeated public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group groups = 3;\n */\n groups: UserPanelPushGetAvailableCompaniesResponse_Group[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company.\n * Use `create(UserPanelPushGetAvailableCompaniesResponse_CompanySchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponse_CompanySchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse_Company> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 23, 1);\n\n/**\n * @generated from message public_api.v1.ShouldShopProductsResponse\n */\nexport type ShouldShopProductsResponse = Message<\"public_api.v1.ShouldShopProductsResponse\"> & {\n /**\n * @generated from field: bool is_visible = 1;\n */\n isVisible: boolean;\n};\n\n/**\n * Describes the message public_api.v1.ShouldShopProductsResponse.\n * Use `create(ShouldShopProductsResponseSchema)` to create a new message.\n */\nexport const ShouldShopProductsResponseSchema: GenMessage<ShouldShopProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 24);\n\n/**\n * @generated from message public_api.v1.GetShopProductsRequest\n */\nexport type GetShopProductsRequest = Message<\"public_api.v1.GetShopProductsRequest\"> & {\n /**\n * @generated from field: optional string access_token = 1;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsRequest.\n * Use `create(GetShopProductsRequestSchema)` to create a new message.\n */\nexport const GetShopProductsRequestSchema: GenMessage<GetShopProductsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 25);\n\n/**\n * @generated from message public_api.v1.GetShopProductsResponse\n */\nexport type GetShopProductsResponse = Message<\"public_api.v1.GetShopProductsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetShopProductsResponse.Product products = 5;\n */\n products: GetShopProductsResponse_Product[];\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsResponse.\n * Use `create(GetShopProductsResponseSchema)` to create a new message.\n */\nexport const GetShopProductsResponseSchema: GenMessage<GetShopProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 26);\n\n/**\n * @generated from message public_api.v1.GetShopProductsResponse.Product\n */\nexport type GetShopProductsResponse_Product = Message<\"public_api.v1.GetShopProductsResponse.Product\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string image_url = 3;\n */\n imageUrl: string;\n\n /**\n * @generated from field: string price = 4;\n */\n price: string;\n\n /**\n * @generated from field: optional bool is_already_bought = 5;\n */\n isAlreadyBought?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsResponse.Product.\n * Use `create(GetShopProductsResponse_ProductSchema)` to create a new message.\n */\nexport const GetShopProductsResponse_ProductSchema: GenMessage<GetShopProductsResponse_Product> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 26, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsResponse\n */\nexport type UserPanelGetFileDetailsResponse = Message<\"public_api.v1.UserPanelGetFileDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetFileDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetFileDetailsResponse.Result success = 1;\n */\n value: UserPanelGetFileDetailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsResponse.\n * Use `create(UserPanelGetFileDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsResponseSchema: GenMessage<UserPanelGetFileDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 27);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsResponse.Result\n */\nexport type UserPanelGetFileDetailsResponse_Result = Message<\"public_api.v1.UserPanelGetFileDetailsResponse.Result\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated string files = 2;\n */\n files: string[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsResponse.Result.\n * Use `create(UserPanelGetFileDetailsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsResponse_ResultSchema: GenMessage<UserPanelGetFileDetailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 27, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsRequest\n */\nexport type UserPanelGetFileDetailsRequest = Message<\"public_api.v1.UserPanelGetFileDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsRequest.\n * Use `create(UserPanelGetFileDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsRequestSchema: GenMessage<UserPanelGetFileDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 28);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsResponse\n */\nexport type UserPanelGetTicketDetailsResponse = Message<\"public_api.v1.UserPanelGetTicketDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetTicketDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetTicketDetailsResponse.Result success = 1;\n */\n value: UserPanelGetTicketDetailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsResponse.\n * Use `create(UserPanelGetTicketDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsResponseSchema: GenMessage<UserPanelGetTicketDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 29);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsResponse.Result\n */\nexport type UserPanelGetTicketDetailsResponse_Result = Message<\"public_api.v1.UserPanelGetTicketDetailsResponse.Result\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string ticket_url = 2;\n */\n ticketUrl: string;\n\n /**\n * @generated from field: string product_name = 3;\n */\n productName: string;\n\n /**\n * @generated from field: string product_image_url = 4;\n */\n productImageUrl: string;\n\n /**\n * @generated from field: optional string google_wallet_url = 5;\n */\n googleWalletUrl?: string;\n\n /**\n * @generated from field: optional string apple_wallet_url = 6;\n */\n appleWalletUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsResponse.Result.\n * Use `create(UserPanelGetTicketDetailsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsResponse_ResultSchema: GenMessage<UserPanelGetTicketDetailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 29, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsRequest\n */\nexport type UserPanelGetTicketDetailsRequest = Message<\"public_api.v1.UserPanelGetTicketDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsRequest.\n * Use `create(UserPanelGetTicketDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsRequestSchema: GenMessage<UserPanelGetTicketDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 30);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result success = 1;\n */\n value: UserPanelGetAudiobookDetailsDownloadURLsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponseSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 31);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails\"> & {\n /**\n * @generated from field: string chapter_id = 1;\n */\n chapterId: string;\n\n /**\n * @generated from field: string public_url = 2;\n */\n publicUrl: string;\n\n /**\n * @generated from field: optional string downloadable_url = 3;\n */\n downloadableUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetailsSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetailsSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 31, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse_Result = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails audiobook_download_details = 1;\n */\n audiobookDownloadDetails: UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails[];\n\n /**\n * @generated from field: optional bool is_available_to_download_in_mobile_app = 2;\n */\n isAvailableToDownloadInMobileApp?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponse_ResultSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 31, 1);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsRequest = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n\n /**\n * @generated from field: optional bool is_browser = 3;\n */\n isBrowser?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsRequestSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 32);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsResponse\n */\nexport type UserPanelGetAudiobookDetailsResponse = Message<\"public_api.v1.UserPanelGetAudiobookDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetAudiobookDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n value: Audiobook$1;\n case: \"audiobook\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsResponse.\n * Use `create(UserPanelGetAudiobookDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsResponseSchema: GenMessage<UserPanelGetAudiobookDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 33);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsRequest\n */\nexport type UserPanelGetAudiobookDetailsRequest = Message<\"public_api.v1.UserPanelGetAudiobookDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsRequest.\n * Use `create(UserPanelGetAudiobookDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsRequestSchema: GenMessage<UserPanelGetAudiobookDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 34);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsRequest\n */\nexport type UserPanelGetProductsRequest = Message<\"public_api.v1.UserPanelGetProductsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsRequest.\n * Use `create(UserPanelGetProductsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetProductsRequestSchema: GenMessage<UserPanelGetProductsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 35);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsResponse\n */\nexport type UserPanelGetProductsResponse = Message<\"public_api.v1.UserPanelGetProductsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetProductsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetProductsResponse.Result success = 1;\n */\n value: UserPanelGetProductsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsResponse.\n * Use `create(UserPanelGetProductsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetProductsResponseSchema: GenMessage<UserPanelGetProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 36);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsResponse.Result\n */\nexport type UserPanelGetProductsResponse_Result = Message<\"public_api.v1.UserPanelGetProductsResponse.Result\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserProduct products = 1;\n */\n products: UserProduct[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsResponse.Result.\n * Use `create(UserPanelGetProductsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetProductsResponse_ResultSchema: GenMessage<UserPanelGetProductsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 36, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelLogoutRequest\n */\nexport type UserPanelLogoutRequest = Message<\"public_api.v1.UserPanelLogoutRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLogoutRequest.\n * Use `create(UserPanelLogoutRequestSchema)` to create a new message.\n */\nexport const UserPanelLogoutRequestSchema: GenMessage<UserPanelLogoutRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 37);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginWithCodeResponse\n */\nexport type UserPanelLoginWithCodeResponse = Message<\"public_api.v1.UserPanelLoginWithCodeResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelLoginWithCodeResponse.result\n */\n result: {\n /**\n * @generated from field: string access_token = 1;\n */\n value: string;\n case: \"accessToken\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n\n /**\n * @generated from field: optional string email = 3;\n */\n email?: string;\n\n /**\n * @generated from field: optional string user_id = 4;\n */\n userId?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginWithCodeResponse.\n * Use `create(UserPanelLoginWithCodeResponseSchema)` to create a new message.\n */\nexport const UserPanelLoginWithCodeResponseSchema: GenMessage<UserPanelLoginWithCodeResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 38);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginWithCodeRequest\n */\nexport type UserPanelLoginWithCodeRequest = Message<\"public_api.v1.UserPanelLoginWithCodeRequest\"> & {\n /**\n * @generated from field: int32 code = 1;\n */\n code: number;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginWithCodeRequest.\n * Use `create(UserPanelLoginWithCodeRequestSchema)` to create a new message.\n */\nexport const UserPanelLoginWithCodeRequestSchema: GenMessage<UserPanelLoginWithCodeRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 39);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginResponse\n */\nexport type UserPanelLoginResponse = Message<\"public_api.v1.UserPanelLoginResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelLoginResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelLoginResponse.Result success = 1;\n */\n value: UserPanelLoginResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginResponse.\n * Use `create(UserPanelLoginResponseSchema)` to create a new message.\n */\nexport const UserPanelLoginResponseSchema: GenMessage<UserPanelLoginResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 40);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginResponse.Result\n */\nexport type UserPanelLoginResponse_Result = Message<\"public_api.v1.UserPanelLoginResponse.Result\"> & {\n /**\n * @generated from field: int32 retry_in = 1;\n */\n retryIn: number;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginResponse.Result.\n * Use `create(UserPanelLoginResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelLoginResponse_ResultSchema: GenMessage<UserPanelLoginResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 40, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginRequest\n */\nexport type UserPanelLoginRequest = Message<\"public_api.v1.UserPanelLoginRequest\"> & {\n /**\n * @generated from field: string email = 1;\n */\n email: string;\n\n /**\n * @generated from field: optional bool regulations_accept = 2;\n */\n regulationsAccept?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginRequest.\n * Use `create(UserPanelLoginRequestSchema)` to create a new message.\n */\nexport const UserPanelLoginRequestSchema: GenMessage<UserPanelLoginRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 41);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlRequest\n */\nexport type GetOrderRetryUrlRequest = Message<\"public_api.v1.GetOrderRetryUrlRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlRequest.\n * Use `create(GetOrderRetryUrlRequestSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlRequestSchema: GenMessage<GetOrderRetryUrlRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 42);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlResponse\n */\nexport type GetOrderRetryUrlResponse = Message<\"public_api.v1.GetOrderRetryUrlResponse\"> & {\n /**\n * @generated from oneof public_api.v1.GetOrderRetryUrlResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.GetOrderRetryUrlResponse.Success url = 1;\n */\n value: GetOrderRetryUrlResponse_Success;\n case: \"url\";\n } | {\n /**\n * @generated from field: string failure = 2;\n */\n value: string;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlResponse.\n * Use `create(GetOrderRetryUrlResponseSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlResponseSchema: GenMessage<GetOrderRetryUrlResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 43);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlResponse.Success\n */\nexport type GetOrderRetryUrlResponse_Success = Message<\"public_api.v1.GetOrderRetryUrlResponse.Success\"> & {\n /**\n * @generated from field: string url = 1;\n */\n url: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlResponse.Success.\n * Use `create(GetOrderRetryUrlResponse_SuccessSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlResponse_SuccessSchema: GenMessage<GetOrderRetryUrlResponse_Success> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 43, 0);\n\n/**\n * @generated from message public_api.v1.GetOrderRequest\n */\nexport type GetOrderRequest = Message<\"public_api.v1.GetOrderRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRequest.\n * Use `create(GetOrderRequestSchema)` to create a new message.\n */\nexport const GetOrderRequestSchema: GenMessage<GetOrderRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 44);\n\n/**\n * @generated from message public_api.v1.GetOrderResponse\n */\nexport type GetOrderResponse = Message<\"public_api.v1.GetOrderResponse\"> & {\n /**\n * @generated from field: optional string id = 1;\n */\n id?: string;\n\n /**\n * @generated from field: repeated public_api.v1.Item items = 2;\n */\n items: Item[];\n\n /**\n * @generated from field: public_api.v1.OrderDetails details = 3;\n */\n details?: OrderDetails;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderResponse.\n * Use `create(GetOrderResponseSchema)` to create a new message.\n */\nexport const GetOrderResponseSchema: GenMessage<GetOrderResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 45);\n\n/**\n * @generated from message public_api.v1.OrderDetails\n */\nexport type OrderDetails = Message<\"public_api.v1.OrderDetails\"> & {\n /**\n * @generated from field: repeated public_api.v1.OrderDetails.SingleItem items = 1;\n */\n items: OrderDetails_SingleItem[];\n\n /**\n * @generated from field: common.v1.Gateway gateway = 2;\n */\n gateway: Gateway;\n};\n\n/**\n * Describes the message public_api.v1.OrderDetails.\n * Use `create(OrderDetailsSchema)` to create a new message.\n */\nexport const OrderDetailsSchema: GenMessage<OrderDetails> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 46);\n\n/**\n * @generated from message public_api.v1.OrderDetails.SingleItem\n */\nexport type OrderDetails_SingleItem = Message<\"public_api.v1.OrderDetails.SingleItem\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: optional string image_url = 2;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: int32 quantity = 4;\n */\n quantity: number;\n\n /**\n * @generated from field: int64 price_amount = 5;\n */\n priceAmount: bigint;\n\n /**\n * @generated from field: string price_currency = 6;\n */\n priceCurrency: string;\n};\n\n/**\n * Describes the message public_api.v1.OrderDetails.SingleItem.\n * Use `create(OrderDetails_SingleItemSchema)` to create a new message.\n */\nexport const OrderDetails_SingleItemSchema: GenMessage<OrderDetails_SingleItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 46, 0);\n\n/**\n * @generated from message public_api.v1.Item\n */\nexport type Item = Message<\"public_api.v1.Item\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string image_url = 3;\n */\n imageUrl: string;\n\n /**\n * @generated from oneof public_api.v1.Item.item\n */\n item: {\n /**\n * @generated from field: public_api.v1.FileDownloadable file_downloadable = 4;\n */\n value: FileDownloadable;\n case: \"fileDownloadable\";\n } | {\n /**\n * @generated from field: public_api.v1.Audiobook audiobook = 5;\n */\n value: Audiobook;\n case: \"audiobook\";\n } | {\n /**\n * @generated from field: public_api.v1.Ticket ticket = 6;\n */\n value: Ticket;\n case: \"ticket\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.Item.\n * Use `create(ItemSchema)` to create a new message.\n */\nexport const ItemSchema: GenMessage<Item> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 47);\n\n/**\n * @generated from message public_api.v1.FileDownloadable\n */\nexport type FileDownloadable = Message<\"public_api.v1.FileDownloadable\"> & {\n /**\n * @generated from field: string file_url = 1;\n */\n fileUrl: string;\n};\n\n/**\n * Describes the message public_api.v1.FileDownloadable.\n * Use `create(FileDownloadableSchema)` to create a new message.\n */\nexport const FileDownloadableSchema: GenMessage<FileDownloadable> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 48);\n\n/**\n * @generated from message public_api.v1.Audiobook\n */\nexport type Audiobook = Message<\"public_api.v1.Audiobook\"> & {\n /**\n * @generated from field: string app_download_url = 1;\n */\n appDownloadUrl: string;\n};\n\n/**\n * Describes the message public_api.v1.Audiobook.\n * Use `create(AudiobookSchema)` to create a new message.\n */\nexport const AudiobookSchema: GenMessage<Audiobook> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 49);\n\n/**\n * @generated from message public_api.v1.Ticket\n */\nexport type Ticket = Message<\"public_api.v1.Ticket\"> & {\n /**\n * @generated from field: string ticket_id = 1;\n */\n ticketId: string;\n\n /**\n * @generated from field: optional string apple_pass_url = 2;\n */\n applePassUrl?: string;\n\n /**\n * @generated from field: optional string google_ticket_url = 3;\n */\n googleTicketUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.Ticket.\n * Use `create(TicketSchema)` to create a new message.\n */\nexport const TicketSchema: GenMessage<Ticket> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 50);\n\n/**\n * @generated from message public_api.v1.UserProduct\n */\nexport type UserProduct = Message<\"public_api.v1.UserProduct\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string project_name = 2;\n */\n projectName: string;\n\n /**\n * @generated from field: string product_id = 3;\n */\n productId: string;\n\n /**\n * @generated from field: string product_name = 4;\n */\n productName: string;\n\n /**\n * @generated from field: string product_description = 5;\n */\n productDescription: string;\n\n /**\n * @generated from field: string product_image_url = 6;\n */\n productImageUrl: string;\n\n /**\n * @generated from field: public_api.v1.UserProductType product_type = 7;\n */\n productType: UserProductType;\n\n /**\n * @generated from field: string access_id = 8;\n */\n accessId: string;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme project_theme = 9;\n */\n projectTheme?: ProjectTheme;\n};\n\n/**\n * Describes the message public_api.v1.UserProduct.\n * Use `create(UserProductSchema)` to create a new message.\n */\nexport const UserProductSchema: GenMessage<UserProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 51);\n\n/**\n * @generated from message public_api.v1.BoolResponse\n */\nexport type BoolResponse = Message<\"public_api.v1.BoolResponse\"> & {\n /**\n * @generated from oneof public_api.v1.BoolResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.BoolResponse.\n * Use `create(BoolResponseSchema)` to create a new message.\n */\nexport const BoolResponseSchema: GenMessage<BoolResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 52);\n\n/**\n * @generated from message public_api.v1.PushEventRequest\n */\nexport type PushEventRequest = Message<\"public_api.v1.PushEventRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string notification_id = 2;\n */\n notificationId: string;\n\n /**\n * @generated from field: common.v1.NotificationEvent event = 3;\n */\n event: NotificationEvent;\n};\n\n/**\n * Describes the message public_api.v1.PushEventRequest.\n * Use `create(PushEventRequestSchema)` to create a new message.\n */\nexport const PushEventRequestSchema: GenMessage<PushEventRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 53);\n\n/**\n * @generated from message public_api.v1.PushSendDeviceTokenRequest\n */\nexport type PushSendDeviceTokenRequest = Message<\"public_api.v1.PushSendDeviceTokenRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: common.v1.PushNotificationDeviceToken payload = 2;\n */\n payload?: PushNotificationDeviceToken;\n\n /**\n * @generated from field: optional bool is_notification_granted = 3;\n */\n isNotificationGranted?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.PushSendDeviceTokenRequest.\n * Use `create(PushSendDeviceTokenRequestSchema)` to create a new message.\n */\nexport const PushSendDeviceTokenRequestSchema: GenMessage<PushSendDeviceTokenRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 54);\n\n/**\n * @generated from message public_api.v1.ProjectTheme\n */\nexport type ProjectTheme = Message<\"public_api.v1.ProjectTheme\"> & {\n /**\n * @generated from field: optional string image_url = 1;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: optional string image_dark_url = 2;\n */\n imageDarkUrl?: string;\n\n /**\n * @generated from field: optional string brand_color = 3;\n */\n brandColor?: string;\n\n /**\n * @generated from field: optional string brand_color_dark = 4;\n */\n brandColorDark?: string;\n};\n\n/**\n * Describes the message public_api.v1.ProjectTheme.\n * Use `create(ProjectThemeSchema)` to create a new message.\n */\nexport const ProjectThemeSchema: GenMessage<ProjectTheme> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 55);\n\n/**\n * @generated from enum public_api.v1.UserProductType\n */\nexport enum UserProductType {\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_AUDIO = 1;\n */\n AUDIO = 1,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_FILE = 2;\n */\n FILE = 2,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_TICKET = 3;\n */\n TICKET = 3,\n}\n\n/**\n * Describes the enum public_api.v1.UserProductType.\n */\nexport const UserProductTypeSchema: GenEnum<UserProductType> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 0);\n\n/**\n * @generated from enum public_api.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_EMAIL_NOT_FOUND = 1;\n */\n EMAIL_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_EMAIL = 2;\n */\n INCORRECT_EMAIL = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_CODE = 3;\n */\n INCORRECT_CODE = 3,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_GENERATE_ACCESS_TOKEN_FAILED = 4;\n */\n GENERATE_ACCESS_TOKEN_FAILED = 4,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_LOGOUT_FAILED = 5;\n */\n LOGOUT_FAILED = 5,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PRDUCTS_NOT_FOUND = 6;\n */\n PRDUCTS_NOT_FOUND = 6,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_AUDIOBOOK_NOT_FOUND = 7;\n */\n AUDIOBOOK_NOT_FOUND = 7,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_AUDIOBOOK = 8;\n */\n INCORRECT_AUDIOBOOK = 8,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNAUTHORIZED = 9;\n */\n UNAUTHORIZED = 9,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_TICKET_NOT_FOUND = 10;\n */\n TICKET_NOT_FOUND = 10,\n}\n\n/**\n * Describes the enum public_api.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 1);\n\n/**\n * @generated from enum public_api.v1.NotificationMethod\n */\nexport enum NotificationMethod {\n /**\n * @generated from enum value: NOTIFICATION_METHOD_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_EMAIL = 1;\n */\n EMAIL = 1,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_SMS = 2;\n */\n SMS = 2,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_PUSH = 3;\n */\n PUSH = 3,\n}\n\n/**\n * Describes the enum public_api.v1.NotificationMethod.\n */\nexport const NotificationMethodSchema: GenEnum<NotificationMethod> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 2);\n\n/**\n * @generated from service public_api.v1.PublicApiService\n */\nexport const PublicApiService: GenService<{\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetOrder\n */\n getOrder: {\n methodKind: \"unary\";\n input: typeof GetOrderRequestSchema;\n output: typeof GetOrderResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetOrderRetryUrl\n */\n getOrderRetryUrl: {\n methodKind: \"unary\";\n input: typeof GetOrderRetryUrlRequestSchema;\n output: typeof GetOrderRetryUrlResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogin\n */\n userPanelLogin: {\n methodKind: \"unary\";\n input: typeof UserPanelLoginRequestSchema;\n output: typeof UserPanelLoginResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLoginWithCode\n */\n userPanelLoginWithCode: {\n methodKind: \"unary\";\n input: typeof UserPanelLoginWithCodeRequestSchema;\n output: typeof UserPanelLoginWithCodeResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogout\n */\n userPanelLogout: {\n methodKind: \"unary\";\n input: typeof UserPanelLogoutRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelDeleteAccount\n */\n userPanelDeleteAccount: {\n methodKind: \"unary\";\n input: typeof UserPanelDeleteAccountRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetProducts\n */\n userPanelGetProducts: {\n methodKind: \"unary\";\n input: typeof UserPanelGetProductsRequestSchema;\n output: typeof UserPanelGetProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetails\n */\n userPanelGetAudiobookDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetAudiobookDetailsRequestSchema;\n output: typeof UserPanelGetAudiobookDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetailsDownloadURLs\n */\n userPanelGetAudiobookDetailsDownloadURLs: {\n methodKind: \"unary\";\n input: typeof UserPanelGetAudiobookDetailsDownloadURLsRequestSchema;\n output: typeof UserPanelGetAudiobookDetailsDownloadURLsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetFileDetails\n */\n userPanelGetFileDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetFileDetailsRequestSchema;\n output: typeof UserPanelGetFileDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetTicketDetails\n */\n userPanelGetTicketDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetTicketDetailsRequestSchema;\n output: typeof UserPanelGetTicketDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.PushSendDeviceToken\n */\n pushSendDeviceToken: {\n methodKind: \"unary\";\n input: typeof PushSendDeviceTokenRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.PushEvent\n */\n pushEvent: {\n methodKind: \"unary\";\n input: typeof PushEventRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * iOS SHOP methods\n *\n * @generated from rpc public_api.v1.PublicApiService.ShouldShopProducts\n */\n shouldShopProducts: {\n methodKind: \"unary\";\n input: typeof EmptySchema;\n output: typeof ShouldShopProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetShopProducts\n */\n getShopProducts: {\n methodKind: \"unary\";\n input: typeof GetShopProductsRequestSchema;\n output: typeof GetShopProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.DidBuyProduct\n */\n didBuyProduct: {\n methodKind: \"unary\";\n input: typeof DidBuyProductRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * Notification settings\n *\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettings\n */\n getNotificationSettings: {\n methodKind: \"unary\";\n input: typeof GetNotificationSettingsRequestSchema;\n output: typeof GetNotificationSettingsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettingsDetails\n */\n getNotificationSettingsDetails: {\n methodKind: \"unary\";\n input: typeof GetNotificationSettingsDetailsRequestSchema;\n output: typeof GetNotificationSettingsDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UpdateGlobalNotificationSettings\n */\n updateGlobalNotificationSettings: {\n methodKind: \"unary\";\n input: typeof UpdateGlobalNotificationSettingsRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UpdateNotificationSettings\n */\n updateNotificationSettings: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationSettingsRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * Product V2 requests\n *\n * @generated from rpc public_api.v1.PublicApiService.GetAvailableCountForProduct\n */\n getAvailableCountForProduct: {\n methodKind: \"unary\";\n input: typeof GetAvailableCountForProductRequestSchema;\n output: typeof GetAvailableCountForProductResponseSchema;\n },\n /**\n * Checkout requests\n *\n * @generated from rpc public_api.v1.PublicApiService.IsOneClickPaymentAvailable\n */\n isOneClickPaymentAvailable: {\n methodKind: \"unary\";\n input: typeof IsOneClickPaymentAvailableRequestSchema;\n output: typeof IsOneClickPaymentAvailableResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetPreOrderDetails\n */\n getPreOrderDetails: {\n methodKind: \"unary\";\n input: typeof GetPreOrderDetailsRequestSchema;\n output: typeof GetPreOrderDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.ApplePayValidateMerchant\n */\n applePayValidateMerchant: {\n methodKind: \"unary\";\n input: typeof ApplePayValidateMerchantRequestSchema;\n output: typeof ApplePayValidateMerchantResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.AuthorizeOneClickPayment\n */\n authorizeOneClickPayment: {\n methodKind: \"unary\";\n input: typeof OneClickAuthorizePaymentRequestSchema;\n output: typeof OneClickAuthorizePaymentResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.NotifyUserAboutProductAvailability\n */\n notifyUserAboutProductAvailability: {\n methodKind: \"unary\";\n input: typeof NotifyUserAboutProductAvailabilityRequestSchema;\n output: typeof EmptySchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_public_v1_public_api, 0);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file common/v1/gateway.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc } from \"@bufbuild/protobuf/codegenv2\";\n\n/**\n * Describes the file common/v1/gateway.proto.\n */\nexport const file_common_v1_gateway: GenFile = /*@__PURE__*/\n fileDesc(\"Chdjb21tb24vdjEvZ2F0ZXdheS5wcm90bxIJY29tbW9uLnYxKrMBCgdHYXRld2F5Eg8KC0dBVEVXQVlfQUxMEAASFwoTR0FURVdBWV9QUlpFTEVXWV8yNBABEhIKDkdBVEVXQVlfU1RSSVBFEAISEAoMR0FURVdBWV9UUEFZEAMSHAoYR0FURVdBWV9DQVNIX09OX0RFTElWRVJZEAQSEAoMR0FURVdBWV9GUkVFEAUSFgoSR0FURVdBWV9JTlBPU1RfUEFZEAYSEAoMR0FURVdBWV9QQVlVEAdCTlpMZ2l0aHViLmNvbS9lbW1lbXMvc3VwZXItY2FydC9hcHBzL3Nydi13b3JrZXIvdXRpbHMvbW9kZWxzL2NvbW1vbi92MTtjb21tb252MWIGcHJvdG8z\");\n\n/**\n * @generated from enum common.v1.Gateway\n */\nexport enum Gateway {\n /**\n * @generated from enum value: GATEWAY_ALL = 0;\n */\n ALL = 0,\n\n /**\n * @generated from enum value: GATEWAY_PRZELEWY_24 = 1;\n */\n PRZELEWY_24 = 1,\n\n /**\n * @generated from enum value: GATEWAY_STRIPE = 2;\n */\n STRIPE = 2,\n\n /**\n * @generated from enum value: GATEWAY_TPAY = 3;\n */\n TPAY = 3,\n\n /**\n * @generated from enum value: GATEWAY_CASH_ON_DELIVERY = 4;\n */\n CASH_ON_DELIVERY = 4,\n\n /**\n * @generated from enum value: GATEWAY_FREE = 5;\n */\n FREE = 5,\n\n /**\n * @generated from enum value: GATEWAY_INPOST_PAY = 6;\n */\n INPOST_PAY = 6,\n\n /**\n * @generated from enum value: GATEWAY_PAYU = 7;\n */\n PAYU = 7,\n}\n\n/**\n * Describes the enum common.v1.Gateway.\n */\nexport const GatewaySchema: GenEnum<Gateway> = /*@__PURE__*/\n enumDesc(file_common_v1_gateway, 0);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file common/v1/address.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file common/v1/address.proto.\n */\nexport const file_common_v1_address: GenFile = /*@__PURE__*/\n fileDesc(\"Chdjb21tb24vdjEvYWRkcmVzcy5wcm90bxIJY29tbW9uLnYxIocBCgdBZGRyZXNzEgwKBG5hbWUYASABKAkSDQoFbGluZTEYAiABKAkSEgoFbGluZTIYAyABKAlIAIgBARIMCgRjaXR5GAQgASgJEg8KB2NvdW50cnkYBSABKAkSFQoIemlwX2NvZGUYBiABKAlIAYgBAUIICgZfbGluZTJCCwoJX3ppcF9jb2RlIq4BCg5CaWxsaW5nQWRkcmVzcxIMCgRuYW1lGAEgASgJEg0KBWxpbmUxGAIgASgJEhIKBWxpbmUyGAMgASgJSACIAQESDAoEY2l0eRgEIAEoCRIPCgdjb3VudHJ5GAUgASgJEhUKCHppcF9jb2RlGAYgASgJSAGIAQESEwoGdGF4X2lkGAcgASgJSAKIAQFCCAoGX2xpbmUyQgsKCV96aXBfY29kZUIJCgdfdGF4X2lkQk5aTGdpdGh1Yi5jb20vZW1tZW1zL3N1cGVyLWNhcnQvYXBwcy9zcnYtd29ya2VyL3V0aWxzL21vZGVscy9jb21tb24vdjE7Y29tbW9udjFiBnByb3RvMw\");\n\n/**\n * @generated from message common.v1.Address\n */\nexport type Address = Message<\"common.v1.Address\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: string line1 = 2;\n */\n line1: string;\n\n /**\n * @generated from field: optional string line2 = 3;\n */\n line2?: string;\n\n /**\n * @generated from field: string city = 4;\n */\n city: string;\n\n /**\n * @generated from field: string country = 5;\n */\n country: string;\n\n /**\n * @generated from field: optional string zip_code = 6;\n */\n zipCode?: string;\n};\n\n/**\n * Describes the message common.v1.Address.\n * Use `create(AddressSchema)` to create a new message.\n */\nexport const AddressSchema: GenMessage<Address> = /*@__PURE__*/\n messageDesc(file_common_v1_address, 0);\n\n/**\n * @generated from message common.v1.BillingAddress\n */\nexport type BillingAddress = Message<\"common.v1.BillingAddress\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: string line1 = 2;\n */\n line1: string;\n\n /**\n * @generated from field: optional string line2 = 3;\n */\n line2?: string;\n\n /**\n * @generated from field: string city = 4;\n */\n city: string;\n\n /**\n * @generated from field: string country = 5;\n */\n country: string;\n\n /**\n * @generated from field: optional string zip_code = 6;\n */\n zipCode?: string;\n\n /**\n * @generated from field: optional string tax_id = 7;\n */\n taxId?: string;\n};\n\n/**\n * Describes the message common.v1.BillingAddress.\n * Use `create(BillingAddressSchema)` to create a new message.\n */\nexport const BillingAddressSchema: GenMessage<BillingAddress> = /*@__PURE__*/\n messageDesc(file_common_v1_address, 1);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file common/v1/push_notifications.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file common/v1/push_notifications.proto.\n */\nexport const file_common_v1_push_notifications: GenFile = /*@__PURE__*/\n fileDesc(\"CiJjb21tb24vdjEvcHVzaF9ub3RpZmljYXRpb25zLnByb3RvEgljb21tb24udjEi9gEKG1B1c2hOb3RpZmljYXRpb25EZXZpY2VUb2tlbhIXCgpwdXNoX3Rva2VuGAIgASgJSACIAQESNAoLZXhwaXJlX3RpbWUYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wSAGIAQESEwoGcDI1NmRoGAQgASgJSAKIAQESFQoIZW5kcG9pbnQYBSABKAlIA4gBARIlCghwbGF0Zm9ybRgGIAEoDjITLmNvbW1vbi52MS5QbGF0Zm9ybUINCgtfcHVzaF90b2tlbkIOCgxfZXhwaXJlX3RpbWVCCQoHX3AyNTZkaEILCglfZW5kcG9pbnQiZwoXUHVzaE5vdGlmaWNhdGlvblBheWxvYWQSDQoFdGl0bGUYAiABKAkSFQoIb3Blbl91cmwYAyABKAlIAYgBARIOCgRib2R5GAQgASgJSABCCQoHbWVzc2FnZUILCglfb3Blbl91cmwqeAoIUGxhdGZvcm0SGAoUUExBVEZPUk1fVU5TUEVDSUZJRUQQABIQCgxQTEFURk9STV9XRUIQARIYChRQTEFURk9STV9JT1NfU0FOREJPWBACEhAKDFBMQVRGT1JNX0lPUxADEhQKEFBMQVRGT1JNX0FORFJPSUQQBCp0ChFOb3RpZmljYXRpb25FdmVudBIRCg1FVkVOVF9VTktOT1dOEAASEgoORVZFTlRfUkVDRUlWRUQQARIQCgxFVkVOVF9PUEVORUQQAhIRCg1FVkVOVF9DTElDS0VEEAMSEwoPRVZFTlRfRElTTUlTU0VEEAQqmQEKGU5vdGlmaWNhdGlvbkdyb3VwSG93T2Z0ZW4SJwojTk9USUZJQ0FUSU9OX0dST1VQX0hPV19PRlRFTl9SQVJFTFkQABImCiJOT1RJRklDQVRJT05fR1JPVVBfSE9XX09GVEVOX09GVEVOEAESKwonTk9USUZJQ0FUSU9OX0dST1VQX0hPV19PRlRFTl9WRVJZX09GVEVOEAJCTlpMZ2l0aHViLmNvbS9lbW1lbXMvc3VwZXItY2FydC9hcHBzL3Nydi13b3JrZXIvdXRpbHMvbW9kZWxzL2NvbW1vbi92MTtjb21tb252MWIGcHJvdG8z\", [file_google_protobuf_timestamp]);\n\n/**\n * @generated from message common.v1.PushNotificationDeviceToken\n */\nexport type PushNotificationDeviceToken = Message<\"common.v1.PushNotificationDeviceToken\"> & {\n /**\n * @generated from field: optional string push_token = 2;\n */\n pushToken?: string;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp expire_time = 3;\n */\n expireTime?: Timestamp;\n\n /**\n * @generated from field: optional string p256dh = 4;\n */\n p256dh?: string;\n\n /**\n * @generated from field: optional string endpoint = 5;\n */\n endpoint?: string;\n\n /**\n * @generated from field: common.v1.Platform platform = 6;\n */\n platform: Platform;\n};\n\n/**\n * Describes the message common.v1.PushNotificationDeviceToken.\n * Use `create(PushNotificationDeviceTokenSchema)` to create a new message.\n */\nexport const PushNotificationDeviceTokenSchema: GenMessage<PushNotificationDeviceToken> = /*@__PURE__*/\n messageDesc(file_common_v1_push_notifications, 0);\n\n/**\n * @generated from message common.v1.PushNotificationPayload\n */\nexport type PushNotificationPayload = Message<\"common.v1.PushNotificationPayload\"> & {\n /**\n * @generated from field: string title = 2;\n */\n title: string;\n\n /**\n * @generated from field: optional string open_url = 3;\n */\n openUrl?: string;\n\n /**\n * @generated from oneof common.v1.PushNotificationPayload.message\n */\n message: {\n /**\n * @generated from field: string body = 4;\n */\n value: string;\n case: \"body\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message common.v1.PushNotificationPayload.\n * Use `create(PushNotificationPayloadSchema)` to create a new message.\n */\nexport const PushNotificationPayloadSchema: GenMessage<PushNotificationPayload> = /*@__PURE__*/\n messageDesc(file_common_v1_push_notifications, 1);\n\n/**\n * @generated from enum common.v1.Platform\n */\nexport enum Platform {\n /**\n * @generated from enum value: PLATFORM_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: PLATFORM_WEB = 1;\n */\n WEB = 1,\n\n /**\n * @generated from enum value: PLATFORM_IOS_SANDBOX = 2;\n */\n IOS_SANDBOX = 2,\n\n /**\n * @generated from enum value: PLATFORM_IOS = 3;\n */\n IOS = 3,\n\n /**\n * @generated from enum value: PLATFORM_ANDROID = 4;\n */\n ANDROID = 4,\n}\n\n/**\n * Describes the enum common.v1.Platform.\n */\nexport const PlatformSchema: GenEnum<Platform> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 0);\n\n/**\n * @generated from enum common.v1.NotificationEvent\n */\nexport enum NotificationEvent {\n /**\n * @generated from enum value: EVENT_UNKNOWN = 0;\n */\n EVENT_UNKNOWN = 0,\n\n /**\n * @generated from enum value: EVENT_RECEIVED = 1;\n */\n EVENT_RECEIVED = 1,\n\n /**\n * @generated from enum value: EVENT_OPENED = 2;\n */\n EVENT_OPENED = 2,\n\n /**\n * @generated from enum value: EVENT_CLICKED = 3;\n */\n EVENT_CLICKED = 3,\n\n /**\n * @generated from enum value: EVENT_DISMISSED = 4;\n */\n EVENT_DISMISSED = 4,\n}\n\n/**\n * Describes the enum common.v1.NotificationEvent.\n */\nexport const NotificationEventSchema: GenEnum<NotificationEvent> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 1);\n\n/**\n * @generated from enum common.v1.NotificationGroupHowOften\n */\nexport enum NotificationGroupHowOften {\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_RARELY = 0;\n */\n RARELY = 0,\n\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_OFTEN = 1;\n */\n OFTEN = 1,\n\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_VERY_OFTEN = 2;\n */\n VERY_OFTEN = 2,\n}\n\n/**\n * Describes the enum common.v1.NotificationGroupHowOften.\n */\nexport const NotificationGroupHowOftenSchema: GenEnum<NotificationGroupHowOften> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 2);\n\n","// @generated by protoc-gen-es v2.10.0 with parameter \"target=ts\"\n// @generated from file dashboard/v1/audiobooks.proto (package dashboard.audiobooks.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Empty, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file dashboard/v1/audiobooks.proto.\n */\nexport const file_dashboard_v1_audiobooks: GenFile = /*@__PURE__*/\n fileDesc(\"Ch1kYXNoYm9hcmQvdjEvYXVkaW9ib29rcy5wcm90bxIXZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEiFgoUR2V0QXVkaW9ib29rc1JlcXVlc3QiIQoTR2V0QXVkaW9ib29rUmVxdWVzdBIKCgJpZBgBIAEoCSKrAQoHQ2hhcHRlchIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEhgKC2Rlc2NyaXB0aW9uGAMgASgJSACIAQESGgoNbXVsdGltZWRpYV9pZBgEIAEoCUgBiAEBEi4KCmNyZWF0ZWRfYXQYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQg4KDF9kZXNjcmlwdGlvbkIQCg5fbXVsdGltZWRpYV9pZCLzAgoJQXVkaW9ib29rEg8KAmlkGAEgASgJSACIAQESEgoKcHJvamVjdF9pZBgCIAEoCRIMCgRuYW1lGAMgASgJEhMKC2Rlc2NyaXB0aW9uGAQgASgJEhMKC2NvdmVyX2ltYWdlGAUgASgJEhcKD3RodW1ibmFpbF9pbWFnZRgGIAEoCRIyCghjaGFwdGV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xdWVzdBolLmRhc2hib2FyZC5hdWRpb2Jvb2tzLnYxLkJvb2xSZXNwb25zZRJ1ChVEZWxldGVBdWRpb2Jvb2tBY2Nlc3MSNS5kYXNoYm9hcmQuYXVkaW9ib29rcy52MS5EZWxldGVBdWRpb2Jvb2tBY2Nlc3NSZXF1ZXN0GiUuZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEuQm9vbFJlc3BvbnNlYgZwcm90bzM\", [file_google_protobuf_timestamp, file_google_protobuf_empty]);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobooksRequest\n */\nexport type GetAudiobooksRequest = Message<\"dashboard.audiobooks.v1.GetAudiobooksRequest\"> & {\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobooksRequest.\n * Use `create(GetAudiobooksRequestSchema)` to create a new message.\n */\nexport const GetAudiobooksRequestSchema: GenMessage<GetAudiobooksRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookRequest\n */\nexport type GetAudiobookRequest = Message<\"dashboard.audiobooks.v1.GetAudiobookRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookRequest.\n * Use `create(GetAudiobookRequestSchema)` to create a new message.\n */\nexport const GetAudiobookRequestSchema: GenMessage<GetAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 1);\n\n/**\n * @generated from message dashboard.audiobooks.v1.Chapter\n */\nexport type Chapter = Message<\"dashboard.audiobooks.v1.Chapter\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional string multimedia_id = 4;\n */\n multimediaId?: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 5;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.Chapter.\n * Use `create(ChapterSchema)` to create a new message.\n */\nexport const ChapterSchema: GenMessage<Chapter> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 2);\n\n/**\n * @generated from message dashboard.audiobooks.v1.Audiobook\n */\nexport type Audiobook = Message<\"dashboard.audiobooks.v1.Audiobook\"> & {\n /**\n * @generated from field: optional string id = 1;\n */\n id?: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: string description = 4;\n */\n description: string;\n\n /**\n * @generated from field: string cover_image = 5;\n */\n coverImage: string;\n\n /**\n * @generated from field: string thumbnail_image = 6;\n */\n thumbnailImage: string;\n\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.Chapter chapters = 7;\n */\n chapters: Chapter[];\n\n /**\n * @generated from field: bool is_downloadable = 8;\n */\n isDownloadable: boolean;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 9;\n */\n createdAt?: Timestamp;\n\n /**\n * @generated from field: optional bool is_browser_downloadable = 10;\n */\n isBrowserDownloadable?: boolean;\n\n /**\n * @generated from field: optional string accent_color = 11;\n */\n accentColor?: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.Audiobook.\n * Use `create(AudiobookSchema)` to create a new message.\n */\nexport const AudiobookSchema: GenMessage<Audiobook> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 3);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobooksResponse\n */\nexport type GetAudiobooksResponse = Message<\"dashboard.audiobooks.v1.GetAudiobooksResponse\"> & {\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.Audiobook audiobooks = 1;\n */\n audiobooks: Audiobook[];\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobooksResponse.\n * Use `create(GetAudiobooksResponseSchema)` to create a new message.\n */\nexport const GetAudiobooksResponseSchema: GenMessage<GetAudiobooksResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 4);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookResponse\n */\nexport type GetAudiobookResponse = Message<\"dashboard.audiobooks.v1.GetAudiobookResponse\"> & {\n /**\n * @generated from field: optional dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n audiobook?: Audiobook;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookResponse.\n * Use `create(GetAudiobookResponseSchema)` to create a new message.\n */\nexport const GetAudiobookResponseSchema: GenMessage<GetAudiobookResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 5);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest\n */\nexport type CreateOrUpdateAudiobookRequest = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest\"> & {\n /**\n * @generated from field: dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n audiobook?: Audiobook;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest.\n * Use `create(CreateOrUpdateAudiobookRequestSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookRequestSchema: GenMessage<CreateOrUpdateAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 6);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse\n */\nexport type CreateOrUpdateAudiobookResponse = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result success = 1;\n */\n value: CreateOrUpdateAudiobookResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.\n * Use `create(CreateOrUpdateAudiobookResponseSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookResponseSchema: GenMessage<CreateOrUpdateAudiobookResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 7);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result\n */\nexport type CreateOrUpdateAudiobookResponse_Result = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result.\n * Use `create(CreateOrUpdateAudiobookResponse_ResultSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookResponse_ResultSchema: GenMessage<CreateOrUpdateAudiobookResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 7, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.DeleteAudiobookRequest\n */\nexport type DeleteAudiobookRequest = Message<\"dashboard.audiobooks.v1.DeleteAudiobookRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.DeleteAudiobookRequest.\n * Use `create(DeleteAudiobookRequestSchema)` to create a new message.\n */\nexport const DeleteAudiobookRequestSchema: GenMessage<DeleteAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 8);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest\n */\nexport type GetAudiobookAccessEmailsRequest = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest\"> & {\n /**\n * @generated from field: string audiobook_id = 1;\n */\n audiobookId: string;\n\n /**\n * @generated from field: optional string email = 2;\n */\n email?: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest.\n * Use `create(GetAudiobookAccessEmailsRequestSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsRequestSchema: GenMessage<GetAudiobookAccessEmailsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 9);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse\n */\nexport type GetAudiobookAccessEmailsResponse = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result success = 1;\n */\n value: GetAudiobookAccessEmailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.\n * Use `create(GetAudiobookAccessEmailsResponseSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponseSchema: GenMessage<GetAudiobookAccessEmailsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail\n */\nexport type GetAudiobookAccessEmailsResponse_AccessEmail = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 3;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail.\n * Use `create(GetAudiobookAccessEmailsResponse_AccessEmailSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponse_AccessEmailSchema: GenMessage<GetAudiobookAccessEmailsResponse_AccessEmail> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result\n */\nexport type GetAudiobookAccessEmailsResponse_Result = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail emails = 1;\n */\n emails: GetAudiobookAccessEmailsResponse_AccessEmail[];\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result.\n * Use `create(GetAudiobookAccessEmailsResponse_ResultSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponse_ResultSchema: GenMessage<GetAudiobookAccessEmailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10, 1);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateAudiobookAccessRequest\n */\nexport type CreateAudiobookAccessRequest = Message<\"dashboard.audiobooks.v1.CreateAudiobookAccessRequest\"> & {\n /**\n * @generated from field: string audiobook_id = 1;\n */\n audiobookId: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateAudiobookAccessRequest.\n * Use `create(CreateAudiobookAccessRequestSchema)` to create a new message.\n */\nexport const CreateAudiobookAccessRequestSchema: GenMessage<CreateAudiobookAccessRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 11);\n\n/**\n * @generated from message dashboard.audiobooks.v1.DeleteAudiobookAccessRequest\n */\nexport type DeleteAudiobookAccessRequest = Message<\"dashboard.audiobooks.v1.DeleteAudiobookAccessRequest\"> & {\n /**\n * @generated from field: string system_access_id = 1;\n */\n systemAccessId: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.DeleteAudiobookAccessRequest.\n * Use `create(DeleteAudiobookAccessRequestSchema)` to create a new message.\n */\nexport const DeleteAudiobookAccessRequestSchema: GenMessage<DeleteAudiobookAccessRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 12);\n\n/**\n * @generated from message dashboard.audiobooks.v1.BoolResponse\n */\nexport type BoolResponse = Message<\"dashboard.audiobooks.v1.BoolResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.BoolResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.BoolResponse.\n * Use `create(BoolResponseSchema)` to create a new message.\n */\nexport const BoolResponseSchema: GenMessage<BoolResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 13);\n\n/**\n * @generated from enum dashboard.audiobooks.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CHAPTER_NOT_FOUND = 2;\n */\n CHAPTER_NOT_FOUND = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_CHAPTER_FORMAT = 3;\n */\n INCORRECT_CHAPTER_FORMAT = 3,\n}\n\n/**\n * Describes the enum dashboard.audiobooks.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_audiobooks, 0);\n\n/**\n * @generated from service dashboard.audiobooks.v1.AudiobooksService\n */\nexport const AudiobooksService: GenService<{\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobooks\n */\n getAudiobooks: {\n methodKind: \"unary\";\n input: typeof GetAudiobooksRequestSchema;\n output: typeof GetAudiobooksResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobook\n */\n getAudiobook: {\n methodKind: \"unary\";\n input: typeof GetAudiobookRequestSchema;\n output: typeof GetAudiobookResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.CreateOrUpdateAudiobook\n */\n createOrUpdateAudiobook: {\n methodKind: \"unary\";\n input: typeof CreateOrUpdateAudiobookRequestSchema;\n output: typeof CreateOrUpdateAudiobookResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.DeleteAudiobook\n */\n deleteAudiobook: {\n methodKind: \"unary\";\n input: typeof DeleteAudiobookRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobookAccessEmails\n */\n getAudiobookAccessEmails: {\n methodKind: \"unary\";\n input: typeof GetAudiobookAccessEmailsRequestSchema;\n output: typeof GetAudiobookAccessEmailsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.CreateAudiobookAccess\n */\n createAudiobookAccess: {\n methodKind: \"unary\";\n input: typeof CreateAudiobookAccessRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.DeleteAudiobookAccess\n */\n deleteAudiobookAccess: {\n methodKind: \"unary\";\n input: typeof DeleteAudiobookAccessRequestSchema;\n output: typeof BoolResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_dashboard_v1_audiobooks, 0);\n\n","import { create } from \"@bufbuild/protobuf\";\nimport { createContext, useContext, useEffect } from \"react\";\nimport {\n AddressSchema,\n BillingAddressSchema,\n} from \"src/gen/proto/common/v1/address_pb\";\nimport {\n GetPreOrderDetailsRequestSchema,\n OneClickAuthorizePaymentRequest_Gateway,\n PreOrderItemSchema,\n} from \"src/gen/proto/public/v1/public_api_pb\";\nimport { PublicApiClient } from \"src/public.api.client\";\nimport zod from \"zod\";\nimport { HOST, setCustomHost } from \"./constants\";\nimport { buildURL } from \"./helper.methods\";\nimport { Err, isErr } from \"./lib/err\";\nimport { formatCurrency, round } from \"./lib/round.number\";\nimport { LinkRequest } from \"./link.request.schema\";\nimport { createPaymentURL, getReferenceIfPossible, injectReferenceToRequestIfNeeded } from \"./methods\";\nimport { SingleProduct } from \"./product.details.model\";\nimport { mapGooglePayConfiguration } from \"./google.pay.mapper\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { useCheckoutStore } from \"./state\";\n\nexport const MARKETING_AGREEMENT_ID = \"__m_a\";\n\ntype CartProduct = {\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n}\n\nexport interface CartMethods {\n checkIfApplePayIsAvailable(): Promise<boolean>;\n getGooglePayConfiguration(args: { items: CartProduct[] }): Promise<{\n isAvailable: true;\n config: google.payments.api.PaymentDataRequest;\n } | {\n isAvailable: false;\n }>;\n\n addProduct(args: CartProduct): Promise<Err | void>;\n\n getProducts: () => Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details?: SingleProduct;\n }[]\n >;\n\n updateQuantity(args: { id: string; quantity: number }): Promise<Err | void>;\n\n removeProductFromCart: (args: { id: string }) => Promise<Err | void>;\n\n clearCart: () => Promise<Err | void>;\n\n getNumberOfElementsInCart: () => Promise<number>;\n\n setCouponCodeIfPossible: (couponCode?: string) => Promise<Err | void>;\n setDeliveryMethod: (deliveryMethod?: string) => Promise<Err | void>;\n setPostalCode: (postalCode?: string) => Promise<Err | void>;\n setEmail: (email?: string) => Promise<Err | void>;\n setCountry: (country: string) => Promise<Err | void>;\n getCountry: () => Promise<Err | string>;\n getAvailableCountries: () => Promise<Err | { name: string; code: string }[]>;\n\n redirectToNextStep: () => Promise<Err | { url: string }>;\n\n getApplePayPaymentRequest: (args?: { expectedItems?: CartProduct[]; }) => Promise<\n Err | ApplePayJS.ApplePayPaymentRequest\n >;\n completeApplePayPayment: (args: {\n token: ApplePayJS.ApplePayPaymentToken;\n shippingContact?: ApplePayJS.ApplePayPaymentContact;\n billingContact?: ApplePayJS.ApplePayPaymentContact;\n }) => Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n >;\n completeGooglePayPayment: (args: {\n paymentData: google.payments.api.PaymentData\n }) => Promise<Err | {\n isSuccess: boolean;\n redirectURL?: string;\n }>;\n\n justRedirectToPayment: (args: {\n email?: string;\n productID: string;\n name?: string;\n country?: string;\n marketingAgreement?: boolean;\n }) => Promise<\n | Err\n | {\n url: string;\n }\n >;\n}\n\nconst CartProviderContext = createContext<CartMethods | undefined>(undefined);\n\nexport var bitsnapProjectID: string | undefined = undefined;\nexport function setProjectID(projectID: string) {\n bitsnapProjectID = projectID;\n}\n\nexport function getProjectID(): string | undefined {\n if (bitsnapProjectID != null) {\n return bitsnapProjectID;\n }\n const me = document.querySelector(\n 'script[data-id][data-name=\"internal-cart\"]',\n );\n const projectID = me?.getAttribute(\"data-id\");\n return projectID ?? undefined;\n}\n\nfunction getNewHostIfExist(): string | undefined {\n const me = document.querySelector(\n 'script[data-id][data-name=\"internal-cart\"]',\n );\n const customHost = me?.getAttribute(\"data-custom-host\");\n return customHost ?? undefined;\n}\n\nconst CartProvider = ({ children }: { children: React.ReactNode }) => {\n const queryClient = new QueryClient();\n\n useEffect(() => {\n updateNumberOfProductsInCart();\n }, []);\n\n const projectID = getProjectID();\n if (projectID == null) {\n return <></>;\n }\n\n\n const checkoutMethods = getCheckoutMethods(projectID);\n\n return (\n <QueryClientProvider client={queryClient}>\n <CartProviderContext.Provider value={checkoutMethods}>\n {children}\n </CartProviderContext.Provider>\n </QueryClientProvider>\n );\n};\n\n// @ts-ignore\nconst getProducts: (projectID: string) => Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details?: SingleProduct;\n }[]\n> = async (projectID: string) => {\n const products = getCheckout()?.products ?? [];\n\n const productIds = Array.from(\n new Set(products.map((product) => product.productID)),\n );\n\n const params = new URLSearchParams();\n params.set(\"ids\", productIds.join(\",\"));\n\n const result = await fetch(\n buildURL(projectID, `/products?${params.toString()}`),\n {\n method: \"GET\",\n },\n );\n\n if (result.status != 200) {\n return [];\n }\n\n const payload: {\n success: boolean;\n message?: string | undefined;\n result?: SingleProduct[] | undefined;\n } = await result.json();\n\n products.forEach((product) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n product[\"details\"] = payload.result?.find((el) => {\n if (el.id === product.productID) {\n return true;\n }\n if (el.variants != null && el.variants.length > 0) {\n const index = el.variants.findIndex(\n (variant) => variant.id === product.productID,\n );\n return index !== -1;\n }\n return false;\n });\n });\n\n // @ts-ignore\n return products\n .filter((el) => \"details\" in el)\n .map((el) => {\n el.details = resolveProductDetailsFromSingleProduct(\n el.productID,\n el.details as SingleProduct,\n );\n return el;\n });\n};\n\nexport const useCartProvider = () => {\n const context = useContext(CartProviderContext);\n\n if (context === undefined) {\n throw new Error(\"useCartProvider must be used within a CartProvider\");\n }\n\n return context;\n};\n\nexport default CartProvider;\n\nconst googlePayConfigSchema = zod.object({\n isAvailable: zod.boolean(),\n merchantId: zod.string(),\n merchantName: zod.string(),\n gateway: zod.string(),\n gatewayId: zod.string(),\n});\nconst checkoutSchema = zod.object({\n country: zod.string().optional(),\n couponCode: zod.string().optional(),\n selectedDeliveryMethod: zod.string().optional(),\n postalCode: zod.string().optional(),\n email: zod.string().optional(),\n products: zod\n .array(\n zod.object({\n id: zod.string(),\n productID: zod.string(),\n quantity: zod.number(),\n metadata: zod.record(zod.string(), zod.string().optional()).optional(),\n }),\n )\n .optional(),\n googlePayConfig: googlePayConfigSchema.optional(),\n});\nexport type GooglePayConfig = zod.infer<typeof googlePayConfigSchema>;\nconst emptyCheckout: Checkout = {\n country: undefined,\n couponCode: undefined,\n email: undefined,\n selectedDeliveryMethod: undefined,\n postalCode: undefined,\n products: [],\n googlePayConfig: undefined,\n};\nexport type Checkout = zod.infer<typeof checkoutSchema>;\n\nconst checkoutKey = \"checkout\";\n\nfunction getCheckout(): Checkout {\n try {\n const value = localStorage.getItem(checkoutKey);\n if (value == null) {\n return emptyCheckout;\n }\n return checkoutSchema.parse(JSON.parse(value));\n } catch (e) {\n return emptyCheckout;\n }\n}\n\nfunction addProducts(products: CartProduct[]) {\n const checkout = getCheckout();\n if (checkout.products == null) {\n checkout.products = [];\n }\n checkout.products.push(...products.map(el => ({\n id: Math.random().toString(36).substring(7),\n productID: el.productID,\n quantity: el.quantity,\n metadata: el.metadata,\n })));\n saveCheckout(checkout);\n updateNumberOfProductsInCart();\n}\n\nfunction removeProductFromCheckout(ids: string[]) {\n const checkout = getCheckout();\n const newCheckout = {\n ...checkout,\n products: checkout?.products?.filter(\n (product) => !ids.includes(product.productID) && !ids.includes(product.id),\n ),\n };\n saveCheckout(newCheckout);\n updateNumberOfProductsInCart();\n}\n\nfunction saveCheckout(model: Checkout) {\n localStorage.setItem(checkoutKey, JSON.stringify(model));\n}\n\nexport const getCheckoutMethods: (projectID: string) => CartMethods = (\n projectID,\n) => {\n const newHost = getNewHostIfExist();\n if (newHost != null) {\n setCustomHost(newHost);\n }\n return {\n async checkIfApplePayIsAvailable(): Promise<boolean> {\n if (typeof window == \"undefined\" || typeof document == 'undefined') {\n return false;\n }\n if (\"ApplePaySession\" in window === false) {\n return false;\n }\n\n try {\n const result = await PublicApiClient.get(HOST).isOneClickPaymentAvailable({\n projectId: projectID,\n });\n\n return result.applePay;\n } catch (e) {\n console.error(\"Error checking if Apple Pay is available\", e);\n return false;\n }\n },\n async getGooglePayConfiguration(args: { items: CartProduct[] }): Promise<{\n isAvailable: true;\n config: google.payments.api.PaymentDataRequest;\n } | {\n isAvailable: false;\n }> {\n if (typeof window == \"undefined\" || typeof document == 'undefined') {\n return {\n isAvailable: false,\n }\n }\n\n try {\n const googlePayConfig = await resolveGooglePayConfiguration(projectID);\n if (googlePayConfig?.isAvailable != true) {\n return {\n isAvailable: false,\n }\n }\n\n const checkout = getCheckout();\n if (checkout == null) {\n console.log('checkout is null');\n return {\n isAvailable: false,\n }\n }\n if (args && args.items != null && args.items.length > 0) {\n if (checkout.products) {\n removeProductFromCheckout(checkout.products.map(el => el.productID));\n }\n addProducts(args.items);\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return {\n isAvailable: false,\n };\n }\n const result = await PublicApiClient.get(HOST).getPreOrderDetails({\n items: products.map((el) =>\n create(PreOrderItemSchema, { id: el.productID, quantity: el.quantity }),\n ),\n projectId: projectID,\n // we can detect 5 the closest inpost pickup point based on shipping address.\n postCode: checkout.postalCode,\n couponCode: checkout.couponCode,\n countryCode: checkout.country,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n });\n if (result.totalAmount == null) {\n return {\n isAvailable: false,\n }\n }\n const cartRequiresShipping = products.find(el => el.details?.isDeliverable == true) != null;\n\n const mappedPaymentRequest = await mapGooglePayConfiguration({\n items: products,\n googlePayConfig: googlePayConfig,\n checkout: checkout,\n cartRequiresShipping: cartRequiresShipping,\n result: result,\n });\n if (mappedPaymentRequest == null) {\n return {\n isAvailable: false,\n }\n }\n\n return {\n isAvailable: true,\n config: mappedPaymentRequest,\n }\n } catch (e) {\n console.error(\"Error resolving Google Pay configuration\", e);\n return {\n isAvailable: false,\n }\n }\n },\n async clearCart(): Promise<Err | void> {\n const empty = structuredClone(emptyCheckout);\n empty.country = getCheckout()?.country;\n saveCheckout(empty);\n updateNumberOfProductsInCart();\n },\n\n async getAvailableCountries(): Promise<\n Err | { name: string; code: string }[]\n > {\n const result = await fetch(buildURL(projectID, \"/countries\"), {\n method: \"GET\",\n });\n\n if (result.status != 200) {\n return [];\n }\n\n try {\n return zod\n .array(\n zod.object({\n name: zod.string(),\n code: zod.string(),\n }),\n )\n .parse(await result.json());\n } catch (e) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n return Err(e.toString(), \"internal\");\n }\n },\n\n async getCountry(): Promise<Err | string> {\n let country = getCheckout()?.country;\n if (country == null) {\n country = \"PL\";\n const checkout = getCheckout();\n checkout.country = country;\n saveCheckout(checkout);\n }\n\n return country;\n },\n\n async getNumberOfElementsInCart(): Promise<number> {\n return (\n getCheckout()?.products?.reduce(\n (acc, product) => acc + product.quantity,\n 0,\n ) ?? 0\n );\n },\n\n async getProducts(): Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [p: string]: string | undefined\n };\n details?: SingleProduct;\n }[]\n > {\n return await getProducts(projectID);\n },\n\n async removeProductFromCart(args: { id: string }): Promise<Err | void> {\n return removeProductFromCheckout([args.id]);\n },\n\n async setCountry(country: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.country = country;\n saveCheckout(checkout);\n },\n\n async setCouponCodeIfPossible(couponCode?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.couponCode = couponCode;\n saveCheckout(checkout);\n },\n\n async setPostalCode(postalCode?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.postalCode = postalCode;\n saveCheckout(checkout);\n },\n\n async setDeliveryMethod(deliveryMethod?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.selectedDeliveryMethod = deliveryMethod;\n saveCheckout(checkout);\n },\n\n async setEmail(email?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.email = email;\n saveCheckout(checkout);\n },\n\n async addProduct(args: CartProduct): Promise<Err | void> {\n return addProducts([args]);\n },\n\n async updateQuantity(args: {\n id: string;\n quantity: number;\n }): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.products = checkout.products?.map((product) => {\n if (product.id === args.id) {\n product.quantity = args.quantity;\n }\n return product;\n });\n saveCheckout(checkout);\n updateNumberOfProductsInCart();\n },\n\n async redirectToNextStep(): Promise<Err | { url: string }> {\n const checkout = getCheckout();\n\n if (checkout.products == null || checkout.products.length == 0) {\n return Err(\"cart-is-empty\", \"badInput\");\n }\n const mergedMetadata = checkout.products.reduce(\n (acc, product) => {\n if (product.metadata != null) {\n Object.keys(product.metadata).forEach((key) => {\n const value = product.metadata?.[key];\n if (value != null) {\n acc[key] = value;\n }\n });\n }\n return acc;\n },\n {} as Record<string, string>,\n );\n\n const payload: LinkRequest = {\n items: checkout.products.map((el) => {\n return {\n id: el.productID,\n quantity: el.quantity,\n };\n }),\n askForNote: true,\n countries: checkout.country ? [checkout.country] : undefined,\n metadata: mergedMetadata,\n };\n\n const paymentResponse = await createPaymentURL(payload);\n\n if (isErr(paymentResponse)) {\n console.warn(\"cannot create payment URL\", paymentResponse.error);\n return paymentResponse;\n }\n\n return {\n url: paymentResponse.url,\n };\n },\n\n async justRedirectToPayment(args: {\n email?: string;\n productID: string;\n name?: string;\n country?: string;\n marketingAgreement?: boolean;\n }): Promise<Err | { url: string }> {\n let payload: LinkRequest = {\n items: [\n {\n id: args.productID,\n quantity: 1,\n },\n ],\n askForNote: false,\n details:\n args.email || args.name\n ? {\n name: args.name,\n email: args.email,\n }\n : undefined,\n };\n\n payload = injectReferenceToRequestIfNeeded(payload);\n\n if (args.country == null) {\n args.country = \"pl\";\n }\n\n if (payload.details == null) {\n payload.details = {};\n }\n if (payload.details.address == null) {\n payload.details.address = {};\n }\n payload.details.address.country = args.country;\n\n if (args.marketingAgreement === true) {\n payload.additionalAgreements = [\n {\n id: MARKETING_AGREEMENT_ID,\n name: \"\",\n required: true,\n answer: true,\n },\n ];\n }\n\n const result = await fetch(buildURL(projectID, \"/buy\"), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(payload),\n });\n console.log(\"CODE\", result.status);\n\n if (result.status != 200) {\n console.warn(\n \"result\",\n await result.text(),\n result.status,\n result.statusText,\n );\n return Err(\"internal-error\", \"internal\");\n }\n\n const response: { url: string; sessionID: string } = await result.json();\n\n console.log(response.url);\n return {\n url: response.url,\n };\n },\n\n async completeApplePayPayment(args: {\n token: ApplePayJS.ApplePayPaymentToken;\n shippingContact?: ApplePayJS.ApplePayPaymentContact;\n billingContact?: ApplePayJS.ApplePayPaymentContact;\n }): Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n > {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return products;\n }\n\n try {\n let shippingName = args.shippingContact?.givenName;\n if (args.shippingContact?.familyName != null) {\n shippingName += ' ' + args.shippingContact?.familyName;\n } else if (args.billingContact?.familyName != null) {\n shippingName += ' ' + args.billingContact?.familyName;\n }\n\n let metadata: Record<string, string> = {};\n\n const ref = getReferenceIfPossible();\n if (ref != null) {\n metadata[\"ref\"] = ref;\n }\n\n const result = await PublicApiClient.get(HOST).authorizeOneClickPayment(\n {\n gateway: OneClickAuthorizePaymentRequest_Gateway.APPLE_PAY,\n paymentData: JSON.stringify(args.token.paymentData),\n paymentMethod: JSON.stringify(args.token.paymentMethod),\n transactionIdentifier: args.token.transactionIdentifier,\n order: create(GetPreOrderDetailsRequestSchema, {\n items: products.map((el) => ({\n id: el.productID,\n quantity: el.quantity,\n })),\n couponCode: checkout.couponCode,\n email: args.shippingContact?.emailAddress ?? args.billingContact?.emailAddress ?? checkout.email ?? undefined,\n phone: args.shippingContact?.phoneNumber ?? args.billingContact?.phoneNumber ?? undefined,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n postCode: checkout.postalCode,\n projectId: projectID,\n }),\n shippingAddress: create(AddressSchema, {\n line1: args.shippingContact?.addressLines?.[0] ?? \"\",\n city: args.shippingContact?.locality ?? \"\",\n country: args.shippingContact?.countryCode ?? \"\",\n zipCode: args.shippingContact?.postalCode ?? \"\",\n name: shippingName,\n }),\n billingAddress: create(BillingAddressSchema, {\n name: args.billingContact?.givenName ?? '' + ' ' + (args.billingContact?.familyName ?? ''),\n line1: args.billingContact?.addressLines?.[0] ?? \"\",\n city: args.billingContact?.locality ?? \"\",\n country: args.billingContact?.countryCode ?? \"\",\n zipCode: args.billingContact?.postalCode ?? \"\",\n }),\n metadata: Object.keys(metadata).length > 0 ? JSON.stringify(metadata) : undefined,\n },\n );\n\n return {\n isSuccess: result.isSuccess,\n redirectURL: result.redirectUrl,\n };\n } catch (error) {\n console.error(error);\n return Err(\"Failed to authorize payment\");\n }\n },\n\n async completeGooglePayPayment(args: {\n paymentData: google.payments.api.PaymentData\n }): Promise<Err | {\n isSuccess: boolean;\n redirectURL?: string;\n }> {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return products;\n }\n\n try {\n let shippingName = args.paymentData.shippingAddress?.name;\n\n let metadata: Record<string, string> = {};\n\n const ref = getReferenceIfPossible();\n if (ref != null) {\n metadata[\"ref\"] = ref;\n }\n\n const result = await PublicApiClient.get(HOST).authorizeOneClickPayment(\n {\n gateway: OneClickAuthorizePaymentRequest_Gateway.GOOGLE_PAY,\n paymentData: args.paymentData.paymentMethodData.tokenizationData.token,\n paymentMethod: args.paymentData.paymentMethodData.type,\n transactionIdentifier: '',\n order: create(GetPreOrderDetailsRequestSchema, {\n items: products.map((el) => ({\n id: el.productID,\n quantity: el.quantity,\n })),\n couponCode: checkout.couponCode,\n email: args.paymentData.email ?? undefined,\n phone: args.paymentData.shippingAddress?.phoneNumber ?? undefined,\n selectedDeliveryMethod: args.paymentData.shippingOptionData?.id ?? checkout.selectedDeliveryMethod,\n postCode: args.paymentData.shippingAddress?.postalCode,\n projectId: projectID,\n }),\n shippingAddress: create(AddressSchema, {\n line1: args.paymentData.shippingAddress?.address1 ?? \"\",\n city: args.paymentData.shippingAddress?.locality ?? \"\",\n country: args.paymentData.shippingAddress?.countryCode ?? \"\",\n zipCode: args.paymentData.shippingAddress?.postalCode ?? \"\",\n name: shippingName,\n }),\n billingAddress: create(BillingAddressSchema, {\n name: args.paymentData.paymentMethodData.info?.billingAddress?.name,\n line1: args.paymentData.paymentMethodData.info?.billingAddress?.address1 ?? \"\",\n city: args.paymentData.paymentMethodData.info?.billingAddress?.locality ?? \"\",\n country: args.paymentData.paymentMethodData.info?.billingAddress?.countryCode ?? \"\",\n zipCode: args.paymentData.paymentMethodData.info?.billingAddress?.postalCode ?? \"\",\n }),\n metadata: Object.keys(metadata).length > 0 ? JSON.stringify(metadata) : undefined,\n },\n );\n\n return {\n isSuccess: result.isSuccess,\n redirectURL: result.redirectUrl,\n };\n } catch (error) {\n console.error(error);\n return Err(\"Failed to authorize payment\");\n }\n\n return {\n isSuccess: true,\n }\n },\n\n async getApplePayPaymentRequest(args?: { expectedItems?: CartProduct[]; }): Promise<\n Err | ApplePayJS.ApplePayPaymentRequest\n > {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n if (args && args.expectedItems != null && args.expectedItems.length > 0) {\n if (checkout.products) {\n removeProductFromCheckout(checkout.products.map(el => el.productID));\n }\n addProducts(args.expectedItems);\n }\n\n const products = await getProducts(projectID);\n\n if (isErr(products)) {\n return products;\n }\n\n const result = await PublicApiClient.get(HOST).getPreOrderDetails({\n items: products.map((el) =>\n create(PreOrderItemSchema, { id: el.productID, quantity: el.quantity }),\n ),\n projectId: projectID,\n // we can detect 5 the closest inpost pickup point based on shipping address.\n postCode: checkout.postalCode,\n couponCode: checkout.couponCode,\n countryCode: checkout.country,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n });\n\n const items = products.map((el) => {\n return {\n amount: `${round((el.quantity * (el.details?.price ?? 0)) / 100, 2)}`,\n label: el.details?.name + \" - \" + el.quantity,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n };\n });\n\n if (result.selectedDeliveryMethod != null) {\n const deliveryMethod = result.methods.find(el => el.id == result.selectedDeliveryMethod);\n if (deliveryMethod != null) {\n items.push({\n amount: `${round(deliveryMethod.amount / 100, 2)}`,\n label: deliveryMethod.name,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n })\n }\n }\n\n if (result.couponCode != null && result.couponValue != null) {\n items.push({\n amount: `-${round(result.couponValue / 100, 2)}`,\n label: result.couponCode,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n });\n }\n\n return {\n countryCode: checkout.country ?? \"PL\",\n merchantCapabilities: [\n \"supports3DS\",\n \"supportsCredit\",\n \"supportsDebit\",\n ],\n supportedNetworks: [\"visa\", \"masterCard\"],\n total: {\n amount: `${round(((result.totalAmount ?? 0) / 100), 2)}`,\n label: \"Płatność za koszyk\",\n type: \"final\",\n },\n shippingMethods: result.methods.map((el) => ({\n amount: `${round(el.amount / 100, 2)}`,\n detail: el.description ?? \"\",\n identifier: el.id,\n label: el.name,\n dateComponentsRange: {\n startDateComponents: {\n days: el.minDays ?? 1,\n hours: 0,\n months: 0,\n years: 0,\n } satisfies ApplePayJS.ApplePayDateComponents,\n endDateComponents: {\n days: el.maxDays ?? 14,\n hours: 0,\n months: 0,\n years: 0,\n } satisfies ApplePayJS.ApplePayDateComponents,\n },\n })),\n lineItems: items,\n currencyCode: \"PLN\",\n };\n },\n };\n};\n\nasync function resolveGooglePayConfiguration(projectID: string) {\n const checkout = getCheckout();\n if (checkout.googlePayConfig?.isAvailable != true) {\n const result = await PublicApiClient.get(HOST).isOneClickPaymentAvailable({\n projectId: projectID,\n });\n if (result.googlePay == true && result.googlePayConfig != null) {\n checkout.googlePayConfig = {\n isAvailable: true,\n gateway: result.googlePayConfig.gateway,\n gatewayId: result.googlePayConfig.gatewayMerchantId,\n merchantName: result.googlePayConfig.merchantName,\n merchantId: result.googlePayConfig.merchantId,\n }\n } else {\n checkout.googlePayConfig = {\n isAvailable: false,\n gateway: '',\n gatewayId: '',\n merchantName: '',\n merchantId: '',\n }\n }\n }\n saveCheckout(checkout);\n return checkout.googlePayConfig;\n}\n\nfunction resolveProductDetailsFromSingleProduct(\n id: string,\n product: SingleProduct,\n) {\n if (id == product.id) {\n const variantIndex = product.variants?.findIndex((v) => v.id === id);\n if (variantIndex != null && variantIndex != -1) {\n const variant = product.variants![variantIndex];\n return {\n ...product,\n availableQuantity: variant.availableQuantity,\n isDeliverable: variant.isDeliverable,\n images: variant.images ?? product.images,\n name: product.name + \" \" + variant.name,\n price: variant.price,\n currency: variant.currency\n }\n }\n return product;\n }\n\n const variant = product.variants?.find((v) => v.id === id);\n if (variant == null) {\n return product;\n }\n\n return {\n ...product,\n id: variant.id,\n name: product.name + \" \" + variant.name,\n price: variant.price,\n currency: variant.currency,\n metadata: product.metadata,\n availableQuantity: variant.availableQuantity,\n isDeliverable: variant.isDeliverable,\n images: variant.images ?? product.images,\n };\n}\n\ntype ApplePaySessionArgs = {\n postCode?: string;\n email?: string;\n couponCode?: string;\n};\n\nfunction updateNumberOfProductsInCart() {\n const checkout = getCheckout();\n let numberOfProductsInCart = 0;\n if (checkout == null) {\n useCheckoutStore.setState((state) => ({ ...state, numberOfProductsInCart }));\n return\n }\n numberOfProductsInCart = checkout.products?.reduce((acc, product) => acc + product.quantity, 0) ?? 0;\n useCheckoutStore.setState((state) => ({ ...state, numberOfProductsInCart }));\n}","export let HOST = \"https://bitsnap.pl\";\n\nexport function setCustomHost(host: string) {\n HOST = host;\n}\n","import { HOST } from \"./constants\";\n\nexport function buildURL(projectID: string, path: string): string {\n return `${HOST}/api/integrations/${projectID}/public-commerce${path}`;\n}\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport type Err = {\n ERR: true\n error: unknown\n type?: ErrTypes\n}\n\ntype ErrTypes = 'internal' | 'badInput' | 'notFound';\n\nexport function isErr(x: unknown): x is Err {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return typeof x === 'object' && x != null && 'ERR' in x;\n}\n\nexport function Err(message: string, type?: ErrTypes): Err {\n return { ERR: true, error: message, type: type }\n}\n\nexport async function tryFail<T>(\n f: (() => Promise<T>) | (() => T)\n): Promise<T | Err> {\n try {\n return await f()\n } catch (e) {\n return { ERR: true, error: e }\n }\n}\n\nexport function assertOk<T>(x: T | Err) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isErr(x)) throw Error((x.error as any).toString());\n}\n","export function round(num: number, numberOfDecimals: number = 2): number {\n return Number(\n +(\n Math.round(Number(num + \"e+\" + numberOfDecimals)) +\n \"e-\" +\n numberOfDecimals\n )\n );\n}\n\nexport function formatCurrency(amount: number, currency: string): string {\n const formatter = Intl.NumberFormat(navigator.language, {\n style: \"currency\",\n currency: currency,\n currencyDisplay: 'symbol',\n });\n\n return formatter.format(amount / 100);\n}","import { create } from 'zustand';\n\ninterface CheckoutStore {\n isCartVisible: boolean;\n numberOfProductsInCart: number;\n showCart: () => void;\n hideCart: () => void;\n setNumberOfProductsInCart: (numberOfProductsInCart: number) => void;\n}\n\nexport const useCheckoutStore = create<CheckoutStore>((set) => ({\n isCartVisible: false,\n numberOfProductsInCart: 0,\n showCart: () => set((state) => ({ ...state, isCartVisible: true })),\n hideCart: () => set((state) => ({ ...state, isCartVisible: false })),\n setNumberOfProductsInCart: (numberOfProductsInCart: number) => set((state) => ({ ...state, numberOfProductsInCart: numberOfProductsInCart })),\n}))\n","import { getCheckoutMethods, getProjectID } from \"./CartProvider\";\nimport { HOST } from \"./constants\";\nimport { buildURL } from \"./helper.methods\";\nimport { Err } from \"./lib/err\";\nimport { LinkRequest } from \"./link.request.schema\";\nimport { useCheckoutStore } from \"./state\";\n\nexport namespace Bitsnap {\n export async function addProductToCart(\n id: string,\n quantity: number = 1,\n metadata?: Record<string, string | undefined>,\n ) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n const methods = getCheckoutMethods(projectID);\n\n const err = await methods.addProduct({\n productID: id,\n quantity: quantity,\n metadata: metadata,\n });\n if (err != null) {\n return err;\n }\n\n return undefined;\n }\n\n export function showCart() {\n useCheckoutStore.setState({ isCartVisible: true });\n }\n\n export function hideCart() {\n useCheckoutStore.setState({ isCartVisible: false });\n }\n}\n\nexport async function createPaymentURL(request: LinkRequest) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n request = injectReferenceToRequestIfNeeded(request);\n\n const result = await fetch(buildURL(projectID, \"/buy\"), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(request),\n });\n\n if (result.status != 200) {\n console.warn(\n \"result\",\n await result.text(),\n result.status,\n result.statusText,\n );\n return Err(\"internal-error\", \"internal\");\n }\n\n const response: { url: string; sessionID: string } = await result.json();\n\n return {\n url: response.url,\n };\n}\n\nexport async function createCheckout(\n request: LinkRequest & { apiKey?: string; testMode?: boolean },\n) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n const headers = {\n \"Content-Type\": \"application/json\",\n ...(request.apiKey != null\n ? { Authorization: `Bearer ${request.apiKey}` }\n : {}),\n };\n\n const path = request.testMode\n ? `/api/payment/link/auto/${projectID}/test`\n : `/api/payment/link/auto/${projectID}`;\n\n delete request.apiKey;\n delete request.testMode;\n\n const response = await fetch(HOST + path, {\n method: \"POST\",\n headers,\n body: JSON.stringify(request),\n });\n\n const payload: {\n url: string;\n } = await response.json();\n\n return {\n status: \"ok\",\n redirectURL: payload.url,\n };\n}\n\nexport function getReferenceIfPossible(): string | undefined {\n if (typeof localStorage == \"undefined\") {\n return undefined;\n }\n const refLink = localStorage.getItem(\"bitsnap-ref\");\n if (refLink == null) {\n return undefined;\n }\n return refLink;\n}\n\nexport function injectReferenceToRequestIfNeeded(\n request: LinkRequest,\n): LinkRequest {\n const ref = getReferenceIfPossible();\n if (ref == null) {\n return request;\n }\n\n if (request.metadata == null) {\n request.metadata = {};\n }\n request.metadata[\"ref\"] = ref;\n return request;\n}\n","import { GetPreOrderDetailsResponse } from \"src/gen/proto/public/v1/public_api_pb\";\nimport { Checkout, GooglePayConfig } from \"./CartProvider\";\nimport { formatCurrency, round } from \"./lib/round.number\";\nimport { SingleProduct } from \"./product.details.model\";\n\nexport function mapGooglePayConfiguration(args: {\n items: {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [key: string]: string | undefined;\n };\n details?: SingleProduct;\n }[];\n googlePayConfig: GooglePayConfig;\n checkout: Checkout;\n result: GetPreOrderDetailsResponse;\n cartRequiresShipping: boolean;\n}): google.payments.api.PaymentDataRequest | undefined {\n const { items, googlePayConfig, checkout, result, cartRequiresShipping } = args;\n if (result.totalAmount == null) {\n return undefined;\n }\n let intents: google.payments.api.CallbackIntent[] = [];\n if (cartRequiresShipping) {\n intents.push('SHIPPING_ADDRESS');\n intents.push('SHIPPING_OPTION');\n }\n\n const returnValue: google.payments.api.PaymentDataRequest = {\n apiVersion: 2,\n apiVersionMinor: 0,\n callbackIntents: intents,\n allowedPaymentMethods: [\n {\n type: 'CARD',\n parameters: {\n allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],\n allowedCardNetworks: ['MASTERCARD', 'VISA'],\n },\n tokenizationSpecification: {\n type: 'PAYMENT_GATEWAY',\n parameters: {\n gateway: googlePayConfig.gateway,\n gatewayMerchantId: googlePayConfig.gatewayId,\n },\n },\n },\n ],\n emailRequired: true,\n shippingAddressParameters: {\n phoneNumberRequired: cartRequiresShipping,\n },\n shippingAddressRequired: cartRequiresShipping,\n shippingOptionRequired: cartRequiresShipping,\n shippingOptionParameters: cartRequiresShipping ? {\n shippingOptions: result.methods.slice(0, 5).map(method => ({\n id: method.id,\n label: method.name + ' - ' + `${formatCurrency(method.amount, result.currency)}`,\n description: (method.description ?? ''),\n })),\n defaultSelectedOptionId: result.selectedDeliveryMethod,\n } : undefined,\n merchantInfo: {\n merchantId: googlePayConfig.merchantId + '',\n merchantName: googlePayConfig.merchantName,\n },\n transactionInfo: {\n totalPriceStatus: 'FINAL',\n totalPriceLabel: 'Płatność za koszyk',\n totalPrice: `${round(result.totalAmount / 100, 2)}`,\n currencyCode: result.currency,\n countryCode: result.country,\n checkoutOption: 'COMPLETE_IMMEDIATE_PURCHASE',\n displayItems: mapGooglePayDisplayItems(items, result.methods, result.selectedDeliveryMethod ?? (result.methods.length > 0 ? result.methods[0].id : undefined), checkout.couponCode, result.couponValue),\n },\n }\n console.log('returnValue', returnValue);\n return returnValue;\n}\n\nfunction mapGooglePayDisplayItems(items: {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [key: string]: string | undefined;\n };\n details?: SingleProduct;\n}[], methods: GetPreOrderDetailsResponse['methods'], deliveryMethod?: string, couponCode?: string, couponValue?: number): google.payments.api.DisplayItem[] {\n\n const displayItems: google.payments.api.DisplayItem[] = [];\n\n let subtotalAmount = 0;\n for (const item of items) {\n if (item.details == null) {\n continue;\n }\n subtotalAmount += item.details.price * item.quantity;\n displayItems.push({\n label: item.details.name + ' x ' + item.quantity,\n price: `${round((item.details.price) / 100, 2)}`,\n type: 'LINE_ITEM',\n status: 'FINAL',\n });\n }\n\n const selectedDeliveryMethod = methods.find(method => method.id === deliveryMethod);\n if (selectedDeliveryMethod != null) {\n displayItems.push({\n label: selectedDeliveryMethod.name,\n price: `${round(selectedDeliveryMethod.amount / 100, 2)}`,\n type: 'SHIPPING_OPTION',\n status: 'FINAL',\n });\n }\n\n if (couponCode != null && couponValue != null) {\n displayItems.push({\n label: `Kupon ${couponCode}`,\n price: `${round(couponValue / 100, 2)}`,\n type: 'DISCOUNT',\n status: 'FINAL',\n });\n }\n if (subtotalAmount > 0) {\n displayItems.push({\n label: 'Subtotal',\n price: `${round(subtotalAmount / 100, 2)}`,\n type: 'SUBTOTAL',\n status: 'FINAL',\n });\n }\n\n return displayItems;\n}","import GooglePayButton from '@google-pay/button-react';\nimport CartProvider, { getProjectID, useCartProvider } from \"./CartProvider\";\nimport { isErr } from './lib/err';\nimport { Spinner } from '@/src/ui/spinner';\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\n\ntype Props = {\n test?: boolean;\n buttonSizeMode?: 'static' | 'fill';\n buttonColor?: 'white' | 'black';\n style?: {\n width?: string;\n };\n items: { name: string; id: string; price: number; quantity: number; isDeliverable?: boolean; metadata?: { [key: string]: string | undefined } }[];\n};\n\nfunction GooglePayButtonComponent({ items, style, buttonColor, buttonSizeMode, test }: Props) {\n const {\n getGooglePayConfiguration,\n completeGooglePayPayment,\n setCountry,\n setCouponCodeIfPossible,\n setDeliveryMethod,\n setEmail,\n setPostalCode,\n clearCart,\n } = useCartProvider();\n\n const { data: googlePayConfiguration } = useQuery({\n queryKey: [\"get-google-pay-configuration\", items.map(el => el.id).join(',')],\n queryFn: () => getGooglePayConfiguration({\n items: items.map(el => ({\n ...el,\n id: undefined,\n productID: el.id,\n }))\n }),\n });\n\n const { mutateAsync: completeGooglePayPaymentAsync, isPending } = useMutation({\n mutationFn: completeGooglePayPayment,\n });\n if (googlePayConfiguration == null || googlePayConfiguration.isAvailable != true) {\n console.log('google pay configuration is not available', googlePayConfiguration);\n return null;\n }\n\n return (\n <>\n <GooglePayButton\n buttonSizeMode={buttonSizeMode}\n buttonColor={buttonColor}\n style={style}\n existingPaymentMethodRequired={true}\n environment={test === true ? 'TEST' : 'PRODUCTION'}\n onPaymentDataChanged={async (paymentData) => {\n console.log('payment data changed', paymentData);\n if (paymentData.shippingAddress?.postalCode != null) {\n await setPostalCode(paymentData.shippingAddress?.postalCode);\n }\n if (paymentData.shippingAddress?.countryCode != null) {\n await setCountry(paymentData.shippingAddress?.countryCode);\n }\n if (paymentData.shippingOptionData?.id != null) {\n await setDeliveryMethod(paymentData.shippingOptionData.id);\n }\n\n const config = await getGooglePayConfiguration({ items: [] });\n console.log('PAYMENT DATA CHANGED CONFIG', config);\n if (config.isAvailable) {\n return {\n error: undefined,\n newShippingOptionParameters: config.config.shippingOptionParameters,\n newTransactionInfo: config.config.transactionInfo,\n }\n }\n\n return {\n error: undefined,\n }\n }}\n paymentRequest={googlePayConfiguration.config}\n onLoadPaymentData={async (paymentRequest) => {\n try {\n const result = await completeGooglePayPaymentAsync({\n paymentData: paymentRequest\n });\n if (isErr(result)) {\n console.log(\"apple pay error\", result);\n return;\n }\n\n result.isSuccess && clearCart();\n if (result.redirectURL) {\n open(result.redirectURL, \"_self\");\n }\n } catch (e) {\n console.warn(\"error completing google pay payment\", e);\n }\n }}\n />\n {isPending ? <Spinner /> : null}\n </>\n );\n}\n\nfunction Wrapper(props: Props) {\n return (\n <>\n <CartProvider>\n <GooglePayButtonComponent {...props} />\n </CartProvider>\n </>\n );\n}\nexport default Wrapper;\n","import { Loader2Icon } from \"lucide-react\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Spinner({ className, ...props }: React.ComponentProps<\"svg\">) {\n return (\n <Loader2Icon\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(\"size-4 animate-spin\", className)}\n {...props}\n />\n )\n}\n\nexport { Spinner }\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport type Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type Partial<T> = {\n [P in keyof T]?: T[P];\n};\n","import { useEffect } from \"react\";\nimport zod from \"zod\";\nimport CartComponent from \"./CartComponent\";\nimport { getCheckoutMethods, getProjectID, setProjectID } from \"./CartProvider\";\nimport { isErr } from \"./lib/err\";\nimport { useCheckoutStore } from \"./state\";\n\nenum CartEvent {\n ADD_TO_CART = \"ADD_TO_CART\",\n}\n\nconst cartAddToCartSchema = zod.object({\n id: zod.string(),\n isSubscription: zod.boolean().default(false),\n quantity: zod.number(),\n metadata: zod.record(zod.string(), zod.string().optional()).optional(),\n});\n\ntype CartAddToCartEvent = zod.infer<typeof cartAddToCartSchema>;\n\nfunction BitsnapCart({\n projectID,\n children,\n onVisibleChange,\n className,\n numberOfProductsInCartOptions,\n}: {\n projectID: string;\n children?: React.ReactNode;\n onVisibleChange?: (isVisible: boolean) => void;\n className?: string;\n numberOfProductsInCartOptions?: {\n style?: React.CSSProperties;\n isVisible?: boolean;\n };\n}) {\n const { isCartVisible, showCart, hideCart, numberOfProductsInCart } = useCheckoutStore();\n\n function sentPostMessageToIframe(msg: unknown) {\n const iframes = document.querySelectorAll(\"iframe\");\n\n iframes.forEach((iframe) => {\n iframe.contentWindow?.postMessage(msg, \"*\");\n });\n }\n\n useEffect(() => {\n onVisibleChange?.(isCartVisible);\n }, [isCartVisible]);\n\n useEffect(() => {\n setProjectID(projectID);\n }, [projectID]);\n\n useEffect(() => {\n if (!(\"cart\" in window)) {\n const projectID = getProjectID();\n if (projectID == null) {\n console.warn(\"There is no project ID configured.\");\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n window[\"cart\"] = {\n buyProduct: async (args: unknown) => {\n try {\n const payload = zod\n .object({\n productID: zod.string(),\n email: zod.string().optional(),\n name: zod.string().optional(),\n country: zod.string().optional(),\n marketingAgreement: zod.boolean().optional(),\n })\n .parse(args);\n\n const methods = getCheckoutMethods(projectID);\n\n const result = await methods.justRedirectToPayment(payload);\n\n console.log(\"result\", result);\n if (isErr(result) == false) {\n window.location.href = result.url;\n } else {\n alert(\n \"Nie udało się przekierować do płatności. Spróbuj ponownie później.\",\n );\n }\n } catch (e) {\n console.warn(e);\n }\n },\n };\n }\n }, []);\n\n async function handleAddingToCart(id: string, payload?: unknown) {\n const projectID = getProjectID();\n if (projectID == null) {\n console.warn(\"There is no project ID configured.\");\n return;\n }\n\n try {\n const data = cartAddToCartSchema.parse(payload);\n\n if (data.isSubscription) {\n await handleAddingSubscriptionToCart(projectID, data);\n return;\n }\n\n const methods = getCheckoutMethods(projectID);\n\n await methods.addProduct({\n productID: data.id,\n quantity: data.quantity,\n metadata: data.metadata,\n });\n\n sentPostMessageToIframe({\n id: id,\n type: CartEvent.ADD_TO_CART,\n success: true,\n });\n showCart();\n } catch (e) {\n console.warn(\"cannot add item to cart\", e);\n }\n }\n\n async function handleAddingSubscriptionToCart(\n projectID: string,\n event: CartAddToCartEvent,\n ) {\n alert(\n `TODO, nie jest to jeszcze zrobione ${projectID} ${event.id} ${event.quantity}`,\n );\n }\n\n function setupEventListener() {\n if (\"__cart_is_listening\" in window) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n window[\"__cart_is_listening\"] = true;\n window.addEventListener(\"message\", (event) => {\n if (\n typeof event.data[\"id\"] != \"undefined\" &&\n typeof event.data[\"type\"] != \"undefined\"\n ) {\n const { id, type } = event.data;\n switch (type) {\n case CartEvent.ADD_TO_CART.toString():\n handleAddingToCart(id, event.data[\"payload\"]).then().catch();\n break;\n default:\n break;\n }\n }\n });\n }\n\n useEffect(() => {\n setupEventListener();\n\n if (typeof window !== \"undefined\") {\n try {\n const parsedParams = new URLSearchParams(window.location.search);\n const refLink =\n parsedParams.get(\"ref\") ?? parsedParams.get(\"utm-source\");\n if (\n typeof localStorage != \"undefined\" &&\n refLink &&\n refLink.length > 0\n ) {\n localStorage.setItem(\"bitsnap-ref\", refLink);\n }\n } catch (e) {\n return;\n }\n }\n }, []);\n\n\n return (\n <>\n <button\n onClick={() => (isCartVisible ? hideCart() : showCart())}\n style={{ position: \"relative\" }}\n className={\n ['bitsnap-checkout', className ?? \"rounded-full hover:bg-neutral-300 transition p-1\"].join(' ')\n }\n >\n {children ? (\n <>{children}</>\n ) : (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"lucide lucide-shopping-cart\"\n >\n <circle cx=\"8\" cy=\"21\" r=\"1\" />\n <circle cx=\"19\" cy=\"21\" r=\"1\" />\n <path d=\"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12\" />\n </svg>\n )}\n {(numberOfProductsInCartOptions?.isVisible != false) && numberOfProductsInCart > 0 && (\n <div\n style={{\n position: \"absolute\",\n bottom: -5,\n right: -5,\n background: \"black\",\n color: \"white\",\n borderRadius: \"50%\",\n width: \"22px\",\n height: \"22px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: \"13px\",\n fontWeight: 600,\n boxShadow: \"0 2px 8px rgba(0, 0, 0, 0.25)\",\n ...numberOfProductsInCartOptions?.style,\n }}\n >\n {numberOfProductsInCart}\n </div>\n )}\n </button>\n <CartComponent\n isVisible={isCartVisible}\n shouldHide={() => {\n hideCart();\n }}\n />\n </>\n );\n}\n\nexport default BitsnapCart;\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { createPortal } from \"react-dom\";\nimport CartComponentContent from \"./CartComponentContent\";\nimport CartProvider from \"./CartProvider\";\n\ninterface Props {\n isVisible: boolean;\n shouldHide: () => void;\n}\n\nfunction CartComponent({ isVisible, shouldHide }: Props) {\n const [parent] = useAutoAnimate(/* optional config */);\n\n return (\n <div ref={parent} className={\"bitsnap-checkout dark\"} style={{ zIndex: 999999 }}>\n {isVisible && (\n <>\n <div\n className={\n \"fixed top-0 right-0 left-0 bottom-0 bg-black/30 cursor-pointer z-10\"\n }\n onClick={shouldHide}\n ></div>\n <div\n className={\n \"fixed z-20 top-0 right-0 bottom-0 w-full md:w-[350px] xl:w-[420px] dark:bg-neutral-900 bg-neutral-300 dark:text-neutral-200 text-neutral-900 flex flex-col\"\n }\n >\n <div\n className={\n \"mx-3 mt-7 flex justify-between items-center\"\n }\n >\n <h1 className={\"text-2xl font-medium\"}>Koszyk</h1>\n <button\n className=\"rounded-full dark:hover:bg-neutral-700 hover:bg-neutral-400 p-2 transition\"\n onClick={shouldHide}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"lucide lucide-x\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n\n <CartComponentContent className={\"grow\"} />\n </div>\n </>\n )}\n </div>\n );\n}\n\nconst WrapperCartComponent = (props: Props) => {\n if (typeof window === \"undefined\") {\n return null;\n }\n\n return createPortal(\n <CartProvider>\n <CartComponent {...props} />\n </CartProvider>,\n document.body,\n );\n};\n\nexport default WrapperCartComponent;\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport React from \"react\";\nimport { useCartProvider } from \"./CartProvider\";\nimport CountrySelector from \"./CountrySelector\";\nimport { isErr } from \"./lib/err\";\nimport { formatCurrency } from \"./lib/round.number\";\nimport LoadingIndicator from \"./LoadingIndicator\";\nimport SingleProduct from \"./SingleProduct\";\nimport { Skeleton } from \"./Skeleton\";\nimport { ApplePayButton, GooglePayButton } from \"..\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport { useMutation, useQuery } from \"@tanstack/react-query\";\n\nconst CartComponentContent = ({ className }: { className: string }) => {\n const provider = useCartProvider();\n\n const { mutateAsync: removeProduct } = useMutation({\n mutationFn: provider.removeProductFromCart,\n });\n const { mutateAsync: updateQuantity } = useMutation({\n mutationFn: provider.updateQuantity,\n });\n const { mutateAsync: setCountryAsync } = useMutation({\n mutationFn: provider.setCountry,\n });\n const { mutateAsync: clearCart } = useMutation({\n mutationFn: provider.clearCart,\n });\n\n const [errMsg, setErrMsg] = React.useState(\"\");\n\n const [isCountryOpen, setIsCountryOpen] = React.useState(false);\n\n const {\n mutateAsync: continueToCheckoutAsync,\n isPending: isContinueToCheckoutLoading,\n } = useMutation({\n mutationFn: provider.redirectToNextStep,\n });\n\n const { data: availableCountries } = useQuery({\n queryKey: [\"cart-available-countries\"],\n queryFn: provider.getAvailableCountries,\n });\n const { data: isApplePayAvailable } = useQuery({\n queryKey: [\"cart-one-click-payment\"],\n queryFn: provider.checkIfApplePayIsAvailable,\n });\n const { data, isLoading, refetch } = useQuery({\n queryKey: [\"cart\"],\n queryFn: provider.getProducts,\n });\n const { data: countryData, refetch: refetchCountry } = useQuery({\n queryKey: [\"cart-country\"],\n queryFn: provider.getCountry,\n });\n\n const [productsParent] = useAutoAnimate(/* optional config */);\n\n const products = isErr(data) ? undefined : data;\n\n const countries = isErr(availableCountries) ? [] : availableCountries;\n\n const sumOfProducts =\n products?.reduce((prev, curr) => {\n if (curr.details == null) {\n return prev;\n }\n return prev + curr.details.price * curr.quantity;\n }, 0) ?? 0;\n const currency = products?.[0]?.details?.currency ?? \"PLN\";\n\n const isSomeProductDeliverable =\n products?.some((product) => product.details?.isDeliverable === true) ??\n false;\n\n const selectedCountry =\n countryData != null && !isErr(countryData) && countryData != \"\"\n ? countryData\n : undefined;\n\n async function shouldUpdate(id: string, newQuantity?: number) {\n if (newQuantity != null) {\n if (newQuantity <= 0) {\n await removeProduct({ id: id });\n await refetch();\n return;\n }\n\n await updateQuantity({\n id: id,\n quantity: newQuantity,\n });\n await refetch();\n return;\n }\n }\n\n async function continueToCheckout() {\n try {\n setErrMsg(\"\");\n\n const response = await continueToCheckoutAsync();\n\n if (isErr(response)) {\n setErrMsg(`${response.error}`);\n return;\n }\n\n await clearCart();\n window.location.href = response.url;\n } catch (e: unknown) {\n setErrMsg(`${e}`);\n }\n }\n\n return (\n <div className={`${className} flex flex-col`} ref={productsParent}>\n {isLoading && (\n <div className={\"relative flex w-full justify-center flex-col gap-4\"}>\n <Skeleton className={\"w-full h-32\"} />\n <Skeleton className={\"w-full h-32\"} />\n </div>\n )}\n\n {!isLoading && (products == null || products.length == 0) && (\n <div className={\"flex flex-col gap-4 p-4\"}>\n <p className={\"dark:text-neutral-400 text-neutral-700\"}>\n Brak produktów w koszyku.\n </p>\n </div>\n )}\n\n <div\n className={\"max-h-[70vh] overflow-clip overflow-y-scroll\"}\n >\n {products != null && products.length > 0 && (\n <ul className={\"mt-5\"}>\n {products.map((product) => (\n <React.Fragment key={product.id}>\n {product.details != null && (\n <li className={\"mb-3\"}>\n <SingleProduct\n quantity={product.quantity}\n details={product.details}\n shouldUpdate={(newQuantity) => {\n shouldUpdate(product.id, newQuantity).then().catch();\n }}\n />\n <hr className=\"h-1 dark:border-neutral-700 border-neutral-400\" />\n </li>\n )}\n </React.Fragment>\n ))}\n </ul>\n )}\n </div>\n\n <div className=\"grow\"></div>\n\n {sumOfProducts > 0 && currency != null && (\n <>\n <div className=\"mx-3 flex flex-col\">\n <div\n className={\n \"flex flex-row justify-between text-lg\"\n }\n >\n <p\n className={\n \"dark:text-neutral-200 text-neutral-800 text-xl\"\n }\n >\n Suma:\n </p>\n <div className={\"flex flex-col items-end\"}>\n <p\n className={\n \"dark:text-neutral-200 text-neutral-800 font-medium\"\n }\n >\n {formatCurrency(sumOfProducts, currency)}\n </p>\n {isSomeProductDeliverable && (\n <p className={\"opacity-70 text-right text-base\"}>\n + dostawa\n </p>\n )}\n </div>\n </div>\n </div>\n\n {countries && countries?.length > 1 && (\n <div>\n <h4\n className={\n \"ml-3 text-sm dark:text-neutral-400 text-neutral-700\"\n }\n >\n Wybierz kraj\n </h4>\n <CountrySelector\n id={Math.random().toString()}\n open={isCountryOpen}\n onToggle={() => {\n setIsCountryOpen(!isCountryOpen);\n }}\n onChange={(newValue) => {\n setCountryAsync(newValue).then(() => {\n refetchCountry().then().catch();\n });\n }}\n selectedValue={selectedCountry ?? \"\"}\n countries={countries}\n />\n </div>\n )}\n\n <div className={\"mb-3 flex flex-col\"}>\n {isApplePayAvailable && products != null && products.length > 0 && (\n <div className=\"w-full px-2\">\n <ApplePayButton colorType=\"white\" style={{ width: '100%' }} items={products?.map(el => ({\n name: el.details?.name ?? \"\",\n id: el.productID,\n price: el.details?.price ?? 0,\n quantity: el.quantity,\n isDeliverable: el.details?.isDeliverable ?? false,\n metadata: el.metadata,\n }))} />\n </div>\n )}\n {products != null && products.length > 0 && (\n <div className=\"w-full px-2\">\n <GooglePayButton buttonSizeMode=\"fill\" buttonColor=\"white\" style={{ width: '100%' }} items={products?.map(el => ({\n name: el.details?.name ?? \"\",\n id: el.productID,\n price: el.details?.price ?? 0,\n quantity: el.quantity,\n isDeliverable: el.details?.isDeliverable ?? false,\n metadata: el.metadata,\n }))} />\n </div>\n )}\n <button\n onClick={continueToCheckout}\n disabled={\n isLoading ||\n isContinueToCheckoutLoading ||\n selectedCountry == null\n }\n className={\n \"px-3 py-2 my-2 mx-2 rounded-md disabled:opacity-40 disabled:cursor-not-allowed dark:bg-neutral-300 dark:hover:bg-neutral-100 dark:text-neutral-800 hover:bg-neutral-900 text-neutral-200 bg-neutral-800 transition font-bold\"\n }\n >\n {isContinueToCheckoutLoading ? <Spinner /> : \"Następny krok\"}\n </button>\n {errMsg.length > 0 && (\n <p className={\"text-red-500 text-sm text-center\"}>\n {errMsg}\n </p>\n )}\n </div>\n </>\n )}\n </div>\n );\n};\n\nexport default CartComponentContent;\n","import { AnimatePresence, motion } from \"framer-motion\";\nimport { type MutableRefObject, useEffect, useRef, useState } from \"react\";\n\nexport interface CountrySelectorProps {\n id: string;\n open: boolean;\n disabled?: boolean;\n onToggle: () => void;\n onChange: (value: string) => void;\n selectedValue: string;\n countries: { name: string; code: string }[];\n}\n\nfunction CountrySelector(\n {\n id,\n open,\n disabled = false,\n onToggle,\n onChange,\n selectedValue,\n countries\n }: CountrySelectorProps) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const mutableRef = ref as MutableRefObject<HTMLDivElement | null>;\n\n const handleClickOutside = (event: MouseEvent) => {\n if (\n mutableRef.current &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n !mutableRef.current.contains(event.target) &&\n open\n ) {\n onToggle();\n setQuery(\"\");\n }\n };\n\n window.document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref]);\n\n useEffect(() => {\n if (selectedValue == null && countries.length > 0) {\n onChange(countries[0].code);\n }\n }, []);\n\n const [query, setQuery] = useState(\"\");\n\n return (\n <div ref={ref}>\n <div className=\"relative\">\n <button\n type=\"button\"\n className={`${disabled ? \"bg-neutral-100\" : \"bg-extra-light-white\"\n } relative w-full rounded-2xl shadow-sm pl-8 pr-10 py-3 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm`}\n aria-haspopup=\"listbox\"\n aria-expanded=\"true\"\n aria-labelledby=\"listbox-label\"\n onClick={onToggle}\n disabled={disabled}\n >\n <span className=\"truncate flex items-center\">\n <img\n alt={`${selectedValue}`}\n src={`https://purecatamphetamine.github.io/country-flag-icons/3x2/${selectedValue}.svg`}\n className={\"inline mr-2 h-4 rounded-sm\"}\n />\n {countries.find(el => el.code === selectedValue)?.name}\n </span>\n <span\n className={`absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none ${disabled ? \"hidden\" : \"\"\n }`}\n >\n <svg\n className=\"h-5 w-5 text-light-purple\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n </button>\n\n <AnimatePresence>\n {open && (\n <motion.ul\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.1 }}\n className=\"absolute z-10 -mt-80 w-full dark:bg-neutral-800 bg-white shadow-lg max-h-80 rounded-md text-body-regular ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-body-regular\"\n tabIndex={-1}\n role=\"listbox\"\n aria-labelledby=\"listbox-label\"\n aria-activedescendant=\"listbox-option-3\"\n >\n <div className=\"sticky top-0 z-10 bg-white dark:bg-neutral-800\">\n <li className=\"dark:text-neutral-200 text-neutral-900 cursor-default select-none relative py-2 px-3\">\n <input\n type=\"search\"\n name=\"search\"\n autoComplete={\"off\"}\n className=\"block w-full outline-none sm:text-body-regular dark:text-neutral-400 text-dark-blue bg-transparent border-light-purple rounded-md placeholder:text-light-purple\"\n placeholder={\"Znajdź kraj\"}\n onChange={(e) => setQuery(e.target.value)}\n />\n </li>\n <hr />\n </div>\n\n <div\n className={\n \"max-h-64 scrollbar scrollbar-track-gray-100 scrollbar-thumb-gray-300 hover:scrollbar-thumb-gray-600 scrollbar-thumb-rounded scrollbar-thin overflow-y-scroll\"\n }\n >\n {countries.filter((country) =>\n country.name.toLowerCase().startsWith(query.toLowerCase())\n ).length === 0 ? (\n <li className=\"text-light-purple cursor-default select-none relative py-2 pl-3 pr-9\">\n No countries found\n </li>\n ) : (\n countries.filter((country) =>\n country.name.toLowerCase().startsWith(query.toLowerCase())\n ).map((value, index) => {\n return (\n <li\n key={`${id}-${index}`}\n className=\"text-dark-blue cursor-default select-none relative py-2 pl-3 pr-9 flex items-center hover:bg-extra-light-white transition\"\n id=\"listbox-option-0\"\n role=\"option\"\n onClick={() => {\n onChange(value.code);\n setQuery(\"\");\n onToggle();\n }}\n >\n <img\n alt={`${value.code}`}\n src={`https://purecatamphetamine.github.io/country-flag-icons/3x2/${value.code}.svg`}\n className={\"inline mr-2 h-4 rounded-sm\"}\n />\n\n <span className=\"font-normal truncate\">\n {value.name}\n </span>\n {value.code === selectedValue ? (\n <span\n className=\"text-blue-600 absolute inset-y-0 right-0 flex items-center pr-8\">\n <svg\n className=\"h-5 w-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n ) : null}\n </li>\n );\n })\n )}\n </div>\n </motion.ul>\n )}\n </AnimatePresence>\n </div>\n </div>\n )\n}\n\n\nexport default CountrySelector","import { useEffect, useState } from \"react\";\nimport { formatCurrency } from \"./lib/round.number\";\nimport type { SingleProduct } from \"./product.details.model\";\n\n\nconst SingleProduct = ({ quantity, details, shouldUpdate }: {\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details: SingleProduct;\n shouldUpdate: (newQuantity?: number) => void;\n}) => {\n\n return (\n <div className={'flex items-center gap-3'}>\n <img className={'aspect-auto max-w-[30%] max-w-32 max-h-32'} src={details.image_url ?? ''} alt={details.name} />\n\n <div className={'flex flex-col'}>\n <p className={'font-medium'}>{details.name}</p>\n <p className={'text-sm'}>{formatCurrency(details.price, details.currency)}</p>\n <div className={'flex justify-between'}>\n <QuantityComponent className={\"\"} quantity={quantity} shouldUpdate={shouldUpdate} />\n <button className={'text-sm font-medium'} onClick={() => shouldUpdate(0)}>Usuń</button>\n </div>\n </div>\n </div>\n );\n}\n\nexport default SingleProduct;\n\nconst QuantityComponent = (\n {\n quantity,\n shouldUpdate,\n className\n }: {\n quantity: number;\n shouldUpdate: (newQuantity: number) => void;\n className: string;\n }) => {\n const [quantityString, setQuantityString] = useState(quantity.toString());\n const [quantityValue, setQuantityValue] = useState(quantity);\n\n useEffect(() => {\n shouldUpdate(quantityValue);\n }, [quantityValue]);\n\n function setNewQuantity(newQuantity: string) {\n setQuantityString(newQuantity);\n if (newQuantity.length == 0) {\n return;\n }\n const parsedInt = parseInt(newQuantity);\n if (isNaN(parsedInt)) {\n setQuantityValue(1);\n setQuantityString('');\n return;\n }\n if (parsedInt == 0 || parsedInt < 0) {\n setQuantityValue(1);\n setQuantityString(\"1\");\n return;\n }\n setQuantityValue(parsedInt);\n setQuantityString(parsedInt.toString());\n }\n\n function increaseQuantity() {\n setQuantityValue(quantity + 1);\n setQuantityString((quantity + 1).toString());\n }\n\n function decreaseQuantity() {\n if (quantity > 1) {\n setQuantityString((quantity - 1).toString());\n setQuantityValue(quantity - 1);\n return;\n }\n setQuantityString(quantity.toString());\n setQuantityValue(quantity);\n }\n\n return (\n <div className={`flex ${className} items-center border dark:border-neutral-400 border-neutral-700 rounded-md my-1`}>\n <button onClick={decreaseQuantity} className={'px-2 py-1'}>-</button>\n <input\n className={'w-8 bg-transparent text-center'}\n value={quantityString}\n onInput={(e) => { setNewQuantity(e.currentTarget.value) }}\n type=\"text\"\n />\n <button onClick={increaseQuantity} className={'px-2 py-1'}>+</button>\n </div>\n );\n}\n","function Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={\"bg-neutral-700 animate-pulse rounded-md\" + ' ' + className}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n"],"mappings":";;;AAAA,OAAO,oBAAoB;;;ACC3B,SAAS,oBAAiC;AAC1C,SAAS,8BAA8B;;;ACIvC,SAAS,YAAAA,WAAU,YAAAC,WAAU,eAAAC,cAAa,eAAAC,oBAAmB;AAE7D,SAAS,8BAAAC,6BAA4B,kCAAAC,uCAAsC;;;ACH3E,SAAS,UAAU,gBAAgB;AAK5B,IAAM,yBACX,yBAAS,0ZAA0Z;;;ACNra,SAAS,YAAAC,WAAU,mBAAmB;AAM/B,IAAM,yBACX,gBAAAA,UAAS,4kBAA4kB;AAyChlB,IAAM,gBACX,4BAAY,wBAAwB,CAAC;AA8ChC,IAAM,uBACX,4BAAY,wBAAwB,CAAC;;;AChGvC,SAAS,YAAAC,WAAU,YAAAC,WAAU,eAAAC,oBAAmB;AAEhD,SAAS,sCAAsC;AAMxC,IAAM,oCACX,gBAAAD,UAAS,gqCAAgqC,CAAC,8BAA8B,CAAC;;;ACT3sC,SAAS,YAAAE,WAAU,YAAAC,WAAU,eAAAC,cAAa,mBAAmB;AAE7D,SAAS,4BAA4B,kCAA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AAAA,gBACT,YAAY;AAAA,gBACZ,gBAAgB;AAAA,gBAChB,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,WAAW;AAAA,gBACX,GAAG,+EAA+B;AAAA,cACpC;AAAA,cAEC;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,IACA,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,QACX,YAAY,MAAM;AAChB,mBAAS;AAAA,QACX;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,sBAAQ;","names":["enumDesc","fileDesc","messageDesc","serviceDesc","file_google_protobuf_empty","file_google_protobuf_timestamp","fileDesc","enumDesc","fileDesc","messageDesc","enumDesc","fileDesc","messageDesc","file_google_protobuf_timestamp","fileDesc","file_google_protobuf_timestamp","file_google_protobuf_empty","messageDesc","serviceDesc","PublicApiClient","create","Bitsnap","_a","_a","create","_b","variant","Fragment","jsx","apRequest","jsx","useQuery","Fragment","jsx","Wrapper","useEffect","zod","useAutoAnimate","useEffect","jsx","jsxs","open","useEffect","useState","jsx","jsxs","useState","useEffect","jsx","useMutation","useQuery","Fragment","jsx","jsxs","_a","_b","_c","_d","_e","Fragment","jsx","jsxs","useAutoAnimate","Fragment","jsx","jsxs","zod","useEffect","projectID","jsxs","Fragment","jsx"]}