@blinkdotnew/sdk 0.10.3 → 0.10.5
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.
- package/README.md +6 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -719,10 +719,15 @@ const sendBulkEmails = async (recipients: string[], subject: string, htmlContent
|
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
// Response format details:
|
|
722
|
-
// ✅ Success response: { success: true, messageId: "msg_abc123..." }
|
|
722
|
+
// ✅ Success response: { success: true, messageId: "msg_abc123...", from: "noreply@project.blink-email.com", to: ["recipient@example.com"], subject: "Email Subject", timestamp: "2024-01-20T10:30:00.000Z" }
|
|
723
723
|
// ❌ The method throws BlinkNotificationsError on failure
|
|
724
724
|
// 🔍 Error types: validation errors, rate limits, network issues, invalid attachments
|
|
725
725
|
|
|
726
|
+
// API Response Format:
|
|
727
|
+
// The notifications API returns data directly (not wrapped in {data: ..., error: ...})
|
|
728
|
+
// This is consistent with other Blink APIs like database and storage
|
|
729
|
+
// All Blink APIs follow this pattern for clean, predictable responses
|
|
730
|
+
|
|
726
731
|
// Best practices:
|
|
727
732
|
// 1. Always include both HTML and text versions for better deliverability
|
|
728
733
|
// 2. Use valid email addresses for 'from' field (not display names)
|
package/dist/index.js
CHANGED
|
@@ -2620,7 +2620,7 @@ var BlinkRealtimeChannel = class {
|
|
|
2620
2620
|
try {
|
|
2621
2621
|
const httpClient = this.httpClient;
|
|
2622
2622
|
const coreUrl = httpClient.coreUrl || "https://core.blink.new";
|
|
2623
|
-
const baseUrl = coreUrl.
|
|
2623
|
+
const baseUrl = coreUrl.replace("https://", "wss://").replace("http://", "ws://");
|
|
2624
2624
|
const wsUrl = `${baseUrl}?project_id=${this.projectId}`;
|
|
2625
2625
|
const WSClass = getWebSocketClass();
|
|
2626
2626
|
this.websocket = new WSClass(wsUrl);
|
package/dist/index.mjs
CHANGED
|
@@ -2618,7 +2618,7 @@ var BlinkRealtimeChannel = class {
|
|
|
2618
2618
|
try {
|
|
2619
2619
|
const httpClient = this.httpClient;
|
|
2620
2620
|
const coreUrl = httpClient.coreUrl || "https://core.blink.new";
|
|
2621
|
-
const baseUrl = coreUrl.
|
|
2621
|
+
const baseUrl = coreUrl.replace("https://", "wss://").replace("http://", "ws://");
|
|
2622
2622
|
const wsUrl = `${baseUrl}?project_id=${this.projectId}`;
|
|
2623
2623
|
const WSClass = getWebSocketClass();
|
|
2624
2624
|
this.websocket = new WSClass(wsUrl);
|
package/package.json
CHANGED