fansunited-management-components 1.3.0 → 1.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-management-components",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "main": "index.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",
@@ -0,0 +1,10 @@
1
+ import { default as ContextModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
2
+ import { default as React } from 'react';
3
+
4
+ type EntityContextProps = {
5
+ labels: any;
6
+ context: ContextModel;
7
+ onChange: (context: ContextModel) => void;
8
+ };
9
+ declare const EntityContext: React.FC<EntityContextProps>;
10
+ export default EntityContext;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { default as TagsModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/TagsModel';
3
+ import { default as EntitySelectOption } from '../../models/select/EntitySelectOption';
4
+
5
+ type TagsProps = {
6
+ labels: any;
7
+ tags: TagsModel[];
8
+ onChangeTags: (entities: EntitySelectOption[]) => void;
9
+ };
10
+ declare const Tags: React.FC<TagsProps>;
11
+ export default Tags;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { default as ImagesModel } from '../../models/images/Images';
3
+
4
+ type MiniGamesImagesProps = {
5
+ labels: any;
6
+ defaultValue: ImagesModel | null;
7
+ onChange: (value: any) => void;
8
+ };
9
+ declare const MiniGamesImages: React.FC<MiniGamesImagesProps>;
10
+ export default MiniGamesImages;
@@ -5,6 +5,7 @@ type InformationInputProps = {
5
5
  placeholder: string;
6
6
  defaultValue: string;
7
7
  required: boolean;
8
+ size: 'sm' | 'md' | 'lg';
8
9
  onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
9
10
  };
10
11
  declare const InformationInput: React.FC<InformationInputProps>;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ type NumberInputProps = {
3
+ label: string;
4
+ description?: string;
5
+ defaultValue: number;
6
+ onChange: (value: number) => void;
7
+ };
8
+ declare const NumberInput: React.FC<NumberInputProps>;
9
+ export default NumberInput;
@@ -4,8 +4,10 @@ type RichTextProps = {
4
4
  label: string;
5
5
  placeholder: string;
6
6
  defaultValue: string;
7
- property: 'description' | 'rules' | 'ad_content';
7
+ property: 'description' | 'rules' | 'ad_content' | 'mini_games_explanation';
8
+ description?: string;
8
9
  setValue: Dispatch<SetStateAction<string>>;
10
+ onChange: (value: string) => void;
9
11
  };
10
12
  declare const RichText: React.FC<RichTextProps>;
11
13
  export default RichText;
@@ -0,0 +1,13 @@
1
+ import { default as React, Dispatch, SetStateAction } from 'react';
2
+ import { default as EntitySelectOption } from '../../../models/select/EntitySelectOption';
3
+ import { MultiValue } from 'react-select';
4
+
5
+ type ContextSelectFilterProps = {
6
+ labels: any;
7
+ options: EntitySelectOption[];
8
+ setOptions: Dispatch<SetStateAction<MultiValue<EntitySelectOption>>>;
9
+ setFilters: Dispatch<SetStateAction<any>>;
10
+ handleResetData: () => void;
11
+ };
12
+ declare const ContextSelectFilter: React.FC<ContextSelectFilterProps>;
13
+ export default ContextSelectFilter;
@@ -0,0 +1,7 @@
1
+ import { default as EntitySelectOption } from '../../../models/select/EntitySelectOption';
2
+
3
+ type OptionProps = {
4
+ option: EntitySelectOption;
5
+ };
6
+ declare const Option: React.FC<OptionProps>;
7
+ export default Option;
@@ -1,2 +1,6 @@
1
+ import { default as SearchModel } from 'fansunited-sdk-esm/Core/Namespaces/Football/Models/Search/SearchModel';
2
+ import { default as GroupSelectOption } from '../models/select/GroupSelectOption';
3
+
1
4
  export declare const displayName: (name: string | undefined, nickname: string | undefined) => string;
2
5
  export declare const remapKeysToSpecificCase: (obj: any, type: "camel" | "snake") => any;
6
+ export declare const formatGroupOptions: (result: SearchModel) => GroupSelectOption[];
@@ -0,0 +1,5 @@
1
+ export default class CampaignModel {
2
+ id: string;
3
+ label: string;
4
+ [k: string]: string;
5
+ }
@@ -0,0 +1,6 @@
1
+ export default class ContentModel {
2
+ id: string;
3
+ type: string;
4
+ label: string;
5
+ [k: string]: string;
6
+ }
@@ -1,6 +1,5 @@
1
- export default class Images {
2
- main: string;
1
+ import { default as MiniGamesImagesModel } from './MiniGamesImages';
2
+
3
+ export default class Images extends MiniGamesImagesModel {
3
4
  cover: string;
4
- mobile: string;
5
- [key: string]: any;
6
5
  }
@@ -0,0 +1,5 @@
1
+ export default class MiniGamesImagesModel {
2
+ main: string;
3
+ mobile: string;
4
+ [key: string]: any;
5
+ }
@@ -0,0 +1,59 @@
1
+ import { default as ImagesModel } from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
2
+ import { default as ContextModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
3
+ import { default as MiniGameImages } from 'fansunited-sdk-esm/Core/Namespaces/MiniGames/Models/MiniGameImages';
4
+
5
+ interface IBranding {
6
+ colors: IBrandingColors;
7
+ urls: IBrandingUrls;
8
+ images: IBrandingImages;
9
+ }
10
+ interface IBrandingColors {
11
+ primary_color: string;
12
+ secondary_color: string;
13
+ content_color: string;
14
+ background_color: string;
15
+ border_color: string;
16
+ additional_color: string;
17
+ }
18
+ interface IBrandingUrls {
19
+ primary_url: string;
20
+ secondary_url: string;
21
+ privacy_policy_url: string;
22
+ terms_and_conditions_url: string;
23
+ additional_url: string;
24
+ }
25
+ interface IBrandingImages {
26
+ main_logo: string;
27
+ mobile_logo: string;
28
+ background_image: string;
29
+ mobile_background_image: string;
30
+ additional_image: string;
31
+ }
32
+ interface IQuestionsRequest {
33
+ question: string;
34
+ images: MiniGameImages;
35
+ options: IOptionsRequest[];
36
+ embed_code: string;
37
+ }
38
+ interface IOptionsRequest {
39
+ option: string;
40
+ correct: boolean;
41
+ images: MiniGameImages;
42
+ }
43
+ export default class ClassicQuizRequestBody {
44
+ title: string;
45
+ description: string;
46
+ type: string;
47
+ time: number;
48
+ rules: string;
49
+ ad_content: string;
50
+ labels: Object;
51
+ custom_fields: Object;
52
+ branding: IBranding | null;
53
+ images: ImagesModel | null;
54
+ status: string;
55
+ flags: string[];
56
+ questions: IQuestionsRequest[];
57
+ context: ContextModel | null;
58
+ }
59
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as EntitySelectOption } from './EntitySelectOption';
2
+
3
+ export default class GroupSelectOption {
4
+ label: string;
5
+ options: EntitySelectOption[];
6
+ }
@@ -10,7 +10,7 @@ export default class Https {
10
10
  private environment;
11
11
  protected mainQueryParams: Record<string, string>;
12
12
  protected headers: Record<string, string>;
13
- private clientApiBaseUrl;
13
+ protected clientApiBaseUrl: string;
14
14
  private readonly sportal365ImagesSearchURL;
15
15
  sportal365Config: Sportal365Config | null;
16
16
  constructor(config: SDKConfigurationModel, sportal365Config: Sportal365Config | null);
@@ -3,10 +3,12 @@ import { default as TemplateRequestBody } from '../../models/templates/TemplateR
3
3
  import { default as Https } from './Https';
4
4
  import { default as Sportal365Config } from '../../models/sportal365/Sportal365Config';
5
5
  import { default as GameRequestBody } from '../../models/games/GameRequestBody';
6
+ import { default as ClassicQuizRequestBody } from '../../models/minigames/classicquizzes/ClassicQuizRequestBody';
6
7
 
7
8
  export default class HttpsService extends Https {
8
9
  private loyaltyBaseUrl;
9
10
  private predictionBaseUrl;
11
+ private miniGamesApiBaseUrl;
10
12
  constructor(config: SDKConfigurationModel, sportal365Config: Sportal365Config | null);
11
13
  createTemplate: (requestBody: TemplateRequestBody) => Promise<Response>;
12
14
  editTemplate: (templateId: string, requestBody: TemplateRequestBody) => Promise<Response>;
@@ -16,4 +18,11 @@ export default class HttpsService extends Https {
16
18
  exportDetailedGameLeaderboard: (gameId: string, limit: number) => Promise<Response>;
17
19
  createGame: (requestBody: GameRequestBody) => Promise<Response>;
18
20
  editGame: (gameId: string, requestBody: GameRequestBody) => Promise<Response>;
21
+ getClassicQuizFeature: () => Promise<Response>;
22
+ getEitherOrFeature: () => Promise<Response>;
23
+ createClassicQuiz: (requestBody: ClassicQuizRequestBody) => Promise<Response>;
24
+ updateClassicQuiz: (id: string, requestBody: ClassicQuizRequestBody) => Promise<Response>;
25
+ getClassicQuizById: (classicQuizId: string) => Promise<Response>;
26
+ deleteClassicQuiz: (classicQuizId: string) => Promise<Response>;
27
+ calculateQuestionsReport: (classicQuizId: string) => Promise<Response>;
19
28
  }