Skip to content

Commit

Permalink
add mails stream
Browse files Browse the repository at this point in the history
  • Loading branch information
topefolorunso committed Oct 23, 2023
1 parent 7cab7c5 commit 996c19b
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "mails",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "organizations",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,41 @@ definitions:
$parameters:
path: "/currencies"

mails_stream:
$ref: "#/definitions/base_stream"
name: mails
primary_key: "id"
retriever:
$ref: "#/definitions/retriever"
partition_router:
- type: SubstreamPartitionRouter
parent_stream_configs:
- type: ParentStreamConfig
parent_key: id
partition_field: thread_id
stream:
$ref: "#/definitions/base_stream"
name: mailthreads
primary_key: "id"
retriever:
$ref: "#/definitions/retriever"
partition_router:
- type: ListPartitionRouter
values:
- inbox
- drafts
- sent
- archive
cursor_field: folder
request_option:
inject_into: request_parameter
type: RequestOption
field_name: folder
$parameters:
path: "mailbox/mailThreads"
$parameters:
path: "mailbox/mailThreads/{{ stream_partition.thread_id }}/mailMessages"

organization_stream:
$ref: "#/definitions/base_stream"
name: "organizations"
Expand Down Expand Up @@ -330,6 +365,7 @@ streams:
- "#/definitions/activity_types_stream"
- "#/definitions/activity_fields_stream"
- "#/definitions/currencies_stream"
- "#/definitions/mails_stream"
- "#/definitions/organization_stream"
- "#/definitions/organization_fields_stream"
- "#/definitions/permission_sets_stream"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": {"type": ["null", "integer"]},
"from": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"id": {"type": ["null", "integer"]},
"email_address": {"type": ["null", "string"]},
"name": {"type": ["null", "string"]},
"linked_person_id": {"type": ["null", "integer"]},
"linked_person_name": {"type": ["null", "string"]},
"mail_message_party_id": {"type": ["null", "integer"]}
}
}
},
"to": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"id": {"type": ["null", "integer"]},
"email_address": {"type": ["null", "string"]},
"name": {"type": ["null", "string"]},
"linked_person_id": {"type": ["null", "integer"]},
"linked_person_name": {"type": ["null", "string"]},
"mail_message_party_id": {"type": ["null", "integer"]}
}
}
},
"body_url": {"type": ["null", "string"]},
"account_id": {"type": ["null", "string"]},
"user_id": {"type": ["null", "integer"]},
"mail_thread_id": {"type": ["null", "integer"]},
"subject": {"type": ["null", "string"]},
"snippet": {"type": ["null", "string"]},
"mail_link_tracking_enabled_flag": {"type": ["null", "integer"]},
"read_flag": {"type": ["null", "integer"]},
"draft_flag": {"type": ["null", "integer"]},
"synced_flag": {"type": ["null", "integer"]},
"deleted_flag": {"type": ["null", "integer"]},
"has_body_flag": {"type": ["null", "integer"]},
"sent_flag": {"type": ["null", "integer"]},
"sent_from_pipedrive_flag": {"type": ["null", "integer"]},
"smart_bcc_flag": {"type": ["null", "integer"]},
"message_time": {"type": ["null", "string"], "format": "date-time"},
"add_time": {"type": ["null", "string"], "format": "date-time"},
"update_time": {"type": ["null", "string"], "format": "date-time"},
"has_attachments_flag": {"type": ["null", "integer"]},
"has_inline_attachments_flag": {"type": ["null", "integer"]},
"has_real_attachments_flag": {"type": ["null", "integer"]}
}
}

0 comments on commit 996c19b

Please sign in to comment.