Skip to content

Commit

Permalink
feat: Implement the subusers stream
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jul 10, 2024
1 parent 4ab7815 commit 82cc4c2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tap_jotform/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,32 @@ def post_process(self, row: dict, context: dict | None = None) -> dict:
}
row["forms"] = forms
return row


class SubusersStream(JotformStream):
"""Subusers stream."""

name = "subusers"
path = "/user/subusers"
primary_keys = ("username",)

selected_by_default = False

schema = th.PropertiesList(
th.Property("owner", th.StringType),
th.Property("status", th.StringType),
th.Property("email", th.EmailType),
th.Property("username", th.StringType),
CREATED_AT,
th.Property(
"permissions",
th.ArrayType(
th.ObjectType(
th.Property("type", th.StringType),
th.Property("resource_id", th.StringType),
th.Property("access_type", th.StringType),
th.Property("title", th.StringType),
),
),
),
).to_dict()
1 change: 1 addition & 0 deletions tap_jotform/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@ def discover_streams(self) -> list[Stream]:
streams.ReportsStream(self),
streams.UserHistory(self),
streams.FoldersStream(self),
streams.SubusersStream(self),
]

0 comments on commit 82cc4c2

Please sign in to comment.