@gooddata/api-client-tiger 10.10.0-alpha.2 → 10.10.0-alpha.21

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.
@@ -567,6 +567,48 @@
567
567
  }
568
568
  }
569
569
  },
570
+ "/api/v1/actions/workspaces/{workspaceId}/ai/searchCreate": {
571
+ "post": {
572
+ "tags": ["Smart Functions", "actions"],
573
+ "summary": "(BETA) Semantic Search in Metadata + creates new visualizations",
574
+ "description": "(BETA) Uses similarity (e.g. cosine distance) search to find top X most similar metadata objects.",
575
+ "operationId": "aiSearchCreate",
576
+ "parameters": [
577
+ {
578
+ "name": "workspaceId",
579
+ "in": "path",
580
+ "description": "Workspace identifier",
581
+ "required": true,
582
+ "schema": {
583
+ "pattern": "^(?!\\.)[.A-Za-z0-9_-]{1,255}$",
584
+ "type": "string"
585
+ }
586
+ }
587
+ ],
588
+ "requestBody": {
589
+ "content": {
590
+ "application/json": {
591
+ "schema": {
592
+ "$ref": "#/components/schemas/SearchCreateRequest"
593
+ }
594
+ }
595
+ },
596
+ "required": true
597
+ },
598
+ "responses": {
599
+ "200": {
600
+ "description": "OK",
601
+ "content": {
602
+ "application/json": {
603
+ "schema": {
604
+ "$ref": "#/components/schemas/SearchCreateResult"
605
+ }
606
+ }
607
+ }
608
+ }
609
+ }
610
+ }
611
+ },
570
612
  "/api/v1/actions/workspaces/{workspaceId}/ai/search": {
571
613
  "post": {
572
614
  "tags": ["Smart Functions", "actions"],
@@ -2696,114 +2738,134 @@
2696
2738
  },
2697
2739
  "description": "Entity describing the valid descendants response."
2698
2740
  },
2699
- "SearchRequest": {
2741
+ "SearchCreateRequest": {
2700
2742
  "required": ["question"],
2701
2743
  "type": "object",
2702
2744
  "properties": {
2703
2745
  "question": {
2704
2746
  "maxLength": 1000,
2705
2747
  "type": "string",
2706
- "description": "Keyword/sentence is input for search."
2707
- },
2708
- "objectTypes": {
2709
- "type": "array",
2710
- "description": "List of object types to search for.",
2711
- "items": {
2712
- "type": "string",
2713
- "description": "Object type to search for.",
2714
- "enum": [
2715
- "attribute",
2716
- "metric",
2717
- "fact",
2718
- "label",
2719
- "date",
2720
- "dataset",
2721
- "visualization",
2722
- "dashboard"
2723
- ]
2724
- }
2748
+ "description": "User question",
2749
+ "example": "Do you have anything about revenue?"
2725
2750
  },
2726
- "deepSearch": {
2727
- "type": "boolean",
2728
- "description": "Turn on deep search. If true, content of complex objects will be searched as well, e.g. metrics in visualizations.",
2729
- "default": false
2730
- },
2731
- "limit": {
2751
+ "limitSearch": {
2732
2752
  "type": "integer",
2733
- "description": "Maximum number of results to return. There is a hard limit and the actual number of returned results may be lower than what is requested.",
2753
+ "description": "Maximum number of search results.",
2734
2754
  "format": "int32",
2735
2755
  "default": 10
2736
2756
  },
2757
+ "limitCreate": {
2758
+ "type": "integer",
2759
+ "description": "Maximum number of created results.",
2760
+ "format": "int32",
2761
+ "default": 5
2762
+ },
2737
2763
  "titleToDescriptorRatio": {
2738
2764
  "type": "number",
2739
- "description": "Temporary for experiments. Ratio of title score to descriptor score.",
2765
+ "description": "Ratio of title to descriptor.",
2740
2766
  "format": "double",
2741
- "default": 0.7
2767
+ "default": 0.75
2742
2768
  }
2743
2769
  }
2744
2770
  },
2745
- "SearchRelationshipObject": {
2746
- "required": [
2747
- "sourceObjectId",
2748
- "sourceObjectTitle",
2749
- "sourceObjectType",
2750
- "sourceWorkspaceId",
2751
- "targetObjectId",
2752
- "targetObjectTitle",
2753
- "targetObjectType",
2754
- "targetWorkspaceId"
2755
- ],
2771
+ "CreatedVisualization": {
2772
+ "required": ["dimensionality", "id", "metrics", "title", "visualizationType"],
2756
2773
  "type": "object",
2757
2774
  "properties": {
2758
- "sourceWorkspaceId": {
2775
+ "id": {
2759
2776
  "type": "string",
2760
- "description": "Source workspace ID. If relationship is dashboard->visualization, this is the workspace where the dashboard is located."
2777
+ "description": "Proposed ID of the new visualization",
2778
+ "example": "revenue_by_country"
2761
2779
  },
2762
- "sourceObjectId": {
2780
+ "title": {
2763
2781
  "type": "string",
2764
- "description": "Source object ID."
2782
+ "description": "Proposed title of the new visualization",
2783
+ "example": "Revenue by Country"
2765
2784
  },
2766
- "sourceObjectType": {
2785
+ "visualizationType": {
2767
2786
  "type": "string",
2768
- "description": "Source object type, e.g. dashboard."
2787
+ "description": "Visualization type requested in question",
2788
+ "example": "TABLE",
2789
+ "enum": ["TABLE", "HEADLINE", "BAR", "LINE", "PIE"]
2769
2790
  },
2770
- "sourceObjectTitle": {
2771
- "type": "string",
2772
- "description": "Source object title."
2791
+ "metrics": {
2792
+ "type": "array",
2793
+ "description": "List of metrics to be used in the new visualization",
2794
+ "items": {
2795
+ "$ref": "#/components/schemas/Metric"
2796
+ }
2773
2797
  },
2774
- "targetWorkspaceId": {
2798
+ "dimensionality": {
2799
+ "type": "array",
2800
+ "description": "List of attributes representing the dimensionality of the new visualization",
2801
+ "items": {
2802
+ "$ref": "#/components/schemas/DimAttribute"
2803
+ }
2804
+ }
2805
+ },
2806
+ "description": "List of created visualizations"
2807
+ },
2808
+ "DimAttribute": {
2809
+ "required": ["id", "type"],
2810
+ "type": "object",
2811
+ "properties": {
2812
+ "id": {
2775
2813
  "type": "string",
2776
- "description": "Target workspace ID. If relationship is dashboard->visualization, this is the workspace where the visualization is located."
2814
+ "description": "ID of the object",
2815
+ "example": "obj-123"
2777
2816
  },
2778
- "targetObjectId": {
2817
+ "type": {
2779
2818
  "type": "string",
2780
- "description": "Target object ID."
2819
+ "description": "Object type",
2820
+ "example": "metric"
2821
+ }
2822
+ },
2823
+ "description": "List of attributes representing the dimensionality of the new visualization"
2824
+ },
2825
+ "Metric": {
2826
+ "required": ["id", "type"],
2827
+ "type": "object",
2828
+ "properties": {
2829
+ "id": {
2830
+ "type": "string",
2831
+ "description": "ID of the object",
2832
+ "example": "obj-123"
2781
2833
  },
2782
- "targetObjectType": {
2834
+ "type": {
2783
2835
  "type": "string",
2784
- "description": "Target object type, e.g. visualization."
2836
+ "description": "Object type",
2837
+ "example": "metric"
2785
2838
  },
2786
- "targetObjectTitle": {
2839
+ "aggFunction": {
2787
2840
  "type": "string",
2788
- "description": "Target object title."
2841
+ "description": "Agg function. Empty if a stored metric is used.",
2842
+ "example": "COUNT, SUM, MIN, MAX, AVG, MEDIAN",
2843
+ "enum": ["COUNT", "SUM", "MIN", "MAX", "AVG", "MEDIAN"]
2789
2844
  }
2790
- }
2845
+ },
2846
+ "description": "List of metrics to be used in the new visualization"
2791
2847
  },
2792
- "SearchResult": {
2793
- "required": ["relationships", "results"],
2848
+ "SearchCreateResult": {
2849
+ "required": ["createdVisualizations", "objects", "textResponse"],
2794
2850
  "type": "object",
2795
2851
  "properties": {
2796
- "results": {
2852
+ "objects": {
2797
2853
  "type": "array",
2854
+ "description": "List of search result objects",
2798
2855
  "items": {
2799
2856
  "$ref": "#/components/schemas/SearchResultObject"
2800
2857
  }
2801
2858
  },
2802
- "relationships": {
2859
+ "createdVisualizations": {
2803
2860
  "type": "array",
2861
+ "description": "List of created visualizations",
2804
2862
  "items": {
2805
- "$ref": "#/components/schemas/SearchRelationshipObject"
2863
+ "$ref": "#/components/schemas/CreatedVisualization"
2806
2864
  }
2865
+ },
2866
+ "textResponse": {
2867
+ "type": "string",
2868
+ "description": "Text answer. Contains reasoning from AI. Can contain an equivalent of \"I don't know\"."
2807
2869
  }
2808
2870
  }
2809
2871
  },
@@ -2883,6 +2945,118 @@
2883
2945
  "description": "Result score for exact match(id/title). 1/1000. Other scores are multiplied by this.",
2884
2946
  "format": "int32"
2885
2947
  }
2948
+ },
2949
+ "description": "List of search result objects"
2950
+ },
2951
+ "SearchRequest": {
2952
+ "required": ["question"],
2953
+ "type": "object",
2954
+ "properties": {
2955
+ "question": {
2956
+ "maxLength": 1000,
2957
+ "type": "string",
2958
+ "description": "Keyword/sentence is input for search."
2959
+ },
2960
+ "objectTypes": {
2961
+ "type": "array",
2962
+ "description": "List of object types to search for.",
2963
+ "items": {
2964
+ "type": "string",
2965
+ "description": "Object type to search for.",
2966
+ "enum": [
2967
+ "attribute",
2968
+ "metric",
2969
+ "fact",
2970
+ "label",
2971
+ "date",
2972
+ "dataset",
2973
+ "visualization",
2974
+ "dashboard"
2975
+ ]
2976
+ }
2977
+ },
2978
+ "deepSearch": {
2979
+ "type": "boolean",
2980
+ "description": "Turn on deep search. If true, content of complex objects will be searched as well, e.g. metrics in visualizations.",
2981
+ "default": false
2982
+ },
2983
+ "limit": {
2984
+ "type": "integer",
2985
+ "description": "Maximum number of results to return. There is a hard limit and the actual number of returned results may be lower than what is requested.",
2986
+ "format": "int32",
2987
+ "default": 10
2988
+ },
2989
+ "titleToDescriptorRatio": {
2990
+ "type": "number",
2991
+ "description": "Temporary for experiments. Ratio of title score to descriptor score.",
2992
+ "format": "double",
2993
+ "default": 0.7
2994
+ }
2995
+ }
2996
+ },
2997
+ "SearchRelationshipObject": {
2998
+ "required": [
2999
+ "sourceObjectId",
3000
+ "sourceObjectTitle",
3001
+ "sourceObjectType",
3002
+ "sourceWorkspaceId",
3003
+ "targetObjectId",
3004
+ "targetObjectTitle",
3005
+ "targetObjectType",
3006
+ "targetWorkspaceId"
3007
+ ],
3008
+ "type": "object",
3009
+ "properties": {
3010
+ "sourceWorkspaceId": {
3011
+ "type": "string",
3012
+ "description": "Source workspace ID. If relationship is dashboard->visualization, this is the workspace where the dashboard is located."
3013
+ },
3014
+ "sourceObjectId": {
3015
+ "type": "string",
3016
+ "description": "Source object ID."
3017
+ },
3018
+ "sourceObjectType": {
3019
+ "type": "string",
3020
+ "description": "Source object type, e.g. dashboard."
3021
+ },
3022
+ "sourceObjectTitle": {
3023
+ "type": "string",
3024
+ "description": "Source object title."
3025
+ },
3026
+ "targetWorkspaceId": {
3027
+ "type": "string",
3028
+ "description": "Target workspace ID. If relationship is dashboard->visualization, this is the workspace where the visualization is located."
3029
+ },
3030
+ "targetObjectId": {
3031
+ "type": "string",
3032
+ "description": "Target object ID."
3033
+ },
3034
+ "targetObjectType": {
3035
+ "type": "string",
3036
+ "description": "Target object type, e.g. visualization."
3037
+ },
3038
+ "targetObjectTitle": {
3039
+ "type": "string",
3040
+ "description": "Target object title."
3041
+ }
3042
+ }
3043
+ },
3044
+ "SearchResult": {
3045
+ "required": ["relationships", "results"],
3046
+ "type": "object",
3047
+ "properties": {
3048
+ "results": {
3049
+ "type": "array",
3050
+ "items": {
3051
+ "$ref": "#/components/schemas/SearchResultObject"
3052
+ }
3053
+ },
3054
+ "relationships": {
3055
+ "type": "array",
3056
+ "items": {
3057
+ "$ref": "#/components/schemas/SearchRelationshipObject"
3058
+ }
3059
+ }
2886
3060
  }
2887
3061
  },
2888
3062
  "RouteRequest": {