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,60 @@
|
|
|
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__ = ["SupportedContentType"]
|
|
6
|
+
|
|
7
|
+
SupportedContentType: TypeAlias = Literal[
|
|
8
|
+
"image/jpeg",
|
|
9
|
+
"image/jpg",
|
|
10
|
+
"image/png",
|
|
11
|
+
"image/gif",
|
|
12
|
+
"image/heic",
|
|
13
|
+
"image/heif",
|
|
14
|
+
"image/tiff",
|
|
15
|
+
"image/bmp",
|
|
16
|
+
"image/x-ms-bmp",
|
|
17
|
+
"video/mp4",
|
|
18
|
+
"video/quicktime",
|
|
19
|
+
"video/mpeg",
|
|
20
|
+
"video/x-m4v",
|
|
21
|
+
"video/3gpp",
|
|
22
|
+
"audio/mpeg",
|
|
23
|
+
"audio/mp3",
|
|
24
|
+
"audio/mp4",
|
|
25
|
+
"audio/x-m4a",
|
|
26
|
+
"audio/m4a",
|
|
27
|
+
"audio/x-caf",
|
|
28
|
+
"audio/wav",
|
|
29
|
+
"audio/x-wav",
|
|
30
|
+
"audio/aiff",
|
|
31
|
+
"audio/x-aiff",
|
|
32
|
+
"audio/aac",
|
|
33
|
+
"audio/x-aac",
|
|
34
|
+
"audio/amr",
|
|
35
|
+
"application/pdf",
|
|
36
|
+
"text/plain",
|
|
37
|
+
"text/markdown",
|
|
38
|
+
"text/vcard",
|
|
39
|
+
"text/x-vcard",
|
|
40
|
+
"text/rtf",
|
|
41
|
+
"application/rtf",
|
|
42
|
+
"text/csv",
|
|
43
|
+
"text/html",
|
|
44
|
+
"text/calendar",
|
|
45
|
+
"application/msword",
|
|
46
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
47
|
+
"application/vnd.ms-excel",
|
|
48
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
49
|
+
"application/vnd.ms-powerpoint",
|
|
50
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
51
|
+
"application/vnd.apple.pages",
|
|
52
|
+
"application/x-iwork-pages-sffpages",
|
|
53
|
+
"application/vnd.apple.numbers",
|
|
54
|
+
"application/x-iwork-numbers-sffnumbers",
|
|
55
|
+
"application/vnd.apple.keynote",
|
|
56
|
+
"application/x-iwork-keynote-sffkey",
|
|
57
|
+
"application/epub+zip",
|
|
58
|
+
"application/zip",
|
|
59
|
+
"application/x-zip-compressed",
|
|
60
|
+
]
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
from .shared_params.text_decoration import TextDecoration
|
|
9
|
+
|
|
10
|
+
__all__ = ["TextPartParam"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TextPartParam(TypedDict, total=False):
|
|
14
|
+
type: Required[Literal["text"]]
|
|
15
|
+
"""Indicates this is a text message part"""
|
|
16
|
+
|
|
17
|
+
value: Required[str]
|
|
18
|
+
"""The text content of the message.
|
|
19
|
+
|
|
20
|
+
This value is sent as-is with no parsing or transformation — Markdown syntax
|
|
21
|
+
will be delivered as plain text. Use `text_decorations` to apply inline
|
|
22
|
+
formatting and animations (iMessage only).
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
text_decorations: Iterable[TextDecoration]
|
|
26
|
+
"""
|
|
27
|
+
Optional array of text decorations applied to character ranges in the `value`
|
|
28
|
+
field (iMessage only).
|
|
29
|
+
|
|
30
|
+
Each decoration specifies a character range `[start, end)` and exactly one of
|
|
31
|
+
`style` or `animation`.
|
|
32
|
+
|
|
33
|
+
**Styles:** `bold`, `italic`, `strikethrough`, `underline` **Animations:**
|
|
34
|
+
`big`, `small`, `shake`, `nod`, `explode`, `ripple`, `bloom`, `jitter`
|
|
35
|
+
|
|
36
|
+
Style ranges may overlap (e.g. bold + italic on the same text), but animation
|
|
37
|
+
ranges must not overlap with other animations or styles.
|
|
38
|
+
|
|
39
|
+
_Characters are measured as UTF-16 code units. Most characters count as 1; some
|
|
40
|
+
emoji count as 2._
|
|
41
|
+
|
|
42
|
+
**Note:** Text decorations only render for iMessage recipients. For SMS/RCS,
|
|
43
|
+
text decorations are not applied.
|
|
44
|
+
"""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .webhook_event_type import WebhookEventType
|
|
8
|
+
|
|
9
|
+
__all__ = ["WebhookEventListResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WebhookEventListResponse(BaseModel):
|
|
13
|
+
doc_url: Literal["https://apidocs.linqapp.com/documentation/webhook-events"]
|
|
14
|
+
"""URL to the webhook events documentation"""
|
|
15
|
+
|
|
16
|
+
events: List[WebhookEventType]
|
|
17
|
+
"""List of all available webhook event types"""
|
|
@@ -0,0 +1,33 @@
|
|
|
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__ = ["WebhookEventType"]
|
|
6
|
+
|
|
7
|
+
WebhookEventType: TypeAlias = Literal[
|
|
8
|
+
"message.sent",
|
|
9
|
+
"message.received",
|
|
10
|
+
"message.read",
|
|
11
|
+
"message.delivered",
|
|
12
|
+
"message.failed",
|
|
13
|
+
"message.edited",
|
|
14
|
+
"reaction.added",
|
|
15
|
+
"reaction.removed",
|
|
16
|
+
"participant.added",
|
|
17
|
+
"participant.removed",
|
|
18
|
+
"chat.created",
|
|
19
|
+
"chat.group_name_updated",
|
|
20
|
+
"chat.group_icon_updated",
|
|
21
|
+
"chat.group_name_update_failed",
|
|
22
|
+
"chat.group_icon_update_failed",
|
|
23
|
+
"chat.typing_indicator.started",
|
|
24
|
+
"chat.typing_indicator.stopped",
|
|
25
|
+
"phone_number.status_updated",
|
|
26
|
+
"call.initiated",
|
|
27
|
+
"call.ringing",
|
|
28
|
+
"call.answered",
|
|
29
|
+
"call.ended",
|
|
30
|
+
"call.failed",
|
|
31
|
+
"call.declined",
|
|
32
|
+
"call.no_answer",
|
|
33
|
+
]
|
|
@@ -0,0 +1,35 @@
|
|
|
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 .webhook_event_type import WebhookEventType
|
|
8
|
+
|
|
9
|
+
__all__ = ["WebhookSubscription"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WebhookSubscription(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
"""Unique identifier for the webhook subscription"""
|
|
15
|
+
|
|
16
|
+
created_at: datetime
|
|
17
|
+
"""When the subscription was created"""
|
|
18
|
+
|
|
19
|
+
is_active: bool
|
|
20
|
+
"""Whether this subscription is currently active"""
|
|
21
|
+
|
|
22
|
+
subscribed_events: List[WebhookEventType]
|
|
23
|
+
"""List of event types this subscription receives"""
|
|
24
|
+
|
|
25
|
+
target_url: str
|
|
26
|
+
"""URL where webhook events will be sent"""
|
|
27
|
+
|
|
28
|
+
updated_at: datetime
|
|
29
|
+
"""When the subscription was last updated"""
|
|
30
|
+
|
|
31
|
+
phone_numbers: Optional[List[str]] = None
|
|
32
|
+
"""Phone numbers this subscription filters for.
|
|
33
|
+
|
|
34
|
+
If null or empty, events from all phone numbers are delivered.
|
|
35
|
+
"""
|
|
@@ -0,0 +1,27 @@
|
|
|
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 List
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .webhook_event_type import WebhookEventType
|
|
10
|
+
|
|
11
|
+
__all__ = ["WebhookSubscriptionCreateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class WebhookSubscriptionCreateParams(TypedDict, total=False):
|
|
15
|
+
subscribed_events: Required[List[WebhookEventType]]
|
|
16
|
+
"""List of event types to subscribe to"""
|
|
17
|
+
|
|
18
|
+
target_url: Required[str]
|
|
19
|
+
"""URL where webhook events will be sent. Must be HTTPS."""
|
|
20
|
+
|
|
21
|
+
phone_numbers: SequenceNotStr[str]
|
|
22
|
+
"""Optional list of phone numbers to filter events for.
|
|
23
|
+
|
|
24
|
+
Only events originating from these phone numbers will be delivered to this
|
|
25
|
+
subscription. If omitted or empty, events from all phone numbers are delivered.
|
|
26
|
+
Phone numbers must be in E.164 format.
|
|
27
|
+
"""
|
|
@@ -0,0 +1,46 @@
|
|
|
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 .webhook_event_type import WebhookEventType
|
|
8
|
+
|
|
9
|
+
__all__ = ["WebhookSubscriptionCreateResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WebhookSubscriptionCreateResponse(BaseModel):
|
|
13
|
+
"""Response returned when creating a webhook subscription.
|
|
14
|
+
|
|
15
|
+
Includes the signing secret which is only shown once.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
id: str
|
|
19
|
+
"""Unique identifier for the webhook subscription"""
|
|
20
|
+
|
|
21
|
+
created_at: datetime
|
|
22
|
+
"""When the subscription was created"""
|
|
23
|
+
|
|
24
|
+
is_active: bool
|
|
25
|
+
"""Whether this subscription is currently active"""
|
|
26
|
+
|
|
27
|
+
signing_secret: str
|
|
28
|
+
"""Secret for verifying webhook signatures.
|
|
29
|
+
|
|
30
|
+
Store this securely - it cannot be retrieved again.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
subscribed_events: List[WebhookEventType]
|
|
34
|
+
"""List of event types this subscription receives"""
|
|
35
|
+
|
|
36
|
+
target_url: str
|
|
37
|
+
"""URL where webhook events will be sent"""
|
|
38
|
+
|
|
39
|
+
updated_at: datetime
|
|
40
|
+
"""When the subscription was last updated"""
|
|
41
|
+
|
|
42
|
+
phone_numbers: Optional[List[str]] = None
|
|
43
|
+
"""Phone numbers this subscription filters for.
|
|
44
|
+
|
|
45
|
+
If null or empty, events from all phone numbers are delivered.
|
|
46
|
+
"""
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .webhook_subscription import WebhookSubscription
|
|
7
|
+
|
|
8
|
+
__all__ = ["WebhookSubscriptionListResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class WebhookSubscriptionListResponse(BaseModel):
|
|
12
|
+
subscriptions: List[WebhookSubscription]
|
|
13
|
+
"""List of webhook subscriptions"""
|
|
@@ -0,0 +1,30 @@
|
|
|
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 List, Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .webhook_event_type import WebhookEventType
|
|
10
|
+
|
|
11
|
+
__all__ = ["WebhookSubscriptionUpdateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class WebhookSubscriptionUpdateParams(TypedDict, total=False):
|
|
15
|
+
is_active: bool
|
|
16
|
+
"""Activate or deactivate the subscription"""
|
|
17
|
+
|
|
18
|
+
phone_numbers: Optional[SequenceNotStr[str]]
|
|
19
|
+
"""Updated list of phone numbers to filter events for.
|
|
20
|
+
|
|
21
|
+
Set to a non-empty array to filter events to specific phone numbers. Set to an
|
|
22
|
+
empty array or null to remove the filter and receive events from all phone
|
|
23
|
+
numbers. Phone numbers must be in E.164 format.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
subscribed_events: List[WebhookEventType]
|
|
27
|
+
"""Updated list of event types to subscribe to"""
|
|
28
|
+
|
|
29
|
+
target_url: str
|
|
30
|
+
"""New target URL for webhook events"""
|