|
11 | 11 | trigger:
|
12 | 12 | $ref: '#/Trigger'
|
13 | 13 | input:
|
14 |
| - description: The input that holds information specific to the task. |
15 |
| - type: object |
| 14 | + $ref: '#/TaskInput' |
16 | 15 | enabled:
|
17 | 16 | type: boolean
|
18 | 17 | default: true
|
@@ -57,6 +56,8 @@ TaskCreate:
|
57 | 56 | enabled:
|
58 | 57 | type: boolean
|
59 | 58 | description: Whether the task is enabled or not.
|
| 59 | + input: |
| 60 | + $ref: '#/TaskInput' |
60 | 61 | # lastCursorValue:
|
61 | 62 | # type: integer
|
62 | 63 | # format: int64
|
@@ -94,6 +95,8 @@ TaskUpdate:
|
94 | 95 | $ref: './common.yml#/destinationID'
|
95 | 96 | trigger:
|
96 | 97 | $ref: '#/TriggerInput'
|
| 98 | + input: |
| 99 | + $ref: '#/TaskInput' |
97 | 100 | enabled:
|
98 | 101 | type: boolean
|
99 | 102 | description: Whether the task is enabled or not.
|
@@ -127,6 +130,11 @@ ActionType:
|
127 | 130 | description: The action to perform on the Algolia index.
|
128 | 131 | enum: ['replace', 'save']
|
129 | 132 |
|
| 133 | +TaskInput: |
| 134 | + oneOf: |
| 135 | + - $ref: '#/OnDemandDateUtilsInput' |
| 136 | + - $ref: '#/ScheduleDateUtilsInput' |
| 137 | + |
130 | 138 | TriggerInput:
|
131 | 139 | type: object
|
132 | 140 | additionalProperties: false
|
@@ -239,3 +247,33 @@ SubscriptionTrigger:
|
239 | 247 | $ref: '#/SubscriptionTriggerType'
|
240 | 248 | required:
|
241 | 249 | - type
|
| 250 | + |
| 251 | +# Task input |
| 252 | + |
| 253 | +OnDemandDateUtilsInput: |
| 254 | + type: object |
| 255 | + additionalProperties: false |
| 256 | + description: The input for an `onDemand` task whose source is of type `bigquery` and for which extracted data spans a given time range. |
| 257 | + properties: |
| 258 | + startDate: |
| 259 | + description: The start date of the extraction (RFC3339 format). |
| 260 | + type: string |
| 261 | + endDate: |
| 262 | + description: The end date of the extraction (RFC3339 format). |
| 263 | + type: string |
| 264 | + required: |
| 265 | + - startDate |
| 266 | + - endDate |
| 267 | + |
| 268 | +ScheduleDateUtilsInput: |
| 269 | + type: object |
| 270 | + additionalProperties: false |
| 271 | + description: The input for a `schedule` task whose source is of type `bigquery` and for which extracted data spans a fixed number of days. |
| 272 | + properties: |
| 273 | + timeframe: |
| 274 | + description: The timeframe of the extraction, in number of days from today. |
| 275 | + type: integer |
| 276 | + minimum: 1 |
| 277 | + maximum: 30 |
| 278 | + required: |
| 279 | + - timeframe |
0 commit comments