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,34 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from typing import cast
|
|
7
|
+
|
|
8
|
+
from .._models import construct_type
|
|
9
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ..types.events_webhook_event import EventsWebhookEvent
|
|
11
|
+
|
|
12
|
+
__all__ = ["WebhooksResource", "AsyncWebhooksResource"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class WebhooksResource(SyncAPIResource):
|
|
16
|
+
def events(self, payload: str) -> EventsWebhookEvent:
|
|
17
|
+
return cast(
|
|
18
|
+
EventsWebhookEvent,
|
|
19
|
+
construct_type(
|
|
20
|
+
type_=EventsWebhookEvent,
|
|
21
|
+
value=json.loads(payload),
|
|
22
|
+
),
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class AsyncWebhooksResource(AsyncAPIResource):
|
|
27
|
+
def events(self, payload: str) -> EventsWebhookEvent:
|
|
28
|
+
return cast(
|
|
29
|
+
EventsWebhookEvent,
|
|
30
|
+
construct_type(
|
|
31
|
+
type_=EventsWebhookEvent,
|
|
32
|
+
value=json.loads(payload),
|
|
33
|
+
),
|
|
34
|
+
)
|
linq/types/__init__.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .chat import Chat as Chat
|
|
6
|
+
from .shared import (
|
|
7
|
+
Reaction as Reaction,
|
|
8
|
+
ChatHandle as ChatHandle,
|
|
9
|
+
ServiceType as ServiceType,
|
|
10
|
+
ReactionType as ReactionType,
|
|
11
|
+
TextDecoration as TextDecoration,
|
|
12
|
+
TextPartResponse as TextPartResponse,
|
|
13
|
+
MediaPartResponse as MediaPartResponse,
|
|
14
|
+
)
|
|
15
|
+
from .message import Message as Message
|
|
16
|
+
from .reply_to import ReplyTo as ReplyTo
|
|
17
|
+
from .message_effect import MessageEffect as MessageEffect
|
|
18
|
+
from .reply_to_param import ReplyToParam as ReplyToParam
|
|
19
|
+
from .link_part_param import LinkPartParam as LinkPartParam
|
|
20
|
+
from .text_part_param import TextPartParam as TextPartParam
|
|
21
|
+
from .media_part_param import MediaPartParam as MediaPartParam
|
|
22
|
+
from .message_event_v2 import MessageEventV2 as MessageEventV2
|
|
23
|
+
from .set_contact_card import SetContactCard as SetContactCard
|
|
24
|
+
from .chat_create_params import ChatCreateParams as ChatCreateParams
|
|
25
|
+
from .chat_update_params import ChatUpdateParams as ChatUpdateParams
|
|
26
|
+
from .webhook_event_type import WebhookEventType as WebhookEventType
|
|
27
|
+
from .reaction_event_base import ReactionEventBase as ReactionEventBase
|
|
28
|
+
from .chat_create_response import ChatCreateResponse as ChatCreateResponse
|
|
29
|
+
from .chat_update_response import ChatUpdateResponse as ChatUpdateResponse
|
|
30
|
+
from .events_webhook_event import EventsWebhookEvent as EventsWebhookEvent
|
|
31
|
+
from .message_effect_param import MessageEffectParam as MessageEffectParam
|
|
32
|
+
from .webhook_subscription import WebhookSubscription as WebhookSubscription
|
|
33
|
+
from .handle_check_response import HandleCheckResponse as HandleCheckResponse
|
|
34
|
+
from .message_content_param import MessageContentParam as MessageContentParam
|
|
35
|
+
from .message_update_params import MessageUpdateParams as MessageUpdateParams
|
|
36
|
+
from .chat_list_chats_params import ChatListChatsParams as ChatListChatsParams
|
|
37
|
+
from .schemas_message_effect import SchemasMessageEffect as SchemasMessageEffect
|
|
38
|
+
from .supported_content_type import SupportedContentType as SupportedContentType
|
|
39
|
+
from .attachment_create_params import AttachmentCreateParams as AttachmentCreateParams
|
|
40
|
+
from .chat_leave_chat_response import ChatLeaveChatResponse as ChatLeaveChatResponse
|
|
41
|
+
from .phonenumber_list_response import PhonenumberListResponse as PhonenumberListResponse
|
|
42
|
+
from .attachment_create_response import AttachmentCreateResponse as AttachmentCreateResponse
|
|
43
|
+
from .chat_created_webhook_event import ChatCreatedWebhookEvent as ChatCreatedWebhookEvent
|
|
44
|
+
from .chat_send_voicememo_params import ChatSendVoicememoParams as ChatSendVoicememoParams
|
|
45
|
+
from .contact_card_create_params import ContactCardCreateParams as ContactCardCreateParams
|
|
46
|
+
from .contact_card_update_params import ContactCardUpdateParams as ContactCardUpdateParams
|
|
47
|
+
from .message_read_webhook_event import MessageReadWebhookEvent as MessageReadWebhookEvent
|
|
48
|
+
from .message_sent_webhook_event import MessageSentWebhookEvent as MessageSentWebhookEvent
|
|
49
|
+
from .phone_number_list_response import PhoneNumberListResponse as PhoneNumberListResponse
|
|
50
|
+
from .schemas_text_part_response import SchemasTextPartResponse as SchemasTextPartResponse
|
|
51
|
+
from .capability_check_RCS_params import CapabilityCheckRCSParams as CapabilityCheckRCSParams
|
|
52
|
+
from .message_add_reaction_params import MessageAddReactionParams as MessageAddReactionParams
|
|
53
|
+
from .schemas_media_part_response import SchemasMediaPartResponse as SchemasMediaPartResponse
|
|
54
|
+
from .webhook_event_list_response import WebhookEventListResponse as WebhookEventListResponse
|
|
55
|
+
from .attachment_retrieve_response import AttachmentRetrieveResponse as AttachmentRetrieveResponse
|
|
56
|
+
from .chat_send_voicememo_response import ChatSendVoicememoResponse as ChatSendVoicememoResponse
|
|
57
|
+
from .contact_card_retrieve_params import ContactCardRetrieveParams as ContactCardRetrieveParams
|
|
58
|
+
from .message_edited_webhook_event import MessageEditedWebhookEvent as MessageEditedWebhookEvent
|
|
59
|
+
from .message_failed_webhook_event import MessageFailedWebhookEvent as MessageFailedWebhookEvent
|
|
60
|
+
from .reaction_added_webhook_event import ReactionAddedWebhookEvent as ReactionAddedWebhookEvent
|
|
61
|
+
from .message_add_reaction_response import MessageAddReactionResponse as MessageAddReactionResponse
|
|
62
|
+
from .contact_card_retrieve_response import ContactCardRetrieveResponse as ContactCardRetrieveResponse
|
|
63
|
+
from .message_received_webhook_event import MessageReceivedWebhookEvent as MessageReceivedWebhookEvent
|
|
64
|
+
from .reaction_removed_webhook_event import ReactionRemovedWebhookEvent as ReactionRemovedWebhookEvent
|
|
65
|
+
from .message_delivered_webhook_event import MessageDeliveredWebhookEvent as MessageDeliveredWebhookEvent
|
|
66
|
+
from .participant_added_webhook_event import ParticipantAddedWebhookEvent as ParticipantAddedWebhookEvent
|
|
67
|
+
from .capability_check_i_message_params import CapabilityCheckiMessageParams as CapabilityCheckiMessageParams
|
|
68
|
+
from .participant_removed_webhook_event import ParticipantRemovedWebhookEvent as ParticipantRemovedWebhookEvent
|
|
69
|
+
from .webhook_subscription_create_params import WebhookSubscriptionCreateParams as WebhookSubscriptionCreateParams
|
|
70
|
+
from .webhook_subscription_list_response import WebhookSubscriptionListResponse as WebhookSubscriptionListResponse
|
|
71
|
+
from .webhook_subscription_update_params import WebhookSubscriptionUpdateParams as WebhookSubscriptionUpdateParams
|
|
72
|
+
from .message_list_messages_thread_params import MessageListMessagesThreadParams as MessageListMessagesThreadParams
|
|
73
|
+
from .webhook_subscription_create_response import WebhookSubscriptionCreateResponse as WebhookSubscriptionCreateResponse
|
|
74
|
+
from .chat_group_icon_updated_webhook_event import ChatGroupIconUpdatedWebhookEvent as ChatGroupIconUpdatedWebhookEvent
|
|
75
|
+
from .chat_group_name_updated_webhook_event import ChatGroupNameUpdatedWebhookEvent as ChatGroupNameUpdatedWebhookEvent
|
|
76
|
+
from .phone_number_status_updated_webhook_event import (
|
|
77
|
+
PhoneNumberStatusUpdatedWebhookEvent as PhoneNumberStatusUpdatedWebhookEvent,
|
|
78
|
+
)
|
|
79
|
+
from .chat_group_icon_update_failed_webhook_event import (
|
|
80
|
+
ChatGroupIconUpdateFailedWebhookEvent as ChatGroupIconUpdateFailedWebhookEvent,
|
|
81
|
+
)
|
|
82
|
+
from .chat_group_name_update_failed_webhook_event import (
|
|
83
|
+
ChatGroupNameUpdateFailedWebhookEvent as ChatGroupNameUpdateFailedWebhookEvent,
|
|
84
|
+
)
|
|
85
|
+
from .chat_typing_indicator_started_webhook_event import (
|
|
86
|
+
ChatTypingIndicatorStartedWebhookEvent as ChatTypingIndicatorStartedWebhookEvent,
|
|
87
|
+
)
|
|
88
|
+
from .chat_typing_indicator_stopped_webhook_event import (
|
|
89
|
+
ChatTypingIndicatorStoppedWebhookEvent as ChatTypingIndicatorStoppedWebhookEvent,
|
|
90
|
+
)
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
from .supported_content_type import SupportedContentType
|
|
8
|
+
|
|
9
|
+
__all__ = ["AttachmentCreateParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AttachmentCreateParams(TypedDict, total=False):
|
|
13
|
+
content_type: Required[SupportedContentType]
|
|
14
|
+
"""Supported MIME types for file attachments and media URLs.
|
|
15
|
+
|
|
16
|
+
**Images:** image/jpeg, image/png, image/gif, image/heic, image/heif,
|
|
17
|
+
image/tiff, image/bmp
|
|
18
|
+
|
|
19
|
+
**Videos:** video/mp4, video/quicktime, video/mpeg, video/3gpp
|
|
20
|
+
|
|
21
|
+
**Audio:** audio/mpeg, audio/mp4, audio/x-m4a, audio/x-caf, audio/wav,
|
|
22
|
+
audio/aiff, audio/aac, audio/amr
|
|
23
|
+
|
|
24
|
+
**Documents:** application/pdf, text/plain, text/markdown, text/vcard, text/rtf,
|
|
25
|
+
text/csv, text/html, text/calendar, application/msword,
|
|
26
|
+
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
|
27
|
+
application/vnd.ms-excel,
|
|
28
|
+
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
|
29
|
+
application/vnd.ms-powerpoint,
|
|
30
|
+
application/vnd.openxmlformats-officedocument.presentationml.presentation,
|
|
31
|
+
application/vnd.apple.pages, application/vnd.apple.numbers,
|
|
32
|
+
application/vnd.apple.keynote, application/epub+zip, application/zip
|
|
33
|
+
|
|
34
|
+
**Unsupported:** WebP, SVG, FLAC, OGG, and executable files are explicitly
|
|
35
|
+
rejected.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
filename: Required[str]
|
|
39
|
+
"""Name of the file to upload"""
|
|
40
|
+
|
|
41
|
+
size_bytes: Required[int]
|
|
42
|
+
"""Size of the file in bytes (max 100MB)"""
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["AttachmentCreateResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AttachmentCreateResponse(BaseModel):
|
|
13
|
+
attachment_id: str
|
|
14
|
+
"""
|
|
15
|
+
Unique identifier for the attachment (for status checks via GET
|
|
16
|
+
/v3/attachments/{id})
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
download_url: str
|
|
20
|
+
"""Permanent CDN URL for the file.
|
|
21
|
+
|
|
22
|
+
Does not expire. Use the `attachment_id` to reference this file in media parts
|
|
23
|
+
when sending messages.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
expires_at: datetime
|
|
27
|
+
"""When the upload URL expires (15 minutes from now)"""
|
|
28
|
+
|
|
29
|
+
http_method: Literal["PUT"]
|
|
30
|
+
"""HTTP method to use for upload (always PUT)"""
|
|
31
|
+
|
|
32
|
+
required_headers: Dict[str, str]
|
|
33
|
+
"""HTTP headers that must be set on the upload request.
|
|
34
|
+
|
|
35
|
+
The presigned URL is signed with these exact values — S3 will reject the upload
|
|
36
|
+
if they don't match.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
upload_url: str
|
|
40
|
+
"""Presigned URL for uploading the file.
|
|
41
|
+
|
|
42
|
+
PUT the raw binary file content to this URL with the `required_headers`. Do not
|
|
43
|
+
JSON-encode or multipart-wrap the body. Expires after 15 minutes.
|
|
44
|
+
"""
|
|
@@ -0,0 +1,55 @@
|
|
|
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 .supported_content_type import SupportedContentType
|
|
9
|
+
|
|
10
|
+
__all__ = ["AttachmentRetrieveResponse"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AttachmentRetrieveResponse(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""Unique identifier for the attachment (UUID)"""
|
|
16
|
+
|
|
17
|
+
content_type: SupportedContentType
|
|
18
|
+
"""Supported MIME types for file attachments and media URLs.
|
|
19
|
+
|
|
20
|
+
**Images:** image/jpeg, image/png, image/gif, image/heic, image/heif,
|
|
21
|
+
image/tiff, image/bmp
|
|
22
|
+
|
|
23
|
+
**Videos:** video/mp4, video/quicktime, video/mpeg, video/3gpp
|
|
24
|
+
|
|
25
|
+
**Audio:** audio/mpeg, audio/mp4, audio/x-m4a, audio/x-caf, audio/wav,
|
|
26
|
+
audio/aiff, audio/aac, audio/amr
|
|
27
|
+
|
|
28
|
+
**Documents:** application/pdf, text/plain, text/markdown, text/vcard, text/rtf,
|
|
29
|
+
text/csv, text/html, text/calendar, application/msword,
|
|
30
|
+
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
|
31
|
+
application/vnd.ms-excel,
|
|
32
|
+
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
|
33
|
+
application/vnd.ms-powerpoint,
|
|
34
|
+
application/vnd.openxmlformats-officedocument.presentationml.presentation,
|
|
35
|
+
application/vnd.apple.pages, application/vnd.apple.numbers,
|
|
36
|
+
application/vnd.apple.keynote, application/epub+zip, application/zip
|
|
37
|
+
|
|
38
|
+
**Unsupported:** WebP, SVG, FLAC, OGG, and executable files are explicitly
|
|
39
|
+
rejected.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
created_at: datetime
|
|
43
|
+
"""When the attachment was created"""
|
|
44
|
+
|
|
45
|
+
filename: str
|
|
46
|
+
"""Original filename of the attachment"""
|
|
47
|
+
|
|
48
|
+
size_bytes: int
|
|
49
|
+
"""Size of the attachment in bytes"""
|
|
50
|
+
|
|
51
|
+
status: Literal["pending", "complete", "failed"]
|
|
52
|
+
"""Current upload/processing status"""
|
|
53
|
+
|
|
54
|
+
download_url: Optional[str] = None
|
|
55
|
+
"""URL to download the attachment"""
|
|
@@ -0,0 +1,20 @@
|
|
|
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, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["CapabilityCheckRCSParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CapabilityCheckRCSParams(TypedDict, total=False):
|
|
13
|
+
address: Required[str]
|
|
14
|
+
"""The recipient phone number or email address to check"""
|
|
15
|
+
|
|
16
|
+
from_: Annotated[str, PropertyInfo(alias="from")]
|
|
17
|
+
"""Optional sender phone number.
|
|
18
|
+
|
|
19
|
+
If omitted, an available phone from your pool is used automatically.
|
|
20
|
+
"""
|
|
@@ -0,0 +1,20 @@
|
|
|
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, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["CapabilityCheckiMessageParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CapabilityCheckiMessageParams(TypedDict, total=False):
|
|
13
|
+
address: Required[str]
|
|
14
|
+
"""The recipient phone number or email address to check"""
|
|
15
|
+
|
|
16
|
+
from_: Annotated[str, PropertyInfo(alias="from")]
|
|
17
|
+
"""Optional sender phone number.
|
|
18
|
+
|
|
19
|
+
If omitted, an available phone from your pool is used automatically.
|
|
20
|
+
"""
|
linq/types/chat.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.chat_handle import ChatHandle
|
|
8
|
+
from .shared.service_type import ServiceType
|
|
9
|
+
|
|
10
|
+
__all__ = ["Chat"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Chat(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""Unique identifier for the chat"""
|
|
16
|
+
|
|
17
|
+
created_at: datetime
|
|
18
|
+
"""When the chat was created"""
|
|
19
|
+
|
|
20
|
+
display_name: Optional[str] = None
|
|
21
|
+
"""Display name for the chat.
|
|
22
|
+
|
|
23
|
+
Defaults to a comma-separated list of recipient handles. Can be updated for
|
|
24
|
+
group chats.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
handles: List[ChatHandle]
|
|
28
|
+
"""List of chat participants with full handle details.
|
|
29
|
+
|
|
30
|
+
Always contains at least two handles (your phone number and the other
|
|
31
|
+
participant).
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
is_archived: bool
|
|
35
|
+
"""Whether the chat is archived"""
|
|
36
|
+
|
|
37
|
+
is_group: bool
|
|
38
|
+
"""Whether this is a group chat"""
|
|
39
|
+
|
|
40
|
+
updated_at: datetime
|
|
41
|
+
"""When the chat was last updated"""
|
|
42
|
+
|
|
43
|
+
service: Optional[ServiceType] = None
|
|
44
|
+
"""Messaging service type"""
|
|
@@ -0,0 +1,33 @@
|
|
|
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, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
from .message_content_param import MessageContentParam
|
|
10
|
+
|
|
11
|
+
__all__ = ["ChatCreateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ChatCreateParams(TypedDict, total=False):
|
|
15
|
+
from_: Required[Annotated[str, PropertyInfo(alias="from")]]
|
|
16
|
+
"""Sender phone number in E.164 format.
|
|
17
|
+
|
|
18
|
+
Must be a phone number that the authenticated partner has permission to send
|
|
19
|
+
from.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
message: Required[MessageContentParam]
|
|
23
|
+
"""Message content container.
|
|
24
|
+
|
|
25
|
+
Groups all message-related fields together, separating the "what" (message
|
|
26
|
+
content) from the "where" (routing fields like from/to).
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
to: Required[SequenceNotStr[str]]
|
|
30
|
+
"""
|
|
31
|
+
Array of recipient handles (phone numbers in E.164 format or email addresses).
|
|
32
|
+
For individual chats, provide one recipient. For group chats, provide multiple.
|
|
33
|
+
"""
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
from .chats.sent_message import SentMessage
|
|
7
|
+
from .shared.chat_handle import ChatHandle
|
|
8
|
+
from .shared.service_type import ServiceType
|
|
9
|
+
|
|
10
|
+
__all__ = ["ChatCreateResponse", "Chat"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Chat(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""Unique identifier for the created chat (UUID)"""
|
|
16
|
+
|
|
17
|
+
display_name: Optional[str] = None
|
|
18
|
+
"""Display name for the chat.
|
|
19
|
+
|
|
20
|
+
Defaults to a comma-separated list of recipient handles. Can be updated for
|
|
21
|
+
group chats.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
handles: List[ChatHandle]
|
|
25
|
+
"""List of participants in the chat.
|
|
26
|
+
|
|
27
|
+
Always contains at least two handles (your phone number and the other
|
|
28
|
+
participant).
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
is_group: bool
|
|
32
|
+
"""Whether this is a group chat"""
|
|
33
|
+
|
|
34
|
+
message: SentMessage
|
|
35
|
+
"""A message that was sent (used in CreateChat and SendMessage responses)"""
|
|
36
|
+
|
|
37
|
+
service: ServiceType
|
|
38
|
+
"""Messaging service type"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class ChatCreateResponse(BaseModel):
|
|
42
|
+
"""Response for creating a new chat with an initial message"""
|
|
43
|
+
|
|
44
|
+
chat: Chat
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.chat_handle import ChatHandle
|
|
8
|
+
from .webhook_event_type import WebhookEventType
|
|
9
|
+
from .shared.service_type import ServiceType
|
|
10
|
+
|
|
11
|
+
__all__ = ["ChatCreatedWebhookEvent", "Data"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Data(BaseModel):
|
|
15
|
+
"""Payload for chat.created webhook events.
|
|
16
|
+
|
|
17
|
+
Matches GET /v3/chats/{chatId} response.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
id: str
|
|
21
|
+
"""Unique identifier for the chat"""
|
|
22
|
+
|
|
23
|
+
created_at: datetime
|
|
24
|
+
"""When the chat was created"""
|
|
25
|
+
|
|
26
|
+
display_name: Optional[str] = None
|
|
27
|
+
"""Display name for the chat.
|
|
28
|
+
|
|
29
|
+
Defaults to a comma-separated list of recipient handles. Can be updated for
|
|
30
|
+
group chats.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
handles: List[ChatHandle]
|
|
34
|
+
"""List of chat participants with full handle details.
|
|
35
|
+
|
|
36
|
+
Always contains at least two handles (your phone number and the other
|
|
37
|
+
participant).
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
is_group: bool
|
|
41
|
+
"""Whether this is a group chat"""
|
|
42
|
+
|
|
43
|
+
updated_at: datetime
|
|
44
|
+
"""When the chat was last updated"""
|
|
45
|
+
|
|
46
|
+
service: Optional[ServiceType] = None
|
|
47
|
+
"""Messaging service type"""
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ChatCreatedWebhookEvent(BaseModel):
|
|
51
|
+
"""Complete webhook payload for chat.created events"""
|
|
52
|
+
|
|
53
|
+
api_version: str
|
|
54
|
+
"""API version for the webhook payload format"""
|
|
55
|
+
|
|
56
|
+
created_at: datetime
|
|
57
|
+
"""When the event was created"""
|
|
58
|
+
|
|
59
|
+
data: Data
|
|
60
|
+
"""Payload for chat.created webhook events.
|
|
61
|
+
|
|
62
|
+
Matches GET /v3/chats/{chatId} response.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
event_id: str
|
|
66
|
+
"""Unique identifier for this event (for deduplication)"""
|
|
67
|
+
|
|
68
|
+
event_type: WebhookEventType
|
|
69
|
+
"""Valid webhook event types that can be subscribed to.
|
|
70
|
+
|
|
71
|
+
**Note:** `message.edited` is only delivered to subscriptions using
|
|
72
|
+
`webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
|
|
73
|
+
subscription will not produce any deliveries.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
partner_id: str
|
|
77
|
+
"""Partner identifier. Present on all webhooks for cross-referencing."""
|
|
78
|
+
|
|
79
|
+
trace_id: str
|
|
80
|
+
"""Trace ID for debugging and correlation across systems."""
|
|
81
|
+
|
|
82
|
+
webhook_version: str
|
|
83
|
+
"""
|
|
84
|
+
Date-based webhook payload version. Determined by the `?version=` query
|
|
85
|
+
parameter in your webhook subscription URL. If no version parameter is
|
|
86
|
+
specified, defaults based on subscription creation date.
|
|
87
|
+
"""
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
|
|
8
|
+
__all__ = ["ChatGroupIconUpdateFailedWebhookEvent", "Data"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Data(BaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Error details for chat.group_icon_update_failed webhook events.
|
|
14
|
+
See [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error code reference.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
chat_id: str
|
|
18
|
+
"""Chat identifier (UUID) of the group chat"""
|
|
19
|
+
|
|
20
|
+
error_code: int
|
|
21
|
+
"""Error codes in webhook failure events (3007, 4001)."""
|
|
22
|
+
|
|
23
|
+
failed_at: datetime
|
|
24
|
+
"""When the failure was detected"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ChatGroupIconUpdateFailedWebhookEvent(BaseModel):
|
|
28
|
+
"""Complete webhook payload for chat.group_icon_update_failed events"""
|
|
29
|
+
|
|
30
|
+
api_version: str
|
|
31
|
+
"""API version for the webhook payload format"""
|
|
32
|
+
|
|
33
|
+
created_at: datetime
|
|
34
|
+
"""When the event was created"""
|
|
35
|
+
|
|
36
|
+
data: Data
|
|
37
|
+
"""
|
|
38
|
+
Error details for chat.group_icon_update_failed webhook events. See
|
|
39
|
+
[WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
|
|
40
|
+
code reference.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
event_id: str
|
|
44
|
+
"""Unique identifier for this event (for deduplication)"""
|
|
45
|
+
|
|
46
|
+
event_type: WebhookEventType
|
|
47
|
+
"""Valid webhook event types that can be subscribed to.
|
|
48
|
+
|
|
49
|
+
**Note:** `message.edited` is only delivered to subscriptions using
|
|
50
|
+
`webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
|
|
51
|
+
subscription will not produce any deliveries.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
partner_id: str
|
|
55
|
+
"""Partner identifier. Present on all webhooks for cross-referencing."""
|
|
56
|
+
|
|
57
|
+
trace_id: str
|
|
58
|
+
"""Trace ID for debugging and correlation across systems."""
|
|
59
|
+
|
|
60
|
+
webhook_version: str
|
|
61
|
+
"""
|
|
62
|
+
Date-based webhook payload version. Determined by the `?version=` query
|
|
63
|
+
parameter in your webhook subscription URL. If no version parameter is
|
|
64
|
+
specified, defaults based on subscription creation date.
|
|
65
|
+
"""
|
|
@@ -0,0 +1,66 @@
|
|
|
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 .._models import BaseModel
|
|
7
|
+
from .shared.chat_handle import ChatHandle
|
|
8
|
+
from .webhook_event_type import WebhookEventType
|
|
9
|
+
|
|
10
|
+
__all__ = ["ChatGroupIconUpdatedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(BaseModel):
|
|
14
|
+
"""Payload for chat.group_icon_updated webhook events"""
|
|
15
|
+
|
|
16
|
+
chat_id: str
|
|
17
|
+
"""Chat identifier (UUID) of the group chat"""
|
|
18
|
+
|
|
19
|
+
updated_at: datetime
|
|
20
|
+
"""When the update occurred"""
|
|
21
|
+
|
|
22
|
+
changed_by_handle: Optional[ChatHandle] = None
|
|
23
|
+
"""The handle who made the change."""
|
|
24
|
+
|
|
25
|
+
new_value: Optional[str] = None
|
|
26
|
+
"""New icon URL (null if the icon was removed)"""
|
|
27
|
+
|
|
28
|
+
old_value: Optional[str] = None
|
|
29
|
+
"""Previous icon URL (null if no previous icon)"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ChatGroupIconUpdatedWebhookEvent(BaseModel):
|
|
33
|
+
"""Complete webhook payload for chat.group_icon_updated events"""
|
|
34
|
+
|
|
35
|
+
api_version: str
|
|
36
|
+
"""API version for the webhook payload format"""
|
|
37
|
+
|
|
38
|
+
created_at: datetime
|
|
39
|
+
"""When the event was created"""
|
|
40
|
+
|
|
41
|
+
data: Data
|
|
42
|
+
"""Payload for chat.group_icon_updated webhook events"""
|
|
43
|
+
|
|
44
|
+
event_id: str
|
|
45
|
+
"""Unique identifier for this event (for deduplication)"""
|
|
46
|
+
|
|
47
|
+
event_type: WebhookEventType
|
|
48
|
+
"""Valid webhook event types that can be subscribed to.
|
|
49
|
+
|
|
50
|
+
**Note:** `message.edited` is only delivered to subscriptions using
|
|
51
|
+
`webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
|
|
52
|
+
subscription will not produce any deliveries.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
partner_id: str
|
|
56
|
+
"""Partner identifier. Present on all webhooks for cross-referencing."""
|
|
57
|
+
|
|
58
|
+
trace_id: str
|
|
59
|
+
"""Trace ID for debugging and correlation across systems."""
|
|
60
|
+
|
|
61
|
+
webhook_version: str
|
|
62
|
+
"""
|
|
63
|
+
Date-based webhook payload version. Determined by the `?version=` query
|
|
64
|
+
parameter in your webhook subscription URL. If no version parameter is
|
|
65
|
+
specified, defaults based on subscription creation date.
|
|
66
|
+
"""
|