Skip to content

feat(specs): create ingestion specs #1100

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

Merged
merged 7 commits into from
Dec 12, 2022
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
69 changes: 69 additions & 0 deletions specs/ingestion/common/parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
authenticationID:
name: authenticationID
in: path
description: The authentication uuid.
required: true
schema:
type: string
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

destinationID:
name: destinationID
in: path
description: The destination uuid.
required: true
schema:
type: string
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

sourceID:
name: sourceID
in: path
description: The source uuid.
required: true
schema:
type: string
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

taskID:
name: taskID
in: path
description: The task uuid.
required: true
schema:
type: string
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

runID:
name: runID
in: path
description: The run uuid.
required: true
schema:
type: string
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

eventID:
name: eventID
in: path
description: The event uuid.
required: true
schema:
type: string
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

itemsPerPage:
name: itemsPerPage
in: query
description: The number of items per page to return
required: false
schema:
type: integer

page:
name: page
in: query
description: The page number to fetch, starting at 1
required: false
schema:
type: integer
163 changes: 163 additions & 0 deletions specs/ingestion/common/schemas/authentication.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
Authentication:
type: object
additionalProperties: false
properties:
authenticationID:
type: string
type:
$ref: '#/AuthenticationType'
name:
type: string
platform:
$ref: '#/PlatformType'
input:
$ref: '#/AuthInput'
createdAt:
$ref: './common.yml#/createdAt'
updatedAt:
$ref: './common.yml#/updatedAt'
required:
- authenticationID
- type
- name
- input
- createdAt

AuthenticationCreate:
type: object
additionalProperties: false
properties:
type:
$ref: '#/AuthenticationType'
name:
type: string
platform:
$ref: '#/PlatformType'
input:
$ref: '#/AuthInput'
required:
- type
- name
- input

AuthenticationCreateResponse:
type: object
additionalProperties: false
properties:
authenticationID:
type: string
name:
type: string
createdAt:
$ref: './common.yml#/createdAt'
required:
- authenticationID
- name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this API is so different than the others :( we should maybe focus on making it more consistent

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's already better now !

- createdAt

AuthenticationUpdate:
type: object
additionalProperties: false
properties:
type:
$ref: '#/AuthenticationType'
name:
type: string
platform:
$ref: '#/PlatformType'
input:
$ref: '#/AuthInput'

AuthenticationUpdateResponse:
type: object
additionalProperties: false
properties:
authenticationID:
type: string
name:
type: string
updatedAt:
$ref: './common.yml#/updatedAt'
required:
- authenticationID
- name
- updatedAt

AuthenticationType:
type: string
enum: ['googleServiceAccount', 'basic', 'apiKey', 'oauth', 'algolia']

PlatformType:
type: string
enum: ['bigcommerce', 'commercetools']

AuthGoogleServiceAccount:
type: object
additionalProperties: false
properties:
clientEmail:
type: string
privateKey:
type: string
required:
- clientEmail
- privateKey

AuthBasic:
type: object
additionalProperties: false
properties:
username:
type: string
password:
type: string
required:
- username
- password

AuthAPIKey:
type: object
additionalProperties: false
properties:
key:
type: string
required:
- key

AuthOAuth:
type: object
additionalProperties: false
properties:
url:
type: string
client_id:
type: string
client_secret:
type: string
scope:
type: string
required:
- url
- client_id
- client_secret
- scope

AuthAlgolia:
type: object
additionalProperties: false
properties:
appID:
type: string
apiKey:
type: string
required:
- appID
- apiKey

AuthInput:
oneOf:
- $ref: '#/AuthGoogleServiceAccount'
- $ref: '#/AuthBasic'
- $ref: '#/AuthAPIKey'
- $ref: '#/AuthOAuth'
- $ref: '#/AuthAlgolia'
28 changes: 28 additions & 0 deletions specs/ingestion/common/schemas/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
createdAt:
type: string
description: Date of creation (RFC3339 format).

updatedAt:
type: string
description: Date of last update (RFC3339 format).

startedAt:
type: string
description: Date of start (RFC3339 format).

finishedAt:
type: string
description: Date of finish (RFC3339 format).

publishedAt:
type: string
description: Date of publish (RFC3339 format).

DeleteResponse:
type: object
properties:
deletedAt:
type: string
description: Date of deletion (RFC3339 format).
required:
- deletedAt
113 changes: 113 additions & 0 deletions specs/ingestion/common/schemas/destination.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
Destination:
type: object
additionalProperties: false
properties:
destinationID:
type: string
type:
$ref: '#/DestinationType'
name:
type: string
input:
$ref: '#/DestinationInput'
createdAt:
$ref: './common.yml#/createdAt'
updatedAt:
$ref: './common.yml#/updatedAt'
authenticationID:
type: string
required:
- destinationID
- type
- name
- input
- createdAt
- authenticationID

DestinationCreate:
type: object
additionalProperties: false
properties:
type:
$ref: '#/DestinationType'
name:
type: string
input:
$ref: '#/DestinationInput'
authenticationID:
type: string
required:
- type
- name
- input
- authenticationID

DestinationCreateResponse:
type: object
additionalProperties: false
properties:
destinationID:
type: string
name:
type: string
createdAt:
$ref: './common.yml#/createdAt'
required:
- destinationID
- name
- createdAt

DestinationUpdate:
type: object
additionalProperties: false
properties:
type:
$ref: '#/DestinationType'
name:
type: string
input:
$ref: '#/DestinationInput'
authenticationID:
type: string

DestinationUpdateResponse:
type: object
additionalProperties: false
properties:
destinationID:
type: string
name:
type: string
updatedAt:
$ref: './common.yml#/updatedAt'
required:
- destinationID
- name
- updatedAt

DestinationType:
type: string
enum: ['search', 'insights', 'flow', 'predict']

DestinationIndexPrefix:
type: object
additionalProperties: false
properties:
indexPrefix:
type: string
required:
- indexPrefix

DestinationIndexName:
type: object
additionalProperties: false
properties:
indexName:
type: string
required:
- indexName

DestinationInput:
oneOf:
- $ref: '#/DestinationIndexPrefix'
- $ref: '#/DestinationIndexName'
Loading