linq-python 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- linq/__init__.py +102 -0
- linq/_base_client.py +2149 -0
- linq/_client.py +2479 -0
- linq/_compat.py +226 -0
- linq/_constants.py +14 -0
- linq/_exceptions.py +108 -0
- linq/_files.py +123 -0
- linq/_models.py +878 -0
- linq/_qs.py +153 -0
- linq/_resource.py +43 -0
- linq/_response.py +833 -0
- linq/_streaming.py +338 -0
- linq/_types.py +271 -0
- linq/_utils/__init__.py +65 -0
- linq/_utils/_compat.py +45 -0
- linq/_utils/_datetime_parse.py +136 -0
- linq/_utils/_json.py +35 -0
- linq/_utils/_logs.py +25 -0
- linq/_utils/_path.py +127 -0
- linq/_utils/_proxy.py +65 -0
- linq/_utils/_reflection.py +42 -0
- linq/_utils/_resources_proxy.py +24 -0
- linq/_utils/_streams.py +12 -0
- linq/_utils/_sync.py +58 -0
- linq/_utils/_transform.py +457 -0
- linq/_utils/_typing.py +156 -0
- linq/_utils/_utils.py +421 -0
- linq/_version.py +4 -0
- linq/lib/.keep +4 -0
- linq/pagination.py +95 -0
- linq/py.typed +0 -0
- linq/resources/__init__.py +134 -0
- linq/resources/attachments.py +589 -0
- linq/resources/capability.py +297 -0
- linq/resources/chats/__init__.py +61 -0
- linq/resources/chats/chats.py +1492 -0
- linq/resources/chats/messages.py +416 -0
- linq/resources/chats/participants.py +322 -0
- linq/resources/chats/typing.py +299 -0
- linq/resources/contact_card.py +472 -0
- linq/resources/messages.py +686 -0
- linq/resources/phone_numbers.py +163 -0
- linq/resources/phonenumbers.py +165 -0
- linq/resources/webhook_events.py +319 -0
- linq/resources/webhook_subscriptions.py +776 -0
- linq/resources/webhooks.py +34 -0
- linq/types/__init__.py +90 -0
- linq/types/attachment_create_params.py +42 -0
- linq/types/attachment_create_response.py +44 -0
- linq/types/attachment_retrieve_response.py +55 -0
- linq/types/capability_check_RCS_params.py +20 -0
- linq/types/capability_check_i_message_params.py +20 -0
- linq/types/chat.py +44 -0
- linq/types/chat_create_params.py +33 -0
- linq/types/chat_create_response.py +44 -0
- linq/types/chat_created_webhook_event.py +87 -0
- linq/types/chat_group_icon_update_failed_webhook_event.py +65 -0
- linq/types/chat_group_icon_updated_webhook_event.py +66 -0
- linq/types/chat_group_name_update_failed_webhook_event.py +65 -0
- linq/types/chat_group_name_updated_webhook_event.py +66 -0
- linq/types/chat_leave_chat_response.py +15 -0
- linq/types/chat_list_chats_params.py +36 -0
- linq/types/chat_send_voicememo_params.py +23 -0
- linq/types/chat_send_voicememo_response.py +79 -0
- linq/types/chat_typing_indicator_started_webhook_event.py +52 -0
- linq/types/chat_typing_indicator_stopped_webhook_event.py +52 -0
- linq/types/chat_update_params.py +15 -0
- linq/types/chat_update_response.py +13 -0
- linq/types/chats/__init__.py +12 -0
- linq/types/chats/message_list_params.py +15 -0
- linq/types/chats/message_send_params.py +18 -0
- linq/types/chats/message_send_response.py +16 -0
- linq/types/chats/participant_add_params.py +12 -0
- linq/types/chats/participant_add_response.py +15 -0
- linq/types/chats/participant_remove_params.py +12 -0
- linq/types/chats/participant_remove_response.py +15 -0
- linq/types/chats/sent_message.py +69 -0
- linq/types/contact_card_create_params.py +24 -0
- linq/types/contact_card_retrieve_params.py +15 -0
- linq/types/contact_card_retrieve_response.py +23 -0
- linq/types/contact_card_update_params.py +21 -0
- linq/types/events_webhook_event.py +50 -0
- linq/types/handle_check_response.py +13 -0
- linq/types/link_part_param.py +22 -0
- linq/types/media_part_param.py +54 -0
- linq/types/message.py +87 -0
- linq/types/message_add_reaction_params.py +32 -0
- linq/types/message_add_reaction_response.py +15 -0
- linq/types/message_content_param.py +82 -0
- linq/types/message_delivered_webhook_event.py +65 -0
- linq/types/message_edited_webhook_event.py +100 -0
- linq/types/message_effect.py +23 -0
- linq/types/message_effect_param.py +22 -0
- linq/types/message_event_v2.py +116 -0
- linq/types/message_failed_webhook_event.py +72 -0
- linq/types/message_list_messages_thread_params.py +18 -0
- linq/types/message_read_webhook_event.py +65 -0
- linq/types/message_received_webhook_event.py +65 -0
- linq/types/message_sent_webhook_event.py +65 -0
- linq/types/message_update_params.py +15 -0
- linq/types/participant_added_webhook_event.py +66 -0
- linq/types/participant_removed_webhook_event.py +66 -0
- linq/types/phone_number_list_response.py +20 -0
- linq/types/phone_number_status_updated_webhook_event.py +82 -0
- linq/types/phonenumber_list_response.py +39 -0
- linq/types/reaction_added_webhook_event.py +46 -0
- linq/types/reaction_event_base.py +85 -0
- linq/types/reaction_removed_webhook_event.py +46 -0
- linq/types/reply_to.py +21 -0
- linq/types/reply_to_param.py +21 -0
- linq/types/schemas_media_part_response.py +29 -0
- linq/types/schemas_message_effect.py +18 -0
- linq/types/schemas_text_part_response.py +22 -0
- linq/types/set_contact_card.py +24 -0
- linq/types/shared/__init__.py +9 -0
- linq/types/shared/chat_handle.py +33 -0
- linq/types/shared/media_part_response.py +34 -0
- linq/types/shared/reaction.py +56 -0
- linq/types/shared/reaction_type.py +7 -0
- linq/types/shared/service_type.py +7 -0
- linq/types/shared/text_decoration.py +23 -0
- linq/types/shared/text_part_response.py +26 -0
- linq/types/shared_params/__init__.py +5 -0
- linq/types/shared_params/reaction_type.py +9 -0
- linq/types/shared_params/service_type.py +9 -0
- linq/types/shared_params/text_decoration.py +23 -0
- linq/types/supported_content_type.py +60 -0
- linq/types/text_part_param.py +44 -0
- linq/types/webhook_event_list_response.py +17 -0
- linq/types/webhook_event_type.py +33 -0
- linq/types/webhook_subscription.py +35 -0
- linq/types/webhook_subscription_create_params.py +27 -0
- linq/types/webhook_subscription_create_response.py +46 -0
- linq/types/webhook_subscription_list_response.py +13 -0
- linq/types/webhook_subscription_update_params.py +30 -0
- linq_python-0.1.0.dist-info/METADATA +572 -0
- linq_python-0.1.0.dist-info/RECORD +139 -0
- linq_python-0.1.0.dist-info/WHEEL +4 -0
- linq_python-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["PhonenumberListResponse", "PhoneNumber", "PhoneNumberCapabilities"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PhoneNumberCapabilities(BaseModel):
|
|
11
|
+
mms: bool
|
|
12
|
+
"""Whether MMS messaging is supported"""
|
|
13
|
+
|
|
14
|
+
sms: bool
|
|
15
|
+
"""Whether SMS messaging is supported"""
|
|
16
|
+
|
|
17
|
+
voice: bool
|
|
18
|
+
"""Whether voice calls are supported"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class PhoneNumber(BaseModel):
|
|
22
|
+
id: str
|
|
23
|
+
"""Unique identifier for the phone number"""
|
|
24
|
+
|
|
25
|
+
phone_number: str
|
|
26
|
+
"""Phone number in E.164 format"""
|
|
27
|
+
|
|
28
|
+
capabilities: Optional[PhoneNumberCapabilities] = None
|
|
29
|
+
|
|
30
|
+
country_code: Optional[str] = None
|
|
31
|
+
"""Deprecated. Always null."""
|
|
32
|
+
|
|
33
|
+
type: Optional[str] = None
|
|
34
|
+
"""Deprecated. Always null."""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class PhonenumberListResponse(BaseModel):
|
|
38
|
+
phone_numbers: List[PhoneNumber]
|
|
39
|
+
"""List of phone numbers assigned to the partner"""
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .webhook_event_type import WebhookEventType
|
|
7
|
+
from .reaction_event_base import ReactionEventBase
|
|
8
|
+
|
|
9
|
+
__all__ = ["ReactionAddedWebhookEvent"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ReactionAddedWebhookEvent(BaseModel):
|
|
13
|
+
"""Complete webhook payload for reaction.added events"""
|
|
14
|
+
|
|
15
|
+
api_version: str
|
|
16
|
+
"""API version for the webhook payload format"""
|
|
17
|
+
|
|
18
|
+
created_at: datetime
|
|
19
|
+
"""When the event was created"""
|
|
20
|
+
|
|
21
|
+
data: ReactionEventBase
|
|
22
|
+
"""Payload for reaction.added webhook events"""
|
|
23
|
+
|
|
24
|
+
event_id: str
|
|
25
|
+
"""Unique identifier for this event (for deduplication)"""
|
|
26
|
+
|
|
27
|
+
event_type: WebhookEventType
|
|
28
|
+
"""Valid webhook event types that can be subscribed to.
|
|
29
|
+
|
|
30
|
+
**Note:** `message.edited` is only delivered to subscriptions using
|
|
31
|
+
`webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
|
|
32
|
+
subscription will not produce any deliveries.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
partner_id: str
|
|
36
|
+
"""Partner identifier. Present on all webhooks for cross-referencing."""
|
|
37
|
+
|
|
38
|
+
trace_id: str
|
|
39
|
+
"""Trace ID for debugging and correlation across systems."""
|
|
40
|
+
|
|
41
|
+
webhook_version: str
|
|
42
|
+
"""
|
|
43
|
+
Date-based webhook payload version. Determined by the `?version=` query
|
|
44
|
+
parameter in your webhook subscription URL. If no version parameter is
|
|
45
|
+
specified, defaults based on subscription creation date.
|
|
46
|
+
"""
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
from .shared.chat_handle import ChatHandle
|
|
10
|
+
from .shared.service_type import ServiceType
|
|
11
|
+
from .shared.reaction_type import ReactionType
|
|
12
|
+
|
|
13
|
+
__all__ = ["ReactionEventBase", "Sticker"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Sticker(BaseModel):
|
|
17
|
+
"""Sticker attachment details when reaction_type is "sticker".
|
|
18
|
+
|
|
19
|
+
Null for non-sticker reactions.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
file_name: Optional[str] = None
|
|
23
|
+
"""Filename of the sticker"""
|
|
24
|
+
|
|
25
|
+
height: Optional[int] = None
|
|
26
|
+
"""Sticker image height in pixels"""
|
|
27
|
+
|
|
28
|
+
mime_type: Optional[str] = None
|
|
29
|
+
"""MIME type of the sticker image"""
|
|
30
|
+
|
|
31
|
+
url: Optional[str] = None
|
|
32
|
+
"""Presigned URL for downloading the sticker image (expires in 1 hour)."""
|
|
33
|
+
|
|
34
|
+
width: Optional[int] = None
|
|
35
|
+
"""Sticker image width in pixels"""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ReactionEventBase(BaseModel):
|
|
39
|
+
is_from_me: bool
|
|
40
|
+
"""
|
|
41
|
+
Whether this reaction was from the owner of the phone number (true) or from
|
|
42
|
+
someone else (false)
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
reaction_type: ReactionType
|
|
46
|
+
"""Type of reaction.
|
|
47
|
+
|
|
48
|
+
Standard iMessage tapbacks are love, like, dislike, laugh, emphasize, question.
|
|
49
|
+
Custom emoji reactions have type "custom" with the actual emoji in the
|
|
50
|
+
custom_emoji field. Sticker reactions have type "sticker" with sticker
|
|
51
|
+
attachment details in the sticker field.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
chat_id: Optional[str] = None
|
|
55
|
+
"""Chat identifier (UUID)"""
|
|
56
|
+
|
|
57
|
+
custom_emoji: Optional[str] = None
|
|
58
|
+
"""The actual emoji when reaction_type is "custom". Null for standard tapbacks."""
|
|
59
|
+
|
|
60
|
+
from_: Optional[str] = FieldInfo(alias="from", default=None)
|
|
61
|
+
"""DEPRECATED: Use from_handle instead.
|
|
62
|
+
|
|
63
|
+
Phone number or email address of the person who added/removed the reaction.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
from_handle: Optional[ChatHandle] = None
|
|
67
|
+
"""The person who added/removed the reaction as a full handle object"""
|
|
68
|
+
|
|
69
|
+
message_id: Optional[str] = None
|
|
70
|
+
"""Message identifier (UUID) that the reaction was added to or removed from"""
|
|
71
|
+
|
|
72
|
+
part_index: Optional[int] = None
|
|
73
|
+
"""Index of the message part that was reacted to (0-based)"""
|
|
74
|
+
|
|
75
|
+
reacted_at: Optional[datetime] = None
|
|
76
|
+
"""When the reaction was added or removed"""
|
|
77
|
+
|
|
78
|
+
service: Optional[ServiceType] = None
|
|
79
|
+
"""Messaging service type"""
|
|
80
|
+
|
|
81
|
+
sticker: Optional[Sticker] = None
|
|
82
|
+
"""Sticker attachment details when reaction_type is "sticker".
|
|
83
|
+
|
|
84
|
+
Null for non-sticker reactions.
|
|
85
|
+
"""
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .webhook_event_type import WebhookEventType
|
|
7
|
+
from .reaction_event_base import ReactionEventBase
|
|
8
|
+
|
|
9
|
+
__all__ = ["ReactionRemovedWebhookEvent"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ReactionRemovedWebhookEvent(BaseModel):
|
|
13
|
+
"""Complete webhook payload for reaction.removed events"""
|
|
14
|
+
|
|
15
|
+
api_version: str
|
|
16
|
+
"""API version for the webhook payload format"""
|
|
17
|
+
|
|
18
|
+
created_at: datetime
|
|
19
|
+
"""When the event was created"""
|
|
20
|
+
|
|
21
|
+
data: ReactionEventBase
|
|
22
|
+
"""Payload for reaction.removed webhook events"""
|
|
23
|
+
|
|
24
|
+
event_id: str
|
|
25
|
+
"""Unique identifier for this event (for deduplication)"""
|
|
26
|
+
|
|
27
|
+
event_type: WebhookEventType
|
|
28
|
+
"""Valid webhook event types that can be subscribed to.
|
|
29
|
+
|
|
30
|
+
**Note:** `message.edited` is only delivered to subscriptions using
|
|
31
|
+
`webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
|
|
32
|
+
subscription will not produce any deliveries.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
partner_id: str
|
|
36
|
+
"""Partner identifier. Present on all webhooks for cross-referencing."""
|
|
37
|
+
|
|
38
|
+
trace_id: str
|
|
39
|
+
"""Trace ID for debugging and correlation across systems."""
|
|
40
|
+
|
|
41
|
+
webhook_version: str
|
|
42
|
+
"""
|
|
43
|
+
Date-based webhook payload version. Determined by the `?version=` query
|
|
44
|
+
parameter in your webhook subscription URL. If no version parameter is
|
|
45
|
+
specified, defaults based on subscription creation date.
|
|
46
|
+
"""
|
linq/types/reply_to.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ReplyTo"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReplyTo(BaseModel):
|
|
11
|
+
"""Indicates this message is a threaded reply to another message"""
|
|
12
|
+
|
|
13
|
+
message_id: str
|
|
14
|
+
"""The ID of the message to reply to"""
|
|
15
|
+
|
|
16
|
+
part_index: Optional[int] = None
|
|
17
|
+
"""
|
|
18
|
+
The specific message part to reply to (0-based index). Defaults to 0 (first
|
|
19
|
+
part) if not provided. Use this when replying to a specific part of a multipart
|
|
20
|
+
message.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ReplyToParam"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReplyToParam(TypedDict, total=False):
|
|
11
|
+
"""Indicates this message is a threaded reply to another message"""
|
|
12
|
+
|
|
13
|
+
message_id: Required[str]
|
|
14
|
+
"""The ID of the message to reply to"""
|
|
15
|
+
|
|
16
|
+
part_index: int
|
|
17
|
+
"""
|
|
18
|
+
The specific message part to reply to (0-based index). Defaults to 0 (first
|
|
19
|
+
part) if not provided. Use this when replying to a specific part of a multipart
|
|
20
|
+
message.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SchemasMediaPartResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SchemasMediaPartResponse(BaseModel):
|
|
11
|
+
"""A media attachment part"""
|
|
12
|
+
|
|
13
|
+
id: str
|
|
14
|
+
"""Unique attachment identifier"""
|
|
15
|
+
|
|
16
|
+
filename: str
|
|
17
|
+
"""Original filename"""
|
|
18
|
+
|
|
19
|
+
mime_type: str
|
|
20
|
+
"""MIME type of the file"""
|
|
21
|
+
|
|
22
|
+
size_bytes: int
|
|
23
|
+
"""File size in bytes"""
|
|
24
|
+
|
|
25
|
+
type: Literal["media"]
|
|
26
|
+
"""Indicates this is a media attachment part"""
|
|
27
|
+
|
|
28
|
+
url: str
|
|
29
|
+
"""Presigned URL for downloading the attachment (expires in 1 hour)."""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["SchemasMessageEffect"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SchemasMessageEffect(BaseModel):
|
|
12
|
+
"""iMessage effect applied to a message (screen or bubble animation)"""
|
|
13
|
+
|
|
14
|
+
name: Optional[str] = None
|
|
15
|
+
"""Effect name (confetti, fireworks, slam, gentle, etc.)"""
|
|
16
|
+
|
|
17
|
+
type: Optional[Literal["screen", "bubble"]] = None
|
|
18
|
+
"""Effect category"""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.text_decoration import TextDecoration
|
|
8
|
+
|
|
9
|
+
__all__ = ["SchemasTextPartResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SchemasTextPartResponse(BaseModel):
|
|
13
|
+
"""A text message part"""
|
|
14
|
+
|
|
15
|
+
type: Literal["text"]
|
|
16
|
+
"""Indicates this is a text message part"""
|
|
17
|
+
|
|
18
|
+
value: str
|
|
19
|
+
"""The text content"""
|
|
20
|
+
|
|
21
|
+
text_decorations: Optional[List[TextDecoration]] = None
|
|
22
|
+
"""Text decorations applied to character ranges in the value"""
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SetContactCard"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SetContactCard(BaseModel):
|
|
11
|
+
first_name: str
|
|
12
|
+
"""First name on the contact card"""
|
|
13
|
+
|
|
14
|
+
is_active: bool
|
|
15
|
+
"""Whether the contact card was successfully applied to the device"""
|
|
16
|
+
|
|
17
|
+
phone_number: str
|
|
18
|
+
"""The phone number the contact card is associated with"""
|
|
19
|
+
|
|
20
|
+
image_url: Optional[str] = None
|
|
21
|
+
"""Image URL on the contact card"""
|
|
22
|
+
|
|
23
|
+
last_name: Optional[str] = None
|
|
24
|
+
"""Last name on the contact card"""
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .reaction import Reaction as Reaction
|
|
4
|
+
from .chat_handle import ChatHandle as ChatHandle
|
|
5
|
+
from .service_type import ServiceType as ServiceType
|
|
6
|
+
from .reaction_type import ReactionType as ReactionType
|
|
7
|
+
from .text_decoration import TextDecoration as TextDecoration
|
|
8
|
+
from .text_part_response import TextPartResponse as TextPartResponse
|
|
9
|
+
from .media_part_response import MediaPartResponse as MediaPartResponse
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from .service_type import ServiceType
|
|
9
|
+
|
|
10
|
+
__all__ = ["ChatHandle"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ChatHandle(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""Unique identifier for this handle"""
|
|
16
|
+
|
|
17
|
+
handle: str
|
|
18
|
+
"""Phone number (E.164) or email address of the participant"""
|
|
19
|
+
|
|
20
|
+
joined_at: datetime
|
|
21
|
+
"""When this participant joined the chat"""
|
|
22
|
+
|
|
23
|
+
service: ServiceType
|
|
24
|
+
"""Messaging service type"""
|
|
25
|
+
|
|
26
|
+
is_me: Optional[bool] = None
|
|
27
|
+
"""Whether this handle belongs to the sender (your phone number)"""
|
|
28
|
+
|
|
29
|
+
left_at: Optional[datetime] = None
|
|
30
|
+
"""When they left (if applicable)"""
|
|
31
|
+
|
|
32
|
+
status: Optional[Literal["active", "left", "removed"]] = None
|
|
33
|
+
"""Participant status"""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .reaction import Reaction
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["MediaPartResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MediaPartResponse(BaseModel):
|
|
13
|
+
"""A media attachment part"""
|
|
14
|
+
|
|
15
|
+
id: str
|
|
16
|
+
"""Unique attachment identifier"""
|
|
17
|
+
|
|
18
|
+
filename: str
|
|
19
|
+
"""Original filename"""
|
|
20
|
+
|
|
21
|
+
mime_type: str
|
|
22
|
+
"""MIME type of the file"""
|
|
23
|
+
|
|
24
|
+
reactions: Optional[List[Reaction]] = None
|
|
25
|
+
"""Reactions on this message part"""
|
|
26
|
+
|
|
27
|
+
size_bytes: int
|
|
28
|
+
"""File size in bytes"""
|
|
29
|
+
|
|
30
|
+
type: Literal["media"]
|
|
31
|
+
"""Indicates this is a media attachment part"""
|
|
32
|
+
|
|
33
|
+
url: str
|
|
34
|
+
"""Presigned URL for downloading the attachment (expires in 1 hour)."""
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
from .chat_handle import ChatHandle
|
|
7
|
+
from .reaction_type import ReactionType
|
|
8
|
+
|
|
9
|
+
__all__ = ["Reaction", "Sticker"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Sticker(BaseModel):
|
|
13
|
+
"""Sticker attachment details when reaction_type is "sticker".
|
|
14
|
+
|
|
15
|
+
Null for non-sticker reactions.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
file_name: Optional[str] = None
|
|
19
|
+
"""Filename of the sticker"""
|
|
20
|
+
|
|
21
|
+
height: Optional[int] = None
|
|
22
|
+
"""Sticker image height in pixels"""
|
|
23
|
+
|
|
24
|
+
mime_type: Optional[str] = None
|
|
25
|
+
"""MIME type of the sticker image"""
|
|
26
|
+
|
|
27
|
+
url: Optional[str] = None
|
|
28
|
+
"""Presigned URL for downloading the sticker image (expires in 1 hour)."""
|
|
29
|
+
|
|
30
|
+
width: Optional[int] = None
|
|
31
|
+
"""Sticker image width in pixels"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class Reaction(BaseModel):
|
|
35
|
+
handle: ChatHandle
|
|
36
|
+
|
|
37
|
+
is_me: bool
|
|
38
|
+
"""Whether this reaction is from the current user"""
|
|
39
|
+
|
|
40
|
+
type: ReactionType
|
|
41
|
+
"""Type of reaction.
|
|
42
|
+
|
|
43
|
+
Standard iMessage tapbacks are love, like, dislike, laugh, emphasize, question.
|
|
44
|
+
Custom emoji reactions have type "custom" with the actual emoji in the
|
|
45
|
+
custom_emoji field. Sticker reactions have type "sticker" with sticker
|
|
46
|
+
attachment details in the sticker field.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
custom_emoji: Optional[str] = None
|
|
50
|
+
"""Custom emoji if type is "custom", null otherwise"""
|
|
51
|
+
|
|
52
|
+
sticker: Optional[Sticker] = None
|
|
53
|
+
"""Sticker attachment details when reaction_type is "sticker".
|
|
54
|
+
|
|
55
|
+
Null for non-sticker reactions.
|
|
56
|
+
"""
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal, TypeAlias
|
|
4
|
+
|
|
5
|
+
__all__ = ["ReactionType"]
|
|
6
|
+
|
|
7
|
+
ReactionType: TypeAlias = Literal["love", "like", "dislike", "laugh", "emphasize", "question", "custom", "sticker"]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["TextDecoration"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TextDecoration(BaseModel):
|
|
12
|
+
range: List[int]
|
|
13
|
+
"""
|
|
14
|
+
Character range `[start, end)` in the `value` string where the decoration
|
|
15
|
+
applies. `start` is inclusive, `end` is exclusive. _Characters are measured as
|
|
16
|
+
UTF-16 code units. Most characters count as 1; some emoji count as 2._
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
animation: Optional[Literal["big", "small", "shake", "nod", "explode", "ripple", "bloom", "jitter"]] = None
|
|
20
|
+
"""Animated text effect to apply. Mutually exclusive with `style`."""
|
|
21
|
+
|
|
22
|
+
style: Optional[Literal["bold", "italic", "strikethrough", "underline"]] = None
|
|
23
|
+
"""Text style to apply. Mutually exclusive with `animation`."""
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .reaction import Reaction
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from .text_decoration import TextDecoration
|
|
9
|
+
|
|
10
|
+
__all__ = ["TextPartResponse"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TextPartResponse(BaseModel):
|
|
14
|
+
"""A text message part"""
|
|
15
|
+
|
|
16
|
+
reactions: Optional[List[Reaction]] = None
|
|
17
|
+
"""Reactions on this message part"""
|
|
18
|
+
|
|
19
|
+
type: Literal["text"]
|
|
20
|
+
"""Indicates this is a text message part"""
|
|
21
|
+
|
|
22
|
+
value: str
|
|
23
|
+
"""The text content"""
|
|
24
|
+
|
|
25
|
+
text_decorations: Optional[List[TextDecoration]] = None
|
|
26
|
+
"""Text decorations applied to character ranges in the value"""
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["ReactionType"]
|
|
8
|
+
|
|
9
|
+
ReactionType: TypeAlias = Literal["love", "like", "dislike", "laugh", "emphasize", "question", "custom", "sticker"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["ServiceType"]
|
|
8
|
+
|
|
9
|
+
ServiceType: TypeAlias = Literal["iMessage", "SMS", "RCS"]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["TextDecoration"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TextDecoration(TypedDict, total=False):
|
|
12
|
+
range: Required[Iterable[int]]
|
|
13
|
+
"""
|
|
14
|
+
Character range `[start, end)` in the `value` string where the decoration
|
|
15
|
+
applies. `start` is inclusive, `end` is exclusive. _Characters are measured as
|
|
16
|
+
UTF-16 code units. Most characters count as 1; some emoji count as 2._
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
animation: Literal["big", "small", "shake", "nod", "explode", "ripple", "bloom", "jitter"]
|
|
20
|
+
"""Animated text effect to apply. Mutually exclusive with `style`."""
|
|
21
|
+
|
|
22
|
+
style: Literal["bold", "italic", "strikethrough", "underline"]
|
|
23
|
+
"""Text style to apply. Mutually exclusive with `animation`."""
|