Add advanced target duration configurations and parsing logic to Goals module. Update Workfeed with new CompanyID config. Extend OpenAPI spec with detailed schema mappings and examples.

This commit is contained in:
Jeppe Bundgaard
2026-03-24 11:23:08 +01:00
parent 40171d9719
commit 8c9388546b
5 changed files with 256 additions and 7 deletions
+90 -7
View File
@@ -8640,6 +8640,30 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/WorkfeedConfigListResponse'
examples:
default:
summary: Workfeed module configuration
value:
success: true
data:
- module: workfeed
variable: enabled
type: bool
value: true
- module: workfeed
variable: api_url
type: string
value: https://api.workfeed.io
- module: workfeed
variable: api_key
type: string
value: wf_live_xxxxxxxxxxxxxxxxx
- module: workfeed
variable: CompanyID
type: string
value: "123456"
meta: []
includes: []
post:
tags: [Config]
summary: Update Workfeed config
@@ -10106,18 +10130,56 @@ components:
- type: string
required: [module, variable, type, value]
WorkfeedConfigEntry:
WorkfeedConfigEnabledEntry:
type: object
properties:
module: { type: string, enum: [workfeed] }
variable: { type: string, enum: [enabled, api_url, api_key] }
type: { type: string, enum: [bool, string] }
value:
oneOf:
- type: boolean
- type: string
variable: { type: string, enum: [enabled] }
type: { type: string, enum: [bool] }
value: { type: boolean }
required: [module, variable, type, value]
WorkfeedConfigApiUrlEntry:
type: object
properties:
module: { type: string, enum: [workfeed] }
variable: { type: string, enum: [api_url] }
type: { type: string, enum: [string] }
value: { type: string, example: "https://api.workfeed.io" }
required: [module, variable, type, value]
WorkfeedConfigApiKeyEntry:
type: object
properties:
module: { type: string, enum: [workfeed] }
variable: { type: string, enum: [api_key] }
type: { type: string, enum: [string] }
value: { type: string, example: "wf_live_xxxxxxxxxxxxxxxxx" }
required: [module, variable, type, value]
WorkfeedConfigCompanyIdEntry:
type: object
properties:
module: { type: string, enum: [workfeed] }
variable: { type: string, enum: [CompanyID] }
type: { type: string, enum: [string] }
value: { type: string, example: "123456" }
required: [module, variable, type, value]
WorkfeedConfigEntry:
oneOf:
- $ref: '#/components/schemas/WorkfeedConfigEnabledEntry'
- $ref: '#/components/schemas/WorkfeedConfigApiUrlEntry'
- $ref: '#/components/schemas/WorkfeedConfigApiKeyEntry'
- $ref: '#/components/schemas/WorkfeedConfigCompanyIdEntry'
discriminator:
propertyName: variable
mapping:
enabled: '#/components/schemas/WorkfeedConfigEnabledEntry'
api_url: '#/components/schemas/WorkfeedConfigApiUrlEntry'
api_key: '#/components/schemas/WorkfeedConfigApiKeyEntry'
CompanyID: '#/components/schemas/WorkfeedConfigCompanyIdEntry'
GatewayApiConfigEntry:
type: object
properties:
@@ -10319,6 +10381,27 @@ components:
properties:
data: { type: array, items: { $ref: '#/components/schemas/WorkfeedConfigEntry' } }
required: [data]
example:
success: true
data:
- module: workfeed
variable: enabled
type: bool
value: true
- module: workfeed
variable: api_url
type: string
value: https://api.workfeed.io
- module: workfeed
variable: api_key
type: string
value: wf_live_xxxxxxxxxxxxxxxxx
- module: workfeed
variable: CompanyID
type: string
value: "123456"
meta: []
includes: []
GatewayApiConfigListResponse:
allOf: