@thorprovider/medusa-extended 1.8.0 → 1.9.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/dist/index.d.mts +759 -0
- package/dist/index.d.ts +759 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/dropshipper.ts +27 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,759 @@
|
|
|
1
|
+
import { GetChannelCustomersOptions, GetChannelCustomersResponse, GetChannelApiKeysResponse, GetChannelCategoriesOptions, GetChannelCategoriesResponse, GetCategorySalesChannelsResponse, AssignCategoriesToChannelsBody, AssignCategoriesToChannelsResponse, UnassignCategoriesFromChannelsBody, UnassignCategoriesFromChannelsResponse, GetCollectionSalesChannelsResponse, AssignCollectionsToChannelsBody, AssignCollectionsToChannelsResponse, UnassignCollectionsFromChannelsBody, UnassignCollectionsFromChannelsResponse, GetAdminStorefrontConfigResponse, UpdateStorefrontConfigBody, UpdateStorefrontConfigResponse, GetAdminSiteConfigResponse, UpdateSiteConfigBody, UpdateSiteConfigResponse, GetAdminSiteConfigHistoryOptions, GetAdminSiteConfigHistoryResponse, RestoreSiteConfigResponse, DropshipperDashboardCapabilities, GetMyProfileResponse, GetNotificationsOptions, GetNotificationsResponse, OnboardDropshipperBody, OnboardDropshipperResponse, GetVariantCostsOptions, GetVariantCostsResponse, CreateVariantCostBody, CreateVariantCostResponse, BatchVariantCostsBody, BatchVariantCostsResponse, DeleteVariantCostResponse, GetDropshipperProductsOptions, GetDropshipperProductsResponse, ValidateCheckoutItemsRequest, ValidateCheckoutItemsResponse, CostPriceChangesCheckResponse, CostPriceChangesResponse, AcknowledgeCostPriceChangesResponse, UpdateDropshipperProductStatusBody, UpdateDropshipperProductStatusResponse, GetProductAttributesResponse, GetDropshipperAttributesResponse, UpdateDropshipperPricesBody, UpdateDropshipperPricesResponse, GetDropshipperOrdersOptions, GetDropshipperOrdersResponse, GetDropshipperOrderDetailResponse, GetDropshipperShippingOptionsParams, GetDropshipperShippingOptionsResponse, ExtendedCreateDropshipperOrderBody, ExtendedCreateDropshipperOrderResponse, SetPaymentCollectorBody, SetPaymentCollectorResponse, SetPaymentMethodBody, SetPaymentMethodResponse, CancelDropshipperOrderResponse, CreateOrderEditBody, CreateOrderEditResponse, AddOrderEditItemBody, AddOrderEditItemResponse, ConfirmOrderEditResponse, GetOrderNotesResponse, CreateOrderNoteBody, CreateOrderNoteResponse, DeleteOrderNoteResponse, GetProviderCategoriesResponse, GetDropshipperCategoriesOptions, GetDropshipperCategoriesResponse, CreateDropshipperCategoryBody, DropshipperCategory, UpdateDropshipperCategoryBody, DeleteDropshipperCategoryResponse, GetCategoryMappingsOptions, GetCategoryMappingsResponse, CreateCategoryMappingBody, CreateCategoryMappingResponse, DeleteCategoryMappingResponse, GetDropshipperCustomersOptions, GetDropshipperCustomersResponse, GetDropshipperCustomerDetailResponse, CreateDropshipperCustomerBody, CreateDropshipperCustomerResponse, UpdateDropshipperCustomerBody, UpdateDropshipperCustomerResponse, GetDropshipperAddressesResponse, DropshipperAddressBody, DropshipperAddressResponse, GetDropshipperAccountResponse, GetDropshipperPayableResponse, GetDropshipperReceivableResponse, GetSettlementsOptions, GetSettlementsResponse, GetSettlementDetailResponse, GetDropshipperAccountBalanceResponse, GetDropshipperAccountOrdersOptions, GetDropshipperAccountOrdersResponse, CreateSettlementBody, CreateSettlementResponse, ConfirmSettlementBody, UpdateSettlementStatusResponse, CancelSettlementBody, GetAdminDropshipperAccountsResponse, GetAdminAccountBalanceResponse, GetAdminPriceListsResponse, GetUserChannelResponse, GetAdminDropshipperAccountOrdersResponse, GetAdminDropshipperAccountSettlementsOptions, GetAdminDropshipperAccountSettlementsResponse, ResolveGuaranteeBody, ResolveGuaranteeResponse, CreateCompensacionBody, CreateCompensacionResponse, CreateAjusteBody, CreateAjusteResponse, CreateCobroBody, CreateCobroResponse, CreatePagoBody, CreatePagoResponse, CreateReversoBody, CreateReversoResponse, ConfirmMovementBody, ConfirmMovementResponse, CancelMovementBody, CancelMovementResponse, GetFinancialAnalysisResponse, RegisterPaymentBody, RegisterPaymentResponse, GetDropshipperPromotionsOptions, GetDropshipperPromotionsResponse, CreateDropshipperPromotionBody, DropshipperPromotion, UpdateDropshipperPromotionBody, DeleteDropshipperPromotionResponse, GetDashboardStatsOptions, GetDashboardStatsResponse, GetStorefrontDropshipperCategoriesResponse, GetDropshipperDraftOrdersOptions, GetDropshipperDraftOrdersResponse, GetDropshipperDraftOrderDetailResponse, CreateDropshipperDraftOrderBody, CreateDropshipperDraftOrderResponse, UpdateDropshipperDraftOrderBody, UpdateDropshipperDraftOrderResponse, ConvertDropshipperDraftOrderBody, ConvertDropshipperDraftOrderResponse, GetGeoCountriesResponse, GetGeoProvincesResponse, GetGeoCitiesResponse } from '@thorprovider/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Medusa Multi-Tenant Admin Client
|
|
5
|
+
* @module @thorprovider/adapters/providers/medusa/admin
|
|
6
|
+
*
|
|
7
|
+
* Wrapper methods for all `/admin/thor/` endpoints defined in the Thor Commerce
|
|
8
|
+
* multi-tenant API contract. Requires an admin API key (`adminConfig.apiKey`)
|
|
9
|
+
* to be provided when creating the Medusa provider.
|
|
10
|
+
*
|
|
11
|
+
* Every method performs a raw `fetch` against the Medusa backend using the
|
|
12
|
+
* admin API key (`x-medusa-access-token`) — the Medusa JS-SDK's admin client
|
|
13
|
+
* does not expose these custom Thor plugin routes, so we use direct HTTP calls.
|
|
14
|
+
*
|
|
15
|
+
* Endpoint reference: `multitenant-api-contract.md`
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Configuration required to instantiate the admin client.
|
|
20
|
+
*/
|
|
21
|
+
interface MedusaAdminClientConfig {
|
|
22
|
+
/** Medusa backend base URL */
|
|
23
|
+
baseUrl: string;
|
|
24
|
+
/** Secret admin API key (x-medusa-access-token) */
|
|
25
|
+
apiKey: string;
|
|
26
|
+
/** Enable debug logging */
|
|
27
|
+
debug?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* HTTP client for Thor Commerce multi-tenant admin endpoints (`/admin/thor/`).
|
|
31
|
+
*
|
|
32
|
+
* All methods throw `ProviderAPIError` on non-2xx responses.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const admin = new MedusaAdminClient({
|
|
37
|
+
* baseUrl: process.env.MEDUSA_BACKEND_URL!,
|
|
38
|
+
* apiKey: process.env.MEDUSA_ADMIN_API_KEY!,
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* const { customers } = await admin.getChannelCustomers('sc_01JXXXXX');
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare class MedusaAdminClient {
|
|
45
|
+
private baseUrl;
|
|
46
|
+
private apiKey;
|
|
47
|
+
private logger;
|
|
48
|
+
constructor(config: MedusaAdminClientConfig);
|
|
49
|
+
private request;
|
|
50
|
+
/**
|
|
51
|
+
* Paginated list of customers linked to a sales channel.
|
|
52
|
+
*
|
|
53
|
+
* `GET /admin/thor/sales-channels/:id/customers`
|
|
54
|
+
*/
|
|
55
|
+
getChannelCustomers(salesChannelId: string, options?: GetChannelCustomersOptions): Promise<GetChannelCustomersResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Publishable API keys associated with a sales channel.
|
|
58
|
+
*
|
|
59
|
+
* `GET /admin/thor/sales-channels/:id/api-keys`
|
|
60
|
+
*/
|
|
61
|
+
getChannelApiKeys(salesChannelId: string): Promise<GetChannelApiKeysResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Product categories assigned to a sales channel.
|
|
64
|
+
*
|
|
65
|
+
* `GET /admin/thor/sales-channels/:id/categories`
|
|
66
|
+
*/
|
|
67
|
+
getChannelCategories(salesChannelId: string, options?: GetChannelCategoriesOptions): Promise<GetChannelCategoriesResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Sales channels to which a category is assigned.
|
|
70
|
+
*
|
|
71
|
+
* `GET /admin/thor/categories/:id/sales-channels`
|
|
72
|
+
*/
|
|
73
|
+
getCategorySalesChannels(categoryId: string): Promise<GetCategorySalesChannelsResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Assign a category to one or more sales channels (idempotent).
|
|
76
|
+
*
|
|
77
|
+
* `POST /admin/thor/categories/:id/sales-channels`
|
|
78
|
+
*/
|
|
79
|
+
assignCategoryToChannels(categoryId: string, body: AssignCategoriesToChannelsBody): Promise<AssignCategoriesToChannelsResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Remove category assignment from one or more sales channels (idempotent).
|
|
82
|
+
*
|
|
83
|
+
* `DELETE /admin/thor/categories/:id/sales-channels`
|
|
84
|
+
*/
|
|
85
|
+
unassignCategoryFromChannels(categoryId: string, body: UnassignCategoriesFromChannelsBody): Promise<UnassignCategoriesFromChannelsResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* Sales channels to which a collection is assigned.
|
|
88
|
+
*
|
|
89
|
+
* `GET /admin/thor/collections/:id/sales-channels`
|
|
90
|
+
*/
|
|
91
|
+
getCollectionSalesChannels(collectionId: string): Promise<GetCollectionSalesChannelsResponse>;
|
|
92
|
+
/**
|
|
93
|
+
* Assign a collection to one or more sales channels (idempotent).
|
|
94
|
+
*
|
|
95
|
+
* `POST /admin/thor/collections/:id/sales-channels`
|
|
96
|
+
*/
|
|
97
|
+
assignCollectionToChannels(collectionId: string, body: AssignCollectionsToChannelsBody): Promise<AssignCollectionsToChannelsResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Remove collection assignment from one or more sales channels (idempotent).
|
|
100
|
+
*
|
|
101
|
+
* `DELETE /admin/thor/collections/:id/sales-channels`
|
|
102
|
+
*/
|
|
103
|
+
unassignCollectionFromChannels(collectionId: string, body: UnassignCollectionsFromChannelsBody): Promise<UnassignCollectionsFromChannelsResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Read the visual storefront configuration for a channel.
|
|
106
|
+
* `:id` is the `sales_channel_id`.
|
|
107
|
+
*
|
|
108
|
+
* `GET /admin/thor/storefront-config/:id`
|
|
109
|
+
*/
|
|
110
|
+
getStorefrontConfig(salesChannelId: string): Promise<GetAdminStorefrontConfigResponse>;
|
|
111
|
+
/**
|
|
112
|
+
* Update the visual storefront configuration for a channel.
|
|
113
|
+
* Triggers the `storefront_config.updated` event → ISR webhook.
|
|
114
|
+
*
|
|
115
|
+
* `PUT /admin/thor/storefront-config/:id`
|
|
116
|
+
*/
|
|
117
|
+
updateStorefrontConfig(salesChannelId: string, body: UpdateStorefrontConfigBody): Promise<UpdateStorefrontConfigResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Read the active Site Designer configuration for a channel, including the
|
|
120
|
+
* last 10 history entries.
|
|
121
|
+
*
|
|
122
|
+
* `GET /admin/thor/site-config/:sales_channel_id`
|
|
123
|
+
*/
|
|
124
|
+
getSiteConfig(salesChannelId: string): Promise<GetAdminSiteConfigResponse>;
|
|
125
|
+
/**
|
|
126
|
+
* Update the Site Designer configuration for a channel.
|
|
127
|
+
* Creates a new history entry on every PUT.
|
|
128
|
+
*
|
|
129
|
+
* `PUT /admin/thor/site-config/:sales_channel_id`
|
|
130
|
+
*/
|
|
131
|
+
updateSiteConfig(salesChannelId: string, body: UpdateSiteConfigBody): Promise<UpdateSiteConfigResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* Full paginated history of Site Designer versions for a channel.
|
|
134
|
+
* Entries are immutable — they are never deleted.
|
|
135
|
+
*
|
|
136
|
+
* `GET /admin/thor/site-config/:sales_channel_id/history`
|
|
137
|
+
*/
|
|
138
|
+
getSiteConfigHistory(salesChannelId: string, options?: GetAdminSiteConfigHistoryOptions): Promise<GetAdminSiteConfigHistoryResponse>;
|
|
139
|
+
/**
|
|
140
|
+
* Restore a previous Site Designer version.
|
|
141
|
+
* Internally runs the update workflow with the stored config of the target
|
|
142
|
+
* version — this creates a **new** history entry and does NOT mutate past
|
|
143
|
+
* entries.
|
|
144
|
+
*
|
|
145
|
+
* `POST /admin/thor/site-config/:sales_channel_id/restore/:version`
|
|
146
|
+
*/
|
|
147
|
+
restoreSiteConfig(salesChannelId: string, version: string): Promise<RestoreSiteConfigResponse>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @fileoverview Dropshipper Client — Thor Commerce Extended
|
|
152
|
+
* @module @thorprovider/medusa-extended/dropshipper
|
|
153
|
+
*
|
|
154
|
+
* HTTP client for all `/admin/thor/dropshipper/` endpoints.
|
|
155
|
+
*
|
|
156
|
+
* Used by both:
|
|
157
|
+
* - X (ThorProvider admin) — authenticated via admin JWT, role "Admin"
|
|
158
|
+
* - Y (Dropshipper panel) — authenticated via dropshipper JWT, role "Dropshipper"
|
|
159
|
+
*
|
|
160
|
+
* Access control is enforced server-side via `withDropshipperScope` middleware.
|
|
161
|
+
* This client always sends `Authorization: Bearer <token>`.
|
|
162
|
+
*
|
|
163
|
+
* Endpoint reference: `dropshipping-api-contract.md`
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Configuration required to instantiate the dropshipper client.
|
|
168
|
+
*/
|
|
169
|
+
interface DropshipperClientConfig {
|
|
170
|
+
/** Medusa backend base URL */
|
|
171
|
+
baseUrl: string;
|
|
172
|
+
/**
|
|
173
|
+
* JWT token obtained from `POST /auth/user/emailpass`.
|
|
174
|
+
* Used as `Authorization: Bearer <token>`.
|
|
175
|
+
*/
|
|
176
|
+
token: string;
|
|
177
|
+
/** Enable debug logging */
|
|
178
|
+
debug?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* HTTP client for Thor Commerce dropshipping endpoints (`/admin/thor/dropshipper/`).
|
|
182
|
+
*
|
|
183
|
+
* All methods throw `ProviderAPIError` on non-2xx responses.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```typescript
|
|
187
|
+
* const client = new DropshipperClient({
|
|
188
|
+
* baseUrl: process.env.MEDUSA_BACKEND_URL!,
|
|
189
|
+
* token: jwtFromLogin,
|
|
190
|
+
* });
|
|
191
|
+
*
|
|
192
|
+
* // Y: list own products
|
|
193
|
+
* const { products } = await client.getProducts();
|
|
194
|
+
*
|
|
195
|
+
* // X: onboard a new dropshipper
|
|
196
|
+
* const { dropshipper } = await client.onboardDropshipper({ ... });
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
declare class DropshipperClient {
|
|
200
|
+
private baseUrl;
|
|
201
|
+
private token;
|
|
202
|
+
private logger;
|
|
203
|
+
constructor(config: DropshipperClientConfig);
|
|
204
|
+
private request;
|
|
205
|
+
/**
|
|
206
|
+
* Fetch dashboard capabilities from the backend.
|
|
207
|
+
*
|
|
208
|
+
* `GET /admin/thor/dropshipper/capabilities`
|
|
209
|
+
*/
|
|
210
|
+
getCapabilities(): Promise<DropshipperDashboardCapabilities>;
|
|
211
|
+
/**
|
|
212
|
+
* Fetch the authenticated dropshipper's personal profile including
|
|
213
|
+
* first_name, last_name, email, avatar_url, and linked sales channel.
|
|
214
|
+
*
|
|
215
|
+
* `GET /admin/thor/dropshipper/me`
|
|
216
|
+
*/
|
|
217
|
+
getMyProfile(): Promise<GetMyProfileResponse>;
|
|
218
|
+
/**
|
|
219
|
+
* List feed notifications for the authenticated dropshipper.
|
|
220
|
+
*
|
|
221
|
+
* `GET /admin/thor/dropshipper/notifications`
|
|
222
|
+
*/
|
|
223
|
+
getNotifications(options?: GetNotificationsOptions): Promise<GetNotificationsResponse>;
|
|
224
|
+
/**
|
|
225
|
+
* Create a new dropshipper account (sales channel + user + price list).
|
|
226
|
+
*
|
|
227
|
+
* `POST /admin/thor/dropshipper/onboard`
|
|
228
|
+
*/
|
|
229
|
+
onboardDropshipper(body: OnboardDropshipperBody): Promise<OnboardDropshipperResponse>;
|
|
230
|
+
/**
|
|
231
|
+
* List variant cost records, optionally filtered by account/variant/currency.
|
|
232
|
+
*
|
|
233
|
+
* `GET /admin/thor/dropshipper/variant-costs`
|
|
234
|
+
*/
|
|
235
|
+
getVariantCosts(options?: GetVariantCostsOptions): Promise<GetVariantCostsResponse>;
|
|
236
|
+
/**
|
|
237
|
+
* Upsert a single variant cost record.
|
|
238
|
+
*
|
|
239
|
+
* `POST /admin/thor/dropshipper/variant-costs`
|
|
240
|
+
*/
|
|
241
|
+
createVariantCost(body: CreateVariantCostBody): Promise<CreateVariantCostResponse>;
|
|
242
|
+
/**
|
|
243
|
+
* Batch-upsert variant costs for a given account and currency.
|
|
244
|
+
*
|
|
245
|
+
* `POST /admin/thor/dropshipper/variant-costs/batch`
|
|
246
|
+
*/
|
|
247
|
+
batchVariantCosts(body: BatchVariantCostsBody): Promise<BatchVariantCostsResponse>;
|
|
248
|
+
/**
|
|
249
|
+
* Delete a variant cost record by ID.
|
|
250
|
+
*
|
|
251
|
+
* `DELETE /admin/thor/dropshipper/variant-costs/:id`
|
|
252
|
+
*/
|
|
253
|
+
deleteVariantCost(id: string): Promise<DeleteVariantCostResponse>;
|
|
254
|
+
/**
|
|
255
|
+
* List products available in Y's channel with cost/margin data.
|
|
256
|
+
*
|
|
257
|
+
* `GET /admin/thor/dropshipper/products`
|
|
258
|
+
*/
|
|
259
|
+
getProducts(options?: GetDropshipperProductsOptions): Promise<GetDropshipperProductsResponse>;
|
|
260
|
+
/**
|
|
261
|
+
* Validate cart items for checkout — returns current stock_quantity, sale_price,
|
|
262
|
+
* and cost_price for each variant so the client can detect stale prices or
|
|
263
|
+
* insufficient stock before creating an order or converting a draft.
|
|
264
|
+
*
|
|
265
|
+
* `POST /admin/thor/dropshipper/checkout/validate`
|
|
266
|
+
*/
|
|
267
|
+
validateCheckoutItems(body: ValidateCheckoutItemsRequest): Promise<ValidateCheckoutItemsResponse>;
|
|
268
|
+
/**
|
|
269
|
+
* Check whether cost prices have changed since the last acknowledgment.
|
|
270
|
+
* Compares a hash of all base cost prices from the channel's price list
|
|
271
|
+
* against a stored snapshot on the dropshipper account.
|
|
272
|
+
*
|
|
273
|
+
* `GET /admin/thor/dropshipper/cost-prices/has-changes`
|
|
274
|
+
*/
|
|
275
|
+
checkCostPriceChanges(): Promise<CostPriceChangesCheckResponse>;
|
|
276
|
+
/**
|
|
277
|
+
* Get the full diff of cost price changes since the last acknowledgment.
|
|
278
|
+
* Returns product/variant info with old and new cost prices.
|
|
279
|
+
*
|
|
280
|
+
* `GET /admin/thor/dropshipper/cost-prices/changes`
|
|
281
|
+
*/
|
|
282
|
+
getCostPriceChanges(): Promise<CostPriceChangesResponse>;
|
|
283
|
+
/**
|
|
284
|
+
* Acknowledge current cost prices as reviewed. Stores the current hash
|
|
285
|
+
* and snapshot so subsequent checks will not report these prices as changed.
|
|
286
|
+
*
|
|
287
|
+
* `POST /admin/thor/dropshipper/cost-prices/acknowledge`
|
|
288
|
+
*/
|
|
289
|
+
acknowledgeCostPriceChanges(): Promise<AcknowledgeCostPriceChangesResponse>;
|
|
290
|
+
/**
|
|
291
|
+
* Toggle whether a product is visible in the public store for the current sales channel.
|
|
292
|
+
* This does not mutate the shared global Medusa product status.
|
|
293
|
+
*
|
|
294
|
+
* `POST /admin/thor/dropshipper/products/:id/status`
|
|
295
|
+
*/
|
|
296
|
+
updateProductStatus(productId: string, body: UpdateDropshipperProductStatusBody): Promise<UpdateDropshipperProductStatusResponse>;
|
|
297
|
+
/**
|
|
298
|
+
* Fetch custom attribute values assigned to a product, grouped by attribute.
|
|
299
|
+
*
|
|
300
|
+
* `GET /admin/thor/dropshipper/products/:id/attributes`
|
|
301
|
+
*/
|
|
302
|
+
getProductAttributes(productId: string): Promise<GetProductAttributesResponse>;
|
|
303
|
+
/**
|
|
304
|
+
* List attribute definitions (with their possible values) scoped to the
|
|
305
|
+
* dropshipper's channel. Only attributes linked to at least one channel
|
|
306
|
+
* product are returned.
|
|
307
|
+
*
|
|
308
|
+
* `GET /admin/thor/dropshipper/attributes`
|
|
309
|
+
*/
|
|
310
|
+
getAttributes(): Promise<GetDropshipperAttributesResponse>;
|
|
311
|
+
/**
|
|
312
|
+
* Bulk-update product and variant margins on Y's channel price list.
|
|
313
|
+
*
|
|
314
|
+
* `PUT /admin/thor/dropshipper/prices`
|
|
315
|
+
*/
|
|
316
|
+
updatePrices(body: UpdateDropshipperPricesBody): Promise<UpdateDropshipperPricesResponse>;
|
|
317
|
+
/**
|
|
318
|
+
* Paginated list of orders in Y's channel.
|
|
319
|
+
*
|
|
320
|
+
* `GET /admin/thor/dropshipper/orders`
|
|
321
|
+
*/
|
|
322
|
+
getOrders(options?: GetDropshipperOrdersOptions): Promise<GetDropshipperOrdersResponse>;
|
|
323
|
+
/**
|
|
324
|
+
* Full detail for a single order with profit breakdown.
|
|
325
|
+
*
|
|
326
|
+
* `GET /admin/thor/dropshipper/orders/:id`
|
|
327
|
+
*/
|
|
328
|
+
getOrder(orderId: string): Promise<GetDropshipperOrderDetailResponse>;
|
|
329
|
+
/**
|
|
330
|
+
* List shipping options for a manual dropshipper order.
|
|
331
|
+
*
|
|
332
|
+
* `GET /admin/thor/dropshipper/orders/shipping-options`
|
|
333
|
+
*/
|
|
334
|
+
getOrderShippingOptions(params: GetDropshipperShippingOptionsParams): Promise<GetDropshipperShippingOptionsResponse>;
|
|
335
|
+
/**
|
|
336
|
+
* Manually create an order on behalf of a customer.
|
|
337
|
+
*
|
|
338
|
+
* `POST /admin/thor/dropshipper/orders`
|
|
339
|
+
*/
|
|
340
|
+
createOrder(body: ExtendedCreateDropshipperOrderBody): Promise<ExtendedCreateDropshipperOrderResponse>;
|
|
341
|
+
/**
|
|
342
|
+
* Set who collects payment for an order (Solo X).
|
|
343
|
+
*
|
|
344
|
+
* `POST /admin/thor/dropshipper/orders/:id/set-payment-collector`
|
|
345
|
+
*/
|
|
346
|
+
setPaymentCollector(orderId: string, body: SetPaymentCollectorBody): Promise<SetPaymentCollectorResponse>;
|
|
347
|
+
/**
|
|
348
|
+
* Change the payment method of a confirmed order.
|
|
349
|
+
*
|
|
350
|
+
* `POST /admin/thor/dropshipper/orders/:id/set-payment-method`
|
|
351
|
+
*/
|
|
352
|
+
setPaymentMethod(orderId: string, body: SetPaymentMethodBody): Promise<SetPaymentMethodResponse>;
|
|
353
|
+
/**
|
|
354
|
+
* Cancel a dropshipper order.
|
|
355
|
+
*
|
|
356
|
+
* `POST /admin/thor/dropshipper/orders/:id/cancel`
|
|
357
|
+
*/
|
|
358
|
+
cancelOrder(orderId: string): Promise<CancelDropshipperOrderResponse>;
|
|
359
|
+
/**
|
|
360
|
+
* Create an order edit for a dropshipper order.
|
|
361
|
+
*
|
|
362
|
+
* `POST /admin/thor/dropshipper/orders/:id/edit`
|
|
363
|
+
*/
|
|
364
|
+
createOrderEdit(orderId: string, body?: CreateOrderEditBody): Promise<CreateOrderEditResponse>;
|
|
365
|
+
/**
|
|
366
|
+
* Add an item to the active order edit.
|
|
367
|
+
*
|
|
368
|
+
* `POST /admin/thor/dropshipper/orders/:id/edit/items`
|
|
369
|
+
*/
|
|
370
|
+
addOrderEditItem(orderId: string, body: AddOrderEditItemBody): Promise<AddOrderEditItemResponse>;
|
|
371
|
+
/**
|
|
372
|
+
* Confirm the active order edit, applying changes to the order.
|
|
373
|
+
*
|
|
374
|
+
* `POST /admin/thor/dropshipper/orders/:id/edit/confirm`
|
|
375
|
+
*/
|
|
376
|
+
confirmOrderEdit(orderId: string): Promise<ConfirmOrderEditResponse>;
|
|
377
|
+
/**
|
|
378
|
+
* Get all notes for an order.
|
|
379
|
+
*
|
|
380
|
+
* `GET /admin/thor/dropshipper/orders/:id/notes`
|
|
381
|
+
*/
|
|
382
|
+
getOrderNotes(orderId: string): Promise<GetOrderNotesResponse>;
|
|
383
|
+
/**
|
|
384
|
+
* Create a new note for an order.
|
|
385
|
+
*
|
|
386
|
+
* `POST /admin/thor/dropshipper/orders/:id/notes`
|
|
387
|
+
*/
|
|
388
|
+
createOrderNote(orderId: string, body: CreateOrderNoteBody): Promise<CreateOrderNoteResponse>;
|
|
389
|
+
/**
|
|
390
|
+
* Delete a note from an order.
|
|
391
|
+
*
|
|
392
|
+
* `DELETE /admin/thor/dropshipper/orders/:id/notes/:noteId`
|
|
393
|
+
*/
|
|
394
|
+
deleteOrderNote(orderId: string, noteId: string): Promise<DeleteOrderNoteResponse>;
|
|
395
|
+
/**
|
|
396
|
+
* List Medusa provider categories linked to Y's channel (read-only).
|
|
397
|
+
*
|
|
398
|
+
* `GET /admin/thor/dropshipper/categories/provider`
|
|
399
|
+
*/
|
|
400
|
+
getProviderCategories(): Promise<GetProviderCategoriesResponse>;
|
|
401
|
+
/**
|
|
402
|
+
* List Y's custom product categories.
|
|
403
|
+
*
|
|
404
|
+
* `GET /admin/thor/dropshipper/categories`
|
|
405
|
+
*/
|
|
406
|
+
getCategories(options?: GetDropshipperCategoriesOptions): Promise<GetDropshipperCategoriesResponse>;
|
|
407
|
+
/**
|
|
408
|
+
* Create a custom category in Y's channel.
|
|
409
|
+
*
|
|
410
|
+
* `POST /admin/thor/dropshipper/categories`
|
|
411
|
+
*/
|
|
412
|
+
createCategory(body: CreateDropshipperCategoryBody): Promise<DropshipperCategory>;
|
|
413
|
+
/**
|
|
414
|
+
* Update a custom category.
|
|
415
|
+
*
|
|
416
|
+
* `PUT /admin/thor/dropshipper/categories/:id`
|
|
417
|
+
*/
|
|
418
|
+
updateCategory(categoryId: string, body: UpdateDropshipperCategoryBody): Promise<DropshipperCategory>;
|
|
419
|
+
/**
|
|
420
|
+
* Delete a custom category.
|
|
421
|
+
*
|
|
422
|
+
* `DELETE /admin/thor/dropshipper/categories/:id`
|
|
423
|
+
*/
|
|
424
|
+
deleteCategory(categoryId: string, options?: {
|
|
425
|
+
force?: boolean;
|
|
426
|
+
}): Promise<DeleteDropshipperCategoryResponse>;
|
|
427
|
+
/**
|
|
428
|
+
* List product-to-category mappings, optionally filtered by product.
|
|
429
|
+
*
|
|
430
|
+
* `GET /admin/thor/dropshipper/category-mappings`
|
|
431
|
+
*/
|
|
432
|
+
getCategoryMappings(options?: GetCategoryMappingsOptions): Promise<GetCategoryMappingsResponse>;
|
|
433
|
+
/**
|
|
434
|
+
* Map a product to a custom category.
|
|
435
|
+
*
|
|
436
|
+
* `POST /admin/thor/dropshipper/category-mappings`
|
|
437
|
+
*/
|
|
438
|
+
createCategoryMapping(body: CreateCategoryMappingBody): Promise<CreateCategoryMappingResponse>;
|
|
439
|
+
/**
|
|
440
|
+
* Remove a product-to-category mapping.
|
|
441
|
+
*
|
|
442
|
+
* `DELETE /admin/thor/dropshipper/category-mappings/:id`
|
|
443
|
+
*/
|
|
444
|
+
deleteCategoryMapping(mappingId: string): Promise<DeleteCategoryMappingResponse>;
|
|
445
|
+
/**
|
|
446
|
+
* Paginated list of customers in Y's channel.
|
|
447
|
+
*
|
|
448
|
+
* `GET /admin/thor/dropshipper/customers`
|
|
449
|
+
*/
|
|
450
|
+
getCustomers(options?: GetDropshipperCustomersOptions): Promise<GetDropshipperCustomersResponse>;
|
|
451
|
+
/**
|
|
452
|
+
* Backwards-compatible alias used by the dashboard checkout flow.
|
|
453
|
+
*/
|
|
454
|
+
getChannelCustomers(_channelId: string, options?: GetDropshipperCustomersOptions): Promise<GetDropshipperCustomersResponse>;
|
|
455
|
+
/**
|
|
456
|
+
* Full detail for a single customer.
|
|
457
|
+
*
|
|
458
|
+
* `GET /admin/thor/dropshipper/customers/:id`
|
|
459
|
+
*/
|
|
460
|
+
getCustomer(customerId: string): Promise<GetDropshipperCustomerDetailResponse>;
|
|
461
|
+
/**
|
|
462
|
+
* Create a customer scoped to Y's channel.
|
|
463
|
+
*
|
|
464
|
+
* `POST /admin/thor/dropshipper/customers`
|
|
465
|
+
*/
|
|
466
|
+
createCustomer(body: CreateDropshipperCustomerBody): Promise<CreateDropshipperCustomerResponse>;
|
|
467
|
+
/**
|
|
468
|
+
* Update a customer scoped to Y's channel.
|
|
469
|
+
*
|
|
470
|
+
* `POST /admin/thor/dropshipper/customers/:id`
|
|
471
|
+
*/
|
|
472
|
+
updateCustomer(customerId: string, body: UpdateDropshipperCustomerBody): Promise<UpdateDropshipperCustomerResponse>;
|
|
473
|
+
/**
|
|
474
|
+
* Transform a raw snake_case address from the API into a camelCase Address.
|
|
475
|
+
*/
|
|
476
|
+
private transformAddress;
|
|
477
|
+
/**
|
|
478
|
+
* List addresses for a customer in Y's channel.
|
|
479
|
+
*
|
|
480
|
+
* `GET /admin/thor/dropshipper/customers/:id/addresses`
|
|
481
|
+
*/
|
|
482
|
+
getCustomerAddresses(customerId: string): Promise<GetDropshipperAddressesResponse>;
|
|
483
|
+
/**
|
|
484
|
+
* Create a new address for a customer.
|
|
485
|
+
*
|
|
486
|
+
* `POST /admin/thor/dropshipper/customers/:id/addresses`
|
|
487
|
+
*/
|
|
488
|
+
createCustomerAddress(customerId: string, body: DropshipperAddressBody): Promise<DropshipperAddressResponse>;
|
|
489
|
+
/**
|
|
490
|
+
* Update an existing customer address.
|
|
491
|
+
*
|
|
492
|
+
* `POST /admin/thor/dropshipper/customers/:id/addresses/:addressId`
|
|
493
|
+
*/
|
|
494
|
+
updateCustomerAddress(customerId: string, addressId: string, body: Partial<DropshipperAddressBody>): Promise<DropshipperAddressResponse>;
|
|
495
|
+
/**
|
|
496
|
+
* Delete a customer address.
|
|
497
|
+
*
|
|
498
|
+
* `DELETE /admin/thor/dropshipper/customers/:id/addresses/:addressId`
|
|
499
|
+
*/
|
|
500
|
+
deleteCustomerAddress(customerId: string, addressId: string): Promise<{
|
|
501
|
+
deleted: true;
|
|
502
|
+
id: string;
|
|
503
|
+
}>;
|
|
504
|
+
/**
|
|
505
|
+
* Y's account info with current balance.
|
|
506
|
+
*
|
|
507
|
+
* `GET /admin/thor/dropshipper/account`
|
|
508
|
+
*/
|
|
509
|
+
getAccount(): Promise<GetDropshipperAccountResponse>;
|
|
510
|
+
/**
|
|
511
|
+
* Orders where Y owes money to X (Y collected payment, needs to pay costs).
|
|
512
|
+
*
|
|
513
|
+
* `GET /admin/thor/dropshipper/account/payable`
|
|
514
|
+
*/
|
|
515
|
+
getPayable(): Promise<GetDropshipperPayableResponse>;
|
|
516
|
+
/**
|
|
517
|
+
* Orders where X owes money to Y (X collected COD, needs to transfer profit).
|
|
518
|
+
*
|
|
519
|
+
* `GET /admin/thor/dropshipper/account/receivable`
|
|
520
|
+
*/
|
|
521
|
+
getReceivable(): Promise<GetDropshipperReceivableResponse>;
|
|
522
|
+
/**
|
|
523
|
+
* List settlements (Y sees own; X can filter by account_id).
|
|
524
|
+
*
|
|
525
|
+
* `GET /admin/thor/dropshipper/settlements`
|
|
526
|
+
*/
|
|
527
|
+
getSettlements(options?: GetSettlementsOptions): Promise<GetSettlementsResponse>;
|
|
528
|
+
/**
|
|
529
|
+
* Full detail for a single settlement record.
|
|
530
|
+
*
|
|
531
|
+
* `GET /admin/thor/dropshipper/settlements/:id`
|
|
532
|
+
*/
|
|
533
|
+
getSettlement(settlementId: string): Promise<GetSettlementDetailResponse>;
|
|
534
|
+
/**
|
|
535
|
+
* Consolidated financial balance for the authenticated dropshipper.
|
|
536
|
+
*
|
|
537
|
+
* `GET /admin/thor/dropshipper/account/balance`
|
|
538
|
+
*/
|
|
539
|
+
getAccountBalance(): Promise<GetDropshipperAccountBalanceResponse>;
|
|
540
|
+
/**
|
|
541
|
+
* Unified financial order list for the authenticated dropshipper.
|
|
542
|
+
*
|
|
543
|
+
* `GET /admin/thor/dropshipper/account/orders`
|
|
544
|
+
*/
|
|
545
|
+
getAccountOrders(options?: GetDropshipperAccountOrdersOptions): Promise<GetDropshipperAccountOrdersResponse>;
|
|
546
|
+
/**
|
|
547
|
+
* Create a settlement record for a dropshipper account.
|
|
548
|
+
*
|
|
549
|
+
* `POST /admin/thor/dropshipper/admin/settlements`
|
|
550
|
+
*/
|
|
551
|
+
createSettlement(body: CreateSettlementBody): Promise<CreateSettlementResponse>;
|
|
552
|
+
/**
|
|
553
|
+
* Confirm a pending settlement (marks it as paid/received).
|
|
554
|
+
*
|
|
555
|
+
* `POST /admin/thor/dropshipper/admin/settlements/:id/confirm`
|
|
556
|
+
*/
|
|
557
|
+
confirmSettlement(settlementId: string, body?: ConfirmSettlementBody): Promise<UpdateSettlementStatusResponse>;
|
|
558
|
+
/**
|
|
559
|
+
* Cancel a pending settlement.
|
|
560
|
+
*
|
|
561
|
+
* `POST /admin/thor/dropshipper/admin/settlements/:id/cancel`
|
|
562
|
+
*/
|
|
563
|
+
cancelSettlement(settlementId: string, body?: CancelSettlementBody): Promise<UpdateSettlementStatusResponse>;
|
|
564
|
+
/**
|
|
565
|
+
* X views all settlement records across all dropshipper accounts.
|
|
566
|
+
*
|
|
567
|
+
* `GET /admin/thor/dropshipper/admin/settlements`
|
|
568
|
+
*/
|
|
569
|
+
getAdminSettlements(options?: GetSettlementsOptions): Promise<GetSettlementsResponse>;
|
|
570
|
+
/**
|
|
571
|
+
* List all dropshipper accounts.
|
|
572
|
+
*
|
|
573
|
+
* `GET /admin/thor/dropshipper/admin/accounts`
|
|
574
|
+
*/
|
|
575
|
+
getAdminAccounts(): Promise<GetAdminDropshipperAccountsResponse>;
|
|
576
|
+
/**
|
|
577
|
+
* Full balance detail for a specific dropshipper account.
|
|
578
|
+
*
|
|
579
|
+
* `GET /admin/thor/dropshipper/admin/accounts/:id/balance`
|
|
580
|
+
*/
|
|
581
|
+
getAdminAccountBalance(accountId: string): Promise<GetAdminAccountBalanceResponse>;
|
|
582
|
+
/**
|
|
583
|
+
* List all dropshipper price lists.
|
|
584
|
+
*
|
|
585
|
+
* `GET /admin/thor/dropshipper/admin/price-lists`
|
|
586
|
+
*/
|
|
587
|
+
getAdminPriceLists(): Promise<GetAdminPriceListsResponse>;
|
|
588
|
+
/**
|
|
589
|
+
* Utility: look up which sales channel a user belongs to.
|
|
590
|
+
*
|
|
591
|
+
* `GET /admin/thor/dropshipper/admin/user-channel`
|
|
592
|
+
*/
|
|
593
|
+
getUserChannel(): Promise<GetUserChannelResponse>;
|
|
594
|
+
/**
|
|
595
|
+
* List orders with financial detail for a dropshipper account (Admin only).
|
|
596
|
+
*
|
|
597
|
+
* `GET /admin/thor/dropshipper/admin/accounts/:id/orders`
|
|
598
|
+
*/
|
|
599
|
+
getAdminAccountOrders(accountId: string, options?: GetDropshipperAccountOrdersOptions): Promise<GetAdminDropshipperAccountOrdersResponse>;
|
|
600
|
+
/**
|
|
601
|
+
* List financial movements for a dropshipper account (Admin only).
|
|
602
|
+
*
|
|
603
|
+
* `GET /admin/thor/dropshipper/admin/accounts/:id/settlements`
|
|
604
|
+
*/
|
|
605
|
+
getAdminAccountSettlements(accountId: string, options?: GetAdminDropshipperAccountSettlementsOptions): Promise<GetAdminDropshipperAccountSettlementsResponse>;
|
|
606
|
+
/**
|
|
607
|
+
* Manually resolve a guarantee on an order (Admin only).
|
|
608
|
+
*
|
|
609
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/guarantee/:order_id`
|
|
610
|
+
*/
|
|
611
|
+
resolveGuarantee(accountId: string, orderId: string, body: ResolveGuaranteeBody): Promise<ResolveGuaranteeResponse>;
|
|
612
|
+
/**
|
|
613
|
+
* Create an internal compensation (netting) between DS and Thor debts (Admin only).
|
|
614
|
+
*
|
|
615
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/settlements/compensacion`
|
|
616
|
+
*/
|
|
617
|
+
createCompensacion(accountId: string, body: CreateCompensacionBody): Promise<CreateCompensacionResponse>;
|
|
618
|
+
/**
|
|
619
|
+
* Create a financial adjustment (Admin only).
|
|
620
|
+
*
|
|
621
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/settlements/ajuste`
|
|
622
|
+
*/
|
|
623
|
+
createAjuste(accountId: string, body: CreateAjusteBody): Promise<CreateAjusteResponse>;
|
|
624
|
+
/**
|
|
625
|
+
* Register a cobro — DS pays Thor the product cost (Admin only).
|
|
626
|
+
*
|
|
627
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/settlements/cobro`
|
|
628
|
+
*/
|
|
629
|
+
createCobro(accountId: string, body: CreateCobroBody): Promise<CreateCobroResponse>;
|
|
630
|
+
/**
|
|
631
|
+
* Register a pago — Thor pays the dropshipper their commission (Admin only).
|
|
632
|
+
*
|
|
633
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/settlements/pago`
|
|
634
|
+
*/
|
|
635
|
+
createPago(accountId: string, body: CreatePagoBody): Promise<CreatePagoResponse>;
|
|
636
|
+
/**
|
|
637
|
+
* Reverse a confirmed financial movement (Admin only).
|
|
638
|
+
*
|
|
639
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/settlements/:mov_id/reverso`
|
|
640
|
+
*/
|
|
641
|
+
reverseSettlement(accountId: string, movementId: string, body: CreateReversoBody): Promise<CreateReversoResponse>;
|
|
642
|
+
/**
|
|
643
|
+
* Confirm a pending financial movement (Admin only).
|
|
644
|
+
*
|
|
645
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/settlements/:mov_id/confirm`
|
|
646
|
+
*/
|
|
647
|
+
confirmSettlementMovement(accountId: string, movementId: string, body?: ConfirmMovementBody): Promise<ConfirmMovementResponse>;
|
|
648
|
+
/**
|
|
649
|
+
* Cancel a pending financial movement draft (Admin only).
|
|
650
|
+
*
|
|
651
|
+
* `POST /admin/thor/dropshipper/admin/accounts/:id/settlements/:mov_id/cancel`
|
|
652
|
+
*/
|
|
653
|
+
cancelSettlementMovement(accountId: string, movementId: string, body: CancelMovementBody): Promise<CancelMovementResponse>;
|
|
654
|
+
/**
|
|
655
|
+
* Get financial analysis for a dropshipper order (Admin only).
|
|
656
|
+
*
|
|
657
|
+
* `GET /admin/thor/dropshipper/admin/orders/:id/financial-analysis`
|
|
658
|
+
*/
|
|
659
|
+
getOrderFinancialAnalysis(orderId: string): Promise<GetFinancialAnalysisResponse>;
|
|
660
|
+
/**
|
|
661
|
+
* Register a partial or full payment for an order.
|
|
662
|
+
*
|
|
663
|
+
* `POST /admin/thor/dropshipper/orders/:id/payment`
|
|
664
|
+
*/
|
|
665
|
+
registerOrderPayment(orderId: string, body: RegisterPaymentBody): Promise<RegisterPaymentResponse>;
|
|
666
|
+
/**
|
|
667
|
+
* List Y's promotions (discount codes).
|
|
668
|
+
*
|
|
669
|
+
* `GET /admin/thor/dropshipper/promotions`
|
|
670
|
+
*/
|
|
671
|
+
getPromotions(options?: GetDropshipperPromotionsOptions): Promise<GetDropshipperPromotionsResponse>;
|
|
672
|
+
/**
|
|
673
|
+
* Create a promotion for Y's channel.
|
|
674
|
+
*
|
|
675
|
+
* `POST /admin/thor/dropshipper/promotions`
|
|
676
|
+
*/
|
|
677
|
+
createPromotion(body: CreateDropshipperPromotionBody): Promise<DropshipperPromotion>;
|
|
678
|
+
/**
|
|
679
|
+
* Get a single promotion by ID.
|
|
680
|
+
*
|
|
681
|
+
* `GET /admin/thor/dropshipper/promotions/:id`
|
|
682
|
+
*/
|
|
683
|
+
getPromotion(promotionId: string): Promise<DropshipperPromotion>;
|
|
684
|
+
/**
|
|
685
|
+
* Update an existing promotion.
|
|
686
|
+
*
|
|
687
|
+
* `PUT /admin/thor/dropshipper/promotions/:id`
|
|
688
|
+
*/
|
|
689
|
+
updatePromotion(promotionId: string, body: UpdateDropshipperPromotionBody): Promise<DropshipperPromotion>;
|
|
690
|
+
/**
|
|
691
|
+
* Delete a promotion.
|
|
692
|
+
*
|
|
693
|
+
* `DELETE /admin/thor/dropshipper/promotions/:id`
|
|
694
|
+
*/
|
|
695
|
+
deletePromotion(promotionId: string): Promise<DeleteDropshipperPromotionResponse>;
|
|
696
|
+
/**
|
|
697
|
+
* Aggregate stats for Y's dashboard (revenue, profit, top products).
|
|
698
|
+
*
|
|
699
|
+
* `GET /admin/thor/dropshipper/dashboard/stats`
|
|
700
|
+
*/
|
|
701
|
+
getDashboardStats(options?: GetDashboardStatsOptions): Promise<GetDashboardStatsResponse>;
|
|
702
|
+
/**
|
|
703
|
+
* Public endpoint: dropshipper-scoped categories for the storefront.
|
|
704
|
+
* Typically called with a publishable API key rather than a JWT.
|
|
705
|
+
*
|
|
706
|
+
* `GET /store/thor/dropshipper-categories`
|
|
707
|
+
*/
|
|
708
|
+
getStorefrontCategories(): Promise<GetStorefrontDropshipperCategoriesResponse>;
|
|
709
|
+
/**
|
|
710
|
+
* List all draft orders in the dropshipper's channel.
|
|
711
|
+
*
|
|
712
|
+
* `GET /admin/thor/dropshipper/draft-orders`
|
|
713
|
+
*/
|
|
714
|
+
getDraftOrders(options?: GetDropshipperDraftOrdersOptions): Promise<GetDropshipperDraftOrdersResponse>;
|
|
715
|
+
/**
|
|
716
|
+
* Get a specific draft order by ID.
|
|
717
|
+
*
|
|
718
|
+
* `GET /admin/thor/dropshipper/draft-orders/:id`
|
|
719
|
+
*/
|
|
720
|
+
getDraftOrder(draftOrderId: string): Promise<GetDropshipperDraftOrderDetailResponse>;
|
|
721
|
+
/**
|
|
722
|
+
* Create a new draft order.
|
|
723
|
+
*
|
|
724
|
+
* `POST /admin/thor/dropshipper/draft-orders`
|
|
725
|
+
*/
|
|
726
|
+
createDraftOrder(body: CreateDropshipperDraftOrderBody): Promise<CreateDropshipperDraftOrderResponse>;
|
|
727
|
+
/**
|
|
728
|
+
* Update a draft order.
|
|
729
|
+
*
|
|
730
|
+
* `POST /admin/thor/dropshipper/draft-orders/:id`
|
|
731
|
+
*/
|
|
732
|
+
updateDraftOrder(draftOrderId: string, body: UpdateDropshipperDraftOrderBody): Promise<UpdateDropshipperDraftOrderResponse>;
|
|
733
|
+
/**
|
|
734
|
+
* Convert a draft order to a real order.
|
|
735
|
+
*
|
|
736
|
+
* `POST /admin/thor/dropshipper/draft-orders/:id/convert`
|
|
737
|
+
*/
|
|
738
|
+
convertDraftOrder(draftOrderId: string, body: ConvertDropshipperDraftOrderBody): Promise<ConvertDropshipperDraftOrderResponse>;
|
|
739
|
+
/**
|
|
740
|
+
* List all geo-reference countries.
|
|
741
|
+
*
|
|
742
|
+
* `GET /admin/geo-reference`
|
|
743
|
+
*/
|
|
744
|
+
getGeoCountries(): Promise<GetGeoCountriesResponse>;
|
|
745
|
+
/**
|
|
746
|
+
* List provinces/states for a country.
|
|
747
|
+
*
|
|
748
|
+
* `GET /admin/geo-reference/countries/:iso_2/provinces`
|
|
749
|
+
*/
|
|
750
|
+
getGeoProvinces(iso2: string): Promise<GetGeoProvincesResponse>;
|
|
751
|
+
/**
|
|
752
|
+
* List cities for a province/state.
|
|
753
|
+
*
|
|
754
|
+
* `GET /admin/geo-reference/provinces/:code/cities`
|
|
755
|
+
*/
|
|
756
|
+
getGeoCities(code: string): Promise<GetGeoCitiesResponse>;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
export { DropshipperClient, type DropshipperClientConfig, MedusaAdminClient, type MedusaAdminClientConfig };
|