@thorprovider/types 6.0.0 → 7.0.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.
@@ -516,8 +516,6 @@ export interface ExtendedCreateDropshipperOrderResponse {
516
516
  discount_total: number;
517
517
  total: number;
518
518
  profit: number;
519
- /** Desglose de impuestos por tasa (ítems + envío). `total` es el importe. */
520
- tax_lines: DropshipperOrderTaxLine[];
521
519
  created_at: string;
522
520
  /** One shipping method per group (contract v2). Replaces `shipping_method`. */
523
521
  shipping_methods: DropshipperShippingMethod[];
@@ -579,20 +577,6 @@ export interface DropshipperItemTaxLine {
579
577
  subtotal: number;
580
578
  }
581
579
 
582
- /**
583
- * Línea de impuesto del desglose de una orden (ítems + envío).
584
- *
585
- * `total` es el **importe del impuesto** (no la base imponible). No expone
586
- * `subtotal` porque en el contrato de order ese campo también es un importe de
587
- * impuesto (impuesto sobre la base pre-descuento), no la base.
588
- */
589
- export interface DropshipperOrderTaxLine {
590
- code: string | null;
591
- rate: number;
592
- total: number;
593
- kind: 'item' | 'shipping';
594
- }
595
-
596
580
  export interface DropshipperOrderItem {
597
581
  id: string;
598
582
  title: string;
@@ -833,8 +817,6 @@ export interface DropshipperShippingMethod {
833
817
  original_total: number;
834
818
  total: number;
835
819
  tax_total: number;
836
- /** Tax lines del método de envío (importe por tasa). El backend ya las emite. */
837
- tax_lines?: DropshipperItemTaxLine[];
838
820
  discount_total: number;
839
821
  /** Discount adjustments applied to this shipping method (read-only; [] when none). */
840
822
  adjustments?: DropshipperItemAdjustment[];
@@ -926,69 +908,10 @@ export interface DropshipperOrderFulfillment {
926
908
  provider_id: string | null;
927
909
  /** Name of the stock location the fulfillment ships from, when resolvable */
928
910
  location_name: string | null;
929
- /** Delivery type of the fulfillment (a group travels together in one fulfillment). */
930
- type: 'pickup' | 'shipping';
931
- /** Shipping option of origin, to resolve the method name against `order.shipping_methods`. */
932
- shipping_option_id: string | null;
933
- /** Pickup store (name + address) for a `pickup` fulfillment; `null` for shipping. */
934
- pickup_location: DropshipperPickupLocation | null;
935
911
  items: DropshipperFulfillmentItem[];
936
912
  labels: DropshipperFulfillmentLabel[];
937
913
  }
938
914
 
939
- /**
940
- * Estado de un grupo de entrega. `configured` = plan aplicado, aún no enviado
941
- * al almacén; `preparing` = enviado al almacén (FulfillmentDeliveryInfo) sin
942
- * fulfillment; el resto son estados del fulfillment vinculado.
943
- */
944
- export type DropshipperDeliveryGroupStatus =
945
- | 'configured'
946
- | 'preparing'
947
- | 'pending'
948
- | 'packed'
949
- | 'shipped'
950
- | 'delivered'
951
- | 'canceled';
952
-
953
- /**
954
- * Un grupo de entrega de la orden: un grupo configurado del plan de envío
955
- * (`metadata.shipping_plan.configured_groups`), con o sin fulfillment. Los
956
- * campos se resuelven progresivamente a medida que la orden avanza.
957
- */
958
- export interface DropshipperDeliveryGroup {
959
- id: string;
960
- type: 'pickup' | 'shipping';
961
- origin: {
962
- id: string | null;
963
- name: string | null;
964
- /** Código corto del almacén (`metadata.code`), si existe. */
965
- code: string | null;
966
- };
967
- method: {
968
- id: string | null;
969
- name: string | null;
970
- estimated_days: string | null;
971
- };
972
- items: Array<{ title: string; sku: string | null; quantity: number }>;
973
- status: DropshipperDeliveryGroupStatus;
974
- /** Fulfillment vinculado, cuando el grupo ya fue cumplido; `null` si no. */
975
- fulfillment: {
976
- id: string;
977
- status: string;
978
- provider_id: string | null;
979
- packed_at: string | null;
980
- shipped_at: string | null;
981
- delivered_at: string | null;
982
- canceled_at: string | null;
983
- labels: DropshipperFulfillmentLabel[];
984
- } | null;
985
- /** Punto de recogida + encargado (solo grupos `pickup`). */
986
- pickup: {
987
- location: DropshipperPickupLocation | null;
988
- person_in_charge: string | null;
989
- } | null;
990
- }
991
-
992
915
  /** A credit line applied to an order (read-only; generated from a gift card,
993
916
  * store credit or payment collection). `amount` is in major units of
994
917
  * `currency_code`. */
@@ -1034,8 +957,6 @@ export interface DropshipperOrderDetail {
1034
957
  claims?: DropshipperOrderClaim[];
1035
958
  /** Fulfillments on the order, read-only (optional) */
1036
959
  fulfillments?: DropshipperOrderFulfillment[];
1037
- /** Grupos de entrega del plan de envío, con o sin fulfillment (optional). */
1038
- delivery_groups?: DropshipperDeliveryGroup[];
1039
960
  transactions: DropshipperTransaction[];
1040
961
  financial_summary: DropshipperFinancialSummary;
1041
962
  /** Credit lines applied to the order (read-only; `[]` when none). */
@@ -1084,8 +1005,6 @@ export interface CreateDropshipperOrderBody {
1084
1005
  /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
1085
1006
  shipping_groups?: ShippingGroupInput[];
1086
1007
  payment_method_id: string;
1087
- /** Código de gift card (obligatorio si el método de pago es gift card). */
1088
- gift_card_code?: string;
1089
1008
  notes?: string;
1090
1009
  }
1091
1010
 
@@ -1106,22 +1025,6 @@ export interface SetPaymentCollectorBody {
1106
1025
  payment_collected_by: 'dropshipper' | 'provider';
1107
1026
  }
1108
1027
 
1109
- /** Body for `POST /admin/thor/dropshipper/gift-cards/validate` */
1110
- export interface ValidateGiftCardBody {
1111
- code: string;
1112
- /** Moneda de la orden: si se envía, se valida que la gift card coincida. */
1113
- currency_code?: string;
1114
- }
1115
-
1116
- /** Response for `POST /admin/thor/dropshipper/gift-cards/validate` */
1117
- export interface ValidateGiftCardResponse {
1118
- valid: boolean;
1119
- /** Mensaje de usuario cuando `valid` es false. */
1120
- reason?: string;
1121
- balance?: number;
1122
- currency_code?: string;
1123
- }
1124
-
1125
1028
  /** Response for `POST /admin/thor/dropshipper/orders/:id/set-payment-collector` */
1126
1029
  export interface SetPaymentCollectorResponse {
1127
1030
  order_id: string;
@@ -1233,8 +1136,6 @@ export interface DropshipperDraftOrder {
1233
1136
  /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
1234
1137
  shipping_method_id: string | null;
1235
1138
  payment_method_id: string | null;
1236
- /** Código de gift card persistido en el borrador (metadata). */
1237
- gift_card_code?: string | null;
1238
1139
  notes: string | null;
1239
1140
  converted_order_id: string | null; // Reference to Medusa order.id after conversion
1240
1141
  converted_at: string | null; // ISO timestamp when converted
@@ -1285,7 +1186,6 @@ export interface CreateDropshipperDraftOrderBody {
1285
1186
  /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
1286
1187
  shipping_method_id?: string;
1287
1188
  payment_method_id?: string;
1288
- gift_card_code?: string;
1289
1189
  notes?: string;
1290
1190
  }
1291
1191
 
@@ -1311,7 +1211,6 @@ export interface UpdateDropshipperDraftOrderBody {
1311
1211
  /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
1312
1212
  shipping_method_id?: string;
1313
1213
  payment_method_id?: string;
1314
- gift_card_code?: string;
1315
1214
  notes?: string;
1316
1215
  }
1317
1216
 
@@ -1338,41 +1237,6 @@ export interface DeleteDropshipperDraftOrderResponse {
1338
1237
  deleted: boolean;
1339
1238
  }
1340
1239
 
1341
- // ============================================================
1342
- // Order totals preview (Solo Y)
1343
- // ============================================================
1344
-
1345
- /** Item for `POST /admin/thor/dropshipper/orders/preview-totals` */
1346
- export interface PreviewDropshipperOrderItem {
1347
- variant_id: string;
1348
- quantity: number;
1349
- /** Sale price per unit the dropshipper intends to charge (honored over the catalog price). */
1350
- unit_price?: number;
1351
- }
1352
-
1353
- /** Body for `POST /admin/thor/dropshipper/orders/preview-totals` */
1354
- export interface PreviewDropshipperOrderTotalsBody {
1355
- customer_id: string;
1356
- currency_code: string;
1357
- items: PreviewDropshipperOrderItem[];
1358
- shipping_address: DropshipperOrderShippingAddress;
1359
- /** One selected option per shipping group (contract v2). Required when any item needs shipping. */
1360
- shipping_groups?: ShippingGroupInput[];
1361
- }
1362
-
1363
- /** Response for `POST /admin/thor/dropshipper/orders/preview-totals` */
1364
- export interface PreviewDropshipperOrderTotalsResponse {
1365
- subtotal: number;
1366
- items_subtotal: number;
1367
- shipping_subtotal: number;
1368
- shipping_total: number;
1369
- tax_total: number;
1370
- discount_total: number;
1371
- total: number;
1372
- /** Desglose de impuestos por tasa (ítems + envío). `total` es el importe. */
1373
- tax_lines: DropshipperOrderTaxLine[];
1374
- }
1375
-
1376
1240
  // ============================================================
1377
1241
  // Custom Categories (Solo Y)
1378
1242
  // ============================================================
@@ -2014,8 +1878,6 @@ export interface DashboardStats {
2014
1878
  total: number;
2015
1879
  profit: number;
2016
1880
  status: string;
2017
- /** Estado de cobro crudo del backend (captured/authorized/partially_captured/...). */
2018
- payment_status: string;
2019
1881
  created_at: string;
2020
1882
  }>;
2021
1883
  top_products_by_profit: DashboardTopProduct[];
package/src/index.ts CHANGED
@@ -340,7 +340,6 @@ export type {
340
340
  DropshipperOrderShippingAddress,
341
341
  DropshipperOrderItem,
342
342
  DropshipperOrderTotals,
343
- DropshipperOrderTaxLine,
344
343
  DropshipperOrderTimelineEvent,
345
344
  DropshipperOrderDetail,
346
345
  GetDropshipperOrderDetailResponse,
@@ -353,8 +352,6 @@ export type {
353
352
  SetPaymentCollectorResponse,
354
353
  SetPaymentMethodBody,
355
354
  SetPaymentMethodResponse,
356
- ValidateGiftCardBody,
357
- ValidateGiftCardResponse,
358
355
  DropshipperCategory,
359
356
  GetDropshipperCategoriesOptions,
360
357
  GetDropshipperCategoriesResponse,
@@ -444,10 +441,6 @@ export type {
444
441
  ConvertDropshipperDraftOrderBody,
445
442
  ConvertDropshipperDraftOrderResponse,
446
443
  DeleteDropshipperDraftOrderResponse,
447
- // Order totals preview
448
- PreviewDropshipperOrderItem,
449
- PreviewDropshipperOrderTotalsBody,
450
- PreviewDropshipperOrderTotalsResponse,
451
444
  // Dropshipper addresses (channel-scoped)
452
445
  DropshipperAddressBody,
453
446
  DropshipperAddressResponse,