Skip to content

Commit 8a2d8e7

Browse files
committed
feat(connectors/clickup-api): add /user and /team endpoint configs
1 parent bcd48c9 commit 8a2d8e7

File tree

12 files changed

+103
-113
lines changed

12 files changed

+103
-113
lines changed

airbyte-integrations/connectors/source-clickup-api/acceptance-test-config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ tests:
2121
# extra_fields: no
2222
# exact_order: no
2323
# extra_records: yes
24-
incremental: # TODO if your connector does not implement incremental sync, remove this block
25-
- config_path: "secrets/config.json"
26-
configured_catalog_path: "integration_tests/configured_catalog.json"
27-
future_state_path: "integration_tests/abnormal_state.json"
24+
# incremental: # TODO if your connector does not implement incremental sync, remove this block
25+
# - config_path: "secrets/config.json"
26+
# configured_catalog_path: "integration_tests/configured_catalog.json"
27+
# future_state_path: "integration_tests/abnormal_state.json"
2828
full_refresh:
2929
- config_path: "secrets/config.json"
3030
configured_catalog_path: "integration_tests/configured_catalog.json"

airbyte-integrations/connectors/source-clickup-api/integration_tests/catalog.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

airbyte-integrations/connectors/source-clickup-api/integration_tests/configured_catalog.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"streams": [
33
{
44
"stream": {
5-
"name": "customers",
5+
"name": "user",
66
"json_schema": {},
77
"supported_sync_modes": ["full_refresh"]
88
},
@@ -11,12 +11,12 @@
1111
},
1212
{
1313
"stream": {
14-
"name": "employees",
14+
"name": "team",
1515
"json_schema": {},
16-
"supported_sync_modes": ["full_refresh", "incremental"]
16+
"supported_sync_modes": ["full_refresh"]
1717
},
18-
"sync_mode": "incremental",
19-
"destination_sync_mode": "append"
18+
"sync_mode": "full_refresh",
19+
"destination_sync_mode": "overwrite"
2020
}
2121
]
2222
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"todo-wrong-field": "this should be an incomplete config file, used in standard tests"
2+
"api_token": "this should be an incomplete config file, used in standard tests"
33
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"fix-me": "TODO"
3-
}
1+
{ "api_token": "abcdefgh" }

airbyte-integrations/connectors/source-clickup-api/source_clickup_api/clickup_api.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ definitions:
1414
name: "{{ options['name'] }}"
1515
http_method: "GET"
1616
authenticator:
17-
type: BearerAuthenticator
18-
api_token: "{{ config['api_key'] }}"
17+
type: ApiKeyAuthenticator
18+
header: "Authorization"
19+
api_token: "{{ config['api_token'] }}"
1920
retriever:
2021
type: SimpleRetriever
2122
$options:
22-
url_base: TODO "your_api_base_url"
23+
url_base: "https://api.clickup.com/api/v2"
2324
name: "{{ options['name'] }}"
2425
primary_key: "{{ options['primary_key'] }}"
2526
record_selector:
@@ -30,15 +31,24 @@ definitions:
3031
streams:
3132
- type: DeclarativeStream
3233
$options:
33-
name: "customers"
34-
primary_key: "id"
34+
name: "user"
3535
schema_loader:
3636
$ref: "*ref(definitions.schema_loader)"
3737
retriever:
3838
$ref: "*ref(definitions.retriever)"
3939
requester:
4040
$ref: "*ref(definitions.requester)"
41-
path: TODO "your_endpoint_path"
41+
path: "/user"
42+
- type: DeclarativeStream
43+
$options:
44+
name: "team"
45+
schema_loader:
46+
$ref: "*ref(definitions.schema_loader)"
47+
retriever:
48+
$ref: "*ref(definitions.retriever)"
49+
requester:
50+
$ref: "*ref(definitions.requester)"
51+
path: "/team"
4252
check:
4353
type: CheckStream
44-
stream_names: ["customers"]
54+
stream_names: ["user", "team"]

airbyte-integrations/connectors/source-clickup-api/source_clickup_api/schemas/TODO.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

airbyte-integrations/connectors/source-clickup-api/source_clickup_api/schemas/customers.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

airbyte-integrations/connectors/source-clickup-api/source_clickup_api/schemas/employees.json

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"properties": {
5+
"teams": {
6+
"type": "array",
7+
"items": {
8+
"type": "object",
9+
"properties": {
10+
"id": {
11+
"type": ["null", "string"]
12+
},
13+
"name": {
14+
"type": ["null", "string"]
15+
},
16+
"color": {
17+
"type": ["null", "string"]
18+
},
19+
"avatar": {
20+
"type": ["null", "string"]
21+
},
22+
"members": {
23+
"type": "array",
24+
"items": {
25+
"type": "object",
26+
"properties": {
27+
"id": {
28+
"type": ["null", "integer"]
29+
},
30+
"username": {
31+
"type": ["null", "string"]
32+
},
33+
"color": {
34+
"type": ["null", "string"]
35+
},
36+
"profilePicture": {
37+
"type": ["null", "string"]
38+
}
39+
}
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}
46+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"properties": {
5+
"user": {
6+
"type": "object",
7+
"properties": {
8+
"id": {
9+
"type": ["null", "integer"]
10+
},
11+
"username": {
12+
"type": ["null", "string"]
13+
},
14+
"color": {
15+
"type": ["null", "string"]
16+
},
17+
"profilePicture": {
18+
"type": ["null", "string"]
19+
}
20+
}
21+
}
22+
}
23+
}

airbyte-integrations/connectors/source-clickup-api/source_clickup_api/spec.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ connectionSpecification:
44
title: ClickUp Api Spec
55
type: object
66
required:
7-
- TODO
7+
- api_token
88
additionalProperties: true
99
properties:
1010
# 'TODO: This schema defines the configuration required for the source. This usually involves metadata such as database and/or authentication information.':
11-
TODO:
11+
api_token:
1212
type: string
13-
description: describe me
13+
description: >-
14+
Every ClickUp API call required authentication. This field is your personal API token. See <a
15+
href="https://clickup.com/api/developer-portal/authentication/#personal-token">here</a>.
16+
airbyte_secret: true

0 commit comments

Comments
 (0)