@hszrdm/core 1.4.0 → 1.6.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/.medusa/server/src/admin/index.js +6361 -3789
- package/.medusa/server/src/admin/index.mjs +6361 -3789
- package/.medusa/server/src/api/admin/back-in-stock/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/back-in-stock/route.js +70 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/items/[itemId]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/items/[itemId]/route.js +64 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/items/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/items/route.js +40 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/promotions/[code]/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/promotions/[code]/route.js +40 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/promotions/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/promotions/route.js +41 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/core-carts/[id]/route.js +28 -0
- package/.medusa/server/src/api/admin/core-carts/customer/[id]/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/core-carts/customer/[id]/route.js +34 -0
- package/.medusa/server/src/api/admin/core-carts/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/core-carts/route.js +69 -0
- package/.medusa/server/src/api/admin/customer-activation/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/customer-activation/route.js +97 -0
- package/.medusa/server/src/api/admin/customer-import/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/customer-import/route.js +166 -0
- package/.medusa/server/src/api/admin/order-export/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/order-export/route.js +88 -0
- package/.medusa/server/src/api/admin/product-migration/inventory/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/product-migration/inventory/route.js +164 -0
- package/.medusa/server/src/api/admin/product-migration/price-list-prices/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/product-migration/price-list-prices/route.js +204 -0
- package/.medusa/server/src/api/admin/product-migration/products/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/product-migration/products/route.js +24 -0
- package/.medusa/server/src/api/admin/product-reviews/[id]/route.js +36 -4
- package/.medusa/server/src/api/admin/product-reviews/settings/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/product-reviews/settings/route.js +63 -0
- package/.medusa/server/src/api/admin/shared-cart/settings/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/shared-cart/settings/route.js +31 -0
- package/.medusa/server/src/api/admin/system-runtime/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/system-runtime/route.js +18 -0
- package/.medusa/server/src/api/hooks/packeta/status/route.d.ts +2 -0
- package/.medusa/server/src/api/hooks/packeta/status/route.js +55 -0
- package/.medusa/server/src/api/middlewares.js +24 -1
- package/.medusa/server/src/api/store/abandoned-cart/recover/route.d.ts +2 -0
- package/.medusa/server/src/api/store/abandoned-cart/recover/route.js +37 -0
- package/.medusa/server/src/api/store/back-in-stock/route.d.ts +8 -0
- package/.medusa/server/src/api/store/back-in-stock/route.js +124 -0
- package/.medusa/server/src/api/store/core-carts/me/active/route.d.ts +2 -0
- package/.medusa/server/src/api/store/core-carts/me/active/route.js +54 -0
- package/.medusa/server/src/api/store/customer-activation/complete/route.d.ts +2 -0
- package/.medusa/server/src/api/store/customer-activation/complete/route.js +96 -0
- package/.medusa/server/src/api/store/customer-activation/route.d.ts +2 -0
- package/.medusa/server/src/api/store/customer-activation/route.js +34 -0
- package/.medusa/server/src/api/store/products/[id]/reviews/route.d.ts +1 -0
- package/.medusa/server/src/api/store/products/[id]/reviews/route.js +76 -34
- package/.medusa/server/src/api/store/review-request/route.d.ts +2 -0
- package/.medusa/server/src/api/store/review-request/route.js +60 -0
- package/.medusa/server/src/api/store/shared-carts/[token]/route.d.ts +2 -0
- package/.medusa/server/src/api/store/shared-carts/[token]/route.js +52 -0
- package/.medusa/server/src/api/store/shared-carts/route.d.ts +13 -0
- package/.medusa/server/src/api/store/shared-carts/route.js +78 -0
- package/.medusa/server/src/core/abandoned-cart.d.ts +64 -0
- package/.medusa/server/src/core/abandoned-cart.js +197 -0
- package/.medusa/server/src/core/admin-cart-management.d.ts +18 -0
- package/.medusa/server/src/core/admin-cart-management.js +102 -0
- package/.medusa/server/src/core/admin-cart-visibility.d.ts +94 -0
- package/.medusa/server/src/core/admin-cart-visibility.js +192 -0
- package/.medusa/server/src/core/back-in-stock.d.ts +51 -0
- package/.medusa/server/src/core/back-in-stock.js +107 -0
- package/.medusa/server/src/core/cart-observability.d.ts +23 -0
- package/.medusa/server/src/core/cart-observability.js +54 -0
- package/.medusa/server/src/core/checkout-contract.d.ts +1 -0
- package/.medusa/server/src/core/checkout-contract.js +2 -1
- package/.medusa/server/src/core/customer-account-contract.d.ts +3 -0
- package/.medusa/server/src/core/customer-account-contract.js +4 -1
- package/.medusa/server/src/core/customer-activation.d.ts +120 -0
- package/.medusa/server/src/core/customer-activation.js +169 -0
- package/.medusa/server/src/core/customer-cart-resume.d.ts +21 -0
- package/.medusa/server/src/core/customer-cart-resume.js +72 -0
- package/.medusa/server/src/core/customer-email.d.ts +1 -1
- package/.medusa/server/src/core/customer-email.js +4 -1
- package/.medusa/server/src/core/native-migration-export.d.ts +6 -0
- package/.medusa/server/src/core/native-migration-export.js +105 -0
- package/.medusa/server/src/core/order-export.d.ts +11 -0
- package/.medusa/server/src/core/order-export.js +297 -0
- package/.medusa/server/src/core/review-request.d.ts +61 -0
- package/.medusa/server/src/core/review-request.js +105 -0
- package/.medusa/server/src/core/review-reward.d.ts +94 -0
- package/.medusa/server/src/core/review-reward.js +124 -0
- package/.medusa/server/src/core/runtime-health.d.ts +39 -0
- package/.medusa/server/src/core/runtime-health.js +250 -0
- package/.medusa/server/src/core/storefront-core-config.d.ts +10 -0
- package/.medusa/server/src/core/storefront-core-config.js +26 -1
- package/.medusa/server/src/core/version.d.ts +2 -2
- package/.medusa/server/src/core/version.js +2 -2
- package/.medusa/server/src/jobs/abandoned-cart-recovery.d.ts +23 -0
- package/.medusa/server/src/jobs/abandoned-cart-recovery.js +137 -0
- package/.medusa/server/src/jobs/back-in-stock-reconciliation.d.ts +15 -0
- package/.medusa/server/src/jobs/back-in-stock-reconciliation.js +90 -0
- package/.medusa/server/src/jobs/dpd-statusdata-sync.d.ts +17 -0
- package/.medusa/server/src/jobs/dpd-statusdata-sync.js +107 -0
- package/.medusa/server/src/jobs/mpl-push-tracking.d.ts +19 -0
- package/.medusa/server/src/jobs/mpl-push-tracking.js +183 -0
- package/.medusa/server/src/jobs/mpl-status-sync.d.ts +8 -2
- package/.medusa/server/src/jobs/mpl-status-sync.js +12 -7
- package/.medusa/server/src/jobs/product-review-request-dispatch.d.ts +28 -0
- package/.medusa/server/src/jobs/product-review-request-dispatch.js +84 -0
- package/.medusa/server/src/jobs/runtime-heartbeat.d.ts +12 -0
- package/.medusa/server/src/jobs/runtime-heartbeat.js +13 -0
- package/.medusa/server/src/jobs/shipping-status-sync.d.ts +8 -2
- package/.medusa/server/src/jobs/shipping-status-sync.js +11 -14
- package/.medusa/server/src/lib/modules/shipping/idempotency.js +3 -3
- package/.medusa/server/src/lib/modules/shipping/index.d.ts +1 -0
- package/.medusa/server/src/lib/modules/shipping/index.js +2 -1
- package/.medusa/server/src/lib/modules/shipping/tracking.d.ts +48 -0
- package/.medusa/server/src/lib/modules/shipping/tracking.js +368 -0
- package/.medusa/server/src/lib/modules/shipping/webhooks.d.ts +6 -9
- package/.medusa/server/src/lib/modules/shipping/webhooks.js +24 -137
- package/.medusa/server/src/modules/back-in-stock/index.d.ts +23 -0
- package/.medusa/server/src/modules/back-in-stock/index.js +16 -0
- package/.medusa/server/src/modules/back-in-stock/migrations/Migration20261101202000.d.ts +5 -0
- package/.medusa/server/src/modules/back-in-stock/migrations/Migration20261101202000.js +18 -0
- package/.medusa/server/src/modules/back-in-stock/models/back-in-stock-subscription.d.ts +13 -0
- package/.medusa/server/src/modules/back-in-stock/models/back-in-stock-subscription.js +23 -0
- package/.medusa/server/src/modules/back-in-stock/service.d.ts +22 -0
- package/.medusa/server/src/modules/back-in-stock/service.js +12 -0
- package/.medusa/server/src/modules/email-center/abandoned-cart-registration.d.ts +1 -0
- package/.medusa/server/src/modules/email-center/abandoned-cart-registration.js +27 -0
- package/.medusa/server/src/modules/email-center/back-in-stock-registration.d.ts +1 -0
- package/.medusa/server/src/modules/email-center/back-in-stock-registration.js +27 -0
- package/.medusa/server/src/modules/email-center/defaults.js +7 -1
- package/.medusa/server/src/modules/email-center/index.d.ts +2 -0
- package/.medusa/server/src/modules/email-center/index.js +3 -1
- package/.medusa/server/src/modules/integration-settings/abandoned-cart-registration.d.ts +1 -0
- package/.medusa/server/src/modules/integration-settings/abandoned-cart-registration.js +30 -0
- package/.medusa/server/src/modules/integration-settings/index.d.ts +1 -0
- package/.medusa/server/src/modules/integration-settings/index.js +2 -1
- package/.medusa/server/src/modules/integration-settings/storefront-public-registration.js +15 -1
- package/.medusa/server/src/modules/product-review/index.d.ts +14 -0
- package/.medusa/server/src/modules/product-review/migrations/Migration20261101113000.d.ts +5 -0
- package/.medusa/server/src/modules/product-review/migrations/Migration20261101113000.js +28 -0
- package/.medusa/server/src/modules/product-review/migrations/Migration20261101114500.d.ts +5 -0
- package/.medusa/server/src/modules/product-review/migrations/Migration20261101114500.js +20 -0
- package/.medusa/server/src/modules/product-review/migrations/Migration20261101121500.d.ts +5 -0
- package/.medusa/server/src/modules/product-review/migrations/Migration20261101121500.js +18 -0
- package/.medusa/server/src/modules/product-review/models/product-review-settings.d.ts +15 -0
- package/.medusa/server/src/modules/product-review/models/product-review-settings.js +19 -0
- package/.medusa/server/src/modules/product-review/models/product-review.d.ts +6 -2
- package/.medusa/server/src/modules/product-review/models/product-review.js +7 -3
- package/.medusa/server/src/modules/product-review/service.d.ts +22 -1
- package/.medusa/server/src/modules/product-review/service.js +3 -2
- package/.medusa/server/src/modules/shared-cart/index.d.ts +21 -0
- package/.medusa/server/src/modules/shared-cart/index.js +13 -0
- package/.medusa/server/src/modules/shared-cart/migrations/Migration20261102010000.d.ts +5 -0
- package/.medusa/server/src/modules/shared-cart/migrations/Migration20261102010000.js +16 -0
- package/.medusa/server/src/modules/shared-cart/models/shared-cart.d.ts +10 -0
- package/.medusa/server/src/modules/shared-cart/models/shared-cart.js +17 -0
- package/.medusa/server/src/modules/shared-cart/service.d.ts +14 -0
- package/.medusa/server/src/modules/shared-cart/service.js +11 -0
- package/.medusa/server/src/modules/shared-cart/settings.d.ts +7 -0
- package/.medusa/server/src/modules/shared-cart/settings.js +64 -0
- package/.medusa/server/src/providers/dpd/index.d.ts +2 -0
- package/.medusa/server/src/providers/dpd/index.js +3 -1
- package/.medusa/server/src/providers/dpd/statusdata-ftp.d.ts +16 -0
- package/.medusa/server/src/providers/dpd/statusdata-ftp.js +268 -0
- package/.medusa/server/src/providers/dpd/statusdata.d.ts +14 -0
- package/.medusa/server/src/providers/dpd/statusdata.js +161 -0
- package/.medusa/server/src/providers/mpl/client.d.ts +3 -1
- package/.medusa/server/src/providers/mpl/client.js +154 -2
- package/.medusa/server/src/providers/mpl/service.js +31 -20
- package/.medusa/server/src/providers/mpl/types.d.ts +25 -0
- package/.medusa/server/src/providers/mpl/types.js +1 -1
- package/.medusa/server/src/providers/packeta/index.d.ts +1 -0
- package/.medusa/server/src/providers/packeta/index.js +2 -1
- package/.medusa/server/src/providers/packeta/push-tracking.d.ts +8 -0
- package/.medusa/server/src/providers/packeta/push-tracking.js +96 -0
- package/.medusa/server/src/providers/packeta/service.js +22 -2
- package/.medusa/server/src/scripts/core-init.d.ts +1 -1
- package/.medusa/server/src/scripts/core-init.js +3 -2
- package/.medusa/server/src/subscribers/back-in-stock-inventory-changed.d.ts +7 -0
- package/.medusa/server/src/subscribers/back-in-stock-inventory-changed.js +65 -0
- package/.medusa/server/src/workflows/link-migrated-customer.d.ts +8 -0
- package/.medusa/server/src/workflows/link-migrated-customer.js +17 -0
- package/README.md +1 -1
- package/package.json +30 -8
|
@@ -16,6 +16,20 @@ declare const _default: import("@medusajs/types").ModuleExports<typeof ProductRe
|
|
|
16
16
|
primaryKey: "id";
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
+
readonly productReviewSettings: {
|
|
20
|
+
id: {
|
|
21
|
+
serviceName: "productReview";
|
|
22
|
+
field: "productReviewSettings";
|
|
23
|
+
linkable: "product_review_settings_id";
|
|
24
|
+
primaryKey: "id";
|
|
25
|
+
};
|
|
26
|
+
toJSON: () => {
|
|
27
|
+
serviceName: "productReview";
|
|
28
|
+
field: "productReviewSettings";
|
|
29
|
+
linkable: "product_review_settings_id";
|
|
30
|
+
primaryKey: "id";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
19
33
|
};
|
|
20
34
|
};
|
|
21
35
|
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20261101113000 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20261101113000 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`alter table "product_review" drop constraint if exists "product_review_status_check";`);
|
|
8
|
+
this.addSql(`update "product_review" set "status" = 'published' where "status" = 'approved';`);
|
|
9
|
+
this.addSql(`alter table "product_review" add constraint "product_review_status_check" check ("status" in ('pending','published','rejected'));`);
|
|
10
|
+
this.addSql(`alter table "product_review" add column if not exists "reward_promotion_id" text null;`);
|
|
11
|
+
this.addSql(`alter table "product_review" add column if not exists "reward_coupon_code" text null;`);
|
|
12
|
+
this.addSql(`alter table "product_review" add column if not exists "reward_issued_at" timestamptz null;`);
|
|
13
|
+
this.addSql(`alter table "product_review" add column if not exists "reward_email_sent_at" timestamptz null;`);
|
|
14
|
+
this.addSql(`create table if not exists "product_review_settings" ("id" text not null, "auto_publish" boolean not null default false, "reward_enabled" boolean not null default true, "reward_type" text check ("reward_type" in ('percentage','fixed')) not null default 'percentage', "reward_value" int not null default 10, "reward_currency_code" text not null default 'huf', "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "product_review_settings_pkey" primary key ("id"));`);
|
|
15
|
+
}
|
|
16
|
+
async down() {
|
|
17
|
+
this.addSql(`drop table if exists "product_review_settings" cascade;`);
|
|
18
|
+
this.addSql(`alter table "product_review" drop column if exists "reward_email_sent_at";`);
|
|
19
|
+
this.addSql(`alter table "product_review" drop column if exists "reward_issued_at";`);
|
|
20
|
+
this.addSql(`alter table "product_review" drop column if exists "reward_coupon_code";`);
|
|
21
|
+
this.addSql(`alter table "product_review" drop column if exists "reward_promotion_id";`);
|
|
22
|
+
this.addSql(`alter table "product_review" drop constraint if exists "product_review_status_check";`);
|
|
23
|
+
this.addSql(`update "product_review" set "status" = 'approved' where "status" = 'published';`);
|
|
24
|
+
this.addSql(`alter table "product_review" add constraint "product_review_status_check" check ("status" in ('pending','approved','rejected'));`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.Migration20261101113000 = Migration20261101113000;
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjExMDExMTMwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LXJldmlldy9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYxMTAxMTEzMDAwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBQ3BELEtBQUssQ0FBQyxFQUFFO1FBQ04sSUFBSSxDQUFDLE1BQU0sQ0FBQyx1R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true });
|
|
3
|
+
exports.Migration20261101114500 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20261101114500 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`alter table if exists "product_review_settings" add column if not exists "request_email_enabled" boolean not null default true;`);
|
|
8
|
+
this.addSql(`alter table if exists "product_review_settings" add column if not exists "request_trigger" text check ("request_trigger" in ('order','fulfillment','delivery')) not null default 'delivery';`);
|
|
9
|
+
this.addSql(`alter table if exists "product_review_settings" add column if not exists "request_delay_days" int not null default 2;`);
|
|
10
|
+
this.addSql(`alter table if exists "product_review_settings" alter column "reward_value" set default 5;`);
|
|
11
|
+
}
|
|
12
|
+
async down() {
|
|
13
|
+
this.addSql(`alter table if exists "product_review_settings" drop column if exists "request_email_enabled";`);
|
|
14
|
+
this.addSql(`alter table if exists "product_review_settings" drop column if exists "request_trigger";`);
|
|
15
|
+
this.addSql(`alter table if exists "product_review_settings" drop column if exists "request_delay_days";`);
|
|
16
|
+
this.addSql(`alter table if exists "product_review_settings" alter column "reward_value" set default 10;`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Migration20261101114500 = Migration20261101114500;
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjExMDExMTQ1MDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LXJldmlldy9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYxMTAxMTE0NTAwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBQ3BELEtBQUssQ0FBQyxFQUFFO1FBQ04sSUFBSSxDQUFDLE1BQU0sQ0FBQyxpSUFBaUksQ0FBQyxDQUFBO1FBQzlJLElBQUksQ0FBQyxNQUFNLENBQUMsOExBQThMLENBQUMsQ0FBQTtRQUMzTSxJQUFJLENBQUMsTUFBTSxDQUFDLHVIQUF1SCxDQUFDLENBQUE7UUFDcEksSUFBSSxDQUFDLE1BQU0sQ0FBQyw0RkFBNEYsQ0FBQyxDQUFBO0lBQzNHLENBQUM7SUFFRCxLQUFLLENBQUMsSUFBSTtRQUNSLElBQUksQ0FBQyxNQUFNLENBQUMsZ0dBQWdHLENBQUMsQ0FBQTtRQUM3RyxJQUFJLENBQUMsTUFBTSxDQUFDLDBGQUEwRixDQUFDLENBQUE7UUFDdkcsSUFBSSxDQUFDLE1BQU0sQ0FBQyw2RkFBNkYsQ0FBQyxDQUFBO1FBQzFHLElBQUksQ0FBQyxNQUFNLENBQUMsNkZBQTZGLENBQUMsQ0FBQTtJQUM1RyxDQUFDO0NBQ0Y7QUFkRCwwREFjQyJ9
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20261101121500 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20261101121500 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`alter table if exists "product_review_settings" add column if not exists "reward_coupon_expiry_days" int not null default 30;`);
|
|
8
|
+
this.addSql(`alter table if exists "product_review_settings" add column if not exists "reward_once_per_order" boolean not null default true;`);
|
|
9
|
+
this.addSql(`alter table if exists "product_review_settings" add column if not exists "reward_email_enabled" boolean not null default true;`);
|
|
10
|
+
}
|
|
11
|
+
async down() {
|
|
12
|
+
this.addSql(`alter table if exists "product_review_settings" drop column if exists "reward_email_enabled";`);
|
|
13
|
+
this.addSql(`alter table if exists "product_review_settings" drop column if exists "reward_once_per_order";`);
|
|
14
|
+
this.addSql(`alter table if exists "product_review_settings" drop column if exists "reward_coupon_expiry_days";`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Migration20261101121500 = Migration20261101121500;
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjExMDExMjE1MDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LXJldmlldy9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYxMTAxMTIxNTAwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBQ3BELEtBQUssQ0FBQyxFQUFFO1FBQ04sSUFBSSxDQUFDLE1BQU0sQ0FBQywrSEFBK0gsQ0FBQyxDQUFBO1FBQzVJLElBQUksQ0FBQyxNQUFNLENBQUMsaUlBQWlJLENBQUMsQ0FBQTtRQUM5SSxJQUFJLENBQUMsTUFBTSxDQUFDLGdJQUFnSSxDQUFDLENBQUE7SUFDL0ksQ0FBQztJQUVELEtBQUssQ0FBQyxJQUFJO1FBQ1IsSUFBSSxDQUFDLE1BQU0sQ0FBQywrRkFBK0YsQ0FBQyxDQUFBO1FBQzVHLElBQUksQ0FBQyxNQUFNLENBQUMsZ0dBQWdHLENBQUMsQ0FBQTtRQUM3RyxJQUFJLENBQUMsTUFBTSxDQUFDLG9HQUFvRyxDQUFDLENBQUE7SUFDbkgsQ0FBQztDQUNGO0FBWkQsMERBWUMifQ==
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const ProductReviewSettings: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
2
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
3
|
+
auto_publish: import("@medusajs/framework/utils").BooleanProperty;
|
|
4
|
+
reward_enabled: import("@medusajs/framework/utils").BooleanProperty;
|
|
5
|
+
reward_type: import("@medusajs/framework/utils").EnumProperty<["percentage", "fixed"]>;
|
|
6
|
+
reward_value: import("@medusajs/framework/utils").NumberProperty;
|
|
7
|
+
reward_currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
8
|
+
reward_coupon_expiry_days: import("@medusajs/framework/utils").NumberProperty;
|
|
9
|
+
reward_once_per_order: import("@medusajs/framework/utils").BooleanProperty;
|
|
10
|
+
reward_email_enabled: import("@medusajs/framework/utils").BooleanProperty;
|
|
11
|
+
request_email_enabled: import("@medusajs/framework/utils").BooleanProperty;
|
|
12
|
+
request_trigger: import("@medusajs/framework/utils").EnumProperty<["order", "fulfillment", "delivery"]>;
|
|
13
|
+
request_delay_days: import("@medusajs/framework/utils").NumberProperty;
|
|
14
|
+
}>, "product_review_settings">;
|
|
15
|
+
export default ProductReviewSettings;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
4
|
+
const ProductReviewSettings = utils_1.model.define("product_review_settings", {
|
|
5
|
+
id: utils_1.model.id().primaryKey(),
|
|
6
|
+
auto_publish: utils_1.model.boolean().default(false),
|
|
7
|
+
reward_enabled: utils_1.model.boolean().default(true),
|
|
8
|
+
reward_type: utils_1.model.enum(["percentage", "fixed"]).default("percentage"),
|
|
9
|
+
reward_value: utils_1.model.number().default(5),
|
|
10
|
+
reward_currency_code: utils_1.model.text().default("huf"),
|
|
11
|
+
reward_coupon_expiry_days: utils_1.model.number().default(30),
|
|
12
|
+
reward_once_per_order: utils_1.model.boolean().default(true),
|
|
13
|
+
reward_email_enabled: utils_1.model.boolean().default(true),
|
|
14
|
+
request_email_enabled: utils_1.model.boolean().default(true),
|
|
15
|
+
request_trigger: utils_1.model.enum(["order", "fulfillment", "delivery"]).default("delivery"),
|
|
16
|
+
request_delay_days: utils_1.model.number().default(2),
|
|
17
|
+
});
|
|
18
|
+
exports.default = ProductReviewSettings;
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1yZXZpZXctc2V0dGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LXJldmlldy9tb2RlbHMvcHJvZHVjdC1yZXZpZXctc2V0dGluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxREFBaUQ7QUFFakQsTUFBTSxxQkFBcUIsR0FBRyxhQUFLLENBQUMsTUFBTSxDQUFDLHlCQUF5QixFQUFFO0lBQ3BFLEVBQUUsRUFBRSxhQUFLLENBQUMsRUFBRSxFQUFFLENBQUMsVUFBVSxFQUFFO0lBQzNCLFlBQVksRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQztJQUM1QyxjQUFjLEVBQUUsYUFBSyxDQUFDLE9BQU8sRUFBRSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUM7SUFDN0MsV0FBVyxFQUFFLGFBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxZQUFZLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsWUFBWSxDQUFDO0lBQ3RFLFlBQVksRUFBRSxhQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztJQUN2QyxvQkFBb0IsRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQztJQUNqRCx5QkFBeUIsRUFBRSxhQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQztJQUNyRCxxQkFBcUIsRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQztJQUNwRCxvQkFBb0IsRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQztJQUNuRCxxQkFBcUIsRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQztJQUNwRCxlQUFlLEVBQUUsYUFBSyxDQUFDLElBQUksQ0FBQyxDQUFDLE9BQU8sRUFBRSxhQUFhLEVBQUUsVUFBVSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDO0lBQ3JGLGtCQUFrQixFQUFFLGFBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO0NBQzlDLENBQUMsQ0FBQTtBQUVGLGtCQUFlLHFCQUFxQixDQUFBIn0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PRODUCT_REVIEW_STATUSES: readonly ["pending", "
|
|
1
|
+
export declare const PRODUCT_REVIEW_STATUSES: readonly ["pending", "published", "rejected"];
|
|
2
2
|
declare const ProductReview: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
3
3
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
4
4
|
product_id: import("@medusajs/framework/utils").TextProperty;
|
|
@@ -6,11 +6,15 @@ declare const ProductReview: import("@medusajs/framework/utils").DmlEntity<impor
|
|
|
6
6
|
customer_name: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
7
7
|
rating: import("@medusajs/framework/utils").NumberProperty;
|
|
8
8
|
body: import("@medusajs/framework/utils").TextProperty;
|
|
9
|
-
status: import("@medusajs/framework/utils").EnumProperty<["pending", "
|
|
9
|
+
status: import("@medusajs/framework/utils").EnumProperty<["pending", "published", "rejected"]>;
|
|
10
10
|
verified_purchase: import("@medusajs/framework/utils").BooleanProperty;
|
|
11
11
|
order_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
12
12
|
moderation_note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
13
13
|
moderated_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
|
|
14
14
|
moderated_by: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
15
|
+
reward_promotion_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
16
|
+
reward_coupon_code: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
17
|
+
reward_issued_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
|
|
18
|
+
reward_email_sent_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
|
|
15
19
|
}>, "product_review">;
|
|
16
20
|
export default ProductReview;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PRODUCT_REVIEW_STATUSES = void 0;
|
|
4
4
|
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
-
exports.PRODUCT_REVIEW_STATUSES = ["pending", "
|
|
5
|
+
exports.PRODUCT_REVIEW_STATUSES = ["pending", "published", "rejected"];
|
|
6
6
|
const ProductReview = utils_1.model.define("product_review", {
|
|
7
7
|
id: utils_1.model.id().primaryKey(),
|
|
8
8
|
product_id: utils_1.model.text(),
|
|
@@ -10,12 +10,16 @@ const ProductReview = utils_1.model.define("product_review", {
|
|
|
10
10
|
customer_name: utils_1.model.text().nullable(),
|
|
11
11
|
rating: utils_1.model.number(),
|
|
12
12
|
body: utils_1.model.text(),
|
|
13
|
-
status: utils_1.model.enum(["pending", "
|
|
13
|
+
status: utils_1.model.enum(["pending", "published", "rejected"]).default("pending"),
|
|
14
14
|
verified_purchase: utils_1.model.boolean().default(false),
|
|
15
15
|
order_id: utils_1.model.text().nullable(),
|
|
16
16
|
moderation_note: utils_1.model.text().nullable(),
|
|
17
17
|
moderated_at: utils_1.model.dateTime().nullable(),
|
|
18
18
|
moderated_by: utils_1.model.text().nullable(),
|
|
19
|
+
reward_promotion_id: utils_1.model.text().nullable(),
|
|
20
|
+
reward_coupon_code: utils_1.model.text().nullable(),
|
|
21
|
+
reward_issued_at: utils_1.model.dateTime().nullable(),
|
|
22
|
+
reward_email_sent_at: utils_1.model.dateTime().nullable(),
|
|
19
23
|
}).indexes([
|
|
20
24
|
{ on: ["product_id", "customer_id"], unique: true },
|
|
21
25
|
{ on: ["product_id", "status", "created_at"] },
|
|
@@ -23,4 +27,4 @@ const ProductReview = utils_1.model.define("product_review", {
|
|
|
23
27
|
{ on: ["status", "created_at"] },
|
|
24
28
|
]);
|
|
25
29
|
exports.default = ProductReview;
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1yZXZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LXJldmlldy9tb2RlbHMvcHJvZHVjdC1yZXZpZXcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscURBQWlEO0FBRXBDLFFBQUEsdUJBQXVCLEdBQUcsQ0FBQyxTQUFTLEVBQUUsV0FBVyxFQUFFLFVBQVUsQ0FBVSxDQUFBO0FBRXBGLE1BQU0sYUFBYSxHQUFHLGFBQUssQ0FBQyxNQUFNLENBQUMsZ0JBQWdCLEVBQUU7SUFDbkQsRUFBRSxFQ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FBRSxhQUFLLENBQUMsUUFBUSxFQUFFLENBQUMsUUFBUSxFQUFFO0NBQ2xELENBQUMsQ0FBQyxPQUFPLENBQUM7SUFDVCxFQUFFLEVBQUUsRUFBRSxDQUFDLFlBQVksRUFBRSxhQUFhLENBQUMsRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFO0lBQ25ELEVBQUUsRUFBRSxFQUFFLENBQUMsWUFBWSxFQUFFLFFBQVEsRUFBRSxZQUFZLENBQUMsRUFBRTtJQUM5QyxFQUFFLEVBQUUsRUFBRSxDQUFDLGFBQWEsRUFBRSxZQUFZLENBQUMsRUFBRTtJQUNyQyxFQUFFLEVBQUUsRUFBRSxDQUFDLFFBQVEsRUFBRSxZQUFZLENBQUMsRUFBRTtDQUNqQyxDQUFDLENBQUE7QUFFRixrQkFBZSxhQUFhLENBQUEifQ==
|
|
@@ -6,13 +6,31 @@ declare const ProductReviewBaseService: import("@medusajs/framework/utils").Medu
|
|
|
6
6
|
customer_name: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
7
7
|
rating: import("@medusajs/framework/utils").NumberProperty;
|
|
8
8
|
body: import("@medusajs/framework/utils").TextProperty;
|
|
9
|
-
status: import("@medusajs/framework/utils").EnumProperty<["pending", "
|
|
9
|
+
status: import("@medusajs/framework/utils").EnumProperty<["pending", "published", "rejected"]>;
|
|
10
10
|
verified_purchase: import("@medusajs/framework/utils").BooleanProperty;
|
|
11
11
|
order_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
12
12
|
moderation_note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
13
13
|
moderated_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
|
|
14
14
|
moderated_by: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
15
|
+
reward_promotion_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
16
|
+
reward_coupon_code: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
17
|
+
reward_issued_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
|
|
18
|
+
reward_email_sent_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
|
|
15
19
|
}>, "product_review">;
|
|
20
|
+
readonly ProductReviewSettings: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
21
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
22
|
+
auto_publish: import("@medusajs/framework/utils").BooleanProperty;
|
|
23
|
+
reward_enabled: import("@medusajs/framework/utils").BooleanProperty;
|
|
24
|
+
reward_type: import("@medusajs/framework/utils").EnumProperty<["percentage", "fixed"]>;
|
|
25
|
+
reward_value: import("@medusajs/framework/utils").NumberProperty;
|
|
26
|
+
reward_currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
27
|
+
reward_coupon_expiry_days: import("@medusajs/framework/utils").NumberProperty;
|
|
28
|
+
reward_once_per_order: import("@medusajs/framework/utils").BooleanProperty;
|
|
29
|
+
reward_email_enabled: import("@medusajs/framework/utils").BooleanProperty;
|
|
30
|
+
request_email_enabled: import("@medusajs/framework/utils").BooleanProperty;
|
|
31
|
+
request_trigger: import("@medusajs/framework/utils").EnumProperty<["order", "fulfillment", "delivery"]>;
|
|
32
|
+
request_delay_days: import("@medusajs/framework/utils").NumberProperty;
|
|
33
|
+
}>, "product_review_settings">;
|
|
16
34
|
}>>;
|
|
17
35
|
type ProductReviewBaseServiceInstance = InstanceType<typeof ProductReviewBaseService>;
|
|
18
36
|
export default class ProductReviewService extends ProductReviewBaseService {
|
|
@@ -21,5 +39,8 @@ export default class ProductReviewService extends ProductReviewBaseService {
|
|
|
21
39
|
retrieveProductReview: ProductReviewBaseServiceInstance["retrieveProductReview"];
|
|
22
40
|
listProductReviews: ProductReviewBaseServiceInstance["listProductReviews"];
|
|
23
41
|
listAndCountProductReviews: ProductReviewBaseServiceInstance["listAndCountProductReviews"];
|
|
42
|
+
createProductReviewSettings: ProductReviewBaseServiceInstance["createProductReviewSettings"];
|
|
43
|
+
updateProductReviewSettings: ProductReviewBaseServiceInstance["updateProductReviewSettings"];
|
|
44
|
+
listProductReviewSettings: ProductReviewBaseServiceInstance["listProductReviewSettings"];
|
|
24
45
|
}
|
|
25
46
|
export {};
|
|
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const utils_1 = require("@medusajs/framework/utils");
|
|
7
7
|
const product_review_1 = __importDefault(require("./models/product-review"));
|
|
8
|
-
const
|
|
8
|
+
const product_review_settings_1 = __importDefault(require("./models/product-review-settings"));
|
|
9
|
+
const ProductReviewBaseService = (0, utils_1.MedusaService)({ ProductReview: product_review_1.default, ProductReviewSettings: product_review_settings_1.default });
|
|
9
10
|
class ProductReviewService extends ProductReviewBaseService {
|
|
10
11
|
}
|
|
11
12
|
exports.default = ProductReviewService;
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3Byb2R1Y3QtcmV2aWV3L3NlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBeUQ7QUFDekQsNkVBQW1EO0FBQ25ELCtGQUFvRTtBQUVwRSxNQUFNLHdCQUF3QixHQUFHLElBQUEscUJBQWEsRUFBQyxFQUFFLGFBQWEsRUFBYix3QkFBYSxFQUFFLHFCQUFxQixFQUFyQixpQ0FBcUIsRUFBRSxDQUFDLENBQUE7QUFHeEYsTUFBcUIsb0JBQXFCLFNBQVEsd0JBQXdCO0NBU3pFO0FBVEQsdUNBU0MifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import SharedCartModuleService from "./service";
|
|
2
|
+
export declare const SHARED_CART_MODULE = "sharedCart";
|
|
3
|
+
declare const _default: import("@medusajs/types").ModuleExports<typeof SharedCartModuleService> & {
|
|
4
|
+
linkable: {
|
|
5
|
+
readonly sharedCart: {
|
|
6
|
+
id: {
|
|
7
|
+
serviceName: "sharedCart";
|
|
8
|
+
field: "sharedCart";
|
|
9
|
+
linkable: "shared_cart_id";
|
|
10
|
+
primaryKey: "id";
|
|
11
|
+
};
|
|
12
|
+
toJSON: () => {
|
|
13
|
+
serviceName: "sharedCart";
|
|
14
|
+
field: "sharedCart";
|
|
15
|
+
linkable: "shared_cart_id";
|
|
16
|
+
primaryKey: "id";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SHARED_CART_MODULE = void 0;
|
|
7
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
8
|
+
const service_1 = __importDefault(require("./service"));
|
|
9
|
+
exports.SHARED_CART_MODULE = "sharedCart";
|
|
10
|
+
exports.default = (0, utils_1.Module)(exports.SHARED_CART_MODULE, {
|
|
11
|
+
service: service_1.default,
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zaGFyZWQtY2FydC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxxREFBa0Q7QUFDbEQsd0RBQStDO0FBRWxDLFFBQUEsa0JBQWtCLEdBQUcsWUFBWSxDQUFBO0FBRTlDLGtCQUFlLElBQUEsY0FBTSxFQUFDLDBCQUFrQixFQUFFO0lBQ3hDLE9BQU8sRUFBRSxpQkFBdUI7Q0FDakMsQ0FBQyxDQUFBIn0=
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20261102010000 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20261102010000 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`create table if not exists "shared_cart" ("id" text not null, "token_hash" text not null, "items" jsonb not null, "region_id" text null, "currency_code" text null, "use_count" int not null default 0, "expires_at" timestamptz not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "shared_cart_pkey" primary key ("id"));`);
|
|
8
|
+
this.addSql(`create unique index if not exists "IDX_shared_cart_token_hash" on "shared_cart" ("token_hash") where deleted_at is null;`);
|
|
9
|
+
this.addSql(`create index if not exists "IDX_shared_cart_expires_at" on "shared_cart" ("expires_at") where deleted_at is null;`);
|
|
10
|
+
}
|
|
11
|
+
async down() {
|
|
12
|
+
this.addSql(`drop table if exists "shared_cart" cascade;`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Migration20261102010000 = Migration20261102010000;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjExMDIwMTAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zaGFyZWQtY2FydC9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYxMTAyMDEwMDAwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBQ3BELEtBQUssQ0FBQyxFQUFFO1FBQ04sSUFBSSxDQUFDLE1BQU0sQ0FBQyxnYUFBZ2EsQ0FBQyxDQUFBO1FBQzdhLElBQUksQ0FBQyxNQUFNLENBQUMsMEhBQTBILENBQUMsQ0FBQTtRQUN2SSxJQUFJLENBQUMsTUFBTSxDQUFDLG1IQUFtSCxDQUFDLENBQUE7SUFDbEksQ0FBQztJQUVELEtBQUssQ0FBQyxJQUFJO1FBQ1IsSUFBSSxDQUFDLE1BQU0sQ0FBQyw2Q0FBNkMsQ0FBQyxDQUFBO0lBQzVELENBQUM7Q0FDRjtBQVZELDBEQVVDIn0=
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const SharedCart: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
2
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
3
|
+
token_hash: import("@medusajs/framework/utils").TextProperty;
|
|
4
|
+
items: import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>;
|
|
5
|
+
region_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
6
|
+
currency_code: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
7
|
+
use_count: import("@medusajs/framework/utils").NumberProperty;
|
|
8
|
+
expires_at: import("@medusajs/framework/utils").DateTimeProperty;
|
|
9
|
+
}>, "shared_cart">;
|
|
10
|
+
export default SharedCart;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
4
|
+
const SharedCart = utils_1.model.define("shared_cart", {
|
|
5
|
+
id: utils_1.model.id().primaryKey(),
|
|
6
|
+
token_hash: utils_1.model.text(),
|
|
7
|
+
items: utils_1.model.json(),
|
|
8
|
+
region_id: utils_1.model.text().nullable(),
|
|
9
|
+
currency_code: utils_1.model.text().nullable(),
|
|
10
|
+
use_count: utils_1.model.number().default(0),
|
|
11
|
+
expires_at: utils_1.model.dateTime(),
|
|
12
|
+
}).indexes([
|
|
13
|
+
{ on: ["token_hash"], unique: true },
|
|
14
|
+
{ on: ["expires_at"] },
|
|
15
|
+
]);
|
|
16
|
+
exports.default = SharedCart;
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLWNhcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zaGFyZWQtY2FydC9tb2RlbHMvc2hhcmVkLWNhcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxREFBaUQ7QUFFakQsTUFBTSxVQUFVLEdBQUcsYUFBSyxDQUFDLE1BQU0sQ0FBQyxhQUFhLEVBQUU7SUFDN0MsRUFBRSxFQUFFLGFBQUssQ0FBQyxFQUFFLEVBQUUsQ0FBQyxVQUFVLEVBQUU7SUFDM0IsVUFBVSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDeEIsS0FBSyxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDbkIsU0FBUyxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDbEMsYUFBYSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDdEMsU0FBUyxFQUFFLGFBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO0lBQ3BDLFVBQVUsRUFBRSxhQUFLLENBQUMsUUFBUSxFQUFFO0NBQzdCLENBQUMsQ0FBQyxPQUFPLENBQUM7SUFDVCxFQUFFLEVBQUUsRUFBRSxDQUFDLFlBQVksQ0FBQyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUU7SUFDcEMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxZQUFZLENBQUMsRUFBRTtDQUN2QixDQUFDLENBQUE7QUFFRixrQkFBZSxVQUFVLENBQUEifQ==
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const SharedCartModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
|
|
2
|
+
readonly SharedCart: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
3
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
4
|
+
token_hash: import("@medusajs/framework/utils").TextProperty;
|
|
5
|
+
items: import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>;
|
|
6
|
+
region_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
7
|
+
currency_code: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
8
|
+
use_count: import("@medusajs/framework/utils").NumberProperty;
|
|
9
|
+
expires_at: import("@medusajs/framework/utils").DateTimeProperty;
|
|
10
|
+
}>, "shared_cart">;
|
|
11
|
+
}>>;
|
|
12
|
+
declare class SharedCartModuleService extends SharedCartModuleService_base {
|
|
13
|
+
}
|
|
14
|
+
export default SharedCartModuleService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const shared_cart_1 = __importDefault(require("./models/shared-cart"));
|
|
8
|
+
class SharedCartModuleService extends (0, utils_1.MedusaService)({ SharedCart: shared_cart_1.default }) {
|
|
9
|
+
}
|
|
10
|
+
exports.default = SharedCartModuleService;
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3NoYXJlZC1jYXJ0L3NlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBeUQ7QUFDekQsdUVBQTZDO0FBRTdDLE1BQU0sdUJBQXdCLFNBQVEsSUFBQSxxQkFBYSxFQUFDLEVBQUUsVUFBVSxFQUFWLHFCQUFVLEVBQUUsQ0FBQztDQUFHO0FBRXRFLGtCQUFlLHVCQUF1QixDQUFBIn0=
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IntegrationSettingsStore } from "../integration-settings";
|
|
2
|
+
export declare const SHARED_CART_SETTINGS_KEY = "shared-cart";
|
|
3
|
+
export declare const DEFAULT_SHARED_CART_TTL_DAYS = 30;
|
|
4
|
+
export declare const MIN_SHARED_CART_TTL_DAYS = 1;
|
|
5
|
+
export declare const MAX_SHARED_CART_TTL_DAYS = 365;
|
|
6
|
+
export declare function getSharedCartTtlDays(store: IntegrationSettingsStore): Promise<number>;
|
|
7
|
+
export declare function saveSharedCartTtlDays(store: IntegrationSettingsStore, ttlDays: number, actorId?: string | null): Promise<number>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_SHARED_CART_TTL_DAYS = exports.MIN_SHARED_CART_TTL_DAYS = exports.DEFAULT_SHARED_CART_TTL_DAYS = exports.SHARED_CART_SETTINGS_KEY = void 0;
|
|
4
|
+
exports.getSharedCartTtlDays = getSharedCartTtlDays;
|
|
5
|
+
exports.saveSharedCartTtlDays = saveSharedCartTtlDays;
|
|
6
|
+
exports.SHARED_CART_SETTINGS_KEY = "shared-cart";
|
|
7
|
+
exports.DEFAULT_SHARED_CART_TTL_DAYS = 30;
|
|
8
|
+
exports.MIN_SHARED_CART_TTL_DAYS = 1;
|
|
9
|
+
exports.MAX_SHARED_CART_TTL_DAYS = 365;
|
|
10
|
+
async function getSharedCartTtlDays(store) {
|
|
11
|
+
const rows = await store.listIntegrationSettings({ integration: exports.SHARED_CART_SETTINGS_KEY }, { take: 1 });
|
|
12
|
+
const config = cleanConfig(rows[0]?.config);
|
|
13
|
+
return normalizeTtl(config.ttl_days);
|
|
14
|
+
}
|
|
15
|
+
async function saveSharedCartTtlDays(store, ttlDays, actorId) {
|
|
16
|
+
const ttl = normalizeTtl(ttlDays, true);
|
|
17
|
+
const rows = await store.listIntegrationSettings({ integration: exports.SHARED_CART_SETTINGS_KEY }, { take: 1 });
|
|
18
|
+
const existing = rows[0];
|
|
19
|
+
const config = {
|
|
20
|
+
...cleanConfig(existing?.config),
|
|
21
|
+
ttl_days: String(ttl),
|
|
22
|
+
};
|
|
23
|
+
const payload = {
|
|
24
|
+
integration: exports.SHARED_CART_SETTINGS_KEY,
|
|
25
|
+
enabled: true,
|
|
26
|
+
config,
|
|
27
|
+
secret_data: existing?.secret_data || null,
|
|
28
|
+
last_test_status: existing?.last_test_status || "unknown",
|
|
29
|
+
last_test_message: existing?.last_test_message || null,
|
|
30
|
+
last_test_at: existing?.last_test_at || null,
|
|
31
|
+
updated_by: actorId || existing?.updated_by || null,
|
|
32
|
+
};
|
|
33
|
+
if (existing) {
|
|
34
|
+
await store.updateIntegrationSettings({ id: existing.id, ...payload });
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
await store.createIntegrationSettings(payload);
|
|
38
|
+
}
|
|
39
|
+
return ttl;
|
|
40
|
+
}
|
|
41
|
+
function normalizeTtl(value, strict = false) {
|
|
42
|
+
const parsed = typeof value === "number" ? value : Number(String(value || ""));
|
|
43
|
+
if (!Number.isFinite(parsed)) {
|
|
44
|
+
if (strict)
|
|
45
|
+
throw new Error("A lejárati időnek számnak kell lennie.");
|
|
46
|
+
return exports.DEFAULT_SHARED_CART_TTL_DAYS;
|
|
47
|
+
}
|
|
48
|
+
const ttl = Math.trunc(parsed);
|
|
49
|
+
if (ttl < exports.MIN_SHARED_CART_TTL_DAYS || ttl > exports.MAX_SHARED_CART_TTL_DAYS) {
|
|
50
|
+
if (strict) {
|
|
51
|
+
throw new Error(`A lejárati idő ${exports.MIN_SHARED_CART_TTL_DAYS} és ${exports.MAX_SHARED_CART_TTL_DAYS} nap között lehet.`);
|
|
52
|
+
}
|
|
53
|
+
return exports.DEFAULT_SHARED_CART_TTL_DAYS;
|
|
54
|
+
}
|
|
55
|
+
return ttl;
|
|
56
|
+
}
|
|
57
|
+
function cleanConfig(value) {
|
|
58
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
59
|
+
return {};
|
|
60
|
+
return Object.fromEntries(Object.entries(value)
|
|
61
|
+
.filter(([, item]) => typeof item === "string")
|
|
62
|
+
.map(([key, item]) => [key, item]));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zaGFyZWQtY2FydC9zZXR0aW5ncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpb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28,4 +28,6 @@ __exportStar(require("./types"), exports);
|
|
|
28
28
|
__exportStar(require("./client"), exports);
|
|
29
29
|
__exportStar(require("./pudo-client"), exports);
|
|
30
30
|
__exportStar(require("./service"), exports);
|
|
31
|
-
|
|
31
|
+
__exportStar(require("./statusdata"), exports);
|
|
32
|
+
__exportStar(require("./statusdata-ftp"), exports);
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvcHJvdmlkZXJzL2RwZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHFEQUFtRTtBQUNuRSxrRkFBa0U7QUFZekQsd0NBWkYsOEJBQTZCLENBWUU7QUFWdEMsa0JBQWUsSUFBQSxzQkFBYyxFQUFDLGVBQU8sQ0FBQyxXQUFXLEVBQUU7SUFDakQsUUFBUSxFQUFFLENBQUMsOEJBQTZCLENBQUM7Q0FDMUMsQ0FBQyxDQUFBO0FBRUYsMENBQXVCO0FBQ3ZCLDJDQUF3QjtBQUN4QixnREFBNkI7QUFDN0IsNENBQXlCO0FBQ3pCLCtDQUE0QjtBQUM1QixtREFBZ0MifQ==
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type DpdStatusdataFtpConfig = {
|
|
2
|
+
host: string;
|
|
3
|
+
port: number;
|
|
4
|
+
username: string;
|
|
5
|
+
password: string;
|
|
6
|
+
directory?: string;
|
|
7
|
+
timeoutMs: number;
|
|
8
|
+
};
|
|
9
|
+
export declare class DpdStatusdataFtpClient {
|
|
10
|
+
readonly config: DpdStatusdataFtpConfig;
|
|
11
|
+
constructor(config: DpdStatusdataFtpConfig);
|
|
12
|
+
listFiles(): Promise<string[]>;
|
|
13
|
+
readFile(filename: string): Promise<string>;
|
|
14
|
+
private withSession;
|
|
15
|
+
}
|
|
16
|
+
export declare function dpdStatusdataFtpConfigFromEnv(env?: Record<string, string | undefined>): DpdStatusdataFtpConfig;
|