@leatcom/portal-sessions 0.0.70-beta.1 → 0.0.70-beta.3
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/dist/portal-sessions.es.d.ts +173 -9
- package/dist/portal-sessions.es.js +27659 -27684
- package/dist/portal-sessions.umd.js +64 -64
- package/package.json +1 -1
|
@@ -15,6 +15,20 @@ export declare type Attribute = {
|
|
|
15
15
|
value: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
declare type Attribute_2 = {
|
|
19
|
+
attribute: {
|
|
20
|
+
field_type: string;
|
|
21
|
+
id: number;
|
|
22
|
+
is_hard_read_only: boolean;
|
|
23
|
+
is_soft_read_only: boolean;
|
|
24
|
+
label: string;
|
|
25
|
+
name: string;
|
|
26
|
+
options: [];
|
|
27
|
+
type: any;
|
|
28
|
+
};
|
|
29
|
+
value: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
18
32
|
declare type Column = {
|
|
19
33
|
align?: "left" | "center" | "right";
|
|
20
34
|
value: ColumnValue;
|
|
@@ -78,11 +92,29 @@ export declare type ContactResource = {
|
|
|
78
92
|
};
|
|
79
93
|
};
|
|
80
94
|
|
|
95
|
+
declare type ContactResource_2 = {
|
|
96
|
+
id: number;
|
|
97
|
+
uuid: string;
|
|
98
|
+
email: string;
|
|
99
|
+
attributes: Array<Attribute_2>;
|
|
100
|
+
tier: Tier_2 | null;
|
|
101
|
+
subscriptions: Array<Subscription_2>;
|
|
102
|
+
credit_balance: CreditBalance_2;
|
|
103
|
+
prepaid_balance: PrepaidBalance_2;
|
|
104
|
+
current_values: { [key: string]: string | number };
|
|
105
|
+
current_display_values: { [key: string]: string };
|
|
106
|
+
};
|
|
107
|
+
|
|
81
108
|
export declare type CreditBalance = {
|
|
82
109
|
balance: number;
|
|
83
110
|
id: number;
|
|
84
111
|
};
|
|
85
112
|
|
|
113
|
+
declare type CreditBalance_2 = {
|
|
114
|
+
balance: number;
|
|
115
|
+
id: number;
|
|
116
|
+
};
|
|
117
|
+
|
|
86
118
|
export declare type CreditReceptionTransactionResource = {
|
|
87
119
|
type: string;
|
|
88
120
|
credits: number;
|
|
@@ -133,6 +165,11 @@ export declare enum FacingMode {
|
|
|
133
165
|
ENVIRONMENT = "environment"
|
|
134
166
|
}
|
|
135
167
|
|
|
168
|
+
declare enum FacingMode_2 {
|
|
169
|
+
USER = "user",
|
|
170
|
+
ENVIRONMENT = "environment",
|
|
171
|
+
}
|
|
172
|
+
|
|
136
173
|
export declare type GiftcardProgram = {
|
|
137
174
|
id: number;
|
|
138
175
|
name: string;
|
|
@@ -184,6 +221,18 @@ export declare type GiftcardTransactionResource = {
|
|
|
184
221
|
created_at: string;
|
|
185
222
|
};
|
|
186
223
|
|
|
224
|
+
declare type GiftcardTransactionResource_2 = {
|
|
225
|
+
id: number;
|
|
226
|
+
uuid: string;
|
|
227
|
+
amount_in_cents: number;
|
|
228
|
+
type: string;
|
|
229
|
+
settled: boolean;
|
|
230
|
+
card: { id: number; uuid: string };
|
|
231
|
+
shop: { id: number; uuid: string; name: string };
|
|
232
|
+
settlements: []; // GiftcardTransactionSettlementResource
|
|
233
|
+
created_at: string;
|
|
234
|
+
};
|
|
235
|
+
|
|
187
236
|
declare type Header = {
|
|
188
237
|
items: HeaderItem[];
|
|
189
238
|
};
|
|
@@ -200,6 +249,12 @@ declare type Image_2 = {
|
|
|
200
249
|
};
|
|
201
250
|
export { Image_2 as Image }
|
|
202
251
|
|
|
252
|
+
declare type Image_3 = {
|
|
253
|
+
id: string;
|
|
254
|
+
type: string;
|
|
255
|
+
value: string;
|
|
256
|
+
};
|
|
257
|
+
|
|
203
258
|
export declare type InputData = {
|
|
204
259
|
enable_on_screen_keyboard?: boolean;
|
|
205
260
|
enable_email_identification?: boolean;
|
|
@@ -221,6 +276,12 @@ export declare type Media = {
|
|
|
221
276
|
value: string;
|
|
222
277
|
};
|
|
223
278
|
|
|
279
|
+
declare type Media_2 = {
|
|
280
|
+
id: number;
|
|
281
|
+
type: string;
|
|
282
|
+
value: string;
|
|
283
|
+
};
|
|
284
|
+
|
|
224
285
|
declare type Option_2 = {
|
|
225
286
|
value: string;
|
|
226
287
|
label: string;
|
|
@@ -263,7 +324,7 @@ export declare type PortalSessionPayload = {
|
|
|
263
324
|
};
|
|
264
325
|
|
|
265
326
|
export declare type PortalSessionProps = {
|
|
266
|
-
type?:
|
|
327
|
+
type?: PortalType_2;
|
|
267
328
|
host?: string;
|
|
268
329
|
apiKey: string;
|
|
269
330
|
shopUuid: string;
|
|
@@ -273,13 +334,13 @@ export declare type PortalSessionProps = {
|
|
|
273
334
|
enableOnScreenKeyboard?: boolean;
|
|
274
335
|
allowMultipleGiftcards?: boolean;
|
|
275
336
|
amountInCents?: number;
|
|
276
|
-
cameraFacingMode?:
|
|
277
|
-
onContactLink?: (contact:
|
|
278
|
-
onClaimReward?: (reward:
|
|
279
|
-
onRedeemVoucher?: (voucher:
|
|
280
|
-
onUseGiftcard?: (giftcardTransaction:
|
|
337
|
+
cameraFacingMode?: FacingMode_2 | "user" | "environment";
|
|
338
|
+
onContactLink?: (contact: ContactResource_2) => void;
|
|
339
|
+
onClaimReward?: (reward: RewardResource_2, transactionUuid?: string) => void;
|
|
340
|
+
onRedeemVoucher?: (voucher: VoucherResource_2) => void;
|
|
341
|
+
onUseGiftcard?: (giftcardTransaction: GiftcardTransactionResource_2) => void;
|
|
281
342
|
onCreateTransaction?: (creditReceptionId: number) => void;
|
|
282
|
-
primaryIdentificationMethod?:
|
|
343
|
+
primaryIdentificationMethod?: PrimaryIdentificationMethod_2;
|
|
283
344
|
};
|
|
284
345
|
|
|
285
346
|
export declare enum PortalType {
|
|
@@ -294,10 +355,26 @@ export declare enum PortalType {
|
|
|
294
355
|
VOUCHER = "VOUCHER"
|
|
295
356
|
}
|
|
296
357
|
|
|
358
|
+
declare enum PortalType_2 {
|
|
359
|
+
GENERIC = "GENERIC",
|
|
360
|
+
GIFTCARD = "GIFTCARD",
|
|
361
|
+
REDEEM_GIFTCARD = "REDEEM_GIFTCARD",
|
|
362
|
+
TOP_UP_GIFTCARD = "TOP_UP_GIFTCARD",
|
|
363
|
+
PORTAL = "PORTAL",
|
|
364
|
+
PAY_PREPAID = "PAY_PREPAID",
|
|
365
|
+
TOP_UP_PREPAID = "TOP_UP_PREPAID",
|
|
366
|
+
POINTS_TRANSACTION = "POINTS_TRANSACTION",
|
|
367
|
+
VOUCHER = "VOUCHER",
|
|
368
|
+
}
|
|
369
|
+
|
|
297
370
|
export declare type PrepaidBalance = {
|
|
298
371
|
balance_in_cents: number;
|
|
299
372
|
};
|
|
300
373
|
|
|
374
|
+
declare type PrepaidBalance_2 = {
|
|
375
|
+
balance_in_cents: number;
|
|
376
|
+
};
|
|
377
|
+
|
|
301
378
|
export declare type PrepaidBalanceResource = {
|
|
302
379
|
balance_in_cents: number;
|
|
303
380
|
balance: string;
|
|
@@ -308,6 +385,11 @@ export declare enum PrimaryIdentificationMethod {
|
|
|
308
385
|
EMAIL = "email"
|
|
309
386
|
}
|
|
310
387
|
|
|
388
|
+
declare enum PrimaryIdentificationMethod_2 {
|
|
389
|
+
IDENTIFIER = "identifier",
|
|
390
|
+
EMAIL = "email",
|
|
391
|
+
}
|
|
392
|
+
|
|
311
393
|
export declare type Promotion = {
|
|
312
394
|
uuid: string;
|
|
313
395
|
name: string;
|
|
@@ -320,6 +402,16 @@ export declare type Promotion = {
|
|
|
320
402
|
[p: string]: string | boolean | number;
|
|
321
403
|
};
|
|
322
404
|
|
|
405
|
+
declare type Promotion_2 = {
|
|
406
|
+
uuid: string;
|
|
407
|
+
name: string;
|
|
408
|
+
description: string;
|
|
409
|
+
voucher_limit: number;
|
|
410
|
+
limit_per_contact: number;
|
|
411
|
+
expiration_duration: number;
|
|
412
|
+
image: Image_3;
|
|
413
|
+
} & { [p: string]: string | boolean | number };
|
|
414
|
+
|
|
323
415
|
export declare type RewardResource = {
|
|
324
416
|
uuid: string;
|
|
325
417
|
title: string;
|
|
@@ -334,6 +426,18 @@ export declare type RewardResource = {
|
|
|
334
426
|
[attributeKey: string]: string | number | boolean;
|
|
335
427
|
};
|
|
336
428
|
|
|
429
|
+
declare type RewardResource_2 = {
|
|
430
|
+
uuid: string;
|
|
431
|
+
title: string;
|
|
432
|
+
description: string;
|
|
433
|
+
cost_price: number;
|
|
434
|
+
required_credits: number;
|
|
435
|
+
active: boolean;
|
|
436
|
+
media: Media_2;
|
|
437
|
+
reward_type: string;
|
|
438
|
+
stock: number;
|
|
439
|
+
} & { [attributeKey: string]: string | number | boolean };
|
|
440
|
+
|
|
337
441
|
declare type RowType = {
|
|
338
442
|
columns: Column[];
|
|
339
443
|
id: number;
|
|
@@ -359,12 +463,31 @@ export declare type Subscription = {
|
|
|
359
463
|
};
|
|
360
464
|
};
|
|
361
465
|
|
|
466
|
+
declare type Subscription_2 = {
|
|
467
|
+
is_subscribed: boolean;
|
|
468
|
+
status: SubscriptionStatus_2;
|
|
469
|
+
subscription_type: {
|
|
470
|
+
active: boolean;
|
|
471
|
+
description: string;
|
|
472
|
+
id: number;
|
|
473
|
+
name: string;
|
|
474
|
+
strategy: SubscriptionStrategy_2;
|
|
475
|
+
uuid: string;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
|
|
362
479
|
export declare enum SubscriptionStatus {
|
|
363
480
|
SUBSCRIBED = "SUBSCRIBED",
|
|
364
481
|
UNSUBSCRIBED = "UNSUBSCRIBED",
|
|
365
482
|
PENDING_CONFIRMATION = "PENDING_CONFIRMATION"
|
|
366
483
|
}
|
|
367
484
|
|
|
485
|
+
declare enum SubscriptionStatus_2 {
|
|
486
|
+
SUBSCRIBED = "SUBSCRIBED",
|
|
487
|
+
UNSUBSCRIBED = "UNSUBSCRIBED",
|
|
488
|
+
PENDING_CONFIRMATION = "PENDING_CONFIRMATION",
|
|
489
|
+
}
|
|
490
|
+
|
|
368
491
|
export declare enum SubscriptionStrategy {
|
|
369
492
|
OPT_OUT = "OPT_OUT",
|
|
370
493
|
OPT_IN = "OPT_IN",
|
|
@@ -372,6 +495,13 @@ export declare enum SubscriptionStrategy {
|
|
|
372
495
|
FUNCTIONAL = "FUNCTIONAL"
|
|
373
496
|
}
|
|
374
497
|
|
|
498
|
+
declare enum SubscriptionStrategy_2 {
|
|
499
|
+
OPT_OUT = "OPT_OUT",
|
|
500
|
+
OPT_IN = "OPT_IN",
|
|
501
|
+
DOUBLE_OPT_IN = "DOUBLE_OPT_IN",
|
|
502
|
+
FUNCTIONAL = "FUNCTIONAL",
|
|
503
|
+
}
|
|
504
|
+
|
|
375
505
|
export declare type SubscriptionType = {
|
|
376
506
|
id: number;
|
|
377
507
|
uuid: string;
|
|
@@ -388,8 +518,6 @@ export declare type TableResponse = {
|
|
|
388
518
|
empty_state_url: string;
|
|
389
519
|
};
|
|
390
520
|
|
|
391
|
-
export declare function TestSession(): JSX_2.Element;
|
|
392
|
-
|
|
393
521
|
export declare type Tier = {
|
|
394
522
|
description: string;
|
|
395
523
|
name: string;
|
|
@@ -397,6 +525,14 @@ export declare type Tier = {
|
|
|
397
525
|
uuid: string;
|
|
398
526
|
};
|
|
399
527
|
|
|
528
|
+
declare type Tier_2 = {
|
|
529
|
+
description: string;
|
|
530
|
+
// media:
|
|
531
|
+
name: string;
|
|
532
|
+
position: number;
|
|
533
|
+
uuid: string;
|
|
534
|
+
};
|
|
535
|
+
|
|
400
536
|
export declare type VoucherResource = {
|
|
401
537
|
uuid: string;
|
|
402
538
|
code: string;
|
|
@@ -416,6 +552,25 @@ export declare type VoucherResource = {
|
|
|
416
552
|
promotion: Promotion;
|
|
417
553
|
};
|
|
418
554
|
|
|
555
|
+
declare type VoucherResource_2 = {
|
|
556
|
+
uuid: string;
|
|
557
|
+
code: string;
|
|
558
|
+
status: VoucherStatus_2;
|
|
559
|
+
name: string;
|
|
560
|
+
description: string;
|
|
561
|
+
expiration_date: string;
|
|
562
|
+
redeemed_at: string;
|
|
563
|
+
is_redeemed: boolean;
|
|
564
|
+
attributes: {
|
|
565
|
+
[key: string]: any;
|
|
566
|
+
};
|
|
567
|
+
contact: {
|
|
568
|
+
uuid: string;
|
|
569
|
+
email: string;
|
|
570
|
+
};
|
|
571
|
+
promotion: Promotion_2;
|
|
572
|
+
};
|
|
573
|
+
|
|
419
574
|
export declare enum VoucherStatus {
|
|
420
575
|
INACTIVE = "INACTIVE",
|
|
421
576
|
ACTIVE = "ACTIVE",
|
|
@@ -425,4 +580,13 @@ export declare enum VoucherStatus {
|
|
|
425
580
|
DEACTIVATED = "DEACTIVATED"
|
|
426
581
|
}
|
|
427
582
|
|
|
583
|
+
declare enum VoucherStatus_2 {
|
|
584
|
+
INACTIVE = "INACTIVE",
|
|
585
|
+
ACTIVE = "ACTIVE",
|
|
586
|
+
EXPIRED = "EXPIRED",
|
|
587
|
+
LOCKED = "LOCKED",
|
|
588
|
+
REDEEMED = "REDEEMED",
|
|
589
|
+
DEACTIVATED = "DEACTIVATED",
|
|
590
|
+
}
|
|
591
|
+
|
|
428
592
|
export { }
|