From 08186d14f6c9844b6ecdb72424f55cc263f2c707 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:11:35 +0000 Subject: [PATCH 1/2] chore(deps): bump golang.org/x/net from 0.21.0 to 0.23.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.21.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ce1a5d6..cdd60f0 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.0 - golang.org/x/net v0.21.0 + golang.org/x/net v0.23.0 ) require ( diff --git a/go.sum b/go.sum index 71673d7..5e347cc 100644 --- a/go.sum +++ b/go.sum @@ -26,8 +26,8 @@ github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02n github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From dbfaa500ee6da64e8b060eb187878daad6eab8db Mon Sep 17 00:00:00 2001 From: github-actions-bot Date: Fri, 19 Apr 2024 13:12:02 +0000 Subject: [PATCH 2/2] chore: Generating enigma-go based on OPEN-RPC API for Qlik Associative Engine version 12.2038.0 --- api-spec.json | 144 +++++++++++++++++++++++++++++++++++++++++ qix_generated.go | 72 ++++++++++++++++++++- schema/engine-rpc.json | 128 +++++++++++++++++++++++++++++++++++- 3 files changed, 341 insertions(+), 3 deletions(-) diff --git a/api-spec.json b/api-spec.json index c46be6d..2c31d90 100644 --- a/api-spec.json +++ b/api-spec.json @@ -140,6 +140,17 @@ } } }, + "ApplyGroupStatesResult": { + "description": "Result of applying GroupState to multiple cyclic groups.", + "x-qlik-stability": "experimental", + "type": "struct", + "entries": { + "ApplySuccess": { + "description": "When true, the cyclic group state was fully applied. *", + "type": "bool" + } + } + }, "ArrayOfNxValuePoint": { "type": "slice", "items": { @@ -713,6 +724,19 @@ } } }, + "CyclicGroupPosition": { + "type": "struct", + "entries": { + "ActiveField": { + "description": "Active field of the cyclic group, identified by a zero-based index.", + "type": "int" + }, + "Info": { + "description": "Target cyclic group.", + "type": "#/definitions/NxInfo" + } + } + }, "DataField": { "type": "struct", "entries": { @@ -1215,6 +1239,49 @@ } ] }, + "ApplyGroupStates": { + "x-qlik-stability": "experimental", + "type": "method", + "params": [ + { + "type": "https://golang.org/pkg/context/Context" + }, + { + "type": "slice", + "items": { + "type": "#/definitions/GroupState" + } + } + ], + "returns": [ + { + "type": "#/definitions/ApplyGroupStatesResult" + }, + { + "type": "error" + } + ] + }, + "ApplyGroupStatesRaw": { + "x-qlik-stability": "experimental", + "type": "method", + "params": [ + { + "type": "https://golang.org/pkg/context/Context" + }, + { + "type": "interface" + } + ], + "returns": [ + { + "type": "https://golang.org/pkg/encoding/json/RawMessage" + }, + { + "type": "error" + } + ] + }, "ApplyTemporaryBookmark": { "description": "Apply temporary bookmark identified by Id.\nApplyTemporaryBookmark method is only supported in SaaS Editions of Qlik Sense.\n\nParameters:\n\n◾ id - Identifier of the temporary selection state", "x-qlik-stability": "locked", @@ -4028,6 +4095,43 @@ } ] }, + "GetGroupStates": { + "x-qlik-stability": "experimental", + "type": "method", + "params": [ + { + "type": "https://golang.org/pkg/context/Context" + } + ], + "returns": [ + { + "type": "slice", + "items": { + "type": "#/definitions/GroupState" + } + }, + { + "type": "error" + } + ] + }, + "GetGroupStatesRaw": { + "x-qlik-stability": "experimental", + "type": "method", + "params": [ + { + "type": "https://golang.org/pkg/context/Context" + } + ], + "returns": [ + { + "type": "https://golang.org/pkg/encoding/json/RawMessage" + }, + { + "type": "error" + } + ] + }, "GetIncludeFileContent": { "description": "Gets the content of a file.\n\nParameters:\n\n◾ path - [\"lib://CONNECTION_NAME\\\\\\\u003cthe name of the file you want to use\u003e.txt\"]\nOR\n[\"lib://Connection_Name\\\\\\\u003cFolder under your connection\u003e\\\\\\\u003cthe name of the file you want to use\u003e.txt\"]\n[ ] should be used when the first variable contains a lib reference.", "x-qlik-stability": "locked", @@ -12660,6 +12764,20 @@ } } }, + "GroupState": { + "x-qlik-stability": "experimental", + "type": "struct", + "entries": { + "ActiveFieldDef": { + "description": "String defining the active field.", + "type": "string" + }, + "Info": { + "description": "Target cyclic group.", + "type": "#/definitions/NxInfo" + } + } + }, "GroupStateInfo": { "type": "struct", "entries": { @@ -13822,6 +13940,20 @@ "NxBookmark": { "type": "struct", "entries": { + "CyclicGroupStates": { + "description": "Information about cyclic groups by zero-based index. This field is unused.", + "type": "slice", + "items": { + "type": "#/definitions/CyclicGroupPosition" + } + }, + "GroupStates": { + "description": "Information about cyclic groups indexed by field definition.", + "type": "slice", + "items": { + "type": "#/definitions/GroupState" + } + }, "Patches": { "description": "Softpatches to be applied with this bookmark.", "type": "slice", @@ -14666,6 +14798,10 @@ "description": "Index of the active field in a cyclic dimension.\nThis parameter is optional. The default value is 0.\nThis parameter is used in case of cyclic dimensions ( qGrouping is C).", "type": "int" }, + "Alias": { + "description": "Alias of the dimension.", + "type": "string" + }, "FieldDefs": { "description": "Array of field names.\nWhen creating a grouped dimension, more than one field name is defined.\nThis parameter is optional.", "type": "slice", @@ -14787,6 +14923,10 @@ "NxLibraryDimension": { "type": "struct", "entries": { + "Alias": { + "description": "Alias of the dimension.", + "type": "string" + }, "FieldDefs": { "description": "Array of dimension names.", "type": "slice", @@ -14813,6 +14953,10 @@ "NxLibraryDimensionDef": { "type": "struct", "entries": { + "Alias": { + "description": "Alias of the dimension.", + "type": "string" + }, "FieldDefs": { "description": "Array of dimension names.", "type": "slice", diff --git a/qix_generated.go b/qix_generated.go index d929a06..f2e979d 100644 --- a/qix_generated.go +++ b/qix_generated.go @@ -1,4 +1,4 @@ -// Code generated by QIX generator (./schema/generate.go) for Qlik Associative Engine version 12.1976.0 . DO NOT EDIT. +// Code generated by QIX generator (./schema/generate.go) for Qlik Associative Engine version 12.2038.0 . DO NOT EDIT. package enigma @@ -8,7 +8,7 @@ import ( ) // Version of the schema used to generate the enigma.go QIX API -const QIX_SCHEMA_VERSION = "12.1976.0" +const QIX_SCHEMA_VERSION = "12.2038.0" // Deprecated: This will be removed in a future version type AlfaNumString struct { @@ -82,6 +82,13 @@ type AppScriptMeta struct { IsLocked bool `json:"qIsLocked,omitempty"` } +// Result of applying GroupState to multiple cyclic groups. +// Stability: experimental +type ApplyGroupStatesResult struct { + // When true, the cyclic group state was fully applied. * + ApplySuccess bool `json:"qApplySuccess,omitempty"` +} + type ArrayOfNxValuePoint []*NxPivotValuePoint type AssociationScore struct { @@ -510,6 +517,13 @@ type CustomConnector struct { SupportFileStreaming bool `json:"qSupportFileStreaming,omitempty"` } +type CyclicGroupPosition struct { + // Target cyclic group. + Info *NxInfo `json:"qInfo,omitempty"` + // Active field of the cyclic group, identified by a zero-based index. + ActiveField int `json:"qActiveField,omitempty"` +} + type DataField struct { // Name of the field. Name string `json:"qName,omitempty"` @@ -1669,6 +1683,14 @@ type GroupBookmarkData struct { CyclePos int `json:"qCyclePos,omitempty"` } +// Stability: experimental +type GroupState struct { + // Target cyclic group. + Info *NxInfo `json:"qInfo,omitempty"` + // String defining the active field. + ActiveFieldDef string `json:"qActiveFieldDef,omitempty"` +} + type GroupStateInfo struct { GroupName string `json:"qGroupName,omitempty"` CurrentItemName string `json:"qCurrentItemName,omitempty"` @@ -2465,6 +2487,10 @@ type NxBookmark struct { VariableItems []*BookmarkVariableItem `json:"qVariableItems,omitempty"` // Softpatches to be applied with this bookmark. Patches []*NxPatches `json:"qPatches,omitempty"` + // Information about cyclic groups by zero-based index. This field is unused. + CyclicGroupStates []*CyclicGroupPosition `json:"qCyclicGroupStates,omitempty"` + // Information about cyclic groups indexed by field definition. + GroupStates []*GroupState `json:"qGroupStates,omitempty"` } type NxCalcCond struct { @@ -3068,6 +3094,8 @@ type NxInlineDimensionDef struct { // Label expression. // This parameter is optional. LabelExpression string `json:"qLabelExpression,omitempty"` + // Alias of the dimension. + Alias string `json:"qAlias,omitempty"` } type NxInlineMeasureDef struct { @@ -3158,6 +3186,8 @@ type NxLibraryDimension struct { // Array of dimension labels. FieldLabels []string `json:"qFieldLabels,omitempty"` LabelExpression string `json:"qLabelExpression,omitempty"` + // Alias of the dimension. + Alias string `json:"qAlias,omitempty"` } type NxLibraryDimensionDef struct { @@ -3176,6 +3206,8 @@ type NxLibraryDimensionDef struct { // Array of dimension labels. FieldLabels []string `json:"qFieldLabels,omitempty"` LabelExpression string `json:"qLabelExpression,omitempty"` + // Alias of the dimension. + Alias string `json:"qAlias,omitempty"` } // Information about the library measure. Is the layout for NxLibraryMeasureDef. @@ -5997,6 +6029,24 @@ func (obj *Doc) ApplyBookmark(ctx context.Context, id string) (bool, error) { return result.Success, err } +// Stability: experimental +func (obj *Doc) ApplyGroupStates(ctx context.Context, groupStates []*GroupState) (*ApplyGroupStatesResult, error) { + result := &struct { + Result *ApplyGroupStatesResult `json:"qResult"` + }{} + err := obj.RPC(ctx, "ApplyGroupStates", result, groupStates) + return result.Result, err +} + +// Stability: experimental +func (obj *Doc) ApplyGroupStatesRaw(ctx context.Context, groupStates interface{}) (json.RawMessage, error) { + result := &struct { + Result json.RawMessage `json:"qResult"` + }{} + err := obj.RPC(ctx, "ApplyGroupStates", result, groupStates) + return result.Result, err +} + // Apply temporary bookmark identified by Id. // ApplyTemporaryBookmark method is only supported in SaaS Editions of Qlik Sense. // @@ -8561,6 +8611,24 @@ func (obj *Doc) GetFolderItemsForConnectionRaw(ctx context.Context, connectionId return result.FolderItems, err } +// Stability: experimental +func (obj *Doc) GetGroupStates(ctx context.Context) ([]*GroupState, error) { + result := &struct { + GroupStates []*GroupState `json:"qGroupStates"` + }{} + err := obj.RPC(ctx, "GetGroupStates", result) + return result.GroupStates, err +} + +// Stability: experimental +func (obj *Doc) GetGroupStatesRaw(ctx context.Context) (json.RawMessage, error) { + result := &struct { + GroupStates json.RawMessage `json:"qGroupStates"` + }{} + err := obj.RPC(ctx, "GetGroupStates", result) + return result.GroupStates, err +} + // Gets the content of a file. // // Parameters: diff --git a/schema/engine-rpc.json b/schema/engine-rpc.json index 9e4c93e..d76f7e3 100644 --- a/schema/engine-rpc.json +++ b/schema/engine-rpc.json @@ -2,7 +2,7 @@ "openrpc": "1.0.0", "info": { "title": "QIX", - "version": "12.1976.0", + "version": "12.2038.0", "description": "The JSON-RPC API over websocket that enables you to interact with the Qlik Associative Engine." }, "methods": [ @@ -8929,6 +8929,65 @@ ], "x-qlik-stability": "locked" }, + { + "name": "Doc.GetGroupStates", + "description": "", + "params": [], + "result": { + "name": "Results for Doc.GetGroupStates", + "schema": { + "type": "object", + "properties": { + "qGroupStates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupState" + } + } + } + } + }, + "errors": [ + { + "$ref": "#/components/errors/GenericErrors" + } + ], + "x-qlik-stability": "experimental" + }, + { + "name": "Doc.ApplyGroupStates", + "description": "", + "params": [ + { + "name": "qGroupStates", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupState" + } + } + } + ], + "result": { + "name": "Results for Doc.ApplyGroupStates", + "schema": { + "type": "object", + "properties": { + "qResult": { + "type": "object", + "$ref": "#/components/schemas/ApplyGroupStatesResult" + } + } + } + }, + "errors": [ + { + "$ref": "#/components/errors/GenericErrors" + } + ], + "x-qlik-stability": "experimental" + }, { "name": "Doc.CreateBookmarkEx", "description": "Creates a bookmark with softpatches.", @@ -14393,6 +14452,20 @@ "items": { "$ref": "#/components/schemas/NxPatches" } + }, + "qCyclicGroupStates": { + "type": "array", + "description": "Information about cyclic groups by zero-based index. This field is unused.", + "items": { + "$ref": "#/components/schemas/CyclicGroupPosition" + } + }, + "qGroupStates": { + "type": "array", + "description": "Information about cyclic groups indexed by field definition.", + "items": { + "$ref": "#/components/schemas/GroupState" + } } } }, @@ -14639,6 +14712,36 @@ } } }, + "CyclicGroupPosition": { + "type": "object", + "properties": { + "qInfo": { + "type": "object", + "description": "Target cyclic group.", + "$ref": "#/components/schemas/NxInfo" + }, + "qActiveField": { + "type": "integer", + "description": "Active field of the cyclic group, identified by a zero-based index.", + "format": "int32" + } + } + }, + "GroupState": { + "type": "object", + "properties": { + "qInfo": { + "type": "object", + "description": "Target cyclic group.", + "$ref": "#/components/schemas/NxInfo" + }, + "qActiveFieldDef": { + "type": "string", + "description": "String defining the active field." + } + }, + "x-qlik-stability": "experimental" + }, "Bookmark": { "type": "object", "properties": { @@ -15976,6 +16079,10 @@ "qLabelExpression": { "type": "string", "description": "Label expression.\nThis parameter is optional." + }, + "qAlias": { + "type": "string", + "description": "Alias of the dimension." } } }, @@ -17442,6 +17549,10 @@ }, "qLabelExpression": { "type": "string" + }, + "qAlias": { + "type": "string", + "description": "Alias of the dimension." } } }, @@ -17469,6 +17580,10 @@ }, "qLabelExpression": { "type": "string" + }, + "qAlias": { + "type": "string", + "description": "Alias of the dimension." } } }, @@ -20963,6 +21078,17 @@ } } }, + "ApplyGroupStatesResult": { + "type": "object", + "description": "Result of applying GroupState to multiple cyclic groups.", + "properties": { + "qApplySuccess": { + "type": "boolean", + "description": "When true, the cyclic group state was fully applied. *" + } + }, + "x-qlik-stability": "experimental" + }, "SearchValueOptions": { "type": "object", "properties": {