@medusajs/search 0.0.1 → 2.18.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 (102) hide show
  1. package/README.md +4 -1
  2. package/dist/index.d.ts +7 -8
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +11 -21
  5. package/dist/index.js.map +1 -0
  6. package/dist/joiner-config.d.ts +8 -2
  7. package/dist/joiner-config.d.ts.map +1 -0
  8. package/dist/joiner-config.js +9 -1
  9. package/dist/joiner-config.js.map +1 -0
  10. package/dist/loaders/{container.d.ts → providers.d.ts} +2 -1
  11. package/dist/loaders/providers.d.ts.map +1 -0
  12. package/dist/loaders/providers.js +23 -0
  13. package/dist/loaders/providers.js.map +1 -0
  14. package/dist/migrations/Migration20260805085626.d.ts +6 -0
  15. package/dist/migrations/Migration20260805085626.d.ts.map +1 -0
  16. package/dist/migrations/Migration20260805085626.js +23 -0
  17. package/dist/migrations/Migration20260805085626.js.map +1 -0
  18. package/dist/models/index.d.ts +3 -2
  19. package/dist/models/index.d.ts.map +1 -0
  20. package/dist/models/index.js +6 -16
  21. package/dist/models/index.js.map +1 -0
  22. package/dist/models/search-index-sync.d.ts +25 -0
  23. package/dist/models/search-index-sync.d.ts.map +1 -0
  24. package/dist/models/search-index-sync.js +42 -0
  25. package/dist/models/search-index-sync.js.map +1 -0
  26. package/dist/models/search-index.d.ts +21 -0
  27. package/dist/models/search-index.d.ts.map +1 -0
  28. package/dist/models/search-index.js +29 -0
  29. package/dist/models/search-index.js.map +1 -0
  30. package/dist/services/index.d.ts +2 -0
  31. package/dist/services/index.d.ts.map +1 -0
  32. package/dist/services/index.js +4 -1
  33. package/dist/services/index.js.map +1 -0
  34. package/dist/services/search-module-service.d.ts +45 -22
  35. package/dist/services/search-module-service.d.ts.map +1 -0
  36. package/dist/services/search-module-service.js +160 -45
  37. package/dist/services/search-module-service.js.map +1 -0
  38. package/dist/services/search-provider.d.ts +23 -0
  39. package/dist/services/search-provider.d.ts.map +1 -0
  40. package/dist/services/search-provider.js +64 -0
  41. package/dist/services/search-provider.js.map +1 -0
  42. package/dist/tsconfig.tsbuildinfo +1 -0
  43. package/dist/types/index.d.ts +80 -110
  44. package/dist/types/index.d.ts.map +1 -0
  45. package/dist/types/index.js +5 -5
  46. package/dist/types/index.js.map +1 -0
  47. package/dist/utils/index.d.ts +63 -3
  48. package/dist/utils/index.d.ts.map +1 -0
  49. package/dist/utils/index.js +384 -17
  50. package/dist/utils/index.js.map +1 -0
  51. package/dist/utils/ingestion.d.ts +12 -0
  52. package/dist/utils/ingestion.d.ts.map +1 -0
  53. package/dist/utils/ingestion.js +69 -0
  54. package/dist/utils/ingestion.js.map +1 -0
  55. package/dist/utils/migrations.d.ts +11 -0
  56. package/dist/utils/migrations.d.ts.map +1 -0
  57. package/dist/utils/migrations.js +98 -0
  58. package/dist/utils/migrations.js.map +1 -0
  59. package/dist/utils/seeding.d.ts +14 -0
  60. package/dist/utils/seeding.d.ts.map +1 -0
  61. package/dist/utils/seeding.js +343 -0
  62. package/dist/utils/seeding.js.map +1 -0
  63. package/package.json +26 -45
  64. package/dist/initialize/index.d.ts +0 -8
  65. package/dist/initialize/index.js +0 -17
  66. package/dist/loaders/connection.d.ts +0 -4
  67. package/dist/loaders/connection.js +0 -41
  68. package/dist/loaders/container.js +0 -21
  69. package/dist/loaders/index.d.ts +0 -2
  70. package/dist/loaders/index.js +0 -10
  71. package/dist/migrations/Migration20231019174230.d.ts +0 -4
  72. package/dist/migrations/Migration20231019174230.js +0 -18
  73. package/dist/models/catalog-relation.d.ts +0 -15
  74. package/dist/models/catalog-relation.js +0 -72
  75. package/dist/models/catalog.d.ts +0 -11
  76. package/dist/models/catalog.js +0 -55
  77. package/dist/module-definition.d.ts +0 -2
  78. package/dist/module-definition.js +0 -15
  79. package/dist/scripts/bin/run-migration-down.d.ts +0 -3
  80. package/dist/scripts/bin/run-migration-down.js +0 -32
  81. package/dist/scripts/bin/run-migration-up.d.ts +0 -3
  82. package/dist/scripts/bin/run-migration-up.js +0 -32
  83. package/dist/scripts/bin/run-seed.d.ts +0 -3
  84. package/dist/scripts/bin/run-seed.js +0 -38
  85. package/dist/scripts/index.d.ts +0 -2
  86. package/dist/scripts/index.js +0 -18
  87. package/dist/scripts/migration-down.d.ts +0 -10
  88. package/dist/scripts/migration-down.js +0 -52
  89. package/dist/scripts/migration-up.d.ts +0 -10
  90. package/dist/scripts/migration-up.js +0 -56
  91. package/dist/scripts/seed-data/index.d.ts +0 -8
  92. package/dist/scripts/seed-data/index.js +0 -138
  93. package/dist/scripts/seed.d.ts +0 -5
  94. package/dist/scripts/seed.js +0 -65
  95. package/dist/services/postgres-provider.d.ts +0 -126
  96. package/dist/services/postgres-provider.js +0 -441
  97. package/dist/utils/build-config.d.ts +0 -21
  98. package/dist/utils/build-config.js +0 -437
  99. package/dist/utils/create-partitions.d.ts +0 -3
  100. package/dist/utils/create-partitions.js +0 -27
  101. package/dist/utils/query-builder.d.ts +0 -28
  102. package/dist/utils/query-builder.js +0 -375
package/README.md CHANGED
@@ -1 +1,4 @@
1
- # Catalog Module
1
+ # Medusa Search Module
2
+
3
+ Provider-backed search: free-text querying, filtering, sorting and faceting over
4
+ denormalized documents, kept up to date from events.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { moduleDefinition } from "./module-definition";
2
- export default moduleDefinition;
3
- export * from "./initialize";
4
- export * from "./loaders";
5
- export * from "./models";
6
- export * from "./scripts";
7
- export * from "./services";
8
- export * from "./utils";
1
+ import "./types";
2
+ import { SearchModuleService } from "./services";
3
+ declare const _default: import("@medusajs/types").ModuleExports<typeof SearchModuleService> & {
4
+ linkable: Record<string, any>;
5
+ };
6
+ export default _default;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAGhB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;;;;AAG/C,wBAGE"}
package/dist/index.js CHANGED
@@ -1,24 +1,14 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
16
5
  Object.defineProperty(exports, "__esModule", { value: true });
17
- const module_definition_1 = require("./module-definition");
18
- exports.default = module_definition_1.moduleDefinition;
19
- __exportStar(require("./initialize"), exports);
20
- __exportStar(require("./loaders"), exports);
21
- __exportStar(require("./models"), exports);
22
- __exportStar(require("./scripts"), exports);
23
- __exportStar(require("./services"), exports);
24
- __exportStar(require("./utils"), exports);
6
+ require("./types");
7
+ const utils_1 = require("@medusajs/framework/utils");
8
+ const _services_1 = require("./services");
9
+ const providers_1 = __importDefault(require("./loaders/providers"));
10
+ exports.default = (0, utils_1.Module)(utils_1.Modules.SEARCH, {
11
+ service: _services_1.SearchModuleService,
12
+ loaders: [providers_1.default],
13
+ });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,mBAAgB;AAEhB,qDAA2D;AAC3D,yCAA+C;AAC/C,oEAAiD;AAEjD,kBAAe,IAAA,cAAM,EAAC,eAAO,CAAC,MAAM,EAAE;IACpC,OAAO,EAAE,+BAAmB;IAC5B,OAAO,EAAE,CAAC,mBAAe,CAAC;CAC3B,CAAC,CAAA"}
@@ -1,2 +1,8 @@
1
- import { ModuleJoinerConfig } from "@medusajs/types";
2
- export declare const joinerConfig: ModuleJoinerConfig;
1
+ /**
2
+ * Nothing here is queryable or linkable — `SearchIndex` and `SearchIndexSync` are
3
+ * the module's own bookkeeping. `models: []` has to be explicit: otherwise
4
+ * `defineJoinerConfig` discovers `src/models` from disk and makes it all linkable,
5
+ * whether or not the models were passed to `MedusaService`.
6
+ */
7
+ export declare const joinerConfig: Omit<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys"> & Required<Pick<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys">>;
8
+ //# sourceMappingURL=joiner-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joiner-config.d.ts","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,uOAAqD,CAAA"}
@@ -1,4 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.joinerConfig = void 0;
4
- exports.joinerConfig = {};
4
+ const utils_1 = require("@medusajs/framework/utils");
5
+ /**
6
+ * Nothing here is queryable or linkable — `SearchIndex` and `SearchIndexSync` are
7
+ * the module's own bookkeeping. `models: []` has to be explicit: otherwise
8
+ * `defineJoinerConfig` discovers `src/models` from disk and makes it all linkable,
9
+ * whether or not the models were passed to `MedusaService`.
10
+ */
11
+ exports.joinerConfig = (0, utils_1.defineJoinerConfig)(utils_1.Modules.SEARCH, { models: [] });
12
+ //# sourceMappingURL=joiner-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joiner-config.js","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":";;;AAAA,qDAAuE;AAEvE;;;;;GAKG;AACU,QAAA,YAAY,GAAG,IAAA,0BAAkB,EAAC,eAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA"}
@@ -1,4 +1,5 @@
1
- import { LoaderOptions } from "@medusajs/modules-sdk";
1
+ import { LoaderOptions } from "@medusajs/framework/types";
2
2
  import { SearchModuleOptions } from "../types";
3
3
  declare const _default: ({ container, options, }: LoaderOptions<SearchModuleOptions>) => Promise<void>;
4
4
  export default _default;
5
+ //# sourceMappingURL=providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/loaders/providers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EACL,mBAAmB,EAGpB,MAAM,QAAQ,CAAA;yBAoBO,yBAGnB,aAAa,CAAC,mBAAmB,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;AAHrD,wBASC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const awilix_1 = require("@medusajs/framework/awilix");
4
+ const modules_sdk_1 = require("@medusajs/framework/modules-sdk");
5
+ const _services_1 = require("../services");
6
+ const _types_1 = require("../types");
7
+ const registrationFn = async (klass, container, pluginOptions) => {
8
+ const key = _services_1.SearchProviderService.getRegistrationIdentifier(klass, pluginOptions.id);
9
+ container.register({
10
+ [_types_1.SearchProviderRegistrationPrefix + key]: (0, awilix_1.asFunction)((cradle) => new klass(cradle, pluginOptions.options ?? {}), {
11
+ lifetime: klass.LIFE_TIME || awilix_1.Lifetime.SINGLETON,
12
+ }),
13
+ });
14
+ container.registerAdd(_types_1.SearchProviderIdentifiersRegistrationName, (0, awilix_1.asValue)(key));
15
+ };
16
+ exports.default = async ({ container, options, }) => {
17
+ await (0, modules_sdk_1.moduleProviderLoader)({
18
+ container,
19
+ providers: options?.providers || [],
20
+ registerServiceFn: registrationFn,
21
+ });
22
+ };
23
+ //# sourceMappingURL=providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../src/loaders/providers.ts"],"names":[],"mappings":";;AAAA,uDAA0E;AAC1E,iEAAsE;AAEtE,yCAAiD;AACjD,mCAIe;AAEf,MAAM,cAAc,GAAG,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE;IAC/D,MAAM,GAAG,GAAG,iCAAqB,CAAC,yBAAyB,CACzD,KAAK,EACL,aAAa,CAAC,EAAE,CACjB,CAAA;IAED,SAAS,CAAC,QAAQ,CAAC;QACjB,CAAC,yCAAgC,GAAG,GAAG,CAAC,EAAE,IAAA,mBAAU,EAClD,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC,EAC1D;YACE,QAAQ,EAAE,KAAK,CAAC,SAAS,IAAI,iBAAQ,CAAC,SAAS;SAChD,CACF;KACF,CAAC,CAAA;IAEF,SAAS,CAAC,WAAW,CAAC,kDAAyC,EAAE,IAAA,gBAAO,EAAC,GAAG,CAAC,CAAC,CAAA;AAChF,CAAC,CAAA;AAED,kBAAe,KAAK,EAAE,EACpB,SAAS,EACT,OAAO,GAC4B,EAAiB,EAAE;IACtD,MAAM,IAAA,kCAAoB,EAAC;QACzB,SAAS;QACT,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,EAAE;QACnC,iBAAiB,EAAE,cAAc;KAClC,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@medusajs/framework/mikro-orm/migrations";
2
+ export declare class Migration20260805085626 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20260805085626.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20260805085626.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20260805085626.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,qBAAa,uBAAwB,SAAQ,SAAS;IAErC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAanB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAQrC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20260805085626 = void 0;
4
+ const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
+ class Migration20260805085626 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`create table if not exists "search_index" ("id" text not null, "name" text not null, "provider" text not null, "status" text check ("status" in ('pending', 'building', 'ready', 'error')) not null default 'pending', "definition_hash" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "search_index_pkey" primary key ("id"));`);
8
+ this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_search_index_deleted_at" ON "search_index" ("deleted_at") WHERE deleted_at IS NULL;`);
9
+ this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_search_index_name" ON "search_index" ("name") WHERE deleted_at IS NULL;`);
10
+ this.addSql(`create table if not exists "search_index_sync" ("id" text not null, "job_id" text null, "status" text check ("status" in ('pending', 'processing', 'done', 'failed', 'canceled')) not null default 'pending', "filters" jsonb null, "last_key" text null, "documents_synced" integer not null default 0, "started_at" timestamptz null, "completed_at" timestamptz null, "error" text null, "search_index_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "search_index_sync_pkey" primary key ("id"));`);
11
+ this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_search_index_sync_search_index_id" ON "search_index_sync" ("search_index_id") WHERE deleted_at IS NULL;`);
12
+ this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_search_index_sync_deleted_at" ON "search_index_sync" ("deleted_at") WHERE deleted_at IS NULL;`);
13
+ this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_search_index_sync_job_id" ON "search_index_sync" ("job_id") WHERE deleted_at IS NULL;`);
14
+ this.addSql(`alter table if exists "search_index_sync" add constraint "search_index_sync_search_index_id_foreign" foreign key ("search_index_id") references "search_index" ("id") on update cascade;`);
15
+ }
16
+ async down() {
17
+ this.addSql(`alter table if exists "search_index_sync" drop constraint if exists "search_index_sync_search_index_id_foreign";`);
18
+ this.addSql(`drop table if exists "search_index" cascade;`);
19
+ this.addSql(`drop table if exists "search_index_sync" cascade;`);
20
+ }
21
+ }
22
+ exports.Migration20260805085626 = Migration20260805085626;
23
+ //# sourceMappingURL=Migration20260805085626.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20260805085626.js","sourceRoot":"","sources":["../../src/migrations/Migration20260805085626.ts"],"names":[],"mappings":";;;AAAA,yEAAqE;AAErE,MAAa,uBAAwB,SAAQ,sBAAS;IAE3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,8aAA8a,CAAC,CAAC;QAC5b,IAAI,CAAC,MAAM,CAAC,qHAAqH,CAAC,CAAC;QACnI,IAAI,CAAC,MAAM,CAAC,gHAAgH,CAAC,CAAC;QAE9H,IAAI,CAAC,MAAM,CAAC,wlBAAwlB,CAAC,CAAC;QACtmB,IAAI,CAAC,MAAM,CAAC,yIAAyI,CAAC,CAAC;QACvJ,IAAI,CAAC,MAAM,CAAC,+HAA+H,CAAC,CAAC;QAC7I,IAAI,CAAC,MAAM,CAAC,uHAAuH,CAAC,CAAC;QAErI,IAAI,CAAC,MAAM,CAAC,0LAA0L,CAAC,CAAC;IAC1M,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,kHAAkH,CAAC,CAAC;QAEhI,IAAI,CAAC,MAAM,CAAC,8CAA8C,CAAC,CAAC;QAE5D,IAAI,CAAC,MAAM,CAAC,mDAAmD,CAAC,CAAC;IACnE,CAAC;CAEF;AAvBD,0DAuBC"}
@@ -1,2 +1,3 @@
1
- export * from "./catalog";
2
- export * from "./catalog-relation";
1
+ export { SearchIndex } from "./search-index";
2
+ export { SearchIndexSync } from "./search-index-sync";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,18 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./catalog"), exports);
18
- __exportStar(require("./catalog-relation"), exports);
3
+ exports.SearchIndexSync = exports.SearchIndex = void 0;
4
+ var search_index_1 = require("./search-index");
5
+ Object.defineProperty(exports, "SearchIndex", { enumerable: true, get: function () { return search_index_1.SearchIndex; } });
6
+ var search_index_sync_1 = require("./search-index-sync");
7
+ Object.defineProperty(exports, "SearchIndexSync", { enumerable: true, get: function () { return search_index_sync_1.SearchIndexSync; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAAnC,2GAAA,WAAW,OAAA;AACpB,yDAAqD;AAA5C,oHAAA,eAAe,OAAA"}
@@ -0,0 +1,25 @@
1
+ import { SearchSyncStatus } from "../utils";
2
+ /**
3
+ * Sync runs against one index. Resuming an interrupted run means
4
+ * finding this index' most recent unfinished row and picking up from its `last_key`.
5
+ */
6
+ export declare const SearchIndexSync: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
7
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
8
+ job_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
9
+ status: import("@medusajs/framework/utils").EnumProperty<typeof SearchSyncStatus>;
10
+ filters: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
11
+ last_key: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
12
+ documents_synced: import("@medusajs/framework/utils").NumberProperty;
13
+ started_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
14
+ completed_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
15
+ error: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
16
+ search_index: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
17
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
18
+ name: import("@medusajs/framework/utils").TextProperty;
19
+ provider: import("@medusajs/framework/utils").TextProperty;
20
+ status: import("@medusajs/framework/utils").EnumProperty<typeof import("../utils").SearchIndexState>;
21
+ definition_hash: import("@medusajs/framework/utils").TextProperty;
22
+ syncs: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "SearchIndexSync">>;
23
+ }>, "SearchIndex">, undefined>;
24
+ }>, "SearchIndexSync">;
25
+ //# sourceMappingURL=search-index-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-index-sync.d.ts","sourceRoot":"","sources":["../../src/models/search-index-sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAG3C;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;sBA8BxB,CAAA"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchIndexSync = void 0;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
+ const utils_2 = require("../utils");
6
+ const search_index_1 = require("./search-index");
7
+ /**
8
+ * Sync runs against one index. Resuming an interrupted run means
9
+ * finding this index' most recent unfinished row and picking up from its `last_key`.
10
+ */
11
+ exports.SearchIndexSync = utils_1.model
12
+ .define("SearchIndexSync", {
13
+ id: utils_1.model.id({ prefix: "srhsync" }).primaryKey(),
14
+ // The reindex job this run belongs to. One job may span several indexes.
15
+ job_id: utils_1.model.text().nullable(),
16
+ status: utils_1.model.enum(utils_2.SearchSyncStatus).default(utils_2.SearchSyncStatus.PENDING),
17
+ // Filters handed to the definition's `seed`. `null` is a full rebuild;
18
+ // anything else records the slice this run covered.
19
+ filters: utils_1.model.json().nullable(),
20
+ // Last primary key handed to the engine, and the resume point.
21
+ last_key: utils_1.model.text().nullable(),
22
+ documents_synced: utils_1.model.number().default(0),
23
+ started_at: utils_1.model.dateTime().nullable(),
24
+ completed_at: utils_1.model.dateTime().nullable(),
25
+ error: utils_1.model.text().nullable(),
26
+ search_index: utils_1.model.belongsTo(() => search_index_1.SearchIndex, { mappedBy: "syncs" }),
27
+ })
28
+ .indexes([
29
+ {
30
+ name: "IDX_search_index_sync_search_index_id",
31
+ on: ["search_index_id"],
32
+ unique: false,
33
+ where: "deleted_at IS NULL",
34
+ },
35
+ {
36
+ name: "IDX_search_index_sync_job_id",
37
+ on: ["job_id"],
38
+ unique: false,
39
+ where: "deleted_at IS NULL",
40
+ },
41
+ ]);
42
+ //# sourceMappingURL=search-index-sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-index-sync.js","sourceRoot":"","sources":["../../src/models/search-index-sync.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AACjD,oCAA2C;AAC3C,iDAA4C;AAE5C;;;GAGG;AACU,QAAA,eAAe,GAAG,aAAK;KACjC,MAAM,CAAC,iBAAiB,EAAE;IACzB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE;IAChD,yEAAyE;IACzE,MAAM,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,aAAK,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC,OAAO,CAAC,wBAAgB,CAAC,OAAO,CAAC;IACtE,uEAAuE;IACvE,oDAAoD;IACpD,OAAO,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAChC,+DAA+D;IAC/D,QAAQ,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,aAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,UAAU,EAAE,aAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACvC,YAAY,EAAE,aAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,KAAK,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC9B,YAAY,EAAE,aAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;CACxE,CAAC;KACD,OAAO,CAAC;IACP;QACE,IAAI,EAAE,uCAAuC;QAC7C,EAAE,EAAE,CAAC,iBAAiB,CAAC;QACvB,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,EAAE,EAAE,CAAC,QAAQ,CAAC;QACd,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,oBAAoB;KAC5B;CACF,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { SearchIndexState } from "../utils";
2
+ export declare const SearchIndex: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
3
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
4
+ name: import("@medusajs/framework/utils").TextProperty;
5
+ provider: import("@medusajs/framework/utils").TextProperty;
6
+ status: import("@medusajs/framework/utils").EnumProperty<typeof SearchIndexState>;
7
+ definition_hash: import("@medusajs/framework/utils").TextProperty;
8
+ syncs: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
9
+ id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
10
+ job_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
11
+ status: import("@medusajs/framework/utils").EnumProperty<typeof import("../utils").SearchSyncStatus>;
12
+ filters: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
13
+ last_key: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
14
+ documents_synced: import("@medusajs/framework/utils").NumberProperty;
15
+ started_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
16
+ completed_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
17
+ error: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
18
+ search_index: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "SearchIndex">, undefined>;
19
+ }>, "SearchIndexSync">>;
20
+ }>, "SearchIndex">;
21
+ //# sourceMappingURL=search-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-index.d.ts","sourceRoot":"","sources":["../../src/models/search-index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAG3C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;kBAqBpB,CAAA"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchIndex = void 0;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
+ const utils_2 = require("../utils");
6
+ const search_index_sync_1 = require("./search-index-sync");
7
+ exports.SearchIndex = utils_1.model
8
+ .define("SearchIndex", {
9
+ id: utils_1.model.id({ prefix: "srhidx" }).primaryKey(),
10
+ // The index name, as used in `query.search({ entity })`.
11
+ // For now we expect the index and entity names to match.
12
+ name: utils_1.model.text(),
13
+ // The identifier of the provider backing this index.
14
+ provider: utils_1.model.text(),
15
+ status: utils_1.model.enum(utils_2.SearchIndexState).default(utils_2.SearchIndexState.PENDING),
16
+ // Used to detect schema drift
17
+ definition_hash: utils_1.model.text(),
18
+ // Append-only history of every sync run against this index.
19
+ syncs: utils_1.model.hasMany(() => search_index_sync_1.SearchIndexSync, { mappedBy: "search_index" }),
20
+ })
21
+ .indexes([
22
+ {
23
+ name: "IDX_search_index_name",
24
+ on: ["name"],
25
+ unique: true,
26
+ where: "deleted_at IS NULL",
27
+ },
28
+ ]);
29
+ //# sourceMappingURL=search-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-index.js","sourceRoot":"","sources":["../../src/models/search-index.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AACjD,oCAA2C;AAC3C,2DAAqD;AAExC,QAAA,WAAW,GAAG,aAAK;KAC7B,MAAM,CAAC,aAAa,EAAE;IACrB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,UAAU,EAAE;IAC/C,yDAAyD;IACzD,yDAAyD;IACzD,IAAI,EAAE,aAAK,CAAC,IAAI,EAAE;IAClB,qDAAqD;IACrD,QAAQ,EAAE,aAAK,CAAC,IAAI,EAAE;IACtB,MAAM,EAAE,aAAK,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC,OAAO,CAAC,wBAAgB,CAAC,OAAO,CAAC;IACtE,8BAA8B;IAC9B,eAAe,EAAE,aAAK,CAAC,IAAI,EAAE;IAC7B,4DAA4D;IAC5D,KAAK,EAAE,aAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,mCAAe,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC1E,CAAC;KACD,OAAO,CAAC;IACP;QACE,IAAI,EAAE,uBAAuB;QAC7B,EAAE,EAAE,CAAC,MAAM,CAAC;QACZ,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,oBAAoB;KAC5B;CACF,CAAC,CAAA"}
@@ -1 +1,3 @@
1
1
  export { default as SearchModuleService } from "./search-module-service";
2
+ export { SearchProviderService } from "./search-provider";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA"}
@@ -3,6 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SearchModuleService = void 0;
6
+ exports.SearchProviderService = exports.SearchModuleService = void 0;
7
7
  var search_module_service_1 = require("./search-module-service");
8
8
  Object.defineProperty(exports, "SearchModuleService", { enumerable: true, get: function () { return __importDefault(search_module_service_1).default; } });
9
+ var search_provider_1 = require("./search-provider");
10
+ Object.defineProperty(exports, "SearchProviderService", { enumerable: true, get: function () { return search_provider_1.SearchProviderService; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;AAAA,iEAAwE;AAA/D,6IAAA,OAAO,OAAuB;AACvC,qDAAyD;AAAhD,wHAAA,qBAAqB,OAAA"}
@@ -1,31 +1,54 @@
1
- import { IEventBusModuleService, InternalModuleDeclaration, ModuleJoinerConfig, RemoteJoinerQuery, SearchModuleTypes } from "@medusajs/types";
2
- import { SchemaObjectRepresentation, StorageProvider } from "../types";
1
+ import { Event, IEventBusModuleService, InternalModuleDeclaration, Logger, ModuleJoinerConfig, ModulesSdkTypes, RemoteQueryFunction, SearchTypes } from "@medusajs/framework/types";
2
+ import { ContainerRegistrationKeys, Modules } from "@medusajs/framework/utils";
3
+ import { SearchEventRoutes, SearchIndexContext, SearchIndexes, SearchIndexSeedAction, SearchModuleOptions } from "../types";
4
+ import { SearchProviderService } from "./search-provider";
3
5
  type InjectedDependencies = {
4
- eventBusModuleService: IEventBusModuleService;
5
- storageProviderCtr: StorageProvider;
6
- storageProviderCtrOptions: unknown;
7
- remoteQuery: (query: string | RemoteJoinerQuery | object, variables?: Record<string, unknown>) => Promise<any>;
6
+ logger: Logger;
7
+ [Modules.EVENT_BUS]: IEventBusModuleService;
8
+ [ContainerRegistrationKeys.QUERY]: RemoteQueryFunction;
9
+ searchProviderService: SearchProviderService;
10
+ searchIndexService: ModulesSdkTypes.IMedusaInternalService<any>;
11
+ searchIndexSyncService: ModulesSdkTypes.IMedusaInternalService<any>;
8
12
  };
9
- export default class SearchModuleService implements SearchModuleTypes.ISearchModuleService {
13
+ declare const SearchModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{}>>;
14
+ export default class SearchModuleService extends SearchModuleService_base implements SearchTypes.ISearchModuleService {
10
15
  protected readonly moduleDeclaration: InternalModuleDeclaration;
11
- private readonly container_;
12
- private readonly moduleOptions_;
13
- protected readonly eventBusModuleService_: IEventBusModuleService;
14
- protected schemaObjectRepresentation_: SchemaObjectRepresentation;
15
- protected schemaEntitiesMap_: Record<string, any>;
16
- protected storageProviderInstance_: StorageProvider;
17
- protected readonly storageProviderCtr_: StorageProvider;
18
- protected readonly storageProviderCtrOptions_: unknown;
19
- protected storageProvider_: StorageProvider;
20
- constructor(container: InjectedDependencies, moduleDeclaration: InternalModuleDeclaration);
16
+ protected isWorkerMode: boolean;
17
+ protected readonly logger_: Logger;
18
+ protected readonly searchProviderService_: SearchProviderService;
19
+ protected readonly moduleOptions_: SearchModuleOptions;
20
+ protected readonly indexes_: SearchIndexes;
21
+ protected readonly context_: SearchIndexContext;
22
+ protected readonly eventRoutes_: SearchEventRoutes;
23
+ constructor(container: InjectedDependencies, moduleOptions: SearchModuleOptions, moduleDeclaration: InternalModuleDeclaration);
24
+ __joinerConfig(): ModuleJoinerConfig;
21
25
  __hooks: {
22
26
  onApplicationStart(this: SearchModuleService): Promise<void>;
23
27
  };
24
- __joinerConfig(): ModuleJoinerConfig;
28
+ search<T = Record<string, unknown>>(query: SearchTypes.SearchQuery): Promise<SearchTypes.SearchResult<T>>;
29
+ searchMany(queries: SearchTypes.SearchQuery[]): Promise<SearchTypes.SearchResult[]>;
30
+ upsertDocuments({ index, documents, }: {
31
+ index: string;
32
+ documents: SearchTypes.SearchDocument[];
33
+ }): Promise<SearchTypes.SearchTask>;
34
+ deleteDocuments({ index, filters, }: {
35
+ index: string;
36
+ filters: SearchTypes.SearchFilters;
37
+ }): Promise<SearchTypes.SearchTask>;
38
+ ingest(event: Event<any>): Promise<SearchTypes.SearchTask[]>;
39
+ listIndexes(): string[];
40
+ listRetrievableFields(index: string): string[];
41
+ reindex(input?: SearchTypes.SearchReindexInput): Promise<SearchTypes.SearchReindexResult>;
42
+ /**
43
+ * Seeds whatever needs data. Indexes that are not migrated yet are skipped —
44
+ * creating and migrating physical indexes is the application's job
45
+ * (e.g. `db:migrate`), not something a booting worker invents.
46
+ */
25
47
  protected onApplicationStart_(): Promise<void>;
26
- query(...args: any[]): Promise<any>;
27
- queryAndCount(...args: any[]): Promise<any>;
28
- protected registerListeners(): void;
29
- private buildSchemaObjectRepresentation_;
48
+ protected createSeedPlan_(): Promise<SearchIndexSeedAction[]>;
49
+ protected executeSeedPlan_(actions: SearchIndexSeedAction[]): Promise<void>;
50
+ createIndexMigrationPlan(): Promise<SearchTypes.SearchIndexMigrationAction[]>;
51
+ executeIndexMigrationPlan(actions: SearchTypes.SearchIndexMigrationAction[]): Promise<void>;
30
52
  }
31
53
  export {};
54
+ //# sourceMappingURL=search-module-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-module-service.d.ts","sourceRoot":"","sources":["../../src/services/search-module-service.ts"],"names":[],"mappings":"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"}