@tivio/sdk-react 8.0.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,40 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+
16
+ /**
17
+ * A better abstraction over CSS.
18
+ *
19
+ * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
20
+ * @website https://github.com/cssinjs/jss
21
+ * @license MIT
22
+ */
23
+
24
+ /** @license React v16.13.1
25
+ * react-is.production.min.js
26
+ *
27
+ * Copyright (c) Facebook, Inc. and its affiliates.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE file in the root directory of this source tree.
31
+ */
32
+
33
+ /** @license React v17.0.2
34
+ * react-is.production.min.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */
@@ -336,6 +336,11 @@ export declare type Assets = {
336
336
  [assetName: string]: ScalableAsset;
337
337
  };
338
338
 
339
+ /**
340
+ * @public
341
+ */
342
+ export declare type AssetType = 'circled' | 'landscape' | 'portrait';
343
+
339
344
  declare type Attributes = {
340
345
  created: string;
341
346
  email: string;
@@ -738,6 +743,16 @@ export declare const createRemotePackageLoader: () => (secret: string, conf: Int
738
743
  */
739
744
  export declare const createUseRemoteBundle: () => (conf: InternalConfig) => RemoteBundleState;
740
745
 
746
+ export declare interface CreateUserPayload {
747
+ displayName?: string;
748
+ email?: string;
749
+ emailVerified?: boolean;
750
+ password?: string;
751
+ referralToken?: string;
752
+ username?: string;
753
+ phoneNumber?: string;
754
+ }
755
+
741
756
  /**
742
757
  * @public
743
758
  */
@@ -776,7 +791,8 @@ export declare enum CustomerId {
776
791
  STARMAX = "STARMAX",
777
792
  STORYBOOK = "STORYBOOK",
778
793
  TIVIO = "TIVIO",
779
- U_KULATEHO_STOLU = "U_KULATEHO_STOLU"
794
+ U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
795
+ STARME = "STARME"
780
796
  }
781
797
 
782
798
  /**
@@ -833,6 +849,9 @@ export declare type Customizations = {
833
849
  borderBottom: string;
834
850
  color?: string;
835
851
  };
852
+ Footer: {
853
+ backgroundColor: string;
854
+ };
836
855
  VideoDetail: {
837
856
  Banner: {
838
857
  title: {
@@ -1305,6 +1324,10 @@ export declare interface GetSourceUrlRequest {
1305
1324
  * See {@link SourcePlayMode} type. If not given, getSourceUrl will pick default based on requested document.
1306
1325
  */
1307
1326
  sourcePlayMode?: SourcePlayMode;
1327
+ /**
1328
+ * Returns url to manifest with audio only chunks.
1329
+ */
1330
+ audioOnly?: boolean;
1308
1331
  }
1309
1332
 
1310
1333
  export declare interface GetSourceUrlResponse {
@@ -1324,6 +1347,10 @@ export declare interface GetSourceUrlResponse {
1324
1347
  * See {@link SourcePlayMode} type.
1325
1348
  */
1326
1349
  sourcePlayMode: SourcePlayMode;
1350
+ /**
1351
+ * Returns url to manifest with audio only chunks.
1352
+ */
1353
+ audioOnly?: boolean;
1327
1354
  }
1328
1355
 
1329
1356
  export declare interface GetVideoAnalyticsErrorItem {
@@ -1430,6 +1457,10 @@ export declare interface IndexedTag extends IndexedObject {
1430
1457
  created: Date;
1431
1458
  name: Translation;
1432
1459
  description?: string;
1460
+ /**
1461
+ * True if the tag is available in Tivio Pro (StarMe)
1462
+ */
1463
+ isTivioPro: boolean;
1433
1464
  }
1434
1465
 
1435
1466
  /**
@@ -1471,6 +1502,14 @@ export declare interface IndexedVideo extends IndexedObject {
1471
1502
  hide: boolean;
1472
1503
  isDuplicate: boolean;
1473
1504
  externals?: VideoExternals;
1505
+ /**
1506
+ * Duration of the video in ms
1507
+ */
1508
+ duration?: number;
1509
+ /**
1510
+ * True if the video is available in Tivio Pro (StarMe)
1511
+ */
1512
+ isTivioPro: boolean;
1474
1513
  }
1475
1514
 
1476
1515
  /**
@@ -2531,6 +2570,11 @@ export declare interface Promotion {
2531
2570
  price?: number;
2532
2571
  }
2533
2572
 
2573
+ /**
2574
+ * @public
2575
+ */
2576
+ export declare type PromotionType = 'CLASSIC' | 'PATREON';
2577
+
2534
2578
  /**
2535
2579
  * @public
2536
2580
  */
@@ -2666,6 +2710,10 @@ export declare type PurchaseEndpointPayload = {
2666
2710
  * Purchase status after change.
2667
2711
  */
2668
2712
  newStatus: PurchaseStatus;
2713
+ /**
2714
+ * Id of the original (first) purchase of reoccurring payments.
2715
+ */
2716
+ originalPurchaseId?: string;
2669
2717
  /**
2670
2718
  * Purchase status before change.
2671
2719
  */
@@ -2789,7 +2837,23 @@ export declare enum PurchaseStatus {
2789
2837
  /**
2790
2838
  * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
2791
2839
  */
2792
- BLOCKED = "BLOCKED"
2840
+ BLOCKED = "BLOCKED",
2841
+ /**
2842
+ * Used in subscription purchases when subscription is renewed.
2843
+ */
2844
+ RENEWED = "RENEWED",
2845
+ /**
2846
+ * From NEW to ABORTED when user cancels purchase before payment or when payment fails.
2847
+ */
2848
+ ABORTED = "ABORTED",
2849
+ /**
2850
+ * When user manually cancels purchase but still has access to content until expiration date.
2851
+ */
2852
+ CANCELLING = "CANCELLING",
2853
+ /**
2854
+ * From PAID to EXPIRED when payment fails to renew subscription.
2855
+ */
2856
+ EXPIRED = "EXPIRED"
2793
2857
  }
2794
2858
 
2795
2859
  /**
@@ -2818,7 +2882,7 @@ export declare interface QerkoData {
2818
2882
  * Otherwise, user is making a purchase for himself.
2819
2883
  */
2820
2884
  voucherPurchase?: boolean;
2821
- onPurchase?: () => void;
2885
+ onPurchase?: (paymentInfo: QerkoPaymentInfo | null) => void;
2822
2886
  onClose?: () => void;
2823
2887
  }
2824
2888
 
@@ -2898,6 +2962,9 @@ declare type Relationship = {
2898
2962
  memberships: {
2899
2963
  data: Membership[];
2900
2964
  };
2965
+ currently_entitled_tiers: {
2966
+ data?: Membership[];
2967
+ };
2901
2968
  };
2902
2969
 
2903
2970
  /**
@@ -3413,6 +3480,8 @@ export declare interface SuccessConfirmationOverlayPayload extends ConfirmationO
3413
3480
  confirmButtonText?: string;
3414
3481
  }
3415
3482
 
3483
+ export declare type SynchronizeUserTypeFunction = (payload: CreateUserPayload, tenantId: string, tenantUserId: string) => Promise<string>;
3484
+
3416
3485
  /**
3417
3486
  * @public
3418
3487
  */
@@ -3449,6 +3518,16 @@ export declare type Tier = {
3449
3518
  type: 'tier';
3450
3519
  };
3451
3520
 
3521
+ export declare interface TileApplicationData {
3522
+ id: string;
3523
+ name: Translation;
3524
+ description?: string;
3525
+ logo: string;
3526
+ urlHandle: string;
3527
+ organizationId: string;
3528
+ type: ApplicationType;
3529
+ }
3530
+
3452
3531
  /**
3453
3532
  * @internal
3454
3533
  */
@@ -4694,6 +4773,12 @@ declare type VastProvidersItem = {
4694
4773
  development?: boolean;
4695
4774
  };
4696
4775
 
4776
+ export declare interface verifyCustomTokenProps {
4777
+ token: string;
4778
+ uid: string;
4779
+ organizationPath: string;
4780
+ }
4781
+
4697
4782
  /**
4698
4783
  * @public
4699
4784
  */
@@ -4789,7 +4874,9 @@ export declare enum VideoContentType {
4789
4874
  /**
4790
4875
  * @public
4791
4876
  */
4792
- export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExternals | MigratedVideoExternals;
4877
+ export declare type VideoExternals = (JojExternals | MallTvExternals | OktagonExternals | MigratedVideoExternals) & {
4878
+ channelKey?: string;
4879
+ };
4793
4880
 
4794
4881
  declare type VideoPath = string;
4795
4882
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-react",
3
- "version": "8.0.0",
3
+ "version": "9.0.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",
@@ -34,17 +34,14 @@
34
34
  "@material-ui/core": "^4.11.2",
35
35
  "@material-ui/icons": "^4.11.2",
36
36
  "@sentry/browser": "^6.1.0",
37
- "@tivio/common": "1.1.116",
37
+ "@tivio/common": "1.1.118",
38
38
  "dayjs": "^1.11.0",
39
39
  "es7-object-polyfill": "^1.0.1",
40
40
  "firebase": "8.10.1",
41
41
  "formik": "^2.2.7",
42
- "i18next": "^20.1.0",
43
42
  "mobx": "^6.0.4",
44
43
  "mobx-react": "^7.1.0",
45
- "react-i18next": "^13.0.1",
46
44
  "react-router-dom": "^5.3.4",
47
- "react-spring": "^9.2.4",
48
45
  "react-virtualized": "^9.22.3",
49
46
  "styled-components": "^5.2.1",
50
47
  "whatwg-fetch": "^3.6.2",