@thorprovider/medusa-extended 1.12.0 → 1.13.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/medusa-extended",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Thor Commerce multi-tenant admin extensions for Medusa v2",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@thorprovider/adapters": "^5.0.8",
28
- "@thorprovider/types": "^5.4.0"
28
+ "@thorprovider/types": "^5.5.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "msw": "^2.12.3",
@@ -166,6 +166,11 @@ import type {
166
166
  // Notifications
167
167
  GetNotificationsOptions,
168
168
  GetNotificationsResponse,
169
+ // Notification preferences
170
+ DropshipperNotificationEventType,
171
+ DropshipperNotificationPreference,
172
+ UpdateNotificationPreferencesBody,
173
+ GetNotificationPreferencesResponse,
169
174
  // Inline return types
170
175
  DropshipperCategory,
171
176
  DropshipperPromotion,
@@ -182,7 +187,7 @@ import { fetchBackendWithResilience } from './request-resilience';
182
187
  // Types
183
188
  // ---------------------------------------------------------------------------
184
189
 
185
- type FetchMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
190
+ type FetchMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
186
191
 
187
192
  // ---------------------------------------------------------------------------
188
193
  // AI Assistant — streaming chat events
@@ -590,6 +595,33 @@ export class DropshipperClient {
590
595
  );
591
596
  }
592
597
 
598
+ /**
599
+ * Get the authenticated dropshipper's notification preferences.
600
+ *
601
+ * `GET /admin/thor/dropshipper/notifications/preferences`
602
+ */
603
+ async getNotificationPreferences(): Promise<GetNotificationPreferencesResponse> {
604
+ return this.request<GetNotificationPreferencesResponse>(
605
+ 'GET',
606
+ '/admin/thor/dropshipper/notifications/preferences',
607
+ );
608
+ }
609
+
610
+ /**
611
+ * Update the authenticated dropshipper's notification preferences.
612
+ *
613
+ * `PATCH /admin/thor/dropshipper/notifications/preferences`
614
+ */
615
+ async updateNotificationPreferences(
616
+ body: UpdateNotificationPreferencesBody,
617
+ ): Promise<GetNotificationPreferencesResponse> {
618
+ return this.request<GetNotificationPreferencesResponse>(
619
+ 'PATCH',
620
+ '/admin/thor/dropshipper/notifications/preferences',
621
+ body,
622
+ );
623
+ }
624
+
593
625
  // -------------------------------------------------------------------------
594
626
  // Onboarding (Solo X)
595
627
  // -------------------------------------------------------------------------
@@ -2001,7 +2033,7 @@ export class DropshipperClient {
2001
2033
  }
2002
2034
 
2003
2035
  // Re-export types used by callers so they don't need to import from @thorprovider/types directly.
2004
- export type { DropshipperCategory, DropshipperPromotion, NotificationData, PriceUpdatedNotificationData, ProductAssignedNotificationData, StockChangeNotificationData, ManualAdminNotificationData, RawNotification, GetNotificationsOptions, GetNotificationsResponse, ChatRequest, ChatResponse, ChatMessage, ChatIntent, ChatSource, ChatSourceVariant } from '@thorprovider/types';
2036
+ export type { DropshipperCategory, DropshipperPromotion, NotificationData, PriceUpdatedNotificationData, ProductAssignedNotificationData, StockChangeNotificationData, ManualAdminNotificationData, RawNotification, GetNotificationsOptions, GetNotificationsResponse, DropshipperNotificationEventType, DropshipperNotificationPreference, UpdateNotificationPreferencesBody, GetNotificationPreferencesResponse, ChatRequest, ChatResponse, ChatMessage, ChatIntent, ChatSource, ChatSourceVariant } from '@thorprovider/types';
2005
2037
 
2006
2038
  // ---------------------------------------------------------------------------
2007
2039
  // AI Assistant — streaming helpers