Skip to content

Commit

Permalink
fix: Update schemas (#52)
Browse files Browse the repository at this point in the history
* fix: Update schemas

* Add schema to items in tags array

* Fix more fields
  • Loading branch information
edgarrmondragon committed Jan 23, 2024
1 parent a7a7cd3 commit e868baf
Showing 1 changed file with 42 additions and 15 deletions.
57 changes: 42 additions & 15 deletions tap_crowd_dev/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,32 +420,51 @@ class Organizations(CrowdDevQueryStream):

schema = th.PropertiesList(
th.Property("id", th.StringType),
th.Property("name", th.StringType),
th.Property("segmentId", th.StringType),
th.Property("tenantId", th.StringType),
th.Property("address", th.ObjectType()),
th.Property("attributes", th.StringType),
th.Property("createdAt", th.DateTimeType),
th.Property("description", th.StringType),
th.Property("displayName", th.StringType),
th.Property("emails", th.ArrayType(th.StringType)),
th.Property("tags", th.ArrayType(th.StringType)),
th.Property("employeeCountByCountry", th.ObjectType()),
th.Property("employees", th.IntegerType),
th.Property("founded", th.IntegerType),
th.Property("geoLocation", th.ObjectType()),
th.Property("location", th.ObjectType()),
th.Property("headline", th.StringType),
th.Property("industry", th.StringType),
th.Property("phoneNumbers", th.ObjectType()),
th.Property("profiles", th.ObjectType()),
th.Property("revenueRangeMin", th.NumberType),
th.Property("revenueRangeMax", th.NumberType),
th.Property("size", th.StringType),
th.Property("type", th.ObjectType()),
th.Property("website", th.StringType),
th.Property("lastEnrichedAt", th.DateTimeType),
th.Property("isTeamOrganization", th.BooleanType),
th.Property("manuallyCreated", th.BooleanType),
th.Property("logo", th.StringType),
th.Property("name", th.StringType),
th.Property("url", th.StringType),
th.Property("description", th.StringType),
th.Property("parentUrl", th.StringType),
th.Property("emails", th.ArrayType(th.StringType)),
th.Property("phoneNumbers", th.ArrayType(th.StringType)),
th.Property("logo", th.StringType),
th.Property("tags", th.ArrayType(TagType)),
th.Property("website", th.StringType),
th.Property("location", th.StringType),
th.Property("github", th.ObjectType(th.Property("handle", th.StringType))),
th.Property("twitter", th.ObjectType(th.Property("handle", th.StringType))),
th.Property("linkedin", th.ObjectType()),
th.Property("crunchbase", th.ObjectType()),
th.Property("employees", th.IntegerType),
th.Property("importHash", th.StringType),
th.Property("createdAt", th.DateTimeType),
th.Property("updatedAt", th.DateTimeType),
th.Property("deletedAt", th.StringType),
th.Property("tenantId", th.StringType),
th.Property("createdById", th.StringType),
th.Property("updatedById", th.StringType),
th.Property("isTeamOrganization", th.BooleanType),
th.Property("type", th.StringType),
th.Property("size", th.StringType),
th.Property(
"naics",
th.ArrayType(
Expand All @@ -459,11 +478,6 @@ class Organizations(CrowdDevQueryStream):
),
),
),
th.Property("lastEnrichedAt", th.DateTimeType),
th.Property("industry", th.StringType),
th.Property("headline", th.StringType),
th.Property("founded", th.IntegerType),
th.Property("empployeeCountByCountry", th.ObjectType()),
th.Property("activeOn", th.ArrayType(th.StringType)),
th.Property(
"identities",
Expand Down Expand Up @@ -520,14 +534,22 @@ class Tasks(CrowdDevQueryStream):

schema = th.PropertiesList(
th.Property("id", th.StringType),
th.Property("body", th.StringType),
th.Property("name", th.StringType),
th.Property("body", th.StringType),
th.Property("type", th.StringType),
th.Property("status", th.StringType),
th.Property("dueDate", th.DateTimeType),
th.Property("importHash", th.ObjectType()),
th.Property("createdAt", th.DateTimeType),
th.Property("updatedAt", th.DateTimeType),
th.Property("deletedAt", th.ObjectType()),
th.Property("tenantId", th.StringType),
th.Property("segmentId", th.StringType),
th.Property("createdById", th.StringType),
th.Property("updatedById", th.StringType),
th.Property("members", th.ArrayType(th.ObjectType())),
th.Property("activities", th.ArrayType(th.ObjectType())),
th.Property("assignedTo", th.ObjectType()),
th.Property("assignees", th.ArrayType(th.ObjectType())),
).to_dict()

def prepare_request_payload(
Expand Down Expand Up @@ -581,9 +603,14 @@ class Tags(CrowdDevGetStream):
schema = th.PropertiesList(
th.Property("id", th.StringType),
th.Property("name", th.StringType),
th.Property("importHash", th.ObjectType()),
th.Property("createdAt", th.DateTimeType),
th.Property("updatedAt", th.DateTimeType),
th.Property("deletedAt", th.ObjectType()),
th.Property("tenantId", th.StringType),
th.Property("createdById", th.StringType),
th.Property("updatedById", th.StringType),
th.Property("members", th.ArrayType(th.ObjectType())),
).to_dict()


Expand Down

0 comments on commit e868baf

Please sign in to comment.