@thorprovider/medusa-extended 1.7.23 → 1.8.1

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.
@@ -33,6 +33,9 @@ import type {
33
33
  GetDropshipperProductsResponse,
34
34
  ValidateCheckoutItemsRequest,
35
35
  ValidateCheckoutItemsResponse,
36
+ CostPriceChangesCheckResponse,
37
+ CostPriceChangesResponse,
38
+ AcknowledgeCostPriceChangesResponse,
36
39
  UpdateDropshipperProductStatusBody,
37
40
  UpdateDropshipperProductStatusResponse,
38
41
  UpdateDropshipperPricesBody,
@@ -161,6 +164,9 @@ import type {
161
164
  DropshipperDashboardCapabilities,
162
165
  // Profile
163
166
  GetMyProfileResponse,
167
+ // Notifications
168
+ GetNotificationsOptions,
169
+ GetNotificationsResponse,
164
170
  // Inline return types
165
171
  DropshipperCategory,
166
172
  DropshipperPromotion,
@@ -306,6 +312,29 @@ export class DropshipperClient {
306
312
  );
307
313
  }
308
314
 
315
+ // -------------------------------------------------------------------------
316
+ // Notifications
317
+ // -------------------------------------------------------------------------
318
+
319
+ /**
320
+ * List feed notifications for the authenticated dropshipper.
321
+ *
322
+ * `GET /admin/thor/dropshipper/notifications`
323
+ */
324
+ async getNotifications(
325
+ options: GetNotificationsOptions = {},
326
+ ): Promise<GetNotificationsResponse> {
327
+ const { limit = 20, offset = 0 } = options;
328
+ const qs = new URLSearchParams({
329
+ limit: String(limit),
330
+ offset: String(offset),
331
+ });
332
+ return this.request<GetNotificationsResponse>(
333
+ 'GET',
334
+ `/admin/thor/dropshipper/notifications?${qs}`,
335
+ );
336
+ }
337
+
309
338
  // -------------------------------------------------------------------------
310
339
  // Onboarding (Solo X)
311
340
  // -------------------------------------------------------------------------
@@ -437,6 +466,46 @@ export class DropshipperClient {
437
466
  );
438
467
  }
439
468
 
469
+ /**
470
+ * Check whether cost prices have changed since the last acknowledgment.
471
+ * Compares a hash of all base cost prices from the channel's price list
472
+ * against a stored snapshot on the dropshipper account.
473
+ *
474
+ * `GET /admin/thor/dropshipper/cost-prices/has-changes`
475
+ */
476
+ async checkCostPriceChanges(): Promise<CostPriceChangesCheckResponse> {
477
+ return this.request<CostPriceChangesCheckResponse>(
478
+ 'GET',
479
+ '/admin/thor/dropshipper/cost-prices/has-changes',
480
+ );
481
+ }
482
+
483
+ /**
484
+ * Get the full diff of cost price changes since the last acknowledgment.
485
+ * Returns product/variant info with old and new cost prices.
486
+ *
487
+ * `GET /admin/thor/dropshipper/cost-prices/changes`
488
+ */
489
+ async getCostPriceChanges(): Promise<CostPriceChangesResponse> {
490
+ return this.request<CostPriceChangesResponse>(
491
+ 'GET',
492
+ '/admin/thor/dropshipper/cost-prices/changes',
493
+ );
494
+ }
495
+
496
+ /**
497
+ * Acknowledge current cost prices as reviewed. Stores the current hash
498
+ * and snapshot so subsequent checks will not report these prices as changed.
499
+ *
500
+ * `POST /admin/thor/dropshipper/cost-prices/acknowledge`
501
+ */
502
+ async acknowledgeCostPriceChanges(): Promise<AcknowledgeCostPriceChangesResponse> {
503
+ return this.request<AcknowledgeCostPriceChangesResponse>(
504
+ 'POST',
505
+ '/admin/thor/dropshipper/cost-prices/acknowledge',
506
+ );
507
+ }
508
+
440
509
  /**
441
510
  * Toggle whether a product is visible in the public store for the current sales channel.
442
511
  * This does not mutate the shared global Medusa product status.
@@ -1732,4 +1801,4 @@ export class DropshipperClient {
1732
1801
  }
1733
1802
 
1734
1803
  // Re-export types used by callers so they don't need to import from @thorprovider/types directly.
1735
- export type { DropshipperCategory, DropshipperPromotion } from '@thorprovider/types';
1804
+ export type { DropshipperCategory, DropshipperPromotion, RawNotification, GetNotificationsOptions, GetNotificationsResponse } from '@thorprovider/types';