@klarna/react-native-klarna-network-payment 0.0.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -29
- package/android/build.gradle +95 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaNetworkPaymentButtonViewSpec.kt +22 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaNetworkPaymentModule.kt +46 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaNetworkPaymentModuleImpl.kt +163 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaNetworkPaymentPackage.kt +30 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentButtonPressEvent.kt +19 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentButtonViewManager.kt +276 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentPresentationMapper.kt +132 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentRequestMapper.kt +328 -0
- package/android/src/main/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentResponseMapper.kt +145 -0
- package/android/src/test/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaNetworkPaymentModuleImplTest.kt +361 -0
- package/android/src/test/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentButtonViewManagerTest.kt +155 -0
- package/android/src/test/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentPresentationMapperTest.kt +447 -0
- package/android/src/test/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentRequestMapperTest.kt +489 -0
- package/android/src/test/java/com/klarna/mobile/sdk/reactnative/klarnanetwork/payment/KlarnaPaymentResponseMapperTest.kt +456 -0
- package/ios/Sources/KlarnaNetworkPayment.h +5 -0
- package/ios/Sources/KlarnaNetworkPayment.mm +110 -0
- package/ios/Sources/KlarnaNetworkPaymentModuleImpl.swift +196 -0
- package/ios/Sources/KlarnaPaymentButtonComponentView.mm +147 -0
- package/ios/Sources/KlarnaPaymentButtonViewImpl.swift +78 -0
- package/ios/Sources/KlarnaPaymentPresentationMapping.swift +102 -0
- package/ios/Sources/KlarnaPaymentRequestDataMapping.swift +232 -0
- package/ios/Sources/KlarnaPaymentRequestMapping.swift +103 -0
- package/ios/Tests/KlarnaNetworkPaymentModuleImplTests.swift +143 -0
- package/ios/Tests/KlarnaPaymentButtonViewImplTests.swift +122 -0
- package/ios/Tests/KlarnaPaymentPresentationMappingTests.swift +335 -0
- package/lib/commonjs/KlarnaNetworkPayment.js +6 -0
- package/lib/commonjs/KlarnaNetworkPayment.js.map +1 -0
- package/lib/commonjs/KlarnaNetworkPaymentImpl.js +44 -0
- package/lib/commonjs/KlarnaNetworkPaymentImpl.js.map +1 -0
- package/lib/commonjs/KlarnaNetworkPaymentMapper.js +164 -0
- package/lib/commonjs/KlarnaNetworkPaymentMapper.js.map +1 -0
- package/lib/commonjs/KlarnaPaymentButton.js +43 -0
- package/lib/commonjs/KlarnaPaymentButton.js.map +1 -0
- package/lib/commonjs/Specs/KlarnaPaymentButtonNativeComponent.js +10 -0
- package/lib/commonjs/Specs/KlarnaPaymentButtonNativeComponent.js.map +1 -0
- package/lib/commonjs/Specs/NativeKlarnaNetworkPayment.js +13 -0
- package/lib/commonjs/Specs/NativeKlarnaNetworkPayment.js.map +1 -0
- package/lib/commonjs/index.js +51 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/types/KlarnaPaymentRequest.js +6 -0
- package/lib/commonjs/types/KlarnaPaymentRequest.js.map +1 -0
- package/lib/commonjs/types/KlarnaPaymentRequestState.js +2 -0
- package/lib/commonjs/types/KlarnaPaymentRequestState.js.map +1 -0
- package/lib/commonjs/types/KlarnaPaymentRequestStateContext.js +6 -0
- package/lib/commonjs/types/KlarnaPaymentRequestStateContext.js.map +1 -0
- package/lib/commonjs/types/KlarnaPaymentRequestStateReason.js +2 -0
- package/lib/commonjs/types/KlarnaPaymentRequestStateReason.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaBillingPlan.js +6 -0
- package/lib/commonjs/types/models/KlarnaBillingPlan.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaCollectCustomerProfileType.js +2 -0
- package/lib/commonjs/types/models/KlarnaCollectCustomerProfileType.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaCustomer.js +6 -0
- package/lib/commonjs/types/models/KlarnaCustomer.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaFreeTrial.js +2 -0
- package/lib/commonjs/types/models/KlarnaFreeTrial.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaInterval.js +2 -0
- package/lib/commonjs/types/models/KlarnaInterval.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaLineItem.js +2 -0
- package/lib/commonjs/types/models/KlarnaLineItem.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaOndemandService.js +6 -0
- package/lib/commonjs/types/models/KlarnaOndemandService.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaPartnerCustomer.js +6 -0
- package/lib/commonjs/types/models/KlarnaPartnerCustomer.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaPaymentPresentation.js +6 -0
- package/lib/commonjs/types/models/KlarnaPaymentPresentation.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaPaymentRequestData.js +6 -0
- package/lib/commonjs/types/models/KlarnaPaymentRequestData.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaRequestCustomerToken.js +6 -0
- package/lib/commonjs/types/models/KlarnaRequestCustomerToken.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaRequestCustomerTokenScope.js +2 -0
- package/lib/commonjs/types/models/KlarnaRequestCustomerTokenScope.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaShipping.js +6 -0
- package/lib/commonjs/types/models/KlarnaShipping.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaShippingConfig.js +6 -0
- package/lib/commonjs/types/models/KlarnaShippingConfig.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaShippingConfigMode.js +2 -0
- package/lib/commonjs/types/models/KlarnaShippingConfigMode.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaShippingOption.js +6 -0
- package/lib/commonjs/types/models/KlarnaShippingOption.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaShippingRecipient.js +2 -0
- package/lib/commonjs/types/models/KlarnaShippingRecipient.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaShippingType.js +2 -0
- package/lib/commonjs/types/models/KlarnaShippingType.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaShippingTypeAttribute.js +2 -0
- package/lib/commonjs/types/models/KlarnaShippingTypeAttribute.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaSubscription.js +6 -0
- package/lib/commonjs/types/models/KlarnaSubscription.js.map +1 -0
- package/lib/commonjs/types/models/KlarnaSupplementaryPurchaseData.js +6 -0
- package/lib/commonjs/types/models/KlarnaSupplementaryPurchaseData.js.map +1 -0
- package/lib/commonjs/types/models/index.js +2 -0
- package/lib/commonjs/types/models/index.js.map +1 -0
- package/lib/module/KlarnaNetworkPayment.js +2 -0
- package/lib/module/KlarnaNetworkPayment.js.map +1 -0
- package/lib/module/KlarnaNetworkPaymentImpl.js +36 -0
- package/lib/module/KlarnaNetworkPaymentImpl.js.map +1 -0
- package/lib/module/KlarnaNetworkPaymentMapper.js +146 -0
- package/lib/module/KlarnaNetworkPaymentMapper.js.map +1 -0
- package/lib/module/KlarnaPaymentButton.js +37 -0
- package/lib/module/KlarnaPaymentButton.js.map +1 -0
- package/lib/module/Specs/KlarnaPaymentButtonNativeComponent.js +3 -0
- package/lib/module/Specs/KlarnaPaymentButtonNativeComponent.js.map +1 -0
- package/lib/module/Specs/NativeKlarnaNetworkPayment.js +9 -0
- package/lib/module/Specs/NativeKlarnaNetworkPayment.js.map +1 -0
- package/lib/module/index.js +40 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/types/KlarnaPaymentRequest.js +2 -0
- package/lib/module/types/KlarnaPaymentRequest.js.map +1 -0
- package/lib/module/types/KlarnaPaymentRequestState.js +2 -0
- package/lib/module/types/KlarnaPaymentRequestState.js.map +1 -0
- package/lib/module/types/KlarnaPaymentRequestStateContext.js +2 -0
- package/lib/module/types/KlarnaPaymentRequestStateContext.js.map +1 -0
- package/lib/module/types/KlarnaPaymentRequestStateReason.js +2 -0
- package/lib/module/types/KlarnaPaymentRequestStateReason.js.map +1 -0
- package/lib/module/types/models/KlarnaBillingPlan.js +2 -0
- package/lib/module/types/models/KlarnaBillingPlan.js.map +1 -0
- package/lib/module/types/models/KlarnaCollectCustomerProfileType.js +2 -0
- package/lib/module/types/models/KlarnaCollectCustomerProfileType.js.map +1 -0
- package/lib/module/types/models/KlarnaCustomer.js +2 -0
- package/lib/module/types/models/KlarnaCustomer.js.map +1 -0
- package/lib/module/types/models/KlarnaFreeTrial.js +2 -0
- package/lib/module/types/models/KlarnaFreeTrial.js.map +1 -0
- package/lib/module/types/models/KlarnaInterval.js +2 -0
- package/lib/module/types/models/KlarnaInterval.js.map +1 -0
- package/lib/module/types/models/KlarnaLineItem.js +2 -0
- package/lib/module/types/models/KlarnaLineItem.js.map +1 -0
- package/lib/module/types/models/KlarnaOndemandService.js +2 -0
- package/lib/module/types/models/KlarnaOndemandService.js.map +1 -0
- package/lib/module/types/models/KlarnaPartnerCustomer.js +2 -0
- package/lib/module/types/models/KlarnaPartnerCustomer.js.map +1 -0
- package/lib/module/types/models/KlarnaPaymentPresentation.js +2 -0
- package/lib/module/types/models/KlarnaPaymentPresentation.js.map +1 -0
- package/lib/module/types/models/KlarnaPaymentRequestData.js +2 -0
- package/lib/module/types/models/KlarnaPaymentRequestData.js.map +1 -0
- package/lib/module/types/models/KlarnaRequestCustomerToken.js +2 -0
- package/lib/module/types/models/KlarnaRequestCustomerToken.js.map +1 -0
- package/lib/module/types/models/KlarnaRequestCustomerTokenScope.js +2 -0
- package/lib/module/types/models/KlarnaRequestCustomerTokenScope.js.map +1 -0
- package/lib/module/types/models/KlarnaShipping.js +2 -0
- package/lib/module/types/models/KlarnaShipping.js.map +1 -0
- package/lib/module/types/models/KlarnaShippingConfig.js +2 -0
- package/lib/module/types/models/KlarnaShippingConfig.js.map +1 -0
- package/lib/module/types/models/KlarnaShippingConfigMode.js +2 -0
- package/lib/module/types/models/KlarnaShippingConfigMode.js.map +1 -0
- package/lib/module/types/models/KlarnaShippingOption.js +2 -0
- package/lib/module/types/models/KlarnaShippingOption.js.map +1 -0
- package/lib/module/types/models/KlarnaShippingRecipient.js +2 -0
- package/lib/module/types/models/KlarnaShippingRecipient.js.map +1 -0
- package/lib/module/types/models/KlarnaShippingType.js +2 -0
- package/lib/module/types/models/KlarnaShippingType.js.map +1 -0
- package/lib/module/types/models/KlarnaShippingTypeAttribute.js +2 -0
- package/lib/module/types/models/KlarnaShippingTypeAttribute.js.map +1 -0
- package/lib/module/types/models/KlarnaSubscription.js +2 -0
- package/lib/module/types/models/KlarnaSubscription.js.map +1 -0
- package/lib/module/types/models/KlarnaSupplementaryPurchaseData.js +2 -0
- package/lib/module/types/models/KlarnaSupplementaryPurchaseData.js.map +1 -0
- package/lib/module/types/models/index.js +2 -0
- package/lib/module/types/models/index.js.map +1 -0
- package/lib/typescript/KlarnaNetworkPayment.d.ts +22 -0
- package/lib/typescript/KlarnaNetworkPayment.d.ts.map +1 -0
- package/lib/typescript/KlarnaNetworkPaymentImpl.d.ts +12 -0
- package/lib/typescript/KlarnaNetworkPaymentImpl.d.ts.map +1 -0
- package/lib/typescript/KlarnaNetworkPaymentMapper.d.ts +273 -0
- package/lib/typescript/KlarnaNetworkPaymentMapper.d.ts.map +1 -0
- package/lib/typescript/KlarnaPaymentButton.d.ts +51 -0
- package/lib/typescript/KlarnaPaymentButton.d.ts.map +1 -0
- package/lib/typescript/Specs/KlarnaPaymentButtonNativeComponent.d.ts +16 -0
- package/lib/typescript/Specs/KlarnaPaymentButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/Specs/NativeKlarnaNetworkPayment.d.ts +13 -0
- package/lib/typescript/Specs/NativeKlarnaNetworkPayment.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +14 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/types/KlarnaPaymentRequest.d.ts +19 -0
- package/lib/typescript/types/KlarnaPaymentRequest.d.ts.map +1 -0
- package/lib/typescript/types/KlarnaPaymentRequestState.d.ts +15 -0
- package/lib/typescript/types/KlarnaPaymentRequestState.d.ts.map +1 -0
- package/lib/typescript/types/KlarnaPaymentRequestStateContext.d.ts +12 -0
- package/lib/typescript/types/KlarnaPaymentRequestStateContext.d.ts.map +1 -0
- package/lib/typescript/types/KlarnaPaymentRequestStateReason.d.ts +13 -0
- package/lib/typescript/types/KlarnaPaymentRequestStateReason.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaBillingPlan.d.ts +17 -0
- package/lib/typescript/types/models/KlarnaBillingPlan.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaCollectCustomerProfileType.d.ts +19 -0
- package/lib/typescript/types/models/KlarnaCollectCustomerProfileType.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaCustomer.d.ts +11 -0
- package/lib/typescript/types/models/KlarnaCustomer.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaFreeTrial.d.ts +7 -0
- package/lib/typescript/types/models/KlarnaFreeTrial.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaInterval.d.ts +11 -0
- package/lib/typescript/types/models/KlarnaInterval.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaLineItem.d.ts +28 -0
- package/lib/typescript/types/models/KlarnaLineItem.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaOndemandService.d.ts +17 -0
- package/lib/typescript/types/models/KlarnaOndemandService.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaPartnerCustomer.d.ts +15 -0
- package/lib/typescript/types/models/KlarnaPartnerCustomer.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaPaymentPresentation.d.ts +119 -0
- package/lib/typescript/types/models/KlarnaPaymentPresentation.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaPaymentRequestData.d.ts +24 -0
- package/lib/typescript/types/models/KlarnaPaymentRequestData.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaRequestCustomerToken.d.ts +9 -0
- package/lib/typescript/types/models/KlarnaRequestCustomerToken.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaRequestCustomerTokenScope.d.ts +9 -0
- package/lib/typescript/types/models/KlarnaRequestCustomerTokenScope.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaShipping.d.ts +15 -0
- package/lib/typescript/types/models/KlarnaShipping.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaShippingConfig.d.ts +9 -0
- package/lib/typescript/types/models/KlarnaShippingConfig.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaShippingConfigMode.d.ts +5 -0
- package/lib/typescript/types/models/KlarnaShippingConfigMode.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaShippingOption.d.ts +12 -0
- package/lib/typescript/types/models/KlarnaShippingOption.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaShippingRecipient.d.ts +14 -0
- package/lib/typescript/types/models/KlarnaShippingRecipient.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaShippingType.d.ts +25 -0
- package/lib/typescript/types/models/KlarnaShippingType.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaShippingTypeAttribute.d.ts +21 -0
- package/lib/typescript/types/models/KlarnaShippingTypeAttribute.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaSubscription.d.ts +14 -0
- package/lib/typescript/types/models/KlarnaSubscription.d.ts.map +1 -0
- package/lib/typescript/types/models/KlarnaSupplementaryPurchaseData.d.ts +21 -0
- package/lib/typescript/types/models/KlarnaSupplementaryPurchaseData.d.ts.map +1 -0
- package/lib/typescript/types/models/index.d.ts +22 -0
- package/lib/typescript/types/models/index.d.ts.map +1 -0
- package/package.json +120 -6
- package/react-native-klarna-network-payment.podspec +29 -0
- package/src/KlarnaNetworkPayment.ts +30 -0
- package/src/KlarnaNetworkPaymentImpl.ts +79 -0
- package/src/KlarnaNetworkPaymentMapper.ts +204 -0
- package/src/KlarnaPaymentButton.tsx +80 -0
- package/src/Specs/KlarnaPaymentButtonNativeComponent.ts +22 -0
- package/src/Specs/NativeKlarnaNetworkPayment.ts +17 -0
- package/src/index.tsx +63 -0
- package/src/types/KlarnaPaymentRequest.ts +19 -0
- package/src/types/KlarnaPaymentRequestState.ts +14 -0
- package/src/types/KlarnaPaymentRequestStateContext.ts +12 -0
- package/src/types/KlarnaPaymentRequestStateReason.ts +12 -0
- package/src/types/models/KlarnaBillingPlan.ts +17 -0
- package/src/types/models/KlarnaCollectCustomerProfileType.ts +18 -0
- package/src/types/models/KlarnaCustomer.ts +11 -0
- package/src/types/models/KlarnaFreeTrial.ts +6 -0
- package/src/types/models/KlarnaInterval.ts +10 -0
- package/src/types/models/KlarnaLineItem.ts +27 -0
- package/src/types/models/KlarnaOndemandService.ts +17 -0
- package/src/types/models/KlarnaPartnerCustomer.ts +15 -0
- package/src/types/models/KlarnaPaymentPresentation.ts +135 -0
- package/src/types/models/KlarnaPaymentRequestData.ts +24 -0
- package/src/types/models/KlarnaRequestCustomerToken.ts +9 -0
- package/src/types/models/KlarnaRequestCustomerTokenScope.ts +8 -0
- package/src/types/models/KlarnaShipping.ts +15 -0
- package/src/types/models/KlarnaShippingConfig.ts +9 -0
- package/src/types/models/KlarnaShippingConfigMode.ts +4 -0
- package/src/types/models/KlarnaShippingOption.ts +12 -0
- package/src/types/models/KlarnaShippingRecipient.ts +13 -0
- package/src/types/models/KlarnaShippingType.ts +24 -0
- package/src/types/models/KlarnaShippingTypeAttribute.ts +20 -0
- package/src/types/models/KlarnaSubscription.ts +14 -0
- package/src/types/models/KlarnaSupplementaryPurchaseData.ts +21 -0
- package/src/types/models/index.ts +35 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';
|
|
2
|
+
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import type { HostComponent } from 'react-native';
|
|
4
|
+
export interface KlarnaPaymentButtonProps extends ViewProps {
|
|
5
|
+
readonly instanceId: string;
|
|
6
|
+
readonly state?: string;
|
|
7
|
+
readonly intent?: string;
|
|
8
|
+
readonly shape?: string;
|
|
9
|
+
readonly buttonStyle?: string;
|
|
10
|
+
readonly theme?: string;
|
|
11
|
+
readonly onButtonPress: DirectEventHandler<null>;
|
|
12
|
+
}
|
|
13
|
+
type KlarnaPaymentButtonNativeComponentType = HostComponent<KlarnaPaymentButtonProps>;
|
|
14
|
+
declare const _default: KlarnaPaymentButtonNativeComponentType;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=KlarnaPaymentButtonNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentButtonNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/Specs/KlarnaPaymentButtonNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;CAClD;AAED,KAAK,sCAAsC,GACzC,aAAa,CAAC,wBAAwB,CAAC,CAAC;wBAIrC,sCAAsC;AAF3C,wBAE4C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type TurboModule } from 'react-native';
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
initiateWithId(instanceId: string, paymentRequestId: string): Promise<Object>;
|
|
4
|
+
initiateWithData(instanceId: string, data: Object): Promise<Object>;
|
|
5
|
+
fetch(instanceId: string, paymentRequestId: string): Promise<Object>;
|
|
6
|
+
cancel(instanceId: string, paymentRequestId: string): Promise<Object>;
|
|
7
|
+
presentationFetch(instanceId: string, data: Object): Promise<Object>;
|
|
8
|
+
presentationHandleLink(instanceId: string, url: string): Promise<Object>;
|
|
9
|
+
dispose(instanceId: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: Spec;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=NativeKlarnaNetworkPayment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeKlarnaNetworkPayment.d.ts","sourceRoot":"","sources":["../../../src/Specs/NativeKlarnaNetworkPayment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAMrE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9E,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACtE,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrE,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzE,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C;;AAED,wBAA8E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { KlarnaPayment } from './KlarnaNetworkPayment';
|
|
2
|
+
declare module '@klarna/react-native-klarna-network-core' {
|
|
3
|
+
interface Klarna {
|
|
4
|
+
readonly payment: KlarnaPayment;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export type { KlarnaPayment } from './KlarnaNetworkPayment';
|
|
8
|
+
export { KlarnaPaymentButton, type KlarnaPaymentButtonIntent, type KlarnaPaymentButtonShape, type KlarnaPaymentButtonState, type KlarnaPaymentButtonStyle, type KlarnaPaymentButtonTheme, type KlarnaPaymentButtonProps, } from './KlarnaPaymentButton';
|
|
9
|
+
export type * from './types/models';
|
|
10
|
+
export type { KlarnaPaymentRequest } from './types/KlarnaPaymentRequest';
|
|
11
|
+
export type { KlarnaPaymentRequestState } from './types/KlarnaPaymentRequestState';
|
|
12
|
+
export type { KlarnaPaymentRequestStateContext } from './types/KlarnaPaymentRequestStateContext';
|
|
13
|
+
export type { KlarnaPaymentRequestStateReason } from './types/KlarnaPaymentRequestStateReason';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAS5D,OAAO,QAAQ,0CAA0C,CAAC;IACxD,UAAU,MAAM;QACd,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;KACjC;CACF;AA4BD,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B,MAAM,uBAAuB,CAAC;AAG/B,mBAAmB,gBAAgB,CAAC;AAGpC,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,YAAY,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACjG,YAAY,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { KlarnaPaymentRequestState } from './KlarnaPaymentRequestState';
|
|
2
|
+
import type { KlarnaPaymentRequestStateContext } from './KlarnaPaymentRequestStateContext';
|
|
3
|
+
import type { KlarnaPaymentRequestStateReason } from './KlarnaPaymentRequestStateReason';
|
|
4
|
+
/** A Payment Request represents a request for a payment. The Payment Request lifecycle is defined in KlarnaPaymentRequestState. */
|
|
5
|
+
export type KlarnaPaymentRequest = {
|
|
6
|
+
/** Unique identifier of this payment request. */
|
|
7
|
+
paymentRequestId: string;
|
|
8
|
+
/** Payment request state. */
|
|
9
|
+
state: KlarnaPaymentRequestState;
|
|
10
|
+
/** Previous payment request state. */
|
|
11
|
+
previousState: KlarnaPaymentRequestState | null;
|
|
12
|
+
/** Payment request state context. */
|
|
13
|
+
stateContext: KlarnaPaymentRequestStateContext | null;
|
|
14
|
+
/** Payment request state reason. */
|
|
15
|
+
stateReason: KlarnaPaymentRequestStateReason | null;
|
|
16
|
+
/** Reference to the payment session or equivalent resource created on your side. */
|
|
17
|
+
paymentRequestReference: string | null;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=KlarnaPaymentRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentRequest.d.ts","sourceRoot":"","sources":["../../../src/types/KlarnaPaymentRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEzF,mIAAmI;AACnI,MAAM,MAAM,oBAAoB,GAAG;IACjC,iDAAiD;IACjD,gBAAgB,EAAE,MAAM,CAAC;IACzB,6BAA6B;IAC7B,KAAK,EAAE,yBAAyB,CAAC;IACjC,sCAAsC;IACtC,aAAa,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAChD,qCAAqC;IACrC,YAAY,EAAE,gCAAgC,GAAG,IAAI,CAAC;IACtD,oCAAoC;IACpC,WAAW,EAAE,+BAA+B,GAAG,IAAI,CAAC;IACpD,oFAAoF;IACpF,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Represents the lifecycle of a payment request. */
|
|
2
|
+
export type KlarnaPaymentRequestState =
|
|
3
|
+
/** Payment request has been submitted to the backend and ready to be initiated. */
|
|
4
|
+
'SUBMITTED'
|
|
5
|
+
/** The payment flow is in progress, customer is inside the purchase flow. */
|
|
6
|
+
| 'IN_PROGRESS'
|
|
7
|
+
/** The customer has approved the request, order can be created. */
|
|
8
|
+
| 'COMPLETED'
|
|
9
|
+
/** The payment request has expired. This is a final state. */
|
|
10
|
+
| 'EXPIRED'
|
|
11
|
+
/** The payment request has been canceled. This is a final state. */
|
|
12
|
+
| 'CANCELED'
|
|
13
|
+
/** The payment request has been declined. This is a final state. */
|
|
14
|
+
| 'DECLINED';
|
|
15
|
+
//# sourceMappingURL=KlarnaPaymentRequestState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentRequestState.d.ts","sourceRoot":"","sources":["../../../src/types/KlarnaPaymentRequestState.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,MAAM,MAAM,yBAAyB;AACnC,mFAAmF;AACjF,WAAW;AACb,6EAA6E;GAC3E,aAAa;AACf,mEAAmE;GACjE,WAAW;AACb,8DAA8D;GAC5D,SAAS;AACX,oEAAoE;GAClE,UAAU;AACZ,oEAAoE;GAClE,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { KlarnaCustomer } from './models/KlarnaCustomer';
|
|
2
|
+
import type { KlarnaShipping } from './models/KlarnaShipping';
|
|
3
|
+
/** Context for the state of a payment request. */
|
|
4
|
+
export type KlarnaPaymentRequestStateContext = {
|
|
5
|
+
/** A short-lived, network-scoped bearer credential that represents an active Klarna Network session. */
|
|
6
|
+
klarnaNetworkSessionToken: string | null;
|
|
7
|
+
/** The Klarna customer information associated with this payment request. */
|
|
8
|
+
klarnaCustomer?: KlarnaCustomer;
|
|
9
|
+
/** The shipping information associated with this payment request. */
|
|
10
|
+
shipping?: KlarnaShipping;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=KlarnaPaymentRequestStateContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentRequestStateContext.d.ts","sourceRoot":"","sources":["../../../src/types/KlarnaPaymentRequestStateContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,kDAAkD;AAClD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,wGAAwG;IACxG,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Reasons for the current state of the payment request. */
|
|
2
|
+
export type KlarnaPaymentRequestStateReason =
|
|
3
|
+
/** The partner has canceled the payment request. Payment request state should be set to CANCELED. */
|
|
4
|
+
'PARTNER_CANCELED'
|
|
5
|
+
/** The Payment request has been submitted to Klarna. */
|
|
6
|
+
| 'PAYMENT_REQUEST_SUBMITTED'
|
|
7
|
+
/** The customer dropped out of the purchase flow (e.g. closed the Klarna window or went back to the merchant site). */
|
|
8
|
+
| 'PURCHASE_FLOW_ABORTED'
|
|
9
|
+
/** Klarna failed to start the purchase flow due to internal error. */
|
|
10
|
+
| 'TECHNICAL_ERROR'
|
|
11
|
+
/** The payment was declined by Klarna or an issuing bank. */
|
|
12
|
+
| 'PAYMENT_DECLINED';
|
|
13
|
+
//# sourceMappingURL=KlarnaPaymentRequestStateReason.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentRequestStateReason.d.ts","sourceRoot":"","sources":["../../../src/types/KlarnaPaymentRequestStateReason.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,MAAM,+BAA+B;AACzC,qGAAqG;AACnG,kBAAkB;AACpB,wDAAwD;GACtD,2BAA2B;AAC7B,uHAAuH;GACrH,uBAAuB;AACzB,sEAAsE;GACpE,iBAAiB;AACnB,6DAA6D;GAC3D,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KlarnaInterval } from './KlarnaInterval';
|
|
2
|
+
export type KlarnaBillingPlan = {
|
|
3
|
+
/** Charge amount in minor currency units. */
|
|
4
|
+
billingAmount: number;
|
|
5
|
+
/** ISO 4217 currency code. */
|
|
6
|
+
currency?: string;
|
|
7
|
+
/** ISO 8601 date string for when the customer will be charged. Must be in the future. */
|
|
8
|
+
from: string;
|
|
9
|
+
/** Billing plan interval. The interval of which the customer is receiving goods or services. */
|
|
10
|
+
interval: KlarnaInterval;
|
|
11
|
+
/** Defines the billing plan interval frequency.
|
|
12
|
+
A weekly billing plan would set `interval` to week and `intervalFrequency` to 1.
|
|
13
|
+
A billing plan every second month would set `interval` to month and `intervalFrequency` to 2.
|
|
14
|
+
A billing plan twice per month would set `interval` to week and `intervalFrequency` to 2. */
|
|
15
|
+
intervalFrequency: number;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=KlarnaBillingPlan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaBillingPlan.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaBillingPlan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6CAA6C;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,QAAQ,EAAE,cAAc,CAAC;IACzB;;;kGAG8F;IAC9F,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Types of customer profile information to collect. */
|
|
2
|
+
export type KlarnaCollectCustomerProfileType =
|
|
3
|
+
/** Collects the customer profile address. */
|
|
4
|
+
'profile:billing_address'
|
|
5
|
+
/** Collects the country. */
|
|
6
|
+
| 'profile:country'
|
|
7
|
+
/** Collects the date of birth of the customer. */
|
|
8
|
+
| 'profile:date_of_birth'
|
|
9
|
+
/** Collects the email and its verification status. */
|
|
10
|
+
| 'profile:email'
|
|
11
|
+
/** Collects the locale. */
|
|
12
|
+
| 'profile:locale'
|
|
13
|
+
/** Collects the family name and given name. */
|
|
14
|
+
| 'profile:name'
|
|
15
|
+
/** Collects the national identification number. */
|
|
16
|
+
| 'profile:national_identification'
|
|
17
|
+
/** Collects the phone number and its verification status. */
|
|
18
|
+
| 'profile:phone';
|
|
19
|
+
//# sourceMappingURL=KlarnaCollectCustomerProfileType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaCollectCustomerProfileType.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaCollectCustomerProfileType.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,MAAM,gCAAgC;AAC1C,6CAA6C;AAC3C,yBAAyB;AAC3B,4BAA4B;GAC1B,iBAAiB;AACnB,kDAAkD;GAChD,uBAAuB;AACzB,sDAAsD;GACpD,eAAe;AACjB,2BAA2B;GACzB,gBAAgB;AAClB,+CAA+C;GAC7C,cAAc;AAChB,mDAAmD;GACjD,iCAAiC;AACnC,6DAA6D;GAC3D,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KlarnaCustomerProfile } from '@klarna/react-native-klarna-network-core';
|
|
2
|
+
/** Klarna customer information associated with a payment request. */
|
|
3
|
+
export type KlarnaCustomer = {
|
|
4
|
+
/** Short-lived token that represents the customer's linked Klarna account. */
|
|
5
|
+
customerToken?: string;
|
|
6
|
+
/** Partner reference for the customer token. */
|
|
7
|
+
customerTokenReference?: string;
|
|
8
|
+
/** Customer profile information collected during the purchase flow. */
|
|
9
|
+
customerProfile?: KlarnaCustomerProfile;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=KlarnaCustomer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaCustomer.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaCustomer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEtF,qEAAqE;AACrE,MAAM,MAAM,cAAc,GAAG;IAC3B,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uEAAuE;IACvE,eAAe,CAAC,EAAE,qBAAqB,CAAC;CACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaFreeTrial.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaFreeTrial.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,MAAM,eAAe;AACzB,4BAA4B;AAC1B,QAAQ;AACV,gCAAgC;GAC9B,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Billing interval for subscriptions and on-demand services. */
|
|
2
|
+
export type KlarnaInterval =
|
|
3
|
+
/** Daily interval. */
|
|
4
|
+
'DAY'
|
|
5
|
+
/** Weekly interval. */
|
|
6
|
+
| 'WEEK'
|
|
7
|
+
/** Monthly interval. */
|
|
8
|
+
| 'MONTH'
|
|
9
|
+
/** Yearly interval. */
|
|
10
|
+
| 'YEAR';
|
|
11
|
+
//# sourceMappingURL=KlarnaInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaInterval.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaInterval.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,cAAc;AACxB,sBAAsB;AACpB,KAAK;AACP,uBAAuB;GACrB,MAAM;AACR,wBAAwB;GACtB,OAAO;AACT,uBAAuB;GACrB,MAAM,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** A line item in the order. */
|
|
2
|
+
export type KlarnaLineItem = {
|
|
3
|
+
/** ISO 4217 currency code. */
|
|
4
|
+
currency?: string;
|
|
5
|
+
/** URL of the product image. */
|
|
6
|
+
imageUrl?: string;
|
|
7
|
+
/** Product name. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** GTIN (UPC, ISBN) of the item. */
|
|
10
|
+
productIdentifier?: string;
|
|
11
|
+
/** URL of the product page. */
|
|
12
|
+
productUrl?: string;
|
|
13
|
+
/** Quantity of the product. */
|
|
14
|
+
quantity: number;
|
|
15
|
+
/** Reference for the line item. */
|
|
16
|
+
lineItemReference?: string;
|
|
17
|
+
/** Reference to the associated shipping. */
|
|
18
|
+
shippingReference?: string;
|
|
19
|
+
/** Reference to the associated subscription. */
|
|
20
|
+
subscriptionReference?: string;
|
|
21
|
+
/** Total amount in minor currency units. */
|
|
22
|
+
totalAmount: number;
|
|
23
|
+
/** Total tax amount in minor currency units. */
|
|
24
|
+
totalTaxAmount?: number;
|
|
25
|
+
/** Unit price in minor currency units. */
|
|
26
|
+
unitPrice?: number;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=KlarnaLineItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaLineItem.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaLineItem.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,MAAM,MAAM,cAAc,GAAG;IAC3B,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KlarnaInterval } from './KlarnaInterval';
|
|
2
|
+
/** On-demand service details for a payment request. */
|
|
3
|
+
export type KlarnaOndemandService = {
|
|
4
|
+
/** ISO 4217 currency code. */
|
|
5
|
+
currency?: string;
|
|
6
|
+
/** Average charge amount in minor currency units. */
|
|
7
|
+
averageAmount?: number;
|
|
8
|
+
/** Minimum charge amount in minor currency units. */
|
|
9
|
+
minimumAmount?: number;
|
|
10
|
+
/** Maximum charge amount in minor currency units. */
|
|
11
|
+
maximumAmount?: number;
|
|
12
|
+
/** The interval of which the customer is using or receiving the service. */
|
|
13
|
+
purchaseInterval?: KlarnaInterval;
|
|
14
|
+
/** Defines the purchase interval frequency. */
|
|
15
|
+
purchaseIntervalFrequency?: number;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=KlarnaOndemandService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaOndemandService.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaOndemandService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,uDAAuD;AACvD,MAAM,MAAM,qBAAqB,GAAG;IAClC,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,+CAA+C;IAC/C,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { KlarnaAddress } from '@klarna/react-native-klarna-network-core';
|
|
2
|
+
/** Customer information provided by the partner. */
|
|
3
|
+
export type KlarnaPartnerCustomer = {
|
|
4
|
+
/** Customer's address. */
|
|
5
|
+
address?: KlarnaAddress;
|
|
6
|
+
/** Customer's email address. */
|
|
7
|
+
email?: string;
|
|
8
|
+
/** Customer's family name. */
|
|
9
|
+
familyName?: string;
|
|
10
|
+
/** Customer's given name. */
|
|
11
|
+
givenName?: string;
|
|
12
|
+
/** Customer's phone number. */
|
|
13
|
+
phone?: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=KlarnaPartnerCustomer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPartnerCustomer.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaPartnerCustomer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAE9E,oDAAoD;AACpD,MAAM,MAAM,qBAAqB,GAAG;IAClC,0BAA0B;IAC1B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { KlarnaInterval } from './KlarnaInterval';
|
|
2
|
+
/** Intent of a payment presentation request. Use this to specify the type of payment scenario for which you want to receive presentation content. */
|
|
3
|
+
export type KlarnaPaymentPresentationIntent = 'PAY' | 'SUBSCRIBE' | 'ADD_TO_WALLET';
|
|
4
|
+
/** Instruction for the payment presentation. */
|
|
5
|
+
export type KlarnaPaymentPresentationInstruction =
|
|
6
|
+
/** Display Klarna as payment option. */
|
|
7
|
+
'SHOW_KLARNA'
|
|
8
|
+
/** Klarna should be preselected. */
|
|
9
|
+
| 'PRESELECT_KLARNA'
|
|
10
|
+
/** Hide all other payment options except Klarna. */
|
|
11
|
+
| 'SHOW_ONLY_KLARNA';
|
|
12
|
+
/** Payment status of a presentation. */
|
|
13
|
+
export type KlarnaPaymentPresentationPaymentStatus =
|
|
14
|
+
/** Waiting for partner authorization to proceed. */
|
|
15
|
+
'PENDING_PARTNER_AUTHORIZATION'
|
|
16
|
+
/** Customer needs to take action to proceed. */
|
|
17
|
+
| 'REQUIRES_CUSTOMER_ACTION';
|
|
18
|
+
/** Alignment of the image in the payment button. */
|
|
19
|
+
export type KlarnaPaymentPresentationImageAlignment = 'LEFT' | 'RIGHT';
|
|
20
|
+
/** Text style applied to a text part. */
|
|
21
|
+
export type KlarnaPaymentPresentationTextPartStyle = 'BOLD' | 'ITALIC' | 'UNDERLINE';
|
|
22
|
+
/** Context for a link text part. */
|
|
23
|
+
export type KlarnaPaymentPresentationTextPartLinkContext =
|
|
24
|
+
/** The link is for authentication purposes. */
|
|
25
|
+
'AUTH'
|
|
26
|
+
/** The link is for informational purposes. */
|
|
27
|
+
| 'INFO';
|
|
28
|
+
/** A part of a text in the payment presentation. Each part can be either plain text or a hyperlink. */
|
|
29
|
+
export type KlarnaPaymentPresentationTextPart = {
|
|
30
|
+
type: 'plain';
|
|
31
|
+
/** The human-readable text content for this part. */
|
|
32
|
+
text: string;
|
|
33
|
+
/** Text styles applied to the text. */
|
|
34
|
+
styles?: KlarnaPaymentPresentationTextPartStyle[];
|
|
35
|
+
} | {
|
|
36
|
+
type: 'link';
|
|
37
|
+
/** The human-readable text content for this part. */
|
|
38
|
+
text: string;
|
|
39
|
+
/** Target URL for the link. */
|
|
40
|
+
url?: string;
|
|
41
|
+
/** Link context for the target URL. */
|
|
42
|
+
context?: KlarnaPaymentPresentationTextPartLinkContext;
|
|
43
|
+
/** Text styles applied to the text. */
|
|
44
|
+
styles?: KlarnaPaymentPresentationTextPartStyle[];
|
|
45
|
+
};
|
|
46
|
+
/** Presentation text, either plain or attributed with linked parts. */
|
|
47
|
+
export type KlarnaPaymentPresentationText = {
|
|
48
|
+
type: 'plainText';
|
|
49
|
+
text: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'attributedText';
|
|
52
|
+
parts?: KlarnaPaymentPresentationTextPart[];
|
|
53
|
+
};
|
|
54
|
+
/** Elements to properly display the Klarna payment button. */
|
|
55
|
+
export type KlarnaPaymentPresentationPaymentButton = {
|
|
56
|
+
/** Text for the payment button. */
|
|
57
|
+
text: string;
|
|
58
|
+
/** Image URL for the payment button. */
|
|
59
|
+
imageUrl?: string;
|
|
60
|
+
/** Alignment of the image in the payment button. */
|
|
61
|
+
imageAlignment?: KlarnaPaymentPresentationImageAlignment;
|
|
62
|
+
};
|
|
63
|
+
/** Icon for the payment option heading. */
|
|
64
|
+
export type KlarnaPaymentPresentationIcon = {
|
|
65
|
+
/** Alternative text for the icon. */
|
|
66
|
+
alt?: string;
|
|
67
|
+
/** Curved edged badge shaped Klarna icon URL for the payment option heading. */
|
|
68
|
+
badgeImageUrl?: string;
|
|
69
|
+
/** Square shaped Klarna icon URL with just the 'K' logo. */
|
|
70
|
+
rectangleImageUrl?: string;
|
|
71
|
+
/** Square shaped Klarna icon URL for the payment option heading. */
|
|
72
|
+
squareImageUrl?: string;
|
|
73
|
+
};
|
|
74
|
+
/** Contains objects for heading, subheading, and action of a payment option. */
|
|
75
|
+
export type KlarnaPaymentPresentationPaymentOption = {
|
|
76
|
+
/** Identifier for the selected payment option. Treat as an opaque string. */
|
|
77
|
+
paymentOptionId: string;
|
|
78
|
+
/** The heading of the payment option. */
|
|
79
|
+
header?: KlarnaPaymentPresentationText;
|
|
80
|
+
/** The badge of the payment option. */
|
|
81
|
+
badge?: KlarnaPaymentPresentationText;
|
|
82
|
+
/** The subheading of the payment option. */
|
|
83
|
+
subheader?: KlarnaPaymentPresentationText;
|
|
84
|
+
/** The message of the payment option, potentially with an action. */
|
|
85
|
+
message?: KlarnaPaymentPresentationText;
|
|
86
|
+
/** The terms and disclosures of the payment option, potentially with links. */
|
|
87
|
+
terms?: KlarnaPaymentPresentationText;
|
|
88
|
+
/** Represents the payment button of the payment option. */
|
|
89
|
+
paymentButton?: KlarnaPaymentPresentationPaymentButton;
|
|
90
|
+
/** Represents the icon of the payment option. */
|
|
91
|
+
icon?: KlarnaPaymentPresentationIcon;
|
|
92
|
+
};
|
|
93
|
+
/** Data for a payment presentation request. */
|
|
94
|
+
export type KlarnaPaymentPresentationData = {
|
|
95
|
+
/** Total payment amount in minor units (e.g. cents). Required for pay and subscribe intents. */
|
|
96
|
+
amount: number;
|
|
97
|
+
/** ISO 4217 currency code (e.g. "SEK"). */
|
|
98
|
+
currency: string;
|
|
99
|
+
/** Intent of the payment request to receive appropriate presentation content for your use case. */
|
|
100
|
+
intent?: KlarnaPaymentPresentationIntent;
|
|
101
|
+
/** List of payment program enablement codes for the payment request. */
|
|
102
|
+
paymentProgramEnablementCodes?: string[];
|
|
103
|
+
/** The interval of which the customer is charged for the subscription. */
|
|
104
|
+
subscriptionBillingInterval?: KlarnaInterval;
|
|
105
|
+
/** Defines the subscription billing interval frequency. Required if subscriptionBillingInterval is set. */
|
|
106
|
+
subscriptionBillingIntervalFrequency?: number;
|
|
107
|
+
};
|
|
108
|
+
/** Content for the payment presentation returned by a fetch call. */
|
|
109
|
+
export type KlarnaPaymentPresentationContent = {
|
|
110
|
+
/** Klarna display instruction (e.g., SHOW_KLARNA). */
|
|
111
|
+
instruction: KlarnaPaymentPresentationInstruction;
|
|
112
|
+
/** Status of the payment process. */
|
|
113
|
+
paymentStatus?: KlarnaPaymentPresentationPaymentStatus;
|
|
114
|
+
/** Klarna display assets for the payment selector. */
|
|
115
|
+
paymentOption?: KlarnaPaymentPresentationPaymentOption;
|
|
116
|
+
/** Klarna display assets for a saved payment option. */
|
|
117
|
+
savedPaymentOption?: KlarnaPaymentPresentationPaymentOption;
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=KlarnaPaymentPresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentPresentation.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaPaymentPresentation.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { KlarnaCollectCustomerProfileType } from './KlarnaCollectCustomerProfileType';
|
|
2
|
+
import type { KlarnaRequestCustomerToken } from './KlarnaRequestCustomerToken';
|
|
3
|
+
import type { KlarnaShippingConfig } from './KlarnaShippingConfig';
|
|
4
|
+
import type { KlarnaSupplementaryPurchaseData } from './KlarnaSupplementaryPurchaseData';
|
|
5
|
+
/** Data for creating a new payment request. */
|
|
6
|
+
export type KlarnaPaymentRequestData = {
|
|
7
|
+
/** Total payment amount in minor units (e.g. cents). Maps to Swift Int64. */
|
|
8
|
+
amount: number;
|
|
9
|
+
/** ISO 4217 currency code (e.g. "SEK"). */
|
|
10
|
+
currency: string;
|
|
11
|
+
/** Payment option to pre-select in the purchase flow. */
|
|
12
|
+
paymentOptionId?: string;
|
|
13
|
+
/** Partner reference for correlating with payment request webhooks. */
|
|
14
|
+
paymentRequestReference?: string;
|
|
15
|
+
/** Request customer account linking; generated token returned in stateContext on completion. */
|
|
16
|
+
requestCustomerToken?: KlarnaRequestCustomerToken;
|
|
17
|
+
/** Configure whether shipping details should be collected from the customer. */
|
|
18
|
+
shippingConfig?: KlarnaShippingConfig;
|
|
19
|
+
/** Customer profile fields to collect; data available in stateContext after successful flow. */
|
|
20
|
+
collectCustomerProfile?: KlarnaCollectCustomerProfileType[];
|
|
21
|
+
/** Supplementary purchase data (line items, shipping, subscriptions, etc.). */
|
|
22
|
+
supplementaryPurchaseData?: KlarnaSupplementaryPurchaseData;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=KlarnaPaymentRequestData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaPaymentRequestData.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaPaymentRequestData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEzF,+CAA+C;AAC/C,MAAM,MAAM,wBAAwB,GAAG;IACrC,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gGAAgG;IAChG,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;IAClD,gFAAgF;IAChF,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,gGAAgG;IAChG,sBAAsB,CAAC,EAAE,gCAAgC,EAAE,CAAC;IAC5D,+EAA+E;IAC/E,yBAAyB,CAAC,EAAE,+BAA+B,CAAC;CAC7D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { KlarnaRequestCustomerTokenScope } from './KlarnaRequestCustomerTokenScope';
|
|
2
|
+
/** Configuration for requesting a customer token. */
|
|
3
|
+
export type KlarnaRequestCustomerToken = {
|
|
4
|
+
/** The scopes to request for the customer token. */
|
|
5
|
+
scopes: KlarnaRequestCustomerTokenScope[];
|
|
6
|
+
/** Partner reference for the customer token. */
|
|
7
|
+
customerTokenReference?: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=KlarnaRequestCustomerToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaRequestCustomerToken.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaRequestCustomerToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEzF,qDAAqD;AACrD,MAAM,MAAM,0BAA0B,GAAG;IACvC,oDAAoD;IACpD,MAAM,EAAE,+BAA+B,EAAE,CAAC;IAC1C,gDAAgD;IAChD,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Scope for requesting a customer token. */
|
|
2
|
+
export type KlarnaRequestCustomerTokenScope =
|
|
3
|
+
/** Allows the customer to log in with Klarna. */
|
|
4
|
+
'customer:login'
|
|
5
|
+
/** Allows recurring payments when the customer is not present. */
|
|
6
|
+
| 'payment:customer_not_present'
|
|
7
|
+
/** Allows payments when the customer is present. */
|
|
8
|
+
| 'payment:customer_present';
|
|
9
|
+
//# sourceMappingURL=KlarnaRequestCustomerTokenScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaRequestCustomerTokenScope.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaRequestCustomerTokenScope.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,MAAM,+BAA+B;AACzC,iDAAiD;AAC/C,gBAAgB;AAClB,kEAAkE;GAChE,8BAA8B;AAChC,oDAAoD;GAClD,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { KlarnaAddress } from '@klarna/react-native-klarna-network-core';
|
|
2
|
+
import type { KlarnaShippingOption } from './KlarnaShippingOption';
|
|
3
|
+
import type { KlarnaShippingRecipient } from './KlarnaShippingRecipient';
|
|
4
|
+
/** Shipping information for a purchase. */
|
|
5
|
+
export type KlarnaShipping = {
|
|
6
|
+
/** Shipping address. */
|
|
7
|
+
address?: KlarnaAddress;
|
|
8
|
+
/** Shipping recipient information. */
|
|
9
|
+
recipient?: KlarnaShippingRecipient;
|
|
10
|
+
/** Shipping option. */
|
|
11
|
+
shippingOption?: KlarnaShippingOption;
|
|
12
|
+
/** Reference for the shipping. */
|
|
13
|
+
shippingReference?: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=KlarnaShipping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaShipping.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaShipping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,2CAA2C;AAC3C,MAAM,MAAM,cAAc,GAAG;IAC3B,wBAAwB;IACxB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,sCAAsC;IACtC,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,uBAAuB;IACvB,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { KlarnaShippingConfigMode } from './KlarnaShippingConfigMode';
|
|
2
|
+
/** Configuration for collecting shipping information from the customer. */
|
|
3
|
+
export type KlarnaShippingConfig = {
|
|
4
|
+
/** List of supported ISO 3166-1 alpha-2 country codes for shipping. */
|
|
5
|
+
supportedCountries?: string[];
|
|
6
|
+
/** Shipping collection mode. */
|
|
7
|
+
mode: KlarnaShippingConfigMode;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=KlarnaShippingConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaShippingConfig.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaShippingConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,2EAA2E;AAC3E,MAAM,MAAM,oBAAoB,GAAG;IACjC,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,gCAAgC;IAChC,IAAI,EAAE,wBAAwB,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaShippingConfigMode.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaShippingConfigMode.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,MAAM,wBAAwB;AAClC,6DAA6D;AAC7D,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { KlarnaShippingType } from './KlarnaShippingType';
|
|
2
|
+
import type { KlarnaShippingTypeAttribute } from './KlarnaShippingTypeAttribute';
|
|
3
|
+
/** Shipping option details. */
|
|
4
|
+
export type KlarnaShippingOption = {
|
|
5
|
+
/** The shipping carrier. */
|
|
6
|
+
shippingCarrier?: string;
|
|
7
|
+
/** The type of shipping. */
|
|
8
|
+
shippingType: KlarnaShippingType;
|
|
9
|
+
/** Additional attributes of the shipping type. */
|
|
10
|
+
shippingTypeAttributes?: KlarnaShippingTypeAttribute[];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=KlarnaShippingOption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaShippingOption.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaShippingOption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,+BAA+B;AAC/B,MAAM,MAAM,oBAAoB,GAAG;IACjC,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,YAAY,EAAE,kBAAkB,CAAC;IACjC,kDAAkD;IAClD,sBAAsB,CAAC,EAAE,2BAA2B,EAAE,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Shipping recipient information. */
|
|
2
|
+
export type KlarnaShippingRecipient = {
|
|
3
|
+
/** Name to put on the attention line. */
|
|
4
|
+
attention?: string;
|
|
5
|
+
/** Recipient's email address. */
|
|
6
|
+
email?: string;
|
|
7
|
+
/** Recipient's family name. */
|
|
8
|
+
familyName: string;
|
|
9
|
+
/** Recipient's given name. */
|
|
10
|
+
givenName: string;
|
|
11
|
+
/** Recipient's phone number. */
|
|
12
|
+
phone?: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=KlarnaShippingRecipient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaShippingRecipient.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaShippingRecipient.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,MAAM,uBAAuB,GAAG;IACpC,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Type of shipping for an order. */
|
|
2
|
+
export type KlarnaShippingType =
|
|
3
|
+
/** Digital delivery via download. */
|
|
4
|
+
'DIGITAL_DOWNLOAD'
|
|
5
|
+
/** Digital delivery via email. */
|
|
6
|
+
| 'DIGITAL_EMAIL'
|
|
7
|
+
/** Other digital delivery method. */
|
|
8
|
+
| 'DIGITAL_OTHER'
|
|
9
|
+
/** Physical delivery by other means. */
|
|
10
|
+
| 'PHYSICAL_OTHER'
|
|
11
|
+
/** Pickup from a box or locker. */
|
|
12
|
+
| 'PICKUP_BOX'
|
|
13
|
+
/** Pickup from a pickup point. */
|
|
14
|
+
| 'PICKUP_POINT'
|
|
15
|
+
/** Pickup from a store. */
|
|
16
|
+
| 'PICKUP_STORE'
|
|
17
|
+
/** Pickup from a warehouse. */
|
|
18
|
+
| 'PICKUP_WAREHOUSE'
|
|
19
|
+
/** Delivery to the curb. */
|
|
20
|
+
| 'TO_CURB'
|
|
21
|
+
/** Delivery to the door. */
|
|
22
|
+
| 'TO_DOOR'
|
|
23
|
+
/** Delivery to the mailbox. */
|
|
24
|
+
| 'TO_MAILBOX';
|
|
25
|
+
//# sourceMappingURL=KlarnaShippingType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KlarnaShippingType.d.ts","sourceRoot":"","sources":["../../../../src/types/models/KlarnaShippingType.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,MAAM,MAAM,kBAAkB;AAC5B,qCAAqC;AACnC,kBAAkB;AACpB,kCAAkC;GAChC,eAAe;AACjB,qCAAqC;GACnC,eAAe;AACjB,wCAAwC;GACtC,gBAAgB;AAClB,mCAAmC;GACjC,YAAY;AACd,kCAAkC;GAChC,cAAc;AAChB,2BAA2B;GACzB,cAAc;AAChB,+BAA+B;GAC7B,kBAAkB;AACpB,4BAA4B;GAC1B,SAAS;AACX,4BAA4B;GAC1B,SAAS;AACX,+BAA+B;GAC7B,YAAY,CAAC"}
|