Skip to content

Commit ca4ff31

Browse files
chore: generated code for commit a1c7c24. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent a1c7c24 commit ca4ff31

File tree

11 files changed

+86
-32
lines changed

11 files changed

+86
-32
lines changed

clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export * from './listEventsResponse';
3737
export * from './listSourcesResponse';
3838
export * from './listTasksResponse';
3939
export * from './methodType';
40+
export * from './onDemandTrigger';
41+
export * from './onDemandTriggerType';
4042
export * from './pagination';
4143
export * from './platform';
4244
export * from './platformNone';
@@ -50,6 +52,7 @@ export * from './runStatus';
5052
export * from './runType';
5153
export * from './scheduleTrigger';
5254
export * from './scheduleTriggerInput';
55+
export * from './scheduleTriggerType';
5356
export * from './source';
5457
export * from './sourceBigCommerce';
5558
export * from './sourceCommercetools';
@@ -64,12 +67,12 @@ export * from './sourceUpdateCommercetools';
6467
export * from './sourceUpdateInput';
6568
export * from './sourceUpdateJson';
6669
export * from './sourceUpdateResponse';
70+
export * from './subscriptionTrigger';
6771
export * from './task';
6872
export * from './taskCreate';
6973
export * from './taskCreateResponse';
7074
export * from './taskCreateTrigger';
7175
export * from './taskSearch';
72-
export * from './taskTrigger';
7376
export * from './taskUpdate';
7477
export * from './taskUpdateResponse';
7578
export * from './trigger';
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
import type { OnDemandTriggerType } from './onDemandTriggerType';
4+
5+
/**
6+
* The trigger information of a task of type `on-demand`.
7+
*/
8+
export type OnDemandTrigger = {
9+
type: OnDemandTriggerType;
10+
11+
/**
12+
* The last time the scheduled task ran.
13+
*/
14+
lastRun?: string;
15+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
/**
4+
* A task which is manually executed via the run task endpoint.
5+
*/
6+
export type OnDemandTriggerType = 'on_demand';

clients/algoliasearch-client-javascript/packages/ingestion/model/scheduleTrigger.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

3-
import type { TriggerType } from './triggerType';
3+
import type { ScheduleTriggerType } from './scheduleTriggerType';
44

55
/**
66
* The trigger information for a task of type \'schedule\'.
77
*/
88
export type ScheduleTrigger = {
9-
type: TriggerType;
9+
type: ScheduleTriggerType;
1010

1111
/**
1212
* A cron expression that represent at which regularity the task should run.
@@ -16,7 +16,7 @@ export type ScheduleTrigger = {
1616
/**
1717
* The last time the scheduled task ran.
1818
*/
19-
lastRun: string;
19+
lastRun?: string;
2020

2121
/**
2222
* The next scheduled run of the task.

clients/algoliasearch-client-javascript/packages/ingestion/model/scheduleTriggerInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

3-
import type { TriggerType } from './triggerType';
3+
import type { ScheduleTriggerType } from './scheduleTriggerType';
44

55
/**
66
* The trigger input for a task of type \'schedule\'.
77
*/
88
export type ScheduleTriggerInput = {
9-
type: TriggerType;
9+
type: ScheduleTriggerType;
1010

1111
/**
1212
* A cron expression that represent at which regularity the task should run.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
/**
4+
* A task which is triggered by a schedule (cron expression).
5+
*/
6+
export type ScheduleTriggerType = 'schedule';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
import type { TriggerType } from './triggerType';
4+
5+
/**
6+
* The trigger input for a task of type \'subscription\'.
7+
*/
8+
export type SubscriptionTrigger = {
9+
type: TriggerType;
10+
};

clients/algoliasearch-client-javascript/packages/ingestion/model/task.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

33
import type { ActionType } from './actionType';
4-
import type { TaskTrigger } from './taskTrigger';
4+
import type { Trigger } from './trigger';
55

66
export type Task = {
77
/**
@@ -19,7 +19,7 @@ export type Task = {
1919
*/
2020
destinationID: string;
2121

22-
trigger?: TaskTrigger;
22+
trigger?: Trigger;
2323

2424
/**
2525
* Whether the task is enabled or not.

clients/algoliasearch-client-javascript/packages/ingestion/model/taskTrigger.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

3-
import type { TriggerType } from './triggerType';
3+
import type { OnDemandTrigger } from './onDemandTrigger';
4+
import type { ScheduleTrigger } from './scheduleTrigger';
5+
import type { SubscriptionTrigger } from './subscriptionTrigger';
46

5-
/**
6-
* The trigger information of a task.
7-
*/
8-
export type Trigger = {
9-
type: TriggerType;
10-
};
7+
export type Trigger = OnDemandTrigger | ScheduleTrigger | SubscriptionTrigger;

specs/bundled/ingestion.yml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -826,15 +826,30 @@ components:
826826
type: string
827827
description: The task UUID.
828828
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
829-
Trigger:
829+
OnDemandTriggerType:
830+
type: string
831+
description: A task which is manually executed via the run task endpoint.
832+
enum:
833+
- on_demand
834+
LastRun:
835+
description: The last time the scheduled task ran.
836+
type: string
837+
OnDemandTrigger:
830838
type: object
831839
additionalProperties: false
832-
description: The trigger information of a task.
840+
description: The trigger information of a task of type `on-demand`.
833841
properties:
834842
type:
835-
$ref: '#/components/schemas/TriggerType'
843+
$ref: '#/components/schemas/OnDemandTriggerType'
844+
lastRun:
845+
$ref: '#/components/schemas/LastRun'
836846
required:
837847
- type
848+
ScheduleTriggerType:
849+
type: string
850+
description: A task which is triggered by a schedule (cron expression).
851+
enum:
852+
- schedule
838853
Cron:
839854
type: string
840855
description: >-
@@ -847,24 +862,32 @@ components:
847862
description: The trigger information for a task of type 'schedule'.
848863
properties:
849864
type:
850-
$ref: '#/components/schemas/TriggerType'
865+
$ref: '#/components/schemas/ScheduleTriggerType'
851866
cron:
852867
$ref: '#/components/schemas/Cron'
853868
lastRun:
854-
description: The last time the scheduled task ran.
855-
type: string
869+
$ref: '#/components/schemas/LastRun'
856870
nextRun:
857871
description: The next scheduled run of the task.
858872
type: string
859873
required:
860874
- type
861875
- cron
862-
- lastRun
863876
- nextRun
864-
TaskTrigger:
877+
SubscriptionTrigger:
878+
type: object
879+
additionalProperties: false
880+
description: The trigger input for a task of type 'subscription'.
881+
properties:
882+
type:
883+
$ref: '#/components/schemas/TriggerType'
884+
required:
885+
- type
886+
Trigger:
865887
oneOf:
866-
- $ref: '#/components/schemas/Trigger'
888+
- $ref: '#/components/schemas/OnDemandTrigger'
867889
- $ref: '#/components/schemas/ScheduleTrigger'
890+
- $ref: '#/components/schemas/SubscriptionTrigger'
868891
Task:
869892
type: object
870893
additionalProperties: false
@@ -876,7 +899,7 @@ components:
876899
destinationID:
877900
$ref: '#/components/schemas/destinationID'
878901
trigger:
879-
$ref: '#/components/schemas/TaskTrigger'
902+
$ref: '#/components/schemas/Trigger'
880903
enabled:
881904
type: boolean
882905
default: true
@@ -909,7 +932,7 @@ components:
909932
description: The trigger input for a task of type 'schedule'.
910933
properties:
911934
type:
912-
$ref: '#/components/schemas/TriggerType'
935+
$ref: '#/components/schemas/ScheduleTriggerType'
913936
cron:
914937
$ref: '#/components/schemas/Cron'
915938
required:

0 commit comments

Comments
 (0)