@leatcom/portal-sessions 0.0.51 → 0.0.53
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 +15 -14
- package/dist/portal-sessions.es.d.ts +7 -0
- package/dist/portal-sessions.es.js +3188 -3170
- package/dist/portal-sessions.umd.js +30 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,20 +44,21 @@ Initiate a new Portal Session as follows:
|
|
|
44
44
|
|
|
45
45
|
## Portal Session Props
|
|
46
46
|
|
|
47
|
-
| Prop
|
|
48
|
-
|
|
49
|
-
| `apiKey`
|
|
50
|
-
| `shopUuid`
|
|
51
|
-
| `contactUuid`
|
|
52
|
-
| `type`
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
47
|
+
| Prop | Type | Required | Description |
|
|
48
|
+
|-------------------------------|--------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------|
|
|
49
|
+
| `apiKey` | `string` | Yes | API key used to authenticate. |
|
|
50
|
+
| `shopUuid` | `string` | Yes | The shop's uuid. |
|
|
51
|
+
| `contactUuid` | `string` | No | Optional contact uuid. This opens the portal session for this contact specifically. |
|
|
52
|
+
| `type` | `PortalType` | No | Optional portal type, defaults to `"PORTAL"`. |
|
|
53
|
+
| `primaryIdentificationMethod` | `string` | No | Start the identification flow with either `"email"` or `"identifier"`, defaults to `"identifier"`. |
|
|
54
|
+
| `enableEmailIdentification` | `boolean` | No | Optional alternative route to identify a contact. |
|
|
55
|
+
| `enableOnScreenKeyboard` | `boolean` | No | Optional on-screen keyboard. |
|
|
56
|
+
| `allowMultipleGiftcards` | `boolean` | No | Allow using multiple giftcards in one session. Applies to sessions with `PortalType` `"REDEEM_GIFTCARD"`. |
|
|
57
|
+
| `amountInCents` | `number` | No | A purchase amount in cents. Applies to sessions with `PortalType` `"REDEEM_GIFTCARD"` and `"PAY_PREPAID"`. |
|
|
58
|
+
| `onContactLink` | `(contact: ContactResource) => void` | No | Optional callback. Called when a contact is linked to the portal session. |
|
|
59
|
+
| `onClaimReward` | `(reward: RewardResource, transactionUuid?: string) => void` | No | Optional callback. Called when a reward is claimed. |
|
|
60
|
+
| `onRedeemVoucher` | `(voucher: VoucherResource) => void` | No | Optional callback. Called when a voucher is redeemed. |
|
|
61
|
+
| `onUseGiftcard` | `(giftcardTransaction: GiftcardTransactionResource) => void` | No | Optional callback. Called when a giftcard payment is made. |
|
|
61
62
|
|
|
62
63
|
## Types
|
|
63
64
|
|
|
@@ -201,6 +201,7 @@ export declare type InputData = {
|
|
|
201
201
|
enable_registration?: boolean;
|
|
202
202
|
amount_in_cents?: number;
|
|
203
203
|
allow_multiple_giftcards?: boolean;
|
|
204
|
+
primary_identification_method?: PrimaryIdentificationMethod;
|
|
204
205
|
};
|
|
205
206
|
|
|
206
207
|
export declare type LoyaltyProgram = {
|
|
@@ -272,6 +273,7 @@ export declare type PortalSessionProps = {
|
|
|
272
273
|
onRedeemVoucher?: (voucher: VoucherResource) => void;
|
|
273
274
|
onUseGiftcard?: (giftcardTransaction: GiftcardTransactionResource) => void;
|
|
274
275
|
onCreateTransaction?: (creditReceptionId: number) => void;
|
|
276
|
+
primaryIdentificationMethod?: PrimaryIdentificationMethod;
|
|
275
277
|
};
|
|
276
278
|
|
|
277
279
|
export declare enum PortalType {
|
|
@@ -293,6 +295,11 @@ export declare type PrepaidBalanceResource = {
|
|
|
293
295
|
balance: string;
|
|
294
296
|
};
|
|
295
297
|
|
|
298
|
+
export declare enum PrimaryIdentificationMethod {
|
|
299
|
+
IDENTIFIER = "identifier",
|
|
300
|
+
EMAIL = "email"
|
|
301
|
+
}
|
|
302
|
+
|
|
296
303
|
export declare type Promotion = {
|
|
297
304
|
uuid: string;
|
|
298
305
|
name: string;
|