Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(specs): rename task type to onDemand #1299

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}