Skip to content

Commit dad2da6

Browse files
chore: add missing docstrings
1 parent ab076a9 commit dad2da6

File tree

68 files changed

+314
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+314
-0
lines changed

src/knockapi/types/activity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313

1414
class Activity(BaseModel):
15+
"""An activity associated with a workflow trigger request.
16+
17+
Messages produced after a [batch step](/designing-workflows/batch-function) can be associated with one or more activities. Non-batched messages will always be associated with a single activity.
18+
"""
19+
1520
id: Optional[str] = None
1621
"""Unique identifier for the activity."""
1722

src/knockapi/types/audience_add_members_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ class AudienceAddMembersParams(TypedDict, total=False):
1414

1515

1616
class MemberUser(TypedDict, total=False):
17+
"""An object containing the user's ID."""
18+
1719
id: str
1820
"""The unique identifier of the user."""
1921

2022

2123
class Member(TypedDict, total=False):
24+
"""An audience member."""
25+
2226
user: Required[MemberUser]
2327
"""An object containing the user's ID."""
2428

src/knockapi/types/audience_list_members_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111

1212
class AudienceListMembersResponse(BaseModel):
13+
"""A paginated list of audience members."""
14+
1315
entries: List[AudienceMember]
1416
"""A list of audience members."""
1517

src/knockapi/types/audience_member.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313

1414
class AudienceMember(BaseModel):
15+
"""An audience member."""
16+
1517
api_typename: str = FieldInfo(alias="__typename")
1618
"""The typename of the schema."""
1719

src/knockapi/types/audience_remove_members_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ class AudienceRemoveMembersParams(TypedDict, total=False):
1414

1515

1616
class MemberUser(TypedDict, total=False):
17+
"""An object containing the user's ID."""
18+
1719
id: str
1820
"""The unique identifier of the user."""
1921

2022

2123
class Member(TypedDict, total=False):
24+
"""An audience member."""
25+
2226
user: Required[MemberUser]
2327
"""An object containing the user's ID."""
2428

src/knockapi/types/bulk_operation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class ErrorItem(BaseModel):
2020

2121

2222
class BulkOperation(BaseModel):
23+
"""A bulk operation entity."""
24+
2325
id: str
2426
"""Unique identifier for the bulk operation."""
2527

src/knockapi/types/inline_identify_user_request_param.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515

1616
class InlineIdentifyUserRequestParamTyped(TypedDict, total=False):
17+
"""A set of parameters to inline-identify a user with.
18+
19+
Inline identifying the user will ensure that the user is available before the request is executed in Knock. It will perform an upsert for the user you're supplying, replacing any properties specified.
20+
"""
21+
1722
id: Required[str]
1823
"""The unique identifier of the user."""
1924

src/knockapi/types/inline_object_request_param.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515

1616
class InlineObjectRequestParamTyped(TypedDict, total=False):
17+
"""A custom [Object](/concepts/objects) entity which belongs to a collection."""
18+
1719
id: Required[str]
1820
"""Unique identifier for the object."""
1921

src/knockapi/types/message.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414

1515
class Source(BaseModel):
16+
"""The workflow or guide that triggered the message."""
17+
1618
api_typename: str = FieldInfo(alias="__typename")
1719

1820
categories: List[str]
@@ -45,6 +47,8 @@ class Source(BaseModel):
4547

4648

4749
class Channel(BaseModel):
50+
"""A configured channel, which is a way to route messages to a provider."""
51+
4852
id: str
4953
"""The unique identifier for the channel."""
5054

@@ -68,6 +72,10 @@ class Channel(BaseModel):
6872

6973

7074
class Message(BaseModel):
75+
"""
76+
Represents a single message that was generated by a workflow for a given channel.
77+
"""
78+
7179
id: str
7280
"""The unique identifier for the message."""
7381

src/knockapi/types/message_delivery_log.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212

1313
class Request(BaseModel):
14+
"""A message delivery log request."""
15+
1416
body: Union[str, Dict[str, object], None] = None
1517
"""The body content that was sent with the request."""
1618

@@ -31,6 +33,8 @@ class Request(BaseModel):
3133

3234

3335
class Response(BaseModel):
36+
"""A message delivery log response."""
37+
3438
body: Union[str, Dict[str, object], None] = None
3539
"""The body content that was received with the response."""
3640

@@ -42,6 +46,10 @@ class Response(BaseModel):
4246

4347

4448
class MessageDeliveryLog(BaseModel):
49+
"""
50+
A message delivery log contains a `request` from Knock to a downstream provider and the `response` that was returned.
51+
"""
52+
4553
id: str
4654
"""The unique identifier for the message delivery log."""
4755

0 commit comments

Comments
 (0)