@hszrdm/core 1.0.3 → 1.2.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.
Files changed (192) hide show
  1. package/.medusa/server/src/admin/index.js +4375 -2368
  2. package/.medusa/server/src/admin/index.mjs +4376 -2369
  3. package/.medusa/server/src/api/admin/ai-translations/apply/route.d.ts +11 -0
  4. package/.medusa/server/src/api/admin/ai-translations/apply/route.js +102 -0
  5. package/.medusa/server/src/api/admin/ai-translations/preview/route.d.ts +10 -0
  6. package/.medusa/server/src/api/admin/ai-translations/preview/route.js +141 -0
  7. package/.medusa/server/src/api/admin/ai-translations/route.d.ts +2 -0
  8. package/.medusa/server/src/api/admin/ai-translations/route.js +19 -0
  9. package/.medusa/server/src/api/admin/cms/entries/[id]/route.d.ts +6 -0
  10. package/.medusa/server/src/api/admin/cms/entries/[id]/route.js +78 -0
  11. package/.medusa/server/src/api/admin/cms/entries/route.d.ts +5 -0
  12. package/.medusa/server/src/api/admin/cms/entries/route.js +77 -0
  13. package/.medusa/server/src/api/admin/cms/taxonomy/[id]/route.d.ts +5 -0
  14. package/.medusa/server/src/api/admin/cms/taxonomy/[id]/route.js +50 -0
  15. package/.medusa/server/src/api/admin/cms/taxonomy/route.d.ts +5 -0
  16. package/.medusa/server/src/api/admin/cms/taxonomy/route.js +60 -0
  17. package/.medusa/server/src/api/admin/core/status/route.d.ts +2 -0
  18. package/.medusa/server/src/api/admin/core/status/route.js +11 -0
  19. package/.medusa/server/src/api/admin/featured-products/[id]/route.d.ts +7 -0
  20. package/.medusa/server/src/api/admin/featured-products/[id]/route.js +54 -0
  21. package/.medusa/server/src/api/admin/leads/[id]/route.d.ts +9 -0
  22. package/.medusa/server/src/api/admin/leads/[id]/route.js +64 -0
  23. package/.medusa/server/src/api/admin/leads/route.d.ts +2 -0
  24. package/.medusa/server/src/api/admin/leads/route.js +26 -0
  25. package/.medusa/server/src/api/admin/newsletter/subscribers/export/route.d.ts +2 -0
  26. package/.medusa/server/src/api/admin/newsletter/subscribers/export/route.js +74 -0
  27. package/.medusa/server/src/api/admin/newsletter/subscribers/route.d.ts +2 -0
  28. package/.medusa/server/src/api/admin/newsletter/subscribers/route.js +57 -0
  29. package/.medusa/server/src/api/admin/product-reviews/[id]/route.d.ts +7 -0
  30. package/.medusa/server/src/api/admin/product-reviews/[id]/route.js +40 -0
  31. package/.medusa/server/src/api/admin/product-reviews/route.d.ts +2 -0
  32. package/.medusa/server/src/api/admin/product-reviews/route.js +31 -0
  33. package/.medusa/server/src/api/admin/quote-requests/[id]/draft-order/route.d.ts +8 -0
  34. package/.medusa/server/src/api/admin/quote-requests/[id]/draft-order/route.js +160 -0
  35. package/.medusa/server/src/api/admin/quote-requests/[id]/order/route.d.ts +2 -0
  36. package/.medusa/server/src/api/admin/quote-requests/[id]/order/route.js +54 -0
  37. package/.medusa/server/src/api/admin/quote-requests/[id]/route.d.ts +5 -0
  38. package/.medusa/server/src/api/admin/quote-requests/[id]/route.js +80 -0
  39. package/.medusa/server/src/api/admin/quote-requests/route.d.ts +2 -0
  40. package/.medusa/server/src/api/admin/quote-requests/route.js +19 -0
  41. package/.medusa/server/src/api/middlewares.js +19 -6
  42. package/.medusa/server/src/api/store/account/wishlist/[productId]/route.d.ts +2 -0
  43. package/.medusa/server/src/api/store/account/wishlist/[productId]/route.js +18 -0
  44. package/.medusa/server/src/api/store/account/wishlist/merge/route.d.ts +6 -0
  45. package/.medusa/server/src/api/store/account/wishlist/merge/route.js +51 -0
  46. package/.medusa/server/src/api/store/account/wishlist/route.d.ts +7 -0
  47. package/.medusa/server/src/api/store/account/wishlist/route.js +76 -0
  48. package/.medusa/server/src/api/store/cms/config/route.d.ts +2 -0
  49. package/.medusa/server/src/api/store/cms/config/route.js +17 -0
  50. package/.medusa/server/src/api/store/cms/entries/[slug]/route.d.ts +2 -0
  51. package/.medusa/server/src/api/store/cms/entries/[slug]/route.js +62 -0
  52. package/.medusa/server/src/api/store/cms/entries/route.d.ts +2 -0
  53. package/.medusa/server/src/api/store/cms/entries/route.js +87 -0
  54. package/.medusa/server/src/api/store/cms/taxonomy/route.d.ts +2 -0
  55. package/.medusa/server/src/api/store/cms/taxonomy/route.js +44 -0
  56. package/.medusa/server/src/api/store/core/pricing/variants/[id]/route.d.ts +2 -0
  57. package/.medusa/server/src/api/store/core/pricing/variants/[id]/route.js +152 -0
  58. package/.medusa/server/src/api/store/featured-products/route.d.ts +2 -0
  59. package/.medusa/server/src/api/store/featured-products/route.js +38 -0
  60. package/.medusa/server/src/api/store/leads/config/route.d.ts +2 -0
  61. package/.medusa/server/src/api/store/leads/config/route.js +21 -0
  62. package/.medusa/server/src/api/store/leads/route.d.ts +4 -0
  63. package/.medusa/server/src/api/store/leads/route.js +176 -0
  64. package/.medusa/server/src/api/store/newsletter/config/route.d.ts +2 -0
  65. package/.medusa/server/src/api/store/newsletter/config/route.js +14 -0
  66. package/.medusa/server/src/api/store/newsletter/confirm/route.d.ts +4 -0
  67. package/.medusa/server/src/api/store/newsletter/confirm/route.js +52 -0
  68. package/.medusa/server/src/api/store/newsletter/route.d.ts +4 -0
  69. package/.medusa/server/src/api/store/newsletter/route.js +172 -0
  70. package/.medusa/server/src/api/store/newsletter/unsubscribe/route.d.ts +4 -0
  71. package/.medusa/server/src/api/store/newsletter/unsubscribe/route.js +54 -0
  72. package/.medusa/server/src/api/store/products/[id]/reviews/route.d.ts +8 -0
  73. package/.medusa/server/src/api/store/products/[id]/reviews/route.js +174 -0
  74. package/.medusa/server/src/api/store/quote-requests/config/route.d.ts +2 -0
  75. package/.medusa/server/src/api/store/quote-requests/config/route.js +13 -0
  76. package/.medusa/server/src/api/store/quote-requests/route.d.ts +5 -0
  77. package/.medusa/server/src/api/store/quote-requests/route.js +214 -0
  78. package/.medusa/server/src/api/store/seo/route.js +42 -10
  79. package/.medusa/server/src/api/store/seo/structured-data/route.js +3 -2
  80. package/.medusa/server/src/config.js +7 -1
  81. package/.medusa/server/src/core/admin-analytics-dashboard.d.ts +1 -0
  82. package/.medusa/server/src/core/admin-analytics-dashboard.js +15 -3
  83. package/.medusa/server/src/core/ai-translation.d.ts +26 -0
  84. package/.medusa/server/src/core/ai-translation.js +173 -0
  85. package/.medusa/server/src/core/featured-products.d.ts +19 -0
  86. package/.medusa/server/src/core/featured-products.js +45 -0
  87. package/.medusa/server/src/core/pricing-tiers.d.ts +25 -0
  88. package/.medusa/server/src/core/pricing-tiers.js +88 -0
  89. package/.medusa/server/src/core/release-info.d.ts +10 -0
  90. package/.medusa/server/src/core/release-info.js +22 -0
  91. package/.medusa/server/src/core/version.d.ts +4 -4
  92. package/.medusa/server/src/core/version.js +3 -3
  93. package/.medusa/server/src/lib/modules/arukereso/config.js +2 -2
  94. package/.medusa/server/src/lib/modules/google-merchant/config.d.ts +2 -0
  95. package/.medusa/server/src/lib/modules/google-merchant/config.js +9 -2
  96. package/.medusa/server/src/lib/modules/google-merchant/feed.d.ts +1 -0
  97. package/.medusa/server/src/lib/modules/google-merchant/feed.js +4 -2
  98. package/.medusa/server/src/localized-config.d.ts +9 -0
  99. package/.medusa/server/src/localized-config.js +14 -0
  100. package/.medusa/server/src/modules/cms/config.d.ts +11 -0
  101. package/.medusa/server/src/modules/cms/config.js +65 -0
  102. package/.medusa/server/src/modules/cms/content-types.d.ts +24 -0
  103. package/.medusa/server/src/modules/cms/content-types.js +27 -0
  104. package/.medusa/server/src/modules/cms/index.d.ts +9 -0
  105. package/.medusa/server/src/modules/cms/index.js +32 -0
  106. package/.medusa/server/src/modules/cms/migrations/Migration20261029170000.d.ts +5 -0
  107. package/.medusa/server/src/modules/cms/migrations/Migration20261029170000.js +27 -0
  108. package/.medusa/server/src/modules/cms/migrations/Migration20261029190000.d.ts +5 -0
  109. package/.medusa/server/src/modules/cms/migrations/Migration20261029190000.js +52 -0
  110. package/.medusa/server/src/modules/cms/models/cms.d.ts +67 -0
  111. package/.medusa/server/src/modules/cms/models/cms.js +64 -0
  112. package/.medusa/server/src/modules/cms/service.d.ts +82 -0
  113. package/.medusa/server/src/modules/cms/service.js +9 -0
  114. package/.medusa/server/src/modules/cms/utils.d.ts +67 -0
  115. package/.medusa/server/src/modules/cms/utils.js +190 -0
  116. package/.medusa/server/src/modules/integration-settings/arukereso-registration.js +2 -2
  117. package/.medusa/server/src/modules/integration-settings/google-merchant-registration.js +6 -2
  118. package/.medusa/server/src/modules/lead/config.d.ts +37 -0
  119. package/.medusa/server/src/modules/lead/config.js +147 -0
  120. package/.medusa/server/src/modules/lead/email.d.ts +17 -0
  121. package/.medusa/server/src/modules/lead/email.js +68 -0
  122. package/.medusa/server/src/modules/lead/index.d.ts +9 -0
  123. package/.medusa/server/src/modules/lead/index.js +27 -0
  124. package/.medusa/server/src/modules/lead/migrations/Migration20261029163000.d.ts +5 -0
  125. package/.medusa/server/src/modules/lead/migrations/Migration20261029163000.js +19 -0
  126. package/.medusa/server/src/modules/lead/models/lead.d.ts +26 -0
  127. package/.medusa/server/src/modules/lead/models/lead.js +53 -0
  128. package/.medusa/server/src/modules/lead/service.d.ts +29 -0
  129. package/.medusa/server/src/modules/lead/service.js +11 -0
  130. package/.medusa/server/src/modules/lead/spam.d.ts +24 -0
  131. package/.medusa/server/src/modules/lead/spam.js +114 -0
  132. package/.medusa/server/src/modules/newsletter/config.d.ts +14 -0
  133. package/.medusa/server/src/modules/newsletter/config.js +51 -0
  134. package/.medusa/server/src/modules/newsletter/email.d.ts +9 -0
  135. package/.medusa/server/src/modules/newsletter/email.js +38 -0
  136. package/.medusa/server/src/modules/newsletter/events.d.ts +10 -0
  137. package/.medusa/server/src/modules/newsletter/events.js +34 -0
  138. package/.medusa/server/src/modules/newsletter/index.d.ts +10 -0
  139. package/.medusa/server/src/modules/newsletter/index.js +33 -0
  140. package/.medusa/server/src/modules/newsletter/migrations/Migration20261030130000.d.ts +5 -0
  141. package/.medusa/server/src/modules/newsletter/migrations/Migration20261030130000.js +18 -0
  142. package/.medusa/server/src/modules/newsletter/models/newsletter-subscriber.d.ts +21 -0
  143. package/.medusa/server/src/modules/newsletter/models/newsletter-subscriber.js +35 -0
  144. package/.medusa/server/src/modules/newsletter/service.d.ts +24 -0
  145. package/.medusa/server/src/modules/newsletter/service.js +11 -0
  146. package/.medusa/server/src/modules/newsletter/token.d.ts +10 -0
  147. package/.medusa/server/src/modules/newsletter/token.js +97 -0
  148. package/.medusa/server/src/modules/product-review/config.d.ts +5 -0
  149. package/.medusa/server/src/modules/product-review/config.js +10 -0
  150. package/.medusa/server/src/modules/product-review/index.d.ts +7 -0
  151. package/.medusa/server/src/modules/product-review/index.js +18 -0
  152. package/.medusa/server/src/modules/product-review/migrations/Migration20261030160100.d.ts +5 -0
  153. package/.medusa/server/src/modules/product-review/migrations/Migration20261030160100.js +18 -0
  154. package/.medusa/server/src/modules/product-review/models/product-review.d.ts +16 -0
  155. package/.medusa/server/src/modules/product-review/models/product-review.js +26 -0
  156. package/.medusa/server/src/modules/product-review/service.d.ts +25 -0
  157. package/.medusa/server/src/modules/product-review/service.js +12 -0
  158. package/.medusa/server/src/modules/quote-request/config.d.ts +14 -0
  159. package/.medusa/server/src/modules/quote-request/config.js +52 -0
  160. package/.medusa/server/src/modules/quote-request/email.d.ts +17 -0
  161. package/.medusa/server/src/modules/quote-request/email.js +133 -0
  162. package/.medusa/server/src/modules/quote-request/index.d.ts +8 -0
  163. package/.medusa/server/src/modules/quote-request/index.js +23 -0
  164. package/.medusa/server/src/modules/quote-request/migrations/Migration20261029160000.d.ts +5 -0
  165. package/.medusa/server/src/modules/quote-request/migrations/Migration20261029160000.js +20 -0
  166. package/.medusa/server/src/modules/quote-request/models/quote-request.d.ts +24 -0
  167. package/.medusa/server/src/modules/quote-request/models/quote-request.js +54 -0
  168. package/.medusa/server/src/modules/quote-request/service.d.ts +32 -0
  169. package/.medusa/server/src/modules/quote-request/service.js +12 -0
  170. package/.medusa/server/src/modules/seo/models/seo-page.js +5 -5
  171. package/.medusa/server/src/modules/seo/sitemap.js +44 -10
  172. package/.medusa/server/src/modules/seo/structured-data.d.ts +1 -1
  173. package/.medusa/server/src/modules/seo/structured-data.js +41 -25
  174. package/.medusa/server/src/modules/seo/technical.d.ts +7 -2
  175. package/.medusa/server/src/modules/seo/technical.js +45 -6
  176. package/.medusa/server/src/modules/seo/types.d.ts +2 -0
  177. package/.medusa/server/src/modules/wishlist/index.d.ts +5 -0
  178. package/.medusa/server/src/modules/wishlist/index.js +14 -0
  179. package/.medusa/server/src/modules/wishlist/migrations/Migration20261030160000.d.ts +5 -0
  180. package/.medusa/server/src/modules/wishlist/migrations/Migration20261030160000.js +17 -0
  181. package/.medusa/server/src/modules/wishlist/models/wishlist-item.d.ts +6 -0
  182. package/.medusa/server/src/modules/wishlist/models/wishlist-item.js +14 -0
  183. package/.medusa/server/src/modules/wishlist/service.d.ts +15 -0
  184. package/.medusa/server/src/modules/wishlist/service.js +12 -0
  185. package/.medusa/server/src/scripts/ensure-locales.d.ts +2 -0
  186. package/.medusa/server/src/scripts/ensure-locales.js +34 -0
  187. package/.medusa/server/src/scripts/ensure-shipping.d.ts +3 -0
  188. package/.medusa/server/src/scripts/ensure-shipping.js +211 -0
  189. package/.medusa/server/src/scripts/verify-bootstrap.js +19 -2
  190. package/.medusa/server/src/subscribers/quote-request-order-placed.d.ts +7 -0
  191. package/.medusa/server/src/subscribers/quote-request-order-placed.js +27 -0
  192. package/package.json +3 -2
@@ -0,0 +1,32 @@
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.CmsTaxonomyTerm = exports.CmsEntry = exports.CMS_TAXONOMIES = exports.CMS_BODY_FORMATS = exports.CMS_ENTRY_STATUSES = exports.publicCmsEntry = exports.isCmsEntryPublic = exports.normalizeCmsTaxonomyInput = exports.normalizeCmsEntryInput = exports.slugifyCms = exports.isCoreCmsContentType = exports.CORE_CMS_CONTENT_TYPE_OPTIONS = exports.CORE_CMS_CONTENT_TYPES = exports.loadCmsConfig = exports.CmsService = exports.CMS_MODULE = void 0;
7
+ const utils_1 = require("@medusajs/framework/utils");
8
+ const service_1 = __importDefault(require("./service"));
9
+ exports.CmsService = service_1.default;
10
+ exports.CMS_MODULE = "cms";
11
+ exports.default = (0, utils_1.Module)(exports.CMS_MODULE, {
12
+ service: service_1.default,
13
+ });
14
+ var config_1 = require("./config");
15
+ Object.defineProperty(exports, "loadCmsConfig", { enumerable: true, get: function () { return config_1.loadCmsConfig; } });
16
+ var content_types_1 = require("./content-types");
17
+ Object.defineProperty(exports, "CORE_CMS_CONTENT_TYPES", { enumerable: true, get: function () { return content_types_1.CORE_CMS_CONTENT_TYPES; } });
18
+ Object.defineProperty(exports, "CORE_CMS_CONTENT_TYPE_OPTIONS", { enumerable: true, get: function () { return content_types_1.CORE_CMS_CONTENT_TYPE_OPTIONS; } });
19
+ Object.defineProperty(exports, "isCoreCmsContentType", { enumerable: true, get: function () { return content_types_1.isCoreCmsContentType; } });
20
+ var utils_2 = require("./utils");
21
+ Object.defineProperty(exports, "slugifyCms", { enumerable: true, get: function () { return utils_2.slugifyCms; } });
22
+ Object.defineProperty(exports, "normalizeCmsEntryInput", { enumerable: true, get: function () { return utils_2.normalizeCmsEntryInput; } });
23
+ Object.defineProperty(exports, "normalizeCmsTaxonomyInput", { enumerable: true, get: function () { return utils_2.normalizeCmsTaxonomyInput; } });
24
+ Object.defineProperty(exports, "isCmsEntryPublic", { enumerable: true, get: function () { return utils_2.isCmsEntryPublic; } });
25
+ Object.defineProperty(exports, "publicCmsEntry", { enumerable: true, get: function () { return utils_2.publicCmsEntry; } });
26
+ var cms_1 = require("./models/cms");
27
+ Object.defineProperty(exports, "CMS_ENTRY_STATUSES", { enumerable: true, get: function () { return cms_1.CMS_ENTRY_STATUSES; } });
28
+ Object.defineProperty(exports, "CMS_BODY_FORMATS", { enumerable: true, get: function () { return cms_1.CMS_BODY_FORMATS; } });
29
+ Object.defineProperty(exports, "CMS_TAXONOMIES", { enumerable: true, get: function () { return cms_1.CMS_TAXONOMIES; } });
30
+ Object.defineProperty(exports, "CmsEntry", { enumerable: true, get: function () { return cms_1.CmsEntry; } });
31
+ Object.defineProperty(exports, "CmsTaxonomyTerm", { enumerable: true, get: function () { return cms_1.CmsTaxonomyTerm; } });
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9jbXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscURBQWtEO0FBQ2xELHdEQUFrQztBQVF6QixxQkFSRixpQkFBVSxDQVFFO0FBTk4sUUFBQSxVQUFVLEdBQUcsS0FBSyxDQUFBO0FBRS9CLGtCQUFlLElBQUEsY0FBTSxFQUFDLGtCQUFVLEVBQUU7SUFDaEMsT0FBTyxFQUFFLGlCQUFVO0NBQ3BCLENBQUMsQ0FBQTtBQUdGLG1DQUF1RjtBQUE5RSx1R0FBQSxhQUFhLE9BQUE7QUFDdEIsaURBTXdCO0FBTHRCLHVIQUFBLHNCQUFzQixPQUFBO0FBQ3RCLDhIQUFBLDZCQUE2QixPQUFBO0FBQzdCLHFIQUFBLG9CQUFvQixPQUFBO0FBSXRCLGlDQU1nQjtBQUxkLG1HQUFBLFVBQVUsT0FBQTtBQUNWLCtHQUFBLHNCQUFzQixPQUFBO0FBQ3RCLGtIQUFBLHlCQUF5QixPQUFBO0FBQ3pCLHlHQUFBLGdCQUFnQixPQUFBO0FBQ2hCLHVHQUFBLGNBQWMsT0FBQTtBQUVoQixvQ0FNcUI7QUFMbkIseUdBQUEsa0JBQWtCLE9BQUE7QUFDbEIsdUdBQUEsZ0JBQWdCLE9BQUE7QUFDaEIscUdBQUEsY0FBYyxPQUFBO0FBQ2QsK0ZBQUEsUUFBUSxPQUFBO0FBQ1Isc0dBQUEsZUFBZSxPQUFBIn0=
@@ -0,0 +1,5 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20261029170000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20261029170000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20261029170000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`create table if not exists "cms_entry" ("id" text not null, "content_type" text not null, "status" text check ("status" in ('draft','published','scheduled','archived')) not null default 'draft', "title" text not null, "slug" text not null, "excerpt" text null, "body" text null, "body_format" text check ("body_format" in ('markdown','html','blocks')) not null default 'markdown', "blocks" jsonb null, "locale" text not null default 'hu-HU', "featured_image_url" text null, "featured_image_alt" text null, "author_id" text null, "author_name" text null, "seo_title" text null, "seo_description" text null, "canonical_url" text null, "noindex" boolean not null default false, "og_image_url" text null, "published_at" timestamptz null, "sort_order" integer not null default 0, "custom_fields" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "cms_entry_pkey" primary key ("id"));`);
8
+ this.addSql(`create unique index if not exists "IDX_cms_entry_slug_locale_type" on "cms_entry" ("content_type", "slug", "locale") where deleted_at is null;`);
9
+ this.addSql(`create index if not exists "IDX_cms_entry_type_status_publish" on "cms_entry" ("content_type", "status", "published_at") where deleted_at is null;`);
10
+ this.addSql(`create index if not exists "IDX_cms_entry_status_publish" on "cms_entry" ("status", "published_at") where deleted_at is null;`);
11
+ this.addSql(`create index if not exists "IDX_cms_entry_locale" on "cms_entry" ("locale") where deleted_at is null;`);
12
+ this.addSql(`create table if not exists "cms_taxonomy_term" ("id" text not null, "taxonomy" text check ("taxonomy" in ('category','tag')) not null, "name" text not null, "slug" text not null, "description" text null, "locale" text not null default 'hu-HU', "metadata" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "cms_taxonomy_term_pkey" primary key ("id"));`);
13
+ this.addSql(`create unique index if not exists "IDX_cms_taxonomy_slug_locale" on "cms_taxonomy_term" ("taxonomy", "slug", "locale") where deleted_at is null;`);
14
+ this.addSql(`create index if not exists "IDX_cms_taxonomy_name" on "cms_taxonomy_term" ("taxonomy", "name") where deleted_at is null;`);
15
+ this.addSql(`create index if not exists "IDX_cms_taxonomy_locale" on "cms_taxonomy_term" ("locale") where deleted_at is null;`);
16
+ this.addSql(`create table if not exists "cms_entry_taxonomy_term" ("cms_entry_id" text not null, "cms_taxonomy_term_id" text not null, constraint "cms_entry_taxonomy_term_pkey" primary key ("cms_entry_id", "cms_taxonomy_term_id"), constraint "cms_entry_taxonomy_term_entry_fk" foreign key ("cms_entry_id") references "cms_entry" ("id") on update cascade on delete cascade, constraint "cms_entry_taxonomy_term_term_fk" foreign key ("cms_taxonomy_term_id") references "cms_taxonomy_term" ("id") on update cascade on delete cascade);`);
17
+ this.addSql(`create index if not exists "IDX_cms_entry_taxonomy_term_entry" on "cms_entry_taxonomy_term" ("cms_entry_id");`);
18
+ this.addSql(`create index if not exists "IDX_cms_entry_taxonomy_term_term" on "cms_entry_taxonomy_term" ("cms_taxonomy_term_id");`);
19
+ }
20
+ async down() {
21
+ this.addSql(`drop table if exists "cms_entry_taxonomy_term" cascade;`);
22
+ this.addSql(`drop table if exists "cms_taxonomy_term" cascade;`);
23
+ this.addSql(`drop table if exists "cms_entry" cascade;`);
24
+ }
25
+ }
26
+ exports.Migration20261029170000 = Migration20261029170000;
27
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjEwMjkxNzAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9jbXMvbWlncmF0aW9ucy9NaWdyYXRpb24yM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0lBQzFELENBQUM7Q0FDRjtBQXZCRCwwREF1QkMifQ==
@@ -0,0 +1,5 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20261029190000 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20261029190000 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20261029190000 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ do $$
9
+ begin
10
+ if exists (
11
+ select 1
12
+ from "cms_entry"
13
+ where "deleted_at" is null
14
+ group by "content_type", "slug"
15
+ having count(*) > 1
16
+ ) then
17
+ raise exception 'CMS migration blocked: duplicate content_type + slug rows exist across locales. Consolidate them into Medusa translations before retrying.';
18
+ end if;
19
+
20
+ if exists (
21
+ select 1
22
+ from "cms_taxonomy_term"
23
+ where "deleted_at" is null
24
+ group by "taxonomy", "slug"
25
+ having count(*) > 1
26
+ ) then
27
+ raise exception 'CMS migration blocked: duplicate taxonomy + slug rows exist across locales. Consolidate them into Medusa translations before retrying.';
28
+ end if;
29
+ end $$;
30
+ `);
31
+ this.addSql(`drop index if exists "IDX_cms_entry_slug_locale_type";`);
32
+ this.addSql(`drop index if exists "IDX_cms_entry_locale";`);
33
+ this.addSql(`drop index if exists "IDX_cms_taxonomy_slug_locale";`);
34
+ this.addSql(`drop index if exists "IDX_cms_taxonomy_locale";`);
35
+ this.addSql(`alter table "cms_entry" drop column if exists "locale";`);
36
+ this.addSql(`alter table "cms_taxonomy_term" drop column if exists "locale";`);
37
+ this.addSql(`create unique index if not exists "IDX_cms_entry_slug_type" on "cms_entry" ("content_type", "slug") where "deleted_at" is null;`);
38
+ this.addSql(`create unique index if not exists "IDX_cms_taxonomy_slug" on "cms_taxonomy_term" ("taxonomy", "slug") where "deleted_at" is null;`);
39
+ }
40
+ async down() {
41
+ this.addSql(`drop index if exists "IDX_cms_entry_slug_type";`);
42
+ this.addSql(`drop index if exists "IDX_cms_taxonomy_slug";`);
43
+ this.addSql(`alter table "cms_entry" add column if not exists "locale" text not null default 'hu-HU';`);
44
+ this.addSql(`alter table "cms_taxonomy_term" add column if not exists "locale" text not null default 'hu-HU';`);
45
+ this.addSql(`create unique index if not exists "IDX_cms_entry_slug_locale_type" on "cms_entry" ("content_type", "slug", "locale") where "deleted_at" is null;`);
46
+ this.addSql(`create index if not exists "IDX_cms_entry_locale" on "cms_entry" ("locale") where "deleted_at" is null;`);
47
+ this.addSql(`create unique index if not exists "IDX_cms_taxonomy_slug_locale" on "cms_taxonomy_term" ("taxonomy", "slug", "locale") where "deleted_at" is null;`);
48
+ this.addSql(`create index if not exists "IDX_cms_taxonomy_locale" on "cms_taxonomy_term" ("locale") where "deleted_at" is null;`);
49
+ }
50
+ }
51
+ exports.Migration20261029190000 = Migration20261029190000;
52
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjEwMjkxOTAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9jbXMvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI2MTAyOTE5MDAwMC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBb0U7QUFFcEUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUNwRCxLQUFLLENBQUMsRUFBRTtRQUNOLElBQUksQ0FBQyxNQUFNLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0tBdUJYLENBQUMsQ0FBQTtRQUVGLElBQUksQ0FBQyxNQUFNLENBQUMsd0RBQXdELENBQUMsQ0FBQTtRQUNyRSxJQUFJLENBQUMsTUFBTSxDQUFDLDhDQUE4QyxDQUFDLENBQUE7UUFDM0QsSUFBSSxDQUFDLE1BQU0sQ0FBQyxzREFBc0QsQ0FBQyxDQUFBO1FBQ25FLElBQUksQ0FBQyxNQUFNLENBQUMsaURBQWlELENBQUMsQ0FBQTtRQUU5RCxJQUFJLENBQUMsTUFBTSxDQUFDLHlEQUF5RCxDQUFDLENBQUE7UUFDdEUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxpRUFBaUUsQ0FBQyxDQUFBO1FBRTlFLElBQUksQ0FBQyxNQUFNLENBQUMsaUlBQWlJLENBQUMsQ0FBQTtRQUM5SSxJQUFJLENBQUMsTUFBTSxDQUFDLG1JQUFtSSxDQUFDLENBQUE7SUFDbEosQ0FBQztJQUVELEtBQUssQ0FBQyxJQUFJO1FBQ1IsSUFBSSxDQUFDLE1BQU0sQ0FBQyxpREFBaUQsQ0FBQyxDQUFBO1FBQzlELElBQUksQ0FBQyxNQUFNLENBQUMsK0NBQStDLENBQUMsQ0FBQTtRQUU1RCxJQUFJLENBQUMsTUFBTSxDQUFDLDBGQUEwRixDQUFDLENBQUE7UUFDdkcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxrR0FBa0csQ0FBQyxDQUFBO1FBRS9HLElBQUksQ0FBQyxNQUFNLENBQUMsa0pBQWtKLENBQUMsQ0FBQTtRQUMvSixJQUFJLENBQUMsTUFBTSxDQUFDLHlHQUF5RyxDQUFDLENBQUE7UUFDdEgsSUFBSSxDQUFDLE1BQU0sQ0FBQyxvSkFBb0osQ0FBQyxDQUFBO1FBQ2pLLElBQUksQ0FBQyxNQUFNLENBQUMsb0hBQW9ILENBQUMsQ0FBQTtJQUNuSSxDQUFDO0NBQ0Y7QUFuREQsMERBbURDIn0=
@@ -0,0 +1,67 @@
1
+ export declare const CMS_ENTRY_STATUSES: readonly ["draft", "published", "scheduled", "archived"];
2
+ export declare const CMS_BODY_FORMATS: readonly ["markdown", "html", "blocks"];
3
+ export declare const CMS_TAXONOMIES: readonly ["category", "tag"];
4
+ export declare const CmsEntry: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
5
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
6
+ content_type: import("@medusajs/framework/utils").TextProperty;
7
+ status: import("@medusajs/framework/utils").EnumProperty<["draft", "published", "scheduled", "archived"]>;
8
+ title: import("@medusajs/framework/utils").TextProperty;
9
+ slug: import("@medusajs/framework/utils").TextProperty;
10
+ excerpt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
11
+ body: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
12
+ body_format: import("@medusajs/framework/utils").EnumProperty<["markdown", "html", "blocks"]>;
13
+ blocks: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
14
+ featured_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
15
+ featured_image_alt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
16
+ author_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
17
+ author_name: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
18
+ seo_title: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
19
+ seo_description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
20
+ canonical_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
21
+ noindex: import("@medusajs/framework/utils").BooleanProperty;
22
+ og_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
23
+ published_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
24
+ sort_order: import("@medusajs/framework/utils").NumberProperty;
25
+ custom_fields: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
26
+ terms: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
27
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
28
+ taxonomy: import("@medusajs/framework/utils").EnumProperty<["category", "tag"]>;
29
+ name: import("@medusajs/framework/utils").TextProperty;
30
+ slug: import("@medusajs/framework/utils").TextProperty;
31
+ description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
32
+ metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
33
+ entries: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "cms_entry">>;
34
+ }>, "cms_taxonomy_term">>;
35
+ }>, "cms_entry">;
36
+ export declare const CmsTaxonomyTerm: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
37
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
38
+ taxonomy: import("@medusajs/framework/utils").EnumProperty<["category", "tag"]>;
39
+ name: import("@medusajs/framework/utils").TextProperty;
40
+ slug: import("@medusajs/framework/utils").TextProperty;
41
+ description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
42
+ metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
43
+ entries: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
44
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
45
+ content_type: import("@medusajs/framework/utils").TextProperty;
46
+ status: import("@medusajs/framework/utils").EnumProperty<["draft", "published", "scheduled", "archived"]>;
47
+ title: import("@medusajs/framework/utils").TextProperty;
48
+ slug: import("@medusajs/framework/utils").TextProperty;
49
+ excerpt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
50
+ body: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
51
+ body_format: import("@medusajs/framework/utils").EnumProperty<["markdown", "html", "blocks"]>;
52
+ blocks: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
53
+ featured_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
54
+ featured_image_alt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
55
+ author_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
56
+ author_name: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
57
+ seo_title: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
58
+ seo_description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
59
+ canonical_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
60
+ noindex: import("@medusajs/framework/utils").BooleanProperty;
61
+ og_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
62
+ published_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
63
+ sort_order: import("@medusajs/framework/utils").NumberProperty;
64
+ custom_fields: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
65
+ terms: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "cms_taxonomy_term">>;
66
+ }>, "cms_entry">>;
67
+ }>, "cms_taxonomy_term">;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CmsTaxonomyTerm = exports.CmsEntry = exports.CMS_TAXONOMIES = exports.CMS_BODY_FORMATS = exports.CMS_ENTRY_STATUSES = void 0;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
+ exports.CMS_ENTRY_STATUSES = [
6
+ "draft",
7
+ "published",
8
+ "scheduled",
9
+ "archived",
10
+ ];
11
+ exports.CMS_BODY_FORMATS = ["markdown", "html", "blocks"];
12
+ exports.CMS_TAXONOMIES = ["category", "tag"];
13
+ exports.CmsEntry = utils_1.model
14
+ .define("cms_entry", {
15
+ id: utils_1.model.id().primaryKey(),
16
+ content_type: utils_1.model.text().searchable(),
17
+ status: utils_1.model.enum(["draft", "published", "scheduled", "archived"]).default("draft"),
18
+ title: utils_1.model.text().searchable().translatable(),
19
+ slug: utils_1.model.text(),
20
+ excerpt: utils_1.model.text().searchable().translatable().nullable(),
21
+ body: utils_1.model.text().searchable().translatable().nullable(),
22
+ body_format: utils_1.model.enum(["markdown", "html", "blocks"]).default("markdown"),
23
+ blocks: utils_1.model.json().nullable(),
24
+ featured_image_url: utils_1.model.text().nullable(),
25
+ featured_image_alt: utils_1.model.text().translatable().nullable(),
26
+ author_id: utils_1.model.text().nullable(),
27
+ author_name: utils_1.model.text().nullable(),
28
+ seo_title: utils_1.model.text().translatable().nullable(),
29
+ seo_description: utils_1.model.text().translatable().nullable(),
30
+ canonical_url: utils_1.model.text().nullable(),
31
+ noindex: utils_1.model.boolean().default(false),
32
+ og_image_url: utils_1.model.text().nullable(),
33
+ published_at: utils_1.model.dateTime().nullable(),
34
+ sort_order: utils_1.model.number().default(0),
35
+ custom_fields: utils_1.model.json().nullable(),
36
+ terms: utils_1.model.manyToMany(() => exports.CmsTaxonomyTerm, {
37
+ mappedBy: "entries",
38
+ pivotTable: "cms_entry_taxonomy_term",
39
+ joinColumn: "cms_entry_id",
40
+ inverseJoinColumn: "cms_taxonomy_term_id",
41
+ }),
42
+ })
43
+ .indexes([
44
+ { on: ["content_type", "slug"], unique: true },
45
+ { on: ["content_type", "status", "published_at"] },
46
+ { on: ["status", "published_at"] },
47
+ ]);
48
+ exports.CmsTaxonomyTerm = utils_1.model
49
+ .define("cms_taxonomy_term", {
50
+ id: utils_1.model.id().primaryKey(),
51
+ taxonomy: utils_1.model.enum(["category", "tag"]),
52
+ name: utils_1.model.text().searchable().translatable(),
53
+ slug: utils_1.model.text(),
54
+ description: utils_1.model.text().translatable().nullable(),
55
+ metadata: utils_1.model.json().nullable(),
56
+ entries: utils_1.model.manyToMany(() => exports.CmsEntry, {
57
+ mappedBy: "terms",
58
+ }),
59
+ })
60
+ .indexes([
61
+ { on: ["taxonomy", "slug"], unique: true },
62
+ { on: ["taxonomy", "name"] },
63
+ ]);
64
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY21zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21vZHVsZXMvY21zL21vZGVscy9jbXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscURBQWlEO0FBRXBDLFFBQUEsa0JBQWtCLEdBQUc7SUFDaEMsT0FBTztJQUNQLFdBQVc7SUFDWCxXQUFXO0lBQ1gsVUFBVTtDQUNGLENBQUE7QUFFRyxRQUFBLGdCQUFnQixHQUFHLENBQUMsVUFBVSxFQUFFLE1BQU0sRUFBRSxRQUFRLENBQVUsQ0FBQTtBQUMx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Q0FBQztJQUNQLEVBQUUsRUFBRSxFQUFFLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUU7SUFDMUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLEVBQUU7Q0FDN0IsQ0FBQyxDQUFBIn0=
@@ -0,0 +1,82 @@
1
+ declare const CmsBaseService: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
2
+ readonly CmsEntry: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
3
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
4
+ content_type: import("@medusajs/framework/utils").TextProperty;
5
+ status: import("@medusajs/framework/utils").EnumProperty<["draft", "published", "scheduled", "archived"]>;
6
+ title: import("@medusajs/framework/utils").TextProperty;
7
+ slug: import("@medusajs/framework/utils").TextProperty;
8
+ excerpt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
9
+ body: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
10
+ body_format: import("@medusajs/framework/utils").EnumProperty<["markdown", "html", "blocks"]>;
11
+ blocks: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
12
+ featured_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
13
+ featured_image_alt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
14
+ author_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
15
+ author_name: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
16
+ seo_title: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
17
+ seo_description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
18
+ canonical_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
19
+ noindex: import("@medusajs/framework/utils").BooleanProperty;
20
+ og_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
21
+ published_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
22
+ sort_order: import("@medusajs/framework/utils").NumberProperty;
23
+ custom_fields: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
24
+ terms: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
25
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
26
+ taxonomy: import("@medusajs/framework/utils").EnumProperty<["category", "tag"]>;
27
+ name: import("@medusajs/framework/utils").TextProperty;
28
+ slug: import("@medusajs/framework/utils").TextProperty;
29
+ description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
30
+ metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
31
+ entries: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "cms_entry">>;
32
+ }>, "cms_taxonomy_term">>;
33
+ }>, "cms_entry">;
34
+ readonly CmsTaxonomyTerm: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
35
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
36
+ taxonomy: import("@medusajs/framework/utils").EnumProperty<["category", "tag"]>;
37
+ name: import("@medusajs/framework/utils").TextProperty;
38
+ slug: import("@medusajs/framework/utils").TextProperty;
39
+ description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
40
+ metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
41
+ entries: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
42
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
43
+ content_type: import("@medusajs/framework/utils").TextProperty;
44
+ status: import("@medusajs/framework/utils").EnumProperty<["draft", "published", "scheduled", "archived"]>;
45
+ title: import("@medusajs/framework/utils").TextProperty;
46
+ slug: import("@medusajs/framework/utils").TextProperty;
47
+ excerpt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
48
+ body: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
49
+ body_format: import("@medusajs/framework/utils").EnumProperty<["markdown", "html", "blocks"]>;
50
+ blocks: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
51
+ featured_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
52
+ featured_image_alt: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
53
+ author_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
54
+ author_name: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
55
+ seo_title: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
56
+ seo_description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
57
+ canonical_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
58
+ noindex: import("@medusajs/framework/utils").BooleanProperty;
59
+ og_image_url: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
60
+ published_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
61
+ sort_order: import("@medusajs/framework/utils").NumberProperty;
62
+ custom_fields: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
63
+ terms: import("@medusajs/framework/utils").ManyToMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "cms_taxonomy_term">>;
64
+ }>, "cms_entry">>;
65
+ }>, "cms_taxonomy_term">;
66
+ }>>;
67
+ type CmsBaseServiceInstance = InstanceType<typeof CmsBaseService>;
68
+ export default class CmsService extends CmsBaseService {
69
+ createCmsEntries: CmsBaseServiceInstance["createCmsEntries"];
70
+ updateCmsEntries: CmsBaseServiceInstance["updateCmsEntries"];
71
+ deleteCmsEntries: CmsBaseServiceInstance["deleteCmsEntries"];
72
+ retrieveCmsEntry: CmsBaseServiceInstance["retrieveCmsEntry"];
73
+ listCmsEntries: CmsBaseServiceInstance["listCmsEntries"];
74
+ listAndCountCmsEntries: CmsBaseServiceInstance["listAndCountCmsEntries"];
75
+ createCmsTaxonomyTerms: CmsBaseServiceInstance["createCmsTaxonomyTerms"];
76
+ updateCmsTaxonomyTerms: CmsBaseServiceInstance["updateCmsTaxonomyTerms"];
77
+ deleteCmsTaxonomyTerms: CmsBaseServiceInstance["deleteCmsTaxonomyTerms"];
78
+ retrieveCmsTaxonomyTerm: CmsBaseServiceInstance["retrieveCmsTaxonomyTerm"];
79
+ listCmsTaxonomyTerms: CmsBaseServiceInstance["listCmsTaxonomyTerms"];
80
+ listAndCountCmsTaxonomyTerms: CmsBaseServiceInstance["listAndCountCmsTaxonomyTerms"];
81
+ }
82
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@medusajs/framework/utils");
4
+ const cms_1 = require("./models/cms");
5
+ const CmsBaseService = (0, utils_1.MedusaService)({ CmsEntry: cms_1.CmsEntry, CmsTaxonomyTerm: cms_1.CmsTaxonomyTerm });
6
+ class CmsService extends CmsBaseService {
7
+ }
8
+ exports.default = CmsService;
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL2Ntcy9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEscURBQXlEO0FBQ3pELHNDQUF3RDtBQUV4RCxNQUFNLGNBQWMsR0FBRyxJQUFBLHFCQUFhLEVBQUMsRUFBRSxRQUFRLEVBQVIsY0FBUSxFQUFFLGVBQWUsRUFBZixxQkFBZSxFQUFFLENBQUMsQ0FBQTtBQUduRSxNQUFxQixVQUFXLFNBQVEsY0FBYztDQWNyRDtBQWRELDZCQWNDIn0=
@@ -0,0 +1,67 @@
1
+ export type CmsEntryLike = Record<string, any>;
2
+ export declare function slugifyCms(value: unknown): string;
3
+ export declare function normalizeCmsEntryInput(body: Record<string, unknown>, defaults: {
4
+ actorId?: string | null;
5
+ }, current?: CmsEntryLike | null): {
6
+ content_type: string;
7
+ status: string;
8
+ title: string;
9
+ slug: string;
10
+ excerpt: string | null;
11
+ body: string | null;
12
+ body_format: string;
13
+ blocks: object | null;
14
+ featured_image_url: string | null;
15
+ featured_image_alt: string | null;
16
+ author_id: string | null;
17
+ author_name: string | null;
18
+ seo_title: string | null;
19
+ seo_description: string | null;
20
+ canonical_url: string | null;
21
+ noindex: boolean;
22
+ og_image_url: string | null;
23
+ published_at: Date | null;
24
+ sort_order: number;
25
+ custom_fields: Record<string, unknown> | null;
26
+ terms: string[];
27
+ };
28
+ export declare function normalizeCmsTaxonomyInput(body: Record<string, unknown>, current?: Record<string, any> | null): {
29
+ taxonomy: string;
30
+ name: string;
31
+ slug: string;
32
+ description: string | null;
33
+ metadata: Record<string, unknown> | null;
34
+ };
35
+ export declare function isCmsEntryPublic(entry: CmsEntryLike, now?: Date): boolean;
36
+ export declare function publicCmsEntry(entry: CmsEntryLike, locale?: string | null): {
37
+ id: any;
38
+ content_type: any;
39
+ title: any;
40
+ slug: any;
41
+ excerpt: any;
42
+ body: any;
43
+ body_format: any;
44
+ blocks: any;
45
+ locale: string | null;
46
+ featured_image_url: any;
47
+ featured_image_alt: any;
48
+ author_name: any;
49
+ seo_title: any;
50
+ seo_description: any;
51
+ canonical_url: any;
52
+ noindex: boolean;
53
+ og_image_url: any;
54
+ published_at: any;
55
+ sort_order: number;
56
+ custom_fields: any;
57
+ terms: {
58
+ id: any;
59
+ taxonomy: any;
60
+ name: any;
61
+ slug: any;
62
+ description: any;
63
+ locale: string | null;
64
+ }[];
65
+ created_at: any;
66
+ updated_at: any;
67
+ };