Skip to content

Commit 46c1e2e

Browse files
authored
feat(specs): add search endpoint to every item type (#1274)
1 parent 102ca8e commit 46c1e2e

File tree

9 files changed

+148
-0
lines changed

9 files changed

+148
-0
lines changed

specs/ingestion/common/schemas/authentication.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ AuthenticationUpdateResponse:
9393
- name
9494
- updatedAt
9595

96+
AuthenticationSearch:
97+
type: object
98+
additionalProperties: false
99+
properties:
100+
authenticationIDs:
101+
type: array
102+
items:
103+
type: string
104+
required:
105+
- authenticationIDs
106+
96107
AuthenticationType:
97108
type: string
98109
enum: ['googleServiceAccount', 'basic', 'apiKey', 'oauth', 'algolia']

specs/ingestion/common/schemas/destination.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ DestinationUpdateResponse:
8484
- name
8585
- updatedAt
8686

87+
DestinationSearch:
88+
type: object
89+
additionalProperties: false
90+
properties:
91+
destinationIDs:
92+
type: array
93+
items:
94+
type: string
95+
required:
96+
- destinationIDs
97+
8798
DestinationType:
8899
type: string
89100
enum: ['search', 'insights', 'flow', 'predict']

specs/ingestion/common/schemas/source.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ SourceUpdateResponse:
8484
- name
8585
- updatedAt
8686

87+
SourceSearch:
88+
type: object
89+
additionalProperties: false
90+
properties:
91+
sourceIDs:
92+
type: array
93+
items:
94+
type: string
95+
required:
96+
- sourceIDs
97+
8798
SourceType:
8899
type: string
89100
enum: ['bigcommerce', 'commercetools', 'json']

specs/ingestion/common/schemas/task.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@ TaskUpdateResponse:
8888
- taskID
8989
- updatedAt
9090

91+
TaskSearch:
92+
type: object
93+
additionalProperties: false
94+
properties:
95+
taskIDs:
96+
type: array
97+
items:
98+
type: string
99+
required:
100+
- taskIDs
101+
91102
ActionType:
92103
type: string
93104
enum: ['replace', 'save', 'delete']
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
post:
2+
tags:
3+
- authentications
4+
summary: Search among authentications.
5+
description: Search among authentications with a defined set of parameters.
6+
operationId: searchAuthentications
7+
requestBody:
8+
content:
9+
application/json:
10+
schema:
11+
$ref: '../../common/schemas/authentication.yml#/AuthenticationSearch'
12+
required: true
13+
responses:
14+
'200':
15+
description: OK
16+
content:
17+
application/json:
18+
schema:
19+
title: searchAuthenticationsResponse
20+
type: array
21+
items:
22+
$ref: '../../common/schemas/authentication.yml#/Authentication'
23+
'400':
24+
$ref: '../../../common/responses/BadRequest.yml'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
post:
2+
tags:
3+
- destinations
4+
summary: Search among destinations.
5+
description: Search among destinations with a defined set of parameters.
6+
operationId: searchDestinations
7+
requestBody:
8+
content:
9+
application/json:
10+
schema:
11+
$ref: '../../common/schemas/destination.yml#/DestinationSearch'
12+
required: true
13+
responses:
14+
'200':
15+
description: OK
16+
content:
17+
application/json:
18+
schema:
19+
title: searchDestinationsResponse
20+
type: array
21+
items:
22+
$ref: '../../common/schemas/destination.yml#/Destination'
23+
'400':
24+
$ref: '../../../common/responses/BadRequest.yml'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
post:
2+
tags:
3+
- sources
4+
summary: Search among sources.
5+
description: Search among sources with a defined set of parameters.
6+
operationId: searchSources
7+
requestBody:
8+
content:
9+
application/json:
10+
schema:
11+
$ref: '../../common/schemas/source.yml#/SourceSearch'
12+
required: true
13+
responses:
14+
'200':
15+
description: OK
16+
content:
17+
application/json:
18+
schema:
19+
title: searchSourcesResponse
20+
type: array
21+
items:
22+
$ref: '../../common/schemas/source.yml#/Source'
23+
'400':
24+
$ref: '../../../common/responses/BadRequest.yml'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
post:
2+
tags:
3+
- tasks
4+
summary: Search among tasks.
5+
description: Search among tasks with a defined set of parameters.
6+
operationId: searchTasks
7+
requestBody:
8+
content:
9+
application/json:
10+
schema:
11+
$ref: '../../common/schemas/task.yml#/TaskSearch'
12+
required: true
13+
responses:
14+
'200':
15+
description: OK
16+
content:
17+
application/json:
18+
schema:
19+
title: searchTasksResponse
20+
type: array
21+
items:
22+
$ref: '../../common/schemas/task.yml#/Task'
23+
'400':
24+
$ref: '../../../common/responses/BadRequest.yml'

specs/ingestion/spec.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,32 @@ paths:
3939
# authentications api
4040
/1/authentications:
4141
$ref: 'paths/authentications/authentications.yml'
42+
/1/authentications/search:
43+
$ref: 'paths/authentications/searchAuthentications.yml'
4244
/1/authentications/{authenticationID}:
4345
$ref: 'paths/authentications/authenticationID.yml'
4446

4547
# destinations api
4648
/1/destinations:
4749
$ref: 'paths/destinations/destinations.yml'
50+
/1/destinations/search:
51+
$ref: 'paths/destinations/searchDestinations.yml'
4852
/1/destinations/{destinationID}:
4953
$ref: 'paths/destinations/destinationID.yml'
5054

5155
# sources api
5256
/1/sources:
5357
$ref: 'paths/sources/sources.yml'
58+
/1/sources/search:
59+
$ref: 'paths/sources/searchSources.yml'
5460
/1/sources/{sourceID}:
5561
$ref: 'paths/sources/sourceID.yml'
5662

5763
# tasks api
5864
/1/tasks:
5965
$ref: 'paths/tasks/tasks.yml'
66+
/1/tasks/search:
67+
$ref: 'paths/tasks/searchTasks.yml'
6068
/1/tasks/{taskID}:
6169
$ref: 'paths/tasks/taskID.yml'
6270
/1/tasks/{taskID}/run:

0 commit comments

Comments
 (0)