Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajmajerik committed Oct 16, 2024
1 parent 405dd59 commit b54280b
Show file tree
Hide file tree
Showing 7 changed files with 671 additions and 134 deletions.
222 changes: 192 additions & 30 deletions frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1254,9 +1254,22 @@
"description": "What triggered the calculation of the query, leave empty if user/immediate",
"type": "string"
},
"credible_intervals": {
"additionalProperties": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"type": "object"
},
"expected_loss": {
"type": "number"
},
"insight": {
"const": "FUNNELS",
"type": "string"
"$ref": "#/definitions/FunnelsQueryResponse"
},
"is_cached": {
"type": "boolean"
Expand All @@ -1269,28 +1282,45 @@
"format": "date-time",
"type": "string"
},
"probability": {
"additionalProperties": {
"type": "number"
},
"type": "object"
},
"query_status": {
"$ref": "#/definitions/QueryStatus",
"description": "Query status indicates whether next to the provided data, a query is still running."
},
"results": {
"additionalProperties": {
"$ref": "#/definitions/ExperimentVariantFunnelResult"
},
"type": "object"
"significance_code": {
"$ref": "#/definitions/ExperimentSignificanceCode"
},
"significant": {
"type": "boolean"
},
"timezone": {
"type": "string"
},
"variants": {
"items": {
"$ref": "#/definitions/ExperimentVariantFunnelBaseStats"
},
"type": "array"
}
},
"required": [
"cache_key",
"credible_intervals",
"expected_loss",
"insight",
"is_cached",
"last_refresh",
"next_allowed_client_refresh",
"results",
"timezone"
"probability",
"significance_code",
"significant",
"timezone",
"variants"
],
"type": "object"
},
Expand Down Expand Up @@ -3641,18 +3671,51 @@
{
"additionalProperties": false,
"properties": {
"credible_intervals": {
"additionalProperties": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"type": "object"
},
"expected_loss": {
"type": "number"
},
"insight": {
"const": "FUNNELS",
"type": "string"
"$ref": "#/definitions/FunnelsQueryResponse"
},
"results": {
"probability": {
"additionalProperties": {
"$ref": "#/definitions/ExperimentVariantFunnelResult"
"type": "number"
},
"type": "object"
},
"significance_code": {
"$ref": "#/definitions/ExperimentSignificanceCode"
},
"significant": {
"type": "boolean"
},
"variants": {
"items": {
"$ref": "#/definitions/ExperimentVariantFunnelBaseStats"
},
"type": "array"
}
},
"required": ["insight", "results"],
"required": [
"credible_intervals",
"expected_loss",
"insight",
"probability",
"significance_code",
"significant",
"variants"
],
"type": "object"
},
{
Expand Down Expand Up @@ -5082,18 +5145,51 @@
"ExperimentFunnelQueryResponse": {
"additionalProperties": false,
"properties": {
"credible_intervals": {
"additionalProperties": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"type": "object"
},
"expected_loss": {
"type": "number"
},
"insight": {
"const": "FUNNELS",
"type": "string"
"$ref": "#/definitions/FunnelsQueryResponse"
},
"results": {
"probability": {
"additionalProperties": {
"$ref": "#/definitions/ExperimentVariantFunnelResult"
"type": "number"
},
"type": "object"
},
"significance_code": {
"$ref": "#/definitions/ExperimentSignificanceCode"
},
"significant": {
"type": "boolean"
},
"variants": {
"items": {
"$ref": "#/definitions/ExperimentVariantFunnelBaseStats"
},
"type": "array"
}
},
"required": ["insight", "results"],
"required": [
"insight",
"variants",
"probability",
"significant",
"significance_code",
"expected_loss",
"credible_intervals"
],
"type": "object"
},
"ExperimentSignificanceCode": {
Expand Down Expand Up @@ -5177,7 +5273,7 @@
],
"type": "object"
},
"ExperimentVariantFunnelResult": {
"ExperimentVariantFunnelBaseStats": {
"additionalProperties": false,
"properties": {
"failure_count": {
Expand Down Expand Up @@ -8762,18 +8858,51 @@
{
"additionalProperties": false,
"properties": {
"credible_intervals": {
"additionalProperties": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"type": "object"
},
"expected_loss": {
"type": "number"
},
"insight": {
"const": "FUNNELS",
"type": "string"
"$ref": "#/definitions/FunnelsQueryResponse"
},
"results": {
"probability": {
"additionalProperties": {
"$ref": "#/definitions/ExperimentVariantFunnelResult"
"type": "number"
},
"type": "object"
},
"significance_code": {
"$ref": "#/definitions/ExperimentSignificanceCode"
},
"significant": {
"type": "boolean"
},
"variants": {
"items": {
"$ref": "#/definitions/ExperimentVariantFunnelBaseStats"
},
"type": "array"
}
},
"required": ["insight", "results"],
"required": [
"insight",
"variants",
"probability",
"significant",
"significance_code",
"expected_loss",
"credible_intervals"
],
"type": "object"
},
{
Expand Down Expand Up @@ -9374,18 +9503,51 @@
{
"additionalProperties": false,
"properties": {
"credible_intervals": {
"additionalProperties": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"type": "object"
},
"expected_loss": {
"type": "number"
},
"insight": {
"const": "FUNNELS",
"type": "string"
"$ref": "#/definitions/FunnelsQueryResponse"
},
"results": {
"probability": {
"additionalProperties": {
"$ref": "#/definitions/ExperimentVariantFunnelResult"
"type": "number"
},
"type": "object"
},
"significance_code": {
"$ref": "#/definitions/ExperimentSignificanceCode"
},
"significant": {
"type": "boolean"
},
"variants": {
"items": {
"$ref": "#/definitions/ExperimentVariantFunnelBaseStats"
},
"type": "array"
}
},
"required": ["insight", "results"],
"required": [
"credible_intervals",
"expected_loss",
"insight",
"probability",
"significance_code",
"significant",
"variants"
],
"type": "object"
},
{
Expand Down
11 changes: 8 additions & 3 deletions frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ export interface ExperimentVariantTrendBaseStats {
absolute_exposure: number
}

export interface ExperimentVariantFunnelResult {
export interface ExperimentVariantFunnelBaseStats {
key: string
success_count: number
failure_count: number
Expand All @@ -1629,8 +1629,13 @@ export interface ExperimentTrendQueryResponse {
export type CachedExperimentTrendQueryResponse = CachedQueryResponse<ExperimentTrendQueryResponse>

export interface ExperimentFunnelQueryResponse {
insight: InsightType.FUNNELS
results: Record<string, ExperimentVariantFunnelResult>
insight: FunnelsQueryResponse
variants: ExperimentVariantFunnelBaseStats[]
probability: Record<string, number>
significant: boolean
significance_code: ExperimentSignificanceCode
expected_loss: number
credible_intervals: Record<string, [number, number]>
}

export type CachedExperimentFunnelQueryResponse = CachedQueryResponse<ExperimentFunnelQueryResponse>
Expand Down
Loading

0 comments on commit b54280b

Please sign in to comment.