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.
Files changed (139) hide show
  1. linq/__init__.py +102 -0
  2. linq/_base_client.py +2149 -0
  3. linq/_client.py +2479 -0
  4. linq/_compat.py +226 -0
  5. linq/_constants.py +14 -0
  6. linq/_exceptions.py +108 -0
  7. linq/_files.py +123 -0
  8. linq/_models.py +878 -0
  9. linq/_qs.py +153 -0
  10. linq/_resource.py +43 -0
  11. linq/_response.py +833 -0
  12. linq/_streaming.py +338 -0
  13. linq/_types.py +271 -0
  14. linq/_utils/__init__.py +65 -0
  15. linq/_utils/_compat.py +45 -0
  16. linq/_utils/_datetime_parse.py +136 -0
  17. linq/_utils/_json.py +35 -0
  18. linq/_utils/_logs.py +25 -0
  19. linq/_utils/_path.py +127 -0
  20. linq/_utils/_proxy.py +65 -0
  21. linq/_utils/_reflection.py +42 -0
  22. linq/_utils/_resources_proxy.py +24 -0
  23. linq/_utils/_streams.py +12 -0
  24. linq/_utils/_sync.py +58 -0
  25. linq/_utils/_transform.py +457 -0
  26. linq/_utils/_typing.py +156 -0
  27. linq/_utils/_utils.py +421 -0
  28. linq/_version.py +4 -0
  29. linq/lib/.keep +4 -0
  30. linq/pagination.py +95 -0
  31. linq/py.typed +0 -0
  32. linq/resources/__init__.py +134 -0
  33. linq/resources/attachments.py +589 -0
  34. linq/resources/capability.py +297 -0
  35. linq/resources/chats/__init__.py +61 -0
  36. linq/resources/chats/chats.py +1492 -0
  37. linq/resources/chats/messages.py +416 -0
  38. linq/resources/chats/participants.py +322 -0
  39. linq/resources/chats/typing.py +299 -0
  40. linq/resources/contact_card.py +472 -0
  41. linq/resources/messages.py +686 -0
  42. linq/resources/phone_numbers.py +163 -0
  43. linq/resources/phonenumbers.py +165 -0
  44. linq/resources/webhook_events.py +319 -0
  45. linq/resources/webhook_subscriptions.py +776 -0
  46. linq/resources/webhooks.py +34 -0
  47. linq/types/__init__.py +90 -0
  48. linq/types/attachment_create_params.py +42 -0
  49. linq/types/attachment_create_response.py +44 -0
  50. linq/types/attachment_retrieve_response.py +55 -0
  51. linq/types/capability_check_RCS_params.py +20 -0
  52. linq/types/capability_check_i_message_params.py +20 -0
  53. linq/types/chat.py +44 -0
  54. linq/types/chat_create_params.py +33 -0
  55. linq/types/chat_create_response.py +44 -0
  56. linq/types/chat_created_webhook_event.py +87 -0
  57. linq/types/chat_group_icon_update_failed_webhook_event.py +65 -0
  58. linq/types/chat_group_icon_updated_webhook_event.py +66 -0
  59. linq/types/chat_group_name_update_failed_webhook_event.py +65 -0
  60. linq/types/chat_group_name_updated_webhook_event.py +66 -0
  61. linq/types/chat_leave_chat_response.py +15 -0
  62. linq/types/chat_list_chats_params.py +36 -0
  63. linq/types/chat_send_voicememo_params.py +23 -0
  64. linq/types/chat_send_voicememo_response.py +79 -0
  65. linq/types/chat_typing_indicator_started_webhook_event.py +52 -0
  66. linq/types/chat_typing_indicator_stopped_webhook_event.py +52 -0
  67. linq/types/chat_update_params.py +15 -0
  68. linq/types/chat_update_response.py +13 -0
  69. linq/types/chats/__init__.py +12 -0
  70. linq/types/chats/message_list_params.py +15 -0
  71. linq/types/chats/message_send_params.py +18 -0
  72. linq/types/chats/message_send_response.py +16 -0
  73. linq/types/chats/participant_add_params.py +12 -0
  74. linq/types/chats/participant_add_response.py +15 -0
  75. linq/types/chats/participant_remove_params.py +12 -0
  76. linq/types/chats/participant_remove_response.py +15 -0
  77. linq/types/chats/sent_message.py +69 -0
  78. linq/types/contact_card_create_params.py +24 -0
  79. linq/types/contact_card_retrieve_params.py +15 -0
  80. linq/types/contact_card_retrieve_response.py +23 -0
  81. linq/types/contact_card_update_params.py +21 -0
  82. linq/types/events_webhook_event.py +50 -0
  83. linq/types/handle_check_response.py +13 -0
  84. linq/types/link_part_param.py +22 -0
  85. linq/types/media_part_param.py +54 -0
  86. linq/types/message.py +87 -0
  87. linq/types/message_add_reaction_params.py +32 -0
  88. linq/types/message_add_reaction_response.py +15 -0
  89. linq/types/message_content_param.py +82 -0
  90. linq/types/message_delivered_webhook_event.py +65 -0
  91. linq/types/message_edited_webhook_event.py +100 -0
  92. linq/types/message_effect.py +23 -0
  93. linq/types/message_effect_param.py +22 -0
  94. linq/types/message_event_v2.py +116 -0
  95. linq/types/message_failed_webhook_event.py +72 -0
  96. linq/types/message_list_messages_thread_params.py +18 -0
  97. linq/types/message_read_webhook_event.py +65 -0
  98. linq/types/message_received_webhook_event.py +65 -0
  99. linq/types/message_sent_webhook_event.py +65 -0
  100. linq/types/message_update_params.py +15 -0
  101. linq/types/participant_added_webhook_event.py +66 -0
  102. linq/types/participant_removed_webhook_event.py +66 -0
  103. linq/types/phone_number_list_response.py +20 -0
  104. linq/types/phone_number_status_updated_webhook_event.py +82 -0
  105. linq/types/phonenumber_list_response.py +39 -0
  106. linq/types/reaction_added_webhook_event.py +46 -0
  107. linq/types/reaction_event_base.py +85 -0
  108. linq/types/reaction_removed_webhook_event.py +46 -0
  109. linq/types/reply_to.py +21 -0
  110. linq/types/reply_to_param.py +21 -0
  111. linq/types/schemas_media_part_response.py +29 -0
  112. linq/types/schemas_message_effect.py +18 -0
  113. linq/types/schemas_text_part_response.py +22 -0
  114. linq/types/set_contact_card.py +24 -0
  115. linq/types/shared/__init__.py +9 -0
  116. linq/types/shared/chat_handle.py +33 -0
  117. linq/types/shared/media_part_response.py +34 -0
  118. linq/types/shared/reaction.py +56 -0
  119. linq/types/shared/reaction_type.py +7 -0
  120. linq/types/shared/service_type.py +7 -0
  121. linq/types/shared/text_decoration.py +23 -0
  122. linq/types/shared/text_part_response.py +26 -0
  123. linq/types/shared_params/__init__.py +5 -0
  124. linq/types/shared_params/reaction_type.py +9 -0
  125. linq/types/shared_params/service_type.py +9 -0
  126. linq/types/shared_params/text_decoration.py +23 -0
  127. linq/types/supported_content_type.py +60 -0
  128. linq/types/text_part_param.py +44 -0
  129. linq/types/webhook_event_list_response.py +17 -0
  130. linq/types/webhook_event_type.py +33 -0
  131. linq/types/webhook_subscription.py +35 -0
  132. linq/types/webhook_subscription_create_params.py +27 -0
  133. linq/types/webhook_subscription_create_response.py +46 -0
  134. linq/types/webhook_subscription_list_response.py +13 -0
  135. linq/types/webhook_subscription_update_params.py +30 -0
  136. linq_python-0.1.0.dist-info/METADATA +572 -0
  137. linq_python-0.1.0.dist-info/RECORD +139 -0
  138. linq_python-0.1.0.dist-info/WHEEL +4 -0
  139. 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"""