synquic-slide 0.1.0__tar.gz

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.
@@ -0,0 +1,76 @@
1
+ # Dependencies
2
+ node_modules/
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # Testing
7
+ coverage/
8
+ .nyc_output
9
+
10
+ # Production builds
11
+ dist/
12
+ build/
13
+ .next/
14
+ out/
15
+
16
+ # Environment variables
17
+ .env
18
+ .env.local
19
+ .env.deploy
20
+ .env.development.local
21
+ .env.test.local
22
+ .env.production.local
23
+
24
+ # Voice engine config (contains real API keys — manage on server, never commit)
25
+ deploy/livekit.yaml
26
+
27
+ # Internal vendor reference — ops only, never commit
28
+ deploy/internal-vendor-map.md
29
+
30
+ # Firebase credentials
31
+ serviceAccountKey.json
32
+ **/serviceAccountKey.json
33
+
34
+ # Logs
35
+ npm-debug.log*
36
+ yarn-debug.log*
37
+ yarn-error.log*
38
+ lerna-debug.log*
39
+ .pnpm-debug.log*
40
+
41
+ # OS files
42
+ .DS_Store
43
+ Thumbs.db
44
+
45
+ # IDE
46
+ .vscode/
47
+ .idea/
48
+ *.swp
49
+ *.swo
50
+ *~
51
+
52
+ # Prisma
53
+ backend/prisma/migrations/*_*/
54
+
55
+ # TypeScript
56
+ *.tsbuildinfo
57
+ next-env.d.ts
58
+
59
+ # Misc
60
+ .turbo
61
+ *.local
62
+ .vercel
63
+ .claude
64
+ CLAUDE.md
65
+ docs/
66
+ /tasks/
67
+
68
+ # SSH keys — never commit
69
+ *.pem
70
+ *.key
71
+ deploy/slide-prod.pem
72
+ slide/
73
+ Prod_RavishingRavisha/
74
+ InboundAIVoice/
75
+ Partner API Documentation.postman_collection.json
76
+ Trustsignal API Collection.postman_collection.json
@@ -0,0 +1,313 @@
1
+ Metadata-Version: 2.4
2
+ Name: synquic-slide
3
+ Version: 0.1.0
4
+ Summary: Official Python SDK for the Slide API
5
+ Project-URL: Homepage, https://slide.synquic.com
6
+ Project-URL: Documentation, https://slide.synquic.com
7
+ Author-email: Synquic <p@synquic.com>
8
+ License: MIT
9
+ Keywords: api,crm,email,sdk,slide,synquic,voice,whatsapp
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.9
20
+ Requires-Dist: httpx>=0.27.0
21
+ Description-Content-Type: text/markdown
22
+
23
+ # synquic-slide
24
+
25
+ **Official Python SDK for the [Slide](https://slide.synquic.com) API**
26
+
27
+ [![PyPI version](https://img.shields.io/pypi/v/synquic-slide)](https://pypi.org/project/synquic-slide/)
28
+ [![Python](https://img.shields.io/pypi/pyversions/synquic-slide)](https://pypi.org/project/synquic-slide/)
29
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
30
+
31
+ Slide is a multichannel customer engagement platform. Use this SDK to send WhatsApp messages, trigger emails, place AI voice calls, manage contacts, query Shopify orders, and more.
32
+
33
+ Supports both **sync** and **async** usage. Fully typed with Python type hints.
34
+
35
+ ---
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ pip install synquic-slide
41
+ ```
42
+
43
+ Requires **Python 3.9+**.
44
+
45
+ ---
46
+
47
+ ## Getting Your API Key
48
+
49
+ 1. Log in to your [Slide dashboard](https://slide.synquic.com)
50
+ 2. Go to **Settings → API Keys**
51
+ 3. Click **Create API Key**
52
+ 4. Select the scopes you need (e.g. `email:send`, `whatsapp:send`, `voice:calls:write`)
53
+ 5. Copy the key — it starts with `sk_live_` and is shown **only once**
54
+
55
+ ```bash
56
+ # .env
57
+ SLIDE_API_KEY=sk_live_your_key_here
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Quick Start
63
+
64
+ ```python
65
+ import os
66
+ from synquic_slide import SlideClient
67
+
68
+ slide = SlideClient(api_key=os.environ["SLIDE_API_KEY"])
69
+
70
+ # Send a WhatsApp template
71
+ msg = slide.whatsapp.send_template(
72
+ to="+919876543210",
73
+ template_name="order_shipped",
74
+ language_code="en",
75
+ )
76
+ print(msg["wamid"])
77
+
78
+ # Send a transactional email
79
+ slide.email.send(
80
+ recipient={"to": "customer@example.com", "firstName": "Priya"},
81
+ template_id="tmpl_order_confirm",
82
+ from_name="Acme Store",
83
+ from_email="orders@acme.com",
84
+ variables={"orderId": "#1042", "total": "₹2,499"},
85
+ )
86
+
87
+ # Initiate an outbound AI voice call
88
+ call = slide.voice.initiate_outbound_call(
89
+ agent_id="agent_abc123",
90
+ to_number="+919876543210",
91
+ call_context={"customerName": "Priya", "orderId": "#1042"},
92
+ )
93
+ print(call["id"], call["status"])
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Async Usage
99
+
100
+ ```python
101
+ import asyncio
102
+ import os
103
+ from synquic_slide import AsyncSlideClient
104
+
105
+ async def main():
106
+ async with AsyncSlideClient(api_key=os.environ["SLIDE_API_KEY"]) as slide:
107
+ contacts = await slide.contacts.list(page=1, limit=50)
108
+ print(contacts["meta"]["total"])
109
+
110
+ msg = await slide.whatsapp.send_template(
111
+ to="+919876543210",
112
+ template_name="order_update",
113
+ language_code="en",
114
+ )
115
+ print(msg["wamid"])
116
+
117
+ asyncio.run(main())
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Resources
123
+
124
+ ### Contacts
125
+
126
+ ```python
127
+ # List contacts
128
+ result = slide.contacts.list(page=1, limit=50, search="priya")
129
+ result["data"] # list of contacts
130
+ result["meta"]["total"]
131
+ ```
132
+
133
+ **Scope:** `contacts:read`
134
+
135
+ ---
136
+
137
+ ### Email
138
+
139
+ ```python
140
+ # Send an email
141
+ slide.email.send(
142
+ recipient={"to": "user@example.com", "firstName": "Rahul"},
143
+ template_id="tmpl_welcome",
144
+ from_name="Acme",
145
+ from_email="hello@acme.com",
146
+ subject="Welcome!", # optional override
147
+ reply_to="support@acme.com", # optional
148
+ variables={"coupon": "SAVE20"},
149
+ )
150
+
151
+ # List templates
152
+ templates = slide.email.list_templates()
153
+
154
+ # Get a template
155
+ tmpl = slide.email.get_template("tmpl_welcome")
156
+
157
+ # List contacts
158
+ contacts = slide.email.list_contacts(page=1, search="rahul")
159
+
160
+ # Create / update a contact
161
+ slide.email.upsert_contact(
162
+ email="user@example.com",
163
+ first_name="Rahul",
164
+ phone="+919876543210",
165
+ tags=["vip", "customer"],
166
+ custom_fields={"city": "Mumbai"},
167
+ )
168
+ ```
169
+
170
+ **Scopes:** `email:send` · `email:templates:read` · `email:contacts:read` · `email:contacts:write`
171
+
172
+ ---
173
+
174
+ ### WhatsApp
175
+
176
+ ```python
177
+ # Send a template
178
+ sent = slide.whatsapp.send_template(
179
+ to="+919876543210",
180
+ template_name="order_shipped",
181
+ language_code="en",
182
+ components=[
183
+ {
184
+ "type": "body",
185
+ "parameters": [
186
+ {"type": "text", "text": "#1042"},
187
+ {"type": "text", "text": "Delhivery"},
188
+ ],
189
+ }
190
+ ],
191
+ )
192
+
193
+ # Upload header media
194
+ with open("banner.jpg", "rb") as f:
195
+ media = slide.whatsapp.upload_header_media(
196
+ file=f.read(),
197
+ filename="banner.jpg",
198
+ mime_type="image/jpeg",
199
+ expected_format="IMAGE",
200
+ )
201
+
202
+ # Read message logs
203
+ logs = slide.whatsapp.list_logs(direction="outbound", status="delivered")
204
+
205
+ # List templates
206
+ templates = slide.whatsapp.list_templates(status="APPROVED", category="UTILITY")
207
+ ```
208
+
209
+ **Scopes:** `whatsapp:send` · `whatsapp:logs:read` · `whatsapp:templates:read`
210
+
211
+ ---
212
+
213
+ ### Instagram
214
+
215
+ ```python
216
+ profile = slide.instagram.get_profile()
217
+ convos = slide.instagram.list_conversations(page=1, limit=20)
218
+
219
+ slide.instagram.send_message(
220
+ recipient_igsid="123456789",
221
+ message="Thanks for reaching out!",
222
+ )
223
+
224
+ insights = slide.instagram.get_insights(period="day", since="2024-01-01", until="2024-01-31")
225
+ ```
226
+
227
+ **Scopes:** `instagram:messages:read` · `instagram:messages:send` · `instagram:insights:read`
228
+
229
+ ---
230
+
231
+ ### Shopify
232
+
233
+ ```python
234
+ results = slide.shopify.search_products(q="running shoes", limit=10)
235
+ types = slide.shopify.get_product_types()
236
+ product = slide.shopify.get_product("gid://shopify/Product/123")
237
+ collections = slide.shopify.list_collections()
238
+ items = slide.shopify.get_collection_products("col_789", limit=50)
239
+ order = slide.shopify.get_order_status(identifier="#1042")
240
+ history = slide.shopify.get_customer_orders(identifier="+919876543210")
241
+ discount = slide.shopify.validate_discount(code="SAVE20")
242
+ ```
243
+
244
+ **Scopes:** `shopify:products:read` · `shopify:orders:read` · `shopify:discounts:read`
245
+
246
+ ---
247
+
248
+ ### Voice
249
+
250
+ ```python
251
+ agents = slide.voice.list_agents()
252
+ agent = slide.voice.get_agent("agent_abc123")
253
+
254
+ call = slide.voice.initiate_outbound_call(
255
+ agent_id="agent_abc123",
256
+ to_number="+919876543210",
257
+ call_context={"customerName": "Priya"},
258
+ )
259
+
260
+ calls = slide.voice.list_calls(status="COMPLETED", direction="OUTBOUND")
261
+ detail = slide.voice.get_call("call_xyz")
262
+ recording = slide.voice.get_call_recording("call_xyz") # URL valid 1 hour
263
+ analytics = slide.voice.get_analytics(from_date="2024-01-01", to_date="2024-01-31")
264
+ ```
265
+
266
+ **Scopes:** `voice:agents:read` · `voice:calls:read` · `voice:calls:write`
267
+
268
+ ---
269
+
270
+ ## Error Handling
271
+
272
+ ```python
273
+ from synquic_slide import (
274
+ SlideError,
275
+ SlideAuthError,
276
+ SlideScopeError,
277
+ SlideNotFoundError,
278
+ SlideValidationError,
279
+ )
280
+
281
+ try:
282
+ slide.email.send(...)
283
+ except SlideAuthError:
284
+ print("Invalid API key — check SLIDE_API_KEY")
285
+ except SlideScopeError as e:
286
+ print(f"Missing scope: {e}") # e.g. "email:send"
287
+ except SlideValidationError as e:
288
+ print(f"Bad request: {e.body}")
289
+ except SlideNotFoundError:
290
+ print("Resource not found")
291
+ except SlideError as e:
292
+ print(f"HTTP {e.status_code}: {e}")
293
+ ```
294
+
295
+ ---
296
+
297
+ ## Context Manager
298
+
299
+ ```python
300
+ # Sync
301
+ with SlideClient(api_key="sk_live_...") as slide:
302
+ slide.contacts.list()
303
+
304
+ # Async
305
+ async with AsyncSlideClient(api_key="sk_live_...") as slide:
306
+ await slide.contacts.list()
307
+ ```
308
+
309
+ ---
310
+
311
+ ## License
312
+
313
+ MIT © [Synquic](https://synquic.com)
@@ -0,0 +1,291 @@
1
+ # synquic-slide
2
+
3
+ **Official Python SDK for the [Slide](https://slide.synquic.com) API**
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/synquic-slide)](https://pypi.org/project/synquic-slide/)
6
+ [![Python](https://img.shields.io/pypi/pyversions/synquic-slide)](https://pypi.org/project/synquic-slide/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ Slide is a multichannel customer engagement platform. Use this SDK to send WhatsApp messages, trigger emails, place AI voice calls, manage contacts, query Shopify orders, and more.
10
+
11
+ Supports both **sync** and **async** usage. Fully typed with Python type hints.
12
+
13
+ ---
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install synquic-slide
19
+ ```
20
+
21
+ Requires **Python 3.9+**.
22
+
23
+ ---
24
+
25
+ ## Getting Your API Key
26
+
27
+ 1. Log in to your [Slide dashboard](https://slide.synquic.com)
28
+ 2. Go to **Settings → API Keys**
29
+ 3. Click **Create API Key**
30
+ 4. Select the scopes you need (e.g. `email:send`, `whatsapp:send`, `voice:calls:write`)
31
+ 5. Copy the key — it starts with `sk_live_` and is shown **only once**
32
+
33
+ ```bash
34
+ # .env
35
+ SLIDE_API_KEY=sk_live_your_key_here
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ import os
44
+ from synquic_slide import SlideClient
45
+
46
+ slide = SlideClient(api_key=os.environ["SLIDE_API_KEY"])
47
+
48
+ # Send a WhatsApp template
49
+ msg = slide.whatsapp.send_template(
50
+ to="+919876543210",
51
+ template_name="order_shipped",
52
+ language_code="en",
53
+ )
54
+ print(msg["wamid"])
55
+
56
+ # Send a transactional email
57
+ slide.email.send(
58
+ recipient={"to": "customer@example.com", "firstName": "Priya"},
59
+ template_id="tmpl_order_confirm",
60
+ from_name="Acme Store",
61
+ from_email="orders@acme.com",
62
+ variables={"orderId": "#1042", "total": "₹2,499"},
63
+ )
64
+
65
+ # Initiate an outbound AI voice call
66
+ call = slide.voice.initiate_outbound_call(
67
+ agent_id="agent_abc123",
68
+ to_number="+919876543210",
69
+ call_context={"customerName": "Priya", "orderId": "#1042"},
70
+ )
71
+ print(call["id"], call["status"])
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Async Usage
77
+
78
+ ```python
79
+ import asyncio
80
+ import os
81
+ from synquic_slide import AsyncSlideClient
82
+
83
+ async def main():
84
+ async with AsyncSlideClient(api_key=os.environ["SLIDE_API_KEY"]) as slide:
85
+ contacts = await slide.contacts.list(page=1, limit=50)
86
+ print(contacts["meta"]["total"])
87
+
88
+ msg = await slide.whatsapp.send_template(
89
+ to="+919876543210",
90
+ template_name="order_update",
91
+ language_code="en",
92
+ )
93
+ print(msg["wamid"])
94
+
95
+ asyncio.run(main())
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Resources
101
+
102
+ ### Contacts
103
+
104
+ ```python
105
+ # List contacts
106
+ result = slide.contacts.list(page=1, limit=50, search="priya")
107
+ result["data"] # list of contacts
108
+ result["meta"]["total"]
109
+ ```
110
+
111
+ **Scope:** `contacts:read`
112
+
113
+ ---
114
+
115
+ ### Email
116
+
117
+ ```python
118
+ # Send an email
119
+ slide.email.send(
120
+ recipient={"to": "user@example.com", "firstName": "Rahul"},
121
+ template_id="tmpl_welcome",
122
+ from_name="Acme",
123
+ from_email="hello@acme.com",
124
+ subject="Welcome!", # optional override
125
+ reply_to="support@acme.com", # optional
126
+ variables={"coupon": "SAVE20"},
127
+ )
128
+
129
+ # List templates
130
+ templates = slide.email.list_templates()
131
+
132
+ # Get a template
133
+ tmpl = slide.email.get_template("tmpl_welcome")
134
+
135
+ # List contacts
136
+ contacts = slide.email.list_contacts(page=1, search="rahul")
137
+
138
+ # Create / update a contact
139
+ slide.email.upsert_contact(
140
+ email="user@example.com",
141
+ first_name="Rahul",
142
+ phone="+919876543210",
143
+ tags=["vip", "customer"],
144
+ custom_fields={"city": "Mumbai"},
145
+ )
146
+ ```
147
+
148
+ **Scopes:** `email:send` · `email:templates:read` · `email:contacts:read` · `email:contacts:write`
149
+
150
+ ---
151
+
152
+ ### WhatsApp
153
+
154
+ ```python
155
+ # Send a template
156
+ sent = slide.whatsapp.send_template(
157
+ to="+919876543210",
158
+ template_name="order_shipped",
159
+ language_code="en",
160
+ components=[
161
+ {
162
+ "type": "body",
163
+ "parameters": [
164
+ {"type": "text", "text": "#1042"},
165
+ {"type": "text", "text": "Delhivery"},
166
+ ],
167
+ }
168
+ ],
169
+ )
170
+
171
+ # Upload header media
172
+ with open("banner.jpg", "rb") as f:
173
+ media = slide.whatsapp.upload_header_media(
174
+ file=f.read(),
175
+ filename="banner.jpg",
176
+ mime_type="image/jpeg",
177
+ expected_format="IMAGE",
178
+ )
179
+
180
+ # Read message logs
181
+ logs = slide.whatsapp.list_logs(direction="outbound", status="delivered")
182
+
183
+ # List templates
184
+ templates = slide.whatsapp.list_templates(status="APPROVED", category="UTILITY")
185
+ ```
186
+
187
+ **Scopes:** `whatsapp:send` · `whatsapp:logs:read` · `whatsapp:templates:read`
188
+
189
+ ---
190
+
191
+ ### Instagram
192
+
193
+ ```python
194
+ profile = slide.instagram.get_profile()
195
+ convos = slide.instagram.list_conversations(page=1, limit=20)
196
+
197
+ slide.instagram.send_message(
198
+ recipient_igsid="123456789",
199
+ message="Thanks for reaching out!",
200
+ )
201
+
202
+ insights = slide.instagram.get_insights(period="day", since="2024-01-01", until="2024-01-31")
203
+ ```
204
+
205
+ **Scopes:** `instagram:messages:read` · `instagram:messages:send` · `instagram:insights:read`
206
+
207
+ ---
208
+
209
+ ### Shopify
210
+
211
+ ```python
212
+ results = slide.shopify.search_products(q="running shoes", limit=10)
213
+ types = slide.shopify.get_product_types()
214
+ product = slide.shopify.get_product("gid://shopify/Product/123")
215
+ collections = slide.shopify.list_collections()
216
+ items = slide.shopify.get_collection_products("col_789", limit=50)
217
+ order = slide.shopify.get_order_status(identifier="#1042")
218
+ history = slide.shopify.get_customer_orders(identifier="+919876543210")
219
+ discount = slide.shopify.validate_discount(code="SAVE20")
220
+ ```
221
+
222
+ **Scopes:** `shopify:products:read` · `shopify:orders:read` · `shopify:discounts:read`
223
+
224
+ ---
225
+
226
+ ### Voice
227
+
228
+ ```python
229
+ agents = slide.voice.list_agents()
230
+ agent = slide.voice.get_agent("agent_abc123")
231
+
232
+ call = slide.voice.initiate_outbound_call(
233
+ agent_id="agent_abc123",
234
+ to_number="+919876543210",
235
+ call_context={"customerName": "Priya"},
236
+ )
237
+
238
+ calls = slide.voice.list_calls(status="COMPLETED", direction="OUTBOUND")
239
+ detail = slide.voice.get_call("call_xyz")
240
+ recording = slide.voice.get_call_recording("call_xyz") # URL valid 1 hour
241
+ analytics = slide.voice.get_analytics(from_date="2024-01-01", to_date="2024-01-31")
242
+ ```
243
+
244
+ **Scopes:** `voice:agents:read` · `voice:calls:read` · `voice:calls:write`
245
+
246
+ ---
247
+
248
+ ## Error Handling
249
+
250
+ ```python
251
+ from synquic_slide import (
252
+ SlideError,
253
+ SlideAuthError,
254
+ SlideScopeError,
255
+ SlideNotFoundError,
256
+ SlideValidationError,
257
+ )
258
+
259
+ try:
260
+ slide.email.send(...)
261
+ except SlideAuthError:
262
+ print("Invalid API key — check SLIDE_API_KEY")
263
+ except SlideScopeError as e:
264
+ print(f"Missing scope: {e}") # e.g. "email:send"
265
+ except SlideValidationError as e:
266
+ print(f"Bad request: {e.body}")
267
+ except SlideNotFoundError:
268
+ print("Resource not found")
269
+ except SlideError as e:
270
+ print(f"HTTP {e.status_code}: {e}")
271
+ ```
272
+
273
+ ---
274
+
275
+ ## Context Manager
276
+
277
+ ```python
278
+ # Sync
279
+ with SlideClient(api_key="sk_live_...") as slide:
280
+ slide.contacts.list()
281
+
282
+ # Async
283
+ async with AsyncSlideClient(api_key="sk_live_...") as slide:
284
+ await slide.contacts.list()
285
+ ```
286
+
287
+ ---
288
+
289
+ ## License
290
+
291
+ MIT © [Synquic](https://synquic.com)
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "synquic-slide"
7
+ version = "0.1.0"
8
+ description = "Official Python SDK for the Slide API"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.9"
12
+ dependencies = ["httpx>=0.27.0"]
13
+ keywords = ["slide", "synquic", "api", "sdk", "whatsapp", "email", "voice", "crm"]
14
+ authors = [{ name = "Synquic", email = "p@synquic.com" }]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Typing :: Typed",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://slide.synquic.com"
29
+ Documentation = "https://slide.synquic.com"
30
+
31
+ [tool.hatch.build.targets.wheel]
32
+ packages = ["synquic_slide"]