@mercurjs/dashboard-shared 2.2.0-canary.2 → 2.2.0-canary.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.ts +1 -0
- package/dist/index.js +33 -71
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9318,14 +9318,6 @@ var require_commission2 = __commonJS({
|
|
|
9318
9318
|
}
|
|
9319
9319
|
});
|
|
9320
9320
|
|
|
9321
|
-
// ../types/dist/http/subscription.js
|
|
9322
|
-
var require_subscription = __commonJS({
|
|
9323
|
-
"../types/dist/http/subscription.js"(exports) {
|
|
9324
|
-
"use strict";
|
|
9325
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9326
|
-
}
|
|
9327
|
-
});
|
|
9328
|
-
|
|
9329
9321
|
// ../types/dist/http/index.js
|
|
9330
9322
|
var require_http3 = __commonJS({
|
|
9331
9323
|
"../types/dist/http/index.js"(exports) {
|
|
@@ -9383,54 +9375,11 @@ var require_http3 = __commonJS({
|
|
|
9383
9375
|
__exportStar(require_payout(), exports);
|
|
9384
9376
|
__exportStar(require_offer(), exports);
|
|
9385
9377
|
__exportStar(require_commission2(), exports);
|
|
9386
|
-
__exportStar(require_subscription(), exports);
|
|
9387
|
-
}
|
|
9388
|
-
});
|
|
9389
|
-
|
|
9390
|
-
// ../types/dist/subscription/common.js
|
|
9391
|
-
var require_common39 = __commonJS({
|
|
9392
|
-
"../types/dist/subscription/common.js"(exports) {
|
|
9393
|
-
"use strict";
|
|
9394
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9395
|
-
}
|
|
9396
|
-
});
|
|
9397
|
-
|
|
9398
|
-
// ../types/dist/subscription/mutation.js
|
|
9399
|
-
var require_mutation3 = __commonJS({
|
|
9400
|
-
"../types/dist/subscription/mutation.js"(exports) {
|
|
9401
|
-
"use strict";
|
|
9402
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9403
|
-
}
|
|
9404
|
-
});
|
|
9405
|
-
|
|
9406
|
-
// ../types/dist/subscription/index.js
|
|
9407
|
-
var require_subscription2 = __commonJS({
|
|
9408
|
-
"../types/dist/subscription/index.js"(exports) {
|
|
9409
|
-
"use strict";
|
|
9410
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
9411
|
-
if (k2 === void 0) k2 = k;
|
|
9412
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9413
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9414
|
-
desc = { enumerable: true, get: function() {
|
|
9415
|
-
return m[k];
|
|
9416
|
-
} };
|
|
9417
|
-
}
|
|
9418
|
-
Object.defineProperty(o, k2, desc);
|
|
9419
|
-
}) : (function(o, m, k, k2) {
|
|
9420
|
-
if (k2 === void 0) k2 = k;
|
|
9421
|
-
o[k2] = m[k];
|
|
9422
|
-
}));
|
|
9423
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
9424
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
9425
|
-
};
|
|
9426
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9427
|
-
__exportStar(require_common39(), exports);
|
|
9428
|
-
__exportStar(require_mutation3(), exports);
|
|
9429
9378
|
}
|
|
9430
9379
|
});
|
|
9431
9380
|
|
|
9432
9381
|
// ../types/dist/payout/common.js
|
|
9433
|
-
var
|
|
9382
|
+
var require_common39 = __commonJS({
|
|
9434
9383
|
"../types/dist/payout/common.js"(exports) {
|
|
9435
9384
|
"use strict";
|
|
9436
9385
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9503,14 +9452,14 @@ var require_payout2 = __commonJS({
|
|
|
9503
9452
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
9504
9453
|
};
|
|
9505
9454
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9506
|
-
__exportStar(
|
|
9455
|
+
__exportStar(require_common39(), exports);
|
|
9507
9456
|
__exportStar(require_provider9(), exports);
|
|
9508
9457
|
__exportStar(require_mutations24(), exports);
|
|
9509
9458
|
}
|
|
9510
9459
|
});
|
|
9511
9460
|
|
|
9512
9461
|
// ../types/dist/offer/common.js
|
|
9513
|
-
var
|
|
9462
|
+
var require_common40 = __commonJS({
|
|
9514
9463
|
"../types/dist/offer/common.js"(exports) {
|
|
9515
9464
|
"use strict";
|
|
9516
9465
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9546,25 +9495,32 @@ var require_offer2 = __commonJS({
|
|
|
9546
9495
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
9547
9496
|
};
|
|
9548
9497
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9549
|
-
__exportStar(
|
|
9498
|
+
__exportStar(require_common40(), exports);
|
|
9550
9499
|
__exportStar(require_mutations25(), exports);
|
|
9551
9500
|
}
|
|
9552
9501
|
});
|
|
9553
9502
|
|
|
9503
|
+
// ../types/dist/product/status.js
|
|
9504
|
+
var require_status = __commonJS({
|
|
9505
|
+
"../types/dist/product/status.js"(exports) {
|
|
9506
|
+
"use strict";
|
|
9507
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9508
|
+
exports.ProductStatus = void 0;
|
|
9509
|
+
exports.ProductStatus = {
|
|
9510
|
+
DRAFT: "draft",
|
|
9511
|
+
PROPOSED: "proposed",
|
|
9512
|
+
PUBLISHED: "published",
|
|
9513
|
+
REJECTED: "rejected"
|
|
9514
|
+
};
|
|
9515
|
+
}
|
|
9516
|
+
});
|
|
9517
|
+
|
|
9554
9518
|
// ../types/dist/product/common.js
|
|
9555
|
-
var
|
|
9519
|
+
var require_common41 = __commonJS({
|
|
9556
9520
|
"../types/dist/product/common.js"(exports) {
|
|
9557
9521
|
"use strict";
|
|
9558
9522
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9559
|
-
exports.ProductChangeActionType = exports.ProductChangeStatus = exports.AttributeType =
|
|
9560
|
-
var ProductStatus;
|
|
9561
|
-
(function(ProductStatus2) {
|
|
9562
|
-
ProductStatus2["DRAFT"] = "draft";
|
|
9563
|
-
ProductStatus2["PROPOSED"] = "proposed";
|
|
9564
|
-
ProductStatus2["PUBLISHED"] = "published";
|
|
9565
|
-
ProductStatus2["REQUIRES_ACTION"] = "requires_action";
|
|
9566
|
-
ProductStatus2["REJECTED"] = "rejected";
|
|
9567
|
-
})(ProductStatus || (exports.ProductStatus = ProductStatus = {}));
|
|
9523
|
+
exports.ProductChangeActionType = exports.ProductChangeStatus = exports.AttributeType = void 0;
|
|
9568
9524
|
var AttributeType;
|
|
9569
9525
|
(function(AttributeType2) {
|
|
9570
9526
|
AttributeType2["SINGLE_SELECT"] = "single_select";
|
|
@@ -9590,6 +9546,7 @@ var require_common42 = __commonJS({
|
|
|
9590
9546
|
ProductChangeActionType3["ATTRIBUTE_ADD"] = "ATTRIBUTE_ADD";
|
|
9591
9547
|
ProductChangeActionType3["ATTRIBUTE_REMOVE"] = "ATTRIBUTE_REMOVE";
|
|
9592
9548
|
ProductChangeActionType3["PRODUCT_DELETE"] = "PRODUCT_DELETE";
|
|
9549
|
+
ProductChangeActionType3["CHANGE_REQUESTED"] = "CHANGE_REQUESTED";
|
|
9593
9550
|
})(ProductChangeActionType2 || (exports.ProductChangeActionType = ProductChangeActionType2 = {}));
|
|
9594
9551
|
}
|
|
9595
9552
|
});
|
|
@@ -9623,7 +9580,7 @@ var require_product5 = __commonJS({
|
|
|
9623
9580
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
9624
9581
|
};
|
|
9625
9582
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9626
|
-
__exportStar(
|
|
9583
|
+
__exportStar(require_common41(), exports);
|
|
9627
9584
|
__exportStar(require_mutations26(), exports);
|
|
9628
9585
|
}
|
|
9629
9586
|
});
|
|
@@ -9637,10 +9594,11 @@ var require_modules = __commonJS({
|
|
|
9637
9594
|
var MercurModules;
|
|
9638
9595
|
(function(MercurModules2) {
|
|
9639
9596
|
MercurModules2["SELLER"] = "seller";
|
|
9640
|
-
MercurModules2["SUBSCRIPTION"] = "subscription";
|
|
9641
9597
|
MercurModules2["COMMISSION"] = "commission";
|
|
9642
9598
|
MercurModules2["PAYOUT"] = "payout";
|
|
9643
9599
|
MercurModules2["OFFER"] = "offer";
|
|
9600
|
+
MercurModules2["PRODUCT_ATTRIBUTE"] = "product_attribute";
|
|
9601
|
+
MercurModules2["PRODUCT_EDIT"] = "product_edit";
|
|
9644
9602
|
MercurModules2["CUSTOM_FIELDS"] = "custom_fields";
|
|
9645
9603
|
MercurModules2["VENDOR_UI"] = "vendor_ui";
|
|
9646
9604
|
MercurModules2["ADMIN_UI"] = "admin_ui";
|
|
@@ -9730,13 +9688,13 @@ var require_dist2 = __commonJS({
|
|
|
9730
9688
|
__exportStar(require_order_group(), exports);
|
|
9731
9689
|
__exportStar(require_commission(), exports);
|
|
9732
9690
|
exports.HttpTypes = __importStar(require_http3());
|
|
9733
|
-
__exportStar(require_subscription2(), exports);
|
|
9734
9691
|
__exportStar(require_payout2(), exports);
|
|
9735
9692
|
__exportStar(require_offer2(), exports);
|
|
9736
|
-
var
|
|
9693
|
+
var status_1 = require_status();
|
|
9737
9694
|
Object.defineProperty(exports, "ProductStatus", { enumerable: true, get: function() {
|
|
9738
|
-
return
|
|
9695
|
+
return status_1.ProductStatus;
|
|
9739
9696
|
} });
|
|
9697
|
+
var product_1 = require_product5();
|
|
9740
9698
|
Object.defineProperty(exports, "AttributeType", { enumerable: true, get: function() {
|
|
9741
9699
|
return product_1.AttributeType;
|
|
9742
9700
|
} });
|
|
@@ -9846,11 +9804,13 @@ var partitionProductChangeActions = (actions) => {
|
|
|
9846
9804
|
case import_types.ProductChangeActionType.VARIANT_UPDATE: {
|
|
9847
9805
|
const fields = details.fields ?? {};
|
|
9848
9806
|
const previousFields = details.previous_fields ?? {};
|
|
9807
|
+
const variantId = details.variant_id !== void 0 && details.variant_id !== null ? String(details.variant_id) : void 0;
|
|
9849
9808
|
for (const [field, value] of Object.entries(fields)) {
|
|
9850
9809
|
updated.push({
|
|
9851
9810
|
field,
|
|
9852
9811
|
previous: previousFields[field],
|
|
9853
|
-
next: value
|
|
9812
|
+
next: value,
|
|
9813
|
+
variant_id: variantId
|
|
9854
9814
|
});
|
|
9855
9815
|
}
|
|
9856
9816
|
break;
|
|
@@ -9866,6 +9826,8 @@ var partitionProductChangeActions = (actions) => {
|
|
|
9866
9826
|
case import_types.ProductChangeActionType.PRODUCT_DELETE:
|
|
9867
9827
|
deleteRequested = true;
|
|
9868
9828
|
break;
|
|
9829
|
+
case import_types.ProductChangeActionType.CHANGE_REQUESTED:
|
|
9830
|
+
break;
|
|
9869
9831
|
}
|
|
9870
9832
|
}
|
|
9871
9833
|
return { updated, added, removed, deleteRequested };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercurjs/dashboard-shared",
|
|
3
|
-
"version": "2.2.0-canary.
|
|
3
|
+
"version": "2.2.0-canary.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mercurjs/mercur",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"zod": "3.25.76"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@mercurjs/types": "
|
|
66
|
+
"@mercurjs/types": "workspace:*",
|
|
67
67
|
"@mercurjs/core": "2.2.0-canary.2",
|
|
68
68
|
"@mercurjs/dashboard-sdk": "2.2.0-canary.2",
|
|
69
69
|
"tsup": "^8.0.2",
|