@thorprovider/types 3.13.3 → 3.13.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/dist/index.d.mts +27 -34
- package/dist/index.d.ts +27 -34
- package/package.json +1 -1
- package/src/admin/DropshippingAdmin.ts +28 -28
package/dist/index.d.mts
CHANGED
|
@@ -4133,48 +4133,38 @@ interface DropshipperDraftOrderItem {
|
|
|
4133
4133
|
/** Minimum quantity for the tier price that produced the effective sale price. */
|
|
4134
4134
|
applied_tier_min_qty?: number | null;
|
|
4135
4135
|
}
|
|
4136
|
-
/** A draft order as returned in list responses */
|
|
4136
|
+
/** A draft order as returned in list responses (stored in custom table, NOT Medusa orders) */
|
|
4137
4137
|
interface DropshipperDraftOrder {
|
|
4138
4138
|
id: string;
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
email: string
|
|
4142
|
-
created_at: string;
|
|
4143
|
-
updated_at: string;
|
|
4139
|
+
sales_channel_id: string;
|
|
4140
|
+
customer_id: string | null;
|
|
4141
|
+
email: string;
|
|
4144
4142
|
currency_code: string;
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4143
|
+
region_id: string;
|
|
4144
|
+
items: Array<{
|
|
4145
|
+
variant_id: string;
|
|
4146
|
+
quantity: number;
|
|
4147
|
+
unit_price: number;
|
|
4148
|
+
title: string;
|
|
4149
|
+
sku?: string;
|
|
4150
|
+
thumbnail?: string;
|
|
4151
|
+
metadata?: Record<string, unknown>;
|
|
4152
|
+
}>;
|
|
4149
4153
|
shipping_address: DropshipperOrderShippingAddress | null;
|
|
4150
4154
|
billing_address: DropshipperOrderShippingAddress | null;
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
}>;
|
|
4158
|
-
/** Single shipping method selected by the UI for the draft workflow. */
|
|
4159
|
-
shipping_method?: {
|
|
4160
|
-
id: string;
|
|
4161
|
-
name: string;
|
|
4162
|
-
amount: number;
|
|
4163
|
-
} | null;
|
|
4164
|
-
/** Payment method selected by the UI for the draft workflow. */
|
|
4165
|
-
payment_method?: {
|
|
4166
|
-
id: string;
|
|
4167
|
-
name: string;
|
|
4168
|
-
} | null;
|
|
4155
|
+
shipping_method_id: string | null;
|
|
4156
|
+
notes: string | null;
|
|
4157
|
+
converted_order_id: string | null;
|
|
4158
|
+
converted_at: string | null;
|
|
4159
|
+
created_at: string;
|
|
4160
|
+
updated_at: string;
|
|
4169
4161
|
metadata: Record<string, unknown> | null;
|
|
4170
|
-
/**
|
|
4171
|
-
region_id?: string;
|
|
4172
|
-
/** UI-computed cost total. */
|
|
4162
|
+
/** UI-computed cost total (sum of item costs). */
|
|
4173
4163
|
total_cost?: number;
|
|
4164
|
+
/** UI-computed estimated total (sum of item prices). */
|
|
4165
|
+
estimated_total?: number;
|
|
4174
4166
|
/** UI-computed profit. */
|
|
4175
4167
|
total_profit?: number;
|
|
4176
|
-
/** UI-only flag for "same as shipping" billing address. */
|
|
4177
|
-
use_same_address?: boolean;
|
|
4178
4168
|
}
|
|
4179
4169
|
/** Options for `GET /admin/thor/dropshipper/draft-orders` */
|
|
4180
4170
|
interface GetDropshipperDraftOrdersOptions {
|
|
@@ -4226,12 +4216,13 @@ interface UpdateDropshipperDraftOrderResponse {
|
|
|
4226
4216
|
}
|
|
4227
4217
|
/** Body for `POST /admin/thor/dropshipper/draft-orders/:id/convert` */
|
|
4228
4218
|
interface ConvertDropshipperDraftOrderBody {
|
|
4229
|
-
|
|
4219
|
+
metadata?: Record<string, unknown>;
|
|
4230
4220
|
}
|
|
4231
4221
|
/** Response for `POST /admin/thor/dropshipper/draft-orders/:id/convert` */
|
|
4232
4222
|
interface ConvertDropshipperDraftOrderResponse {
|
|
4233
4223
|
order: DropshipperOrderDetail;
|
|
4234
4224
|
message: string;
|
|
4225
|
+
draft_id: string;
|
|
4235
4226
|
}
|
|
4236
4227
|
/** A dropshipper custom category node */
|
|
4237
4228
|
interface DropshipperCategory {
|
|
@@ -4341,6 +4332,8 @@ interface DropshipperCustomer {
|
|
|
4341
4332
|
total_spent: number;
|
|
4342
4333
|
currency_code: string;
|
|
4343
4334
|
last_order_at: string | null;
|
|
4335
|
+
type: string;
|
|
4336
|
+
status: string;
|
|
4344
4337
|
}
|
|
4345
4338
|
/** Stats on a customer as seen by the dropshipper */
|
|
4346
4339
|
interface DropshipperCustomerStats {
|
package/dist/index.d.ts
CHANGED
|
@@ -4133,48 +4133,38 @@ interface DropshipperDraftOrderItem {
|
|
|
4133
4133
|
/** Minimum quantity for the tier price that produced the effective sale price. */
|
|
4134
4134
|
applied_tier_min_qty?: number | null;
|
|
4135
4135
|
}
|
|
4136
|
-
/** A draft order as returned in list responses */
|
|
4136
|
+
/** A draft order as returned in list responses (stored in custom table, NOT Medusa orders) */
|
|
4137
4137
|
interface DropshipperDraftOrder {
|
|
4138
4138
|
id: string;
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
email: string
|
|
4142
|
-
created_at: string;
|
|
4143
|
-
updated_at: string;
|
|
4139
|
+
sales_channel_id: string;
|
|
4140
|
+
customer_id: string | null;
|
|
4141
|
+
email: string;
|
|
4144
4142
|
currency_code: string;
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4143
|
+
region_id: string;
|
|
4144
|
+
items: Array<{
|
|
4145
|
+
variant_id: string;
|
|
4146
|
+
quantity: number;
|
|
4147
|
+
unit_price: number;
|
|
4148
|
+
title: string;
|
|
4149
|
+
sku?: string;
|
|
4150
|
+
thumbnail?: string;
|
|
4151
|
+
metadata?: Record<string, unknown>;
|
|
4152
|
+
}>;
|
|
4149
4153
|
shipping_address: DropshipperOrderShippingAddress | null;
|
|
4150
4154
|
billing_address: DropshipperOrderShippingAddress | null;
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
}>;
|
|
4158
|
-
/** Single shipping method selected by the UI for the draft workflow. */
|
|
4159
|
-
shipping_method?: {
|
|
4160
|
-
id: string;
|
|
4161
|
-
name: string;
|
|
4162
|
-
amount: number;
|
|
4163
|
-
} | null;
|
|
4164
|
-
/** Payment method selected by the UI for the draft workflow. */
|
|
4165
|
-
payment_method?: {
|
|
4166
|
-
id: string;
|
|
4167
|
-
name: string;
|
|
4168
|
-
} | null;
|
|
4155
|
+
shipping_method_id: string | null;
|
|
4156
|
+
notes: string | null;
|
|
4157
|
+
converted_order_id: string | null;
|
|
4158
|
+
converted_at: string | null;
|
|
4159
|
+
created_at: string;
|
|
4160
|
+
updated_at: string;
|
|
4169
4161
|
metadata: Record<string, unknown> | null;
|
|
4170
|
-
/**
|
|
4171
|
-
region_id?: string;
|
|
4172
|
-
/** UI-computed cost total. */
|
|
4162
|
+
/** UI-computed cost total (sum of item costs). */
|
|
4173
4163
|
total_cost?: number;
|
|
4164
|
+
/** UI-computed estimated total (sum of item prices). */
|
|
4165
|
+
estimated_total?: number;
|
|
4174
4166
|
/** UI-computed profit. */
|
|
4175
4167
|
total_profit?: number;
|
|
4176
|
-
/** UI-only flag for "same as shipping" billing address. */
|
|
4177
|
-
use_same_address?: boolean;
|
|
4178
4168
|
}
|
|
4179
4169
|
/** Options for `GET /admin/thor/dropshipper/draft-orders` */
|
|
4180
4170
|
interface GetDropshipperDraftOrdersOptions {
|
|
@@ -4226,12 +4216,13 @@ interface UpdateDropshipperDraftOrderResponse {
|
|
|
4226
4216
|
}
|
|
4227
4217
|
/** Body for `POST /admin/thor/dropshipper/draft-orders/:id/convert` */
|
|
4228
4218
|
interface ConvertDropshipperDraftOrderBody {
|
|
4229
|
-
|
|
4219
|
+
metadata?: Record<string, unknown>;
|
|
4230
4220
|
}
|
|
4231
4221
|
/** Response for `POST /admin/thor/dropshipper/draft-orders/:id/convert` */
|
|
4232
4222
|
interface ConvertDropshipperDraftOrderResponse {
|
|
4233
4223
|
order: DropshipperOrderDetail;
|
|
4234
4224
|
message: string;
|
|
4225
|
+
draft_id: string;
|
|
4235
4226
|
}
|
|
4236
4227
|
/** A dropshipper custom category node */
|
|
4237
4228
|
interface DropshipperCategory {
|
|
@@ -4341,6 +4332,8 @@ interface DropshipperCustomer {
|
|
|
4341
4332
|
total_spent: number;
|
|
4342
4333
|
currency_code: string;
|
|
4343
4334
|
last_order_at: string | null;
|
|
4335
|
+
type: string;
|
|
4336
|
+
status: string;
|
|
4344
4337
|
}
|
|
4345
4338
|
/** Stats on a customer as seen by the dropshipper */
|
|
4346
4339
|
interface DropshipperCustomerStats {
|
package/package.json
CHANGED
|
@@ -535,41 +535,38 @@ export interface DropshipperDraftOrderItem {
|
|
|
535
535
|
applied_tier_min_qty?: number | null;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
-
/** A draft order as returned in list responses */
|
|
538
|
+
/** A draft order as returned in list responses (stored in custom table, NOT Medusa orders) */
|
|
539
539
|
export interface DropshipperDraftOrder {
|
|
540
|
-
id: string;
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
email: string
|
|
544
|
-
created_at: string;
|
|
545
|
-
updated_at: string;
|
|
540
|
+
id: string; // Format: "ddraft_..." (custom table ID)
|
|
541
|
+
sales_channel_id: string;
|
|
542
|
+
customer_id: string | null;
|
|
543
|
+
email: string;
|
|
546
544
|
currency_code: string;
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
545
|
+
region_id: string;
|
|
546
|
+
items: Array<{
|
|
547
|
+
variant_id: string;
|
|
548
|
+
quantity: number;
|
|
549
|
+
unit_price: number; // Fixed price in cents (dropshipper markup already applied)
|
|
550
|
+
title: string;
|
|
551
|
+
sku?: string;
|
|
552
|
+
thumbnail?: string;
|
|
553
|
+
metadata?: Record<string, unknown>;
|
|
554
|
+
}>;
|
|
551
555
|
shipping_address: DropshipperOrderShippingAddress | null;
|
|
552
556
|
billing_address: DropshipperOrderShippingAddress | null;
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}>;
|
|
560
|
-
/** Single shipping method selected by the UI for the draft workflow. */
|
|
561
|
-
shipping_method?: { id: string; name: string; amount: number } | null;
|
|
562
|
-
/** Payment method selected by the UI for the draft workflow. */
|
|
563
|
-
payment_method?: { id: string; name: string } | null;
|
|
557
|
+
shipping_method_id: string | null;
|
|
558
|
+
notes: string | null;
|
|
559
|
+
converted_order_id: string | null; // Reference to Medusa order.id after conversion
|
|
560
|
+
converted_at: string | null; // ISO timestamp when converted
|
|
561
|
+
created_at: string;
|
|
562
|
+
updated_at: string;
|
|
564
563
|
metadata: Record<string, unknown> | null;
|
|
565
|
-
/**
|
|
566
|
-
region_id?: string;
|
|
567
|
-
/** UI-computed cost total. */
|
|
564
|
+
/** UI-computed cost total (sum of item costs). */
|
|
568
565
|
total_cost?: number;
|
|
566
|
+
/** UI-computed estimated total (sum of item prices). */
|
|
567
|
+
estimated_total?: number;
|
|
569
568
|
/** UI-computed profit. */
|
|
570
569
|
total_profit?: number;
|
|
571
|
-
/** UI-only flag for "same as shipping" billing address. */
|
|
572
|
-
use_same_address?: boolean;
|
|
573
570
|
}
|
|
574
571
|
|
|
575
572
|
/** Options for `GET /admin/thor/dropshipper/draft-orders` */
|
|
@@ -629,13 +626,14 @@ export interface UpdateDropshipperDraftOrderResponse {
|
|
|
629
626
|
|
|
630
627
|
/** Body for `POST /admin/thor/dropshipper/draft-orders/:id/convert` */
|
|
631
628
|
export interface ConvertDropshipperDraftOrderBody {
|
|
632
|
-
|
|
629
|
+
metadata?: Record<string, unknown>; // Optional additional metadata for the created order
|
|
633
630
|
}
|
|
634
631
|
|
|
635
632
|
/** Response for `POST /admin/thor/dropshipper/draft-orders/:id/convert` */
|
|
636
633
|
export interface ConvertDropshipperDraftOrderResponse {
|
|
637
634
|
order: DropshipperOrderDetail;
|
|
638
635
|
message: string;
|
|
636
|
+
draft_id: string; // ID of the draft that was converted
|
|
639
637
|
}
|
|
640
638
|
|
|
641
639
|
// ============================================================
|
|
@@ -772,6 +770,8 @@ export interface DropshipperCustomer {
|
|
|
772
770
|
total_spent: number;
|
|
773
771
|
currency_code: string;
|
|
774
772
|
last_order_at: string | null;
|
|
773
|
+
type: string;
|
|
774
|
+
status: string;
|
|
775
775
|
}
|
|
776
776
|
|
|
777
777
|
/** Stats on a customer as seen by the dropshipper */
|