@leatcom/portal-sessions 0.0.79 → 0.0.80

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 CHANGED
@@ -55,21 +55,23 @@ Initiate a new Portal BaseSession as follows:
55
55
 
56
56
  ## Portal BaseSession Props
57
57
 
58
- | Prop | Type | Required | Description |
59
- |-------------------------------|--------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------|
60
- | `apiKey` | `string` | Yes | API key used to authenticate. |
61
- | `shopUuid` | `string` | Yes | The shop's uuid. |
62
- | `contactUuid` | `string` | No | Optional contact uuid. This opens the portal session for this contact specifically. |
63
- | `type` | `PortalType` | No | Optional portal type, defaults to `"PORTAL"`. |
64
- | `primaryIdentificationMethod` | `string` | No | Start the identification flow with either `"email"` or `"identifier"`, defaults to `"identifier"`. |
65
- | `enableEmailIdentification` | `boolean` | No | Optional alternative route to identify a contact. |
66
- | `enableOnScreenKeyboard` | `boolean` | No | Optional on-screen keyboard. |
67
- | `allowMultipleGiftcards` | `boolean` | No | Allow using multiple giftcards in one session. Applies to sessions with `PortalType` `"REDEEM_GIFTCARD"`. |
68
- | `amountInCents` | `number` | No | A purchase amount in cents. Applies to sessions with `PortalType` `"REDEEM_GIFTCARD"` and `"PAY_PREPAID"`. |
69
- | `onContactLink` | `(contact: ContactResource) => void` | No | Optional callback. Called when a contact is linked to the portal session. |
70
- | `onClaimReward` | `(reward: RewardResource, transactionUuid?: string) => void` | No | Optional callback. Called when a reward is claimed. |
71
- | `onRedeemVoucher` | `(voucher: VoucherResource) => void` | No | Optional callback. Called when a voucher is redeemed. |
72
- | `onUseGiftcard` | `(giftcardTransaction: GiftcardTransactionResource) => void` | No | Optional callback. Called when a giftcard payment is made. |
58
+ | Prop | Type | Required | Description |
59
+ |-------------------------------|--------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
60
+ | `apiKey` | `string` | Yes | API key used to authenticate. |
61
+ | `shopUuid` | `string` | Yes | The shop's uuid. |
62
+ | `contactUuid` | `string` | No | Optional contact uuid. This opens the portal session for this contact specifically. |
63
+ | `type` | `PortalType` | No | Optional portal type, defaults to `"PORTAL"`. |
64
+ | `primaryIdentificationMethod` | `string` | No | Start the identification flow with either `"email"` or `"identifier"`, defaults to `"identifier"`. |
65
+ | `cameraService` | `number` | No | Specify which camera package to use to scan QR codes. |
66
+ | `cameraFacingMode` | `string` | No | [MediaTrackConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints) facingMode. Specifies the default camera if applicable (`"user"` (front) or `"environment"` (back)), defaults to `"user"`. |
67
+ | `enableEmailIdentification` | `boolean` | No | Optional alternative route to identify a contact. |
68
+ | `enableOnScreenKeyboard` | `boolean` | No | Optional on-screen keyboard. |
69
+ | `allowMultipleGiftcards` | `boolean` | No | Allow using multiple giftcards in one session. Applies to sessions with `PortalType` `"REDEEM_GIFTCARD"`. |
70
+ | `amountInCents` | `number` | No | A purchase amount in cents. Applies to sessions with `PortalType` `"REDEEM_GIFTCARD"` and `"PAY_PREPAID"`. |
71
+ | `onContactLink` | `(contact: ContactResource) => void` | No | Optional callback. Called when a contact is linked to the portal session. |
72
+ | `onClaimReward` | `(reward: RewardResource, transactionUuid?: string) => void` | No | Optional callback. Called when a reward is claimed. |
73
+ | `onRedeemVoucher` | `(voucher: VoucherResource) => void` | No | Optional callback. Called when a voucher is redeemed. |
74
+ | `onUseGiftcard` | `(giftcardTransaction: GiftcardTransactionResource) => void` | No | Optional callback. Called when a giftcard payment is made. |
73
75
 
74
76
  ## Types
75
77
 
@@ -55,6 +55,7 @@ declare type PortalSessionProps = {
55
55
  enableOnScreenKeyboard?: boolean;
56
56
  allowMultipleGiftcards?: boolean;
57
57
  amountInCents?: number;
58
+ cameraService?: 1 | 2 | 3;
58
59
  cameraFacingMode?: FacingMode | "user" | "environment";
59
60
  onContactLink?: (contact: ContactResource) => void;
60
61
  onClaimReward?: (reward: RewardResource, transactionUuid?: string) => void;