@tivio/sdk-react 5.0.1 → 5.0.3-alpha

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -6,6 +6,9 @@ settings in the administration of Tivio Studio while having the freedom to build
6
6
 
7
7
  ## Changelog
8
8
 
9
+ * 5.0.2
10
+ * patch: export hook useChannelSource
11
+
9
12
  * 5.0.1
10
13
  * patch: move changelog
11
14
 
package/README.md.bak CHANGED
@@ -6,6 +6,9 @@ settings in the administration of Tivio Studio while having the freedom to build
6
6
 
7
7
  ## Changelog
8
8
 
9
+ * 5.0.2
10
+ * patch: export hook useChannelSource
11
+
9
12
  * 5.0.1
10
13
  * patch: move changelog
11
14
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { FunctionComponentElement } from 'react';
3
+ import { GeoPoint } from '@firebase/firestore-types';
3
4
  import { OperatingSystem } from 'detect-browser';
4
5
  import { default as React_2 } from 'react';
5
6
 
@@ -947,18 +948,44 @@ export declare type LiveTvChannelSource = SourceBase & {
947
948
  };
948
949
 
949
950
  /**
951
+ * If value of the field (only 1st level) is undefined it means that it was never saved
952
+ * and might or might not be present in maxmind service.
953
+ *
954
+ * If it is null it means that maxmind does not have data for this field.
955
+ *
950
956
  * @public
951
957
  */
952
- export declare type LocationField = {
958
+ export declare interface LocationField {
953
959
  /**
954
- * Two-letter uppercase continent code (TODO not sure if this ISO-3166 format or something else, we get these from maxmind service)
960
+ * Two-letter uppercase continent code (TODO not sure if this ISO-3166 format or something else, we get these from maxmind service).
955
961
  */
956
- continentCode?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA';
962
+ continentCode?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA' | null;
957
963
  /**
958
- * Two-letter uppercase country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
964
+ * Two-letter uppercase country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
959
965
  */
960
- countryIsoCode?: string;
961
- };
966
+ countryIsoCode?: string | null;
967
+ /**
968
+ *
969
+ */
970
+ city?: {
971
+ /**
972
+ * Maxmind specific id, works as key for identifying cities
973
+ * (see https://support.maxmind.com/hc/en-us/articles/4414877149467-IP-Geolocation-Data#h_01FRRNFD5Z5EWNCAXM6SZZ5H2C).
974
+ */
975
+ geonameId: number;
976
+ /**
977
+ * City name in english (see https://maxmind.github.io/GeoIP2-node/interfaces/CityRecord.html#names).
978
+ */
979
+ cityName?: string;
980
+ } | null;
981
+ /**
982
+ * The approximate latitude and longitude of the location associated with the IP address.
983
+ * This value is not precise and should not be used to identify a particular address or household.
984
+ *
985
+ * Source https://maxmind.github.io/GeoIP2-node/interfaces/LocationRecord.html#latitude.
986
+ */
987
+ geoPoint?: GeoPoint | null;
988
+ }
962
989
 
963
990
  declare interface Logger {
964
991
  /** important messages */
@@ -2310,7 +2337,7 @@ export declare type TivioComponents = {
2310
2337
  onEnded?: () => any;
2311
2338
  }>;
2312
2339
  TvApp: React_2.ComponentType<TvAppProps>;
2313
- FeatureSupportCheck: React_2.ComponentType<{}>;
2340
+ FeatureSupportCheck: React_2.ComponentType;
2314
2341
  CustomerScreen: React_2.ComponentType<{
2315
2342
  screenId: string;
2316
2343
  }>;
@@ -2450,6 +2477,7 @@ export declare type TivioHooks = {
2450
2477
  applyInviteCode: (code: string) => void;
2451
2478
  inviteCodeReset: () => void;
2452
2479
  };
2480
+ useChannelSource: UseChannelSource;
2453
2481
  };
2454
2482
 
2455
2483
  /**
@@ -2509,7 +2537,6 @@ export declare type TivioInternalHooks = {
2509
2537
  loading: boolean;
2510
2538
  });
2511
2539
  useTvChannel: UseTvChannel;
2512
- useChannelSource: UseChannelSource;
2513
2540
  useUser: () => {
2514
2541
  user: User | null;
2515
2542
  error: string | null;
@@ -2698,6 +2725,11 @@ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2698
2725
  */
2699
2726
  export declare const TivioWidget: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<TivioWidgetRef>>;
2700
2727
 
2728
+ /**
2729
+ * @public
2730
+ */
2731
+ export declare const TivioWidgetApp: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<unknown>>;
2732
+
2701
2733
  /**
2702
2734
  * @public
2703
2735
  */
@@ -2724,6 +2756,7 @@ export declare interface TivioWidgetProps {
2724
2756
  width: number;
2725
2757
  x: number;
2726
2758
  }) => any;
2759
+ navigateFunction?: any;
2727
2760
  }
2728
2761
 
2729
2762
  /**
@@ -2899,6 +2932,16 @@ export declare type UseChannelSource = (tvChannelId: string) => {
2899
2932
  error: Error | null;
2900
2933
  };
2901
2934
 
2935
+ /**
2936
+ * Use channel source
2937
+ * @param tvChannelId
2938
+ * @public
2939
+ */
2940
+ export declare const useChannelSource: (tvChannelId: string) => {
2941
+ source: ChannelSourcePojo | null;
2942
+ error: Error | null;
2943
+ };
2944
+
2902
2945
  /**
2903
2946
  * @public
2904
2947
  */