Skip to content

Commit

Permalink
fix(specs): rename task type to onDemand (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Feb 6, 2023
1 parent d39716c commit 9d04dc2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions specs/ingestion/common/schemas/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ TriggerType:
type: string
description: >
The type of the task reflect how it can be used:
- on_demand: a task that runs manually
- onDemand: a task that runs manually
- schedule: a task that runs regularly, following a given cron expression
- subscription: a task that runs after a subscription event is received from an integration (e.g. Webhook).
enum: ['on_demand', 'schedule', 'subscription']
enum: ['onDemand', 'schedule', 'subscription']

# schedule trigger

Expand Down Expand Up @@ -195,7 +195,7 @@ ScheduleTrigger:
OnDemandTriggerType:
type: string
description: A task which is manually executed via the run task endpoint.
enum: ['on_demand']
enum: ['onDemand']

OnDemandTriggerInput:
type: object
Expand Down
2 changes: 1 addition & 1 deletion specs/ingestion/common/taskParameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ triggerType:
type: array
items:
$ref: './schemas/task.yml#/TriggerType'
example: on_demand,schedule
example: onDemand,schedule
4 changes: 2 additions & 2 deletions templates/javascript/clients/client/api/guards.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export function isOnDemandTrigger(
trigger: Trigger
): trigger is OnDemandTrigger {
return trigger.type === 'on_demand';
return trigger.type === 'onDemand';
}

/**
Expand All @@ -34,4 +34,4 @@ export function isSubscriptionTrigger(
): trigger is SubscriptionTrigger {
return trigger.type === 'subscription';
}
{{/isIngestionClient}}
{{/isIngestionClient}}

0 comments on commit 9d04dc2

Please sign in to comment.