@mitumba/sdk 5.22.0 → 5.24.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 +46 -3
- package/dist/index.d.ts +46 -3
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2490,6 +2490,15 @@ var AdminModule = class {
|
|
|
2490
2490
|
async changeSetting(key, input, options) {
|
|
2491
2491
|
return this.client.put(`/admin/settings/${encodeURIComponent(key)}`, input, options);
|
|
2492
2492
|
}
|
|
2493
|
+
/**
|
|
2494
|
+
* Send the `ops.test_notification` event to the caller only, to check which channels reach them.
|
|
2495
|
+
* Delivery follows the channel modes, the test allowlist and the caller's own contacts, exactly
|
|
2496
|
+
* as for a real event. Requires `broadcast:send`. Presses in the same minute are one test.
|
|
2497
|
+
* Errors: 503 `notifications_unavailable` when the event was not accepted (nothing was sent).
|
|
2498
|
+
*/
|
|
2499
|
+
async sendTestNotification(options) {
|
|
2500
|
+
return this.client.post("/admin/notifications/test", void 0, options);
|
|
2501
|
+
}
|
|
2493
2502
|
// ── VAZI Moderation ──
|
|
2494
2503
|
async listVaziOutfits(params, options) {
|
|
2495
2504
|
return this.client.get("/admin/vazi/outfits", params, options);
|
|
@@ -3108,6 +3117,22 @@ function partitionCart(items) {
|
|
|
3108
3117
|
return partition;
|
|
3109
3118
|
}
|
|
3110
3119
|
|
|
3120
|
+
// src/modules/categories.ts
|
|
3121
|
+
function categorySection(category) {
|
|
3122
|
+
return category.section === "home" ? "home" : "fashion";
|
|
3123
|
+
}
|
|
3124
|
+
function isNewOnlyCategory(category) {
|
|
3125
|
+
return category.new_only === true;
|
|
3126
|
+
}
|
|
3127
|
+
function isConditionAllowed(category, condition) {
|
|
3128
|
+
return !isNewOnlyCategory(category) || condition === "new";
|
|
3129
|
+
}
|
|
3130
|
+
function categoriesBySection(categories) {
|
|
3131
|
+
const grouped = { fashion: [], home: [] };
|
|
3132
|
+
for (const category of categories) grouped[categorySection(category)].push(category);
|
|
3133
|
+
return grouped;
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3111
3136
|
// src/markets.ts
|
|
3112
3137
|
var GAP = " ";
|
|
3113
3138
|
function group(value, locale) {
|
|
@@ -3344,6 +3369,6 @@ var MitumbaClient = class {
|
|
|
3344
3369
|
}
|
|
3345
3370
|
};
|
|
3346
3371
|
|
|
3347
|
-
export { APIClient, APIError, AdminModule, AuthModule, BALE_ORDER_STATUSES, BusinessesModule, CONDITIONS, CartModule, CheckoutsModule, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DisputesModule, IDBTokenStore, IamModule, LISTING_STATUSES, ListingsModule, MailerModule, MarketsModule, MemoryTokenStore, MessagesModule, MitumbaClient, NotificationsModule, OAuthModule, ORDER_STATUSES, OrdersModule, PAYMENT_STATUSES, PayModule, RealtimeProtocolError, RealtimeUnavailableError, ReportsModule, ReviewsModule, SearchModule, SettingsModule, StoresModule, TWO_FACTOR_METHOD_TYPES, UploadsModule, VaziModule, WholesaleModule, WishlistsModule, activeMarkets, baleShareUrl, cartLineAvailability, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, storeShareUrl };
|
|
3372
|
+
export { APIClient, APIError, AdminModule, AuthModule, BALE_ORDER_STATUSES, BusinessesModule, CONDITIONS, CartModule, CheckoutsModule, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DisputesModule, IDBTokenStore, IamModule, LISTING_STATUSES, ListingsModule, MailerModule, MarketsModule, MemoryTokenStore, MessagesModule, MitumbaClient, NotificationsModule, OAuthModule, ORDER_STATUSES, OrdersModule, PAYMENT_STATUSES, PayModule, RealtimeProtocolError, RealtimeUnavailableError, ReportsModule, ReviewsModule, SearchModule, SettingsModule, StoresModule, TWO_FACTOR_METHOD_TYPES, UploadsModule, VaziModule, WholesaleModule, WishlistsModule, activeMarkets, baleShareUrl, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, storeShareUrl };
|
|
3348
3373
|
//# sourceMappingURL=index.mjs.map
|
|
3349
3374
|
//# sourceMappingURL=index.mjs.map
|