@acmekit/index 2.13.1

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 (151) hide show
  1. package/README.md +1 -0
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +13 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/loaders/index.d.ts +4 -0
  7. package/dist/loaders/index.d.ts.map +1 -0
  8. package/dist/loaders/index.js +27 -0
  9. package/dist/loaders/index.js.map +1 -0
  10. package/dist/migrations/Migration20231019174230.d.ts +5 -0
  11. package/dist/migrations/Migration20231019174230.d.ts.map +1 -0
  12. package/dist/migrations/Migration20231019174230.js +12 -0
  13. package/dist/migrations/Migration20231019174230.js.map +1 -0
  14. package/dist/migrations/Migration20241209173313.d.ts +6 -0
  15. package/dist/migrations/Migration20241209173313.d.ts.map +1 -0
  16. package/dist/migrations/Migration20241209173313.js +36 -0
  17. package/dist/migrations/Migration20241209173313.js.map +1 -0
  18. package/dist/migrations/Migration20250122154720.d.ts +6 -0
  19. package/dist/migrations/Migration20250122154720.d.ts.map +1 -0
  20. package/dist/migrations/Migration20250122154720.js +16 -0
  21. package/dist/migrations/Migration20250122154720.js.map +1 -0
  22. package/dist/migrations/Migration20250127105159.d.ts +6 -0
  23. package/dist/migrations/Migration20250127105159.d.ts.map +1 -0
  24. package/dist/migrations/Migration20250127105159.js +16 -0
  25. package/dist/migrations/Migration20250127105159.js.map +1 -0
  26. package/dist/migrations/Migration20250127144442.d.ts +6 -0
  27. package/dist/migrations/Migration20250127144442.d.ts.map +1 -0
  28. package/dist/migrations/Migration20250127144442.js +16 -0
  29. package/dist/migrations/Migration20250127144442.js.map +1 -0
  30. package/dist/migrations/Migration20250128132404.d.ts +6 -0
  31. package/dist/migrations/Migration20250128132404.d.ts.map +1 -0
  32. package/dist/migrations/Migration20250128132404.js +16 -0
  33. package/dist/migrations/Migration20250128132404.js.map +1 -0
  34. package/dist/migrations/Migration20250218132404.d.ts +6 -0
  35. package/dist/migrations/Migration20250218132404.d.ts.map +1 -0
  36. package/dist/migrations/Migration20250218132404.js +48 -0
  37. package/dist/migrations/Migration20250218132404.js.map +1 -0
  38. package/dist/migrations/Migration20250515161913.d.ts +6 -0
  39. package/dist/migrations/Migration20250515161913.d.ts.map +1 -0
  40. package/dist/migrations/Migration20250515161913.js +62 -0
  41. package/dist/migrations/Migration20250515161913.js.map +1 -0
  42. package/dist/models/index-data.d.ts +8 -0
  43. package/dist/models/index-data.d.ts.map +1 -0
  44. package/dist/models/index-data.js +12 -0
  45. package/dist/models/index-data.js.map +1 -0
  46. package/dist/models/index-metadata.d.ts +10 -0
  47. package/dist/models/index-metadata.d.ts.map +1 -0
  48. package/dist/models/index-metadata.js +23 -0
  49. package/dist/models/index-metadata.js.map +1 -0
  50. package/dist/models/index-relation.d.ts +11 -0
  51. package/dist/models/index-relation.d.ts.map +1 -0
  52. package/dist/models/index-relation.js +14 -0
  53. package/dist/models/index-relation.js.map +1 -0
  54. package/dist/models/index-sync.d.ts +7 -0
  55. package/dist/models/index-sync.d.ts.map +1 -0
  56. package/dist/models/index-sync.js +18 -0
  57. package/dist/models/index-sync.js.map +1 -0
  58. package/dist/models/index.d.ts +5 -0
  59. package/dist/models/index.d.ts.map +1 -0
  60. package/dist/models/index.js +15 -0
  61. package/dist/models/index.js.map +1 -0
  62. package/dist/services/data-synchronizer.d.ts +35 -0
  63. package/dist/services/data-synchronizer.d.ts.map +1 -0
  64. package/dist/services/data-synchronizer.js +238 -0
  65. package/dist/services/data-synchronizer.js.map +1 -0
  66. package/dist/services/index-data.d.ts +8 -0
  67. package/dist/services/index-data.d.ts.map +1 -0
  68. package/dist/services/index-data.js +9 -0
  69. package/dist/services/index-data.js.map +1 -0
  70. package/dist/services/index-metadata.d.ts +8 -0
  71. package/dist/services/index-metadata.d.ts.map +1 -0
  72. package/dist/services/index-metadata.js +9 -0
  73. package/dist/services/index-metadata.js.map +1 -0
  74. package/dist/services/index-module-service.d.ts +75 -0
  75. package/dist/services/index-module-service.d.ts.map +1 -0
  76. package/dist/services/index-module-service.js +340 -0
  77. package/dist/services/index-module-service.js.map +1 -0
  78. package/dist/services/index-relation.d.ts +8 -0
  79. package/dist/services/index-relation.d.ts.map +1 -0
  80. package/dist/services/index-relation.js +9 -0
  81. package/dist/services/index-relation.js.map +1 -0
  82. package/dist/services/index-sync.d.ts +8 -0
  83. package/dist/services/index-sync.d.ts.map +1 -0
  84. package/dist/services/index-sync.js +9 -0
  85. package/dist/services/index-sync.js.map +1 -0
  86. package/dist/services/index.d.ts +2 -0
  87. package/dist/services/index.d.ts.map +1 -0
  88. package/dist/services/index.js +9 -0
  89. package/dist/services/index.js.map +1 -0
  90. package/dist/services/postgres-provider.d.ts +132 -0
  91. package/dist/services/postgres-provider.d.ts.map +1 -0
  92. package/dist/services/postgres-provider.js +516 -0
  93. package/dist/services/postgres-provider.js.map +1 -0
  94. package/dist/tsconfig.tsbuildinfo +1 -0
  95. package/dist/types/index.d.ts +21 -0
  96. package/dist/types/index.d.ts.map +1 -0
  97. package/dist/types/index.js +12 -0
  98. package/dist/types/index.js.map +1 -0
  99. package/dist/utils/base-graphql-schema.d.ts +2 -0
  100. package/dist/utils/base-graphql-schema.d.ts.map +1 -0
  101. package/dist/utils/base-graphql-schema.js +10 -0
  102. package/dist/utils/base-graphql-schema.js.map +1 -0
  103. package/dist/utils/build-config.d.ts +28 -0
  104. package/dist/utils/build-config.d.ts.map +1 -0
  105. package/dist/utils/build-config.js +840 -0
  106. package/dist/utils/build-config.js.map +1 -0
  107. package/dist/utils/create-partitions.d.ts +4 -0
  108. package/dist/utils/create-partitions.d.ts.map +1 -0
  109. package/dist/utils/create-partitions.js +80 -0
  110. package/dist/utils/create-partitions.js.map +1 -0
  111. package/dist/utils/default-schema.d.ts +2 -0
  112. package/dist/utils/default-schema.d.ts.map +1 -0
  113. package/dist/utils/default-schema.js +41 -0
  114. package/dist/utils/default-schema.js.map +1 -0
  115. package/dist/utils/flatten-object-keys.d.ts +23 -0
  116. package/dist/utils/flatten-object-keys.d.ts.map +1 -0
  117. package/dist/utils/flatten-object-keys.js +54 -0
  118. package/dist/utils/flatten-object-keys.js.map +1 -0
  119. package/dist/utils/gql-to-types.d.ts +3 -0
  120. package/dist/utils/gql-to-types.d.ts.map +1 -0
  121. package/dist/utils/gql-to-types.js +98 -0
  122. package/dist/utils/gql-to-types.js.map +1 -0
  123. package/dist/utils/index-metadata-status.d.ts +7 -0
  124. package/dist/utils/index-metadata-status.d.ts.map +1 -0
  125. package/dist/utils/index-metadata-status.js +11 -0
  126. package/dist/utils/index-metadata-status.js.map +1 -0
  127. package/dist/utils/index.d.ts +10 -0
  128. package/dist/utils/index.d.ts.map +1 -0
  129. package/dist/utils/index.js +26 -0
  130. package/dist/utils/index.js.map +1 -0
  131. package/dist/utils/normalize-fields-selection.d.ts +2 -0
  132. package/dist/utils/normalize-fields-selection.d.ts.map +1 -0
  133. package/dist/utils/normalize-fields-selection.js +10 -0
  134. package/dist/utils/normalize-fields-selection.js.map +1 -0
  135. package/dist/utils/normalze-table-name.d.ts +3 -0
  136. package/dist/utils/normalze-table-name.d.ts.map +1 -0
  137. package/dist/utils/normalze-table-name.js +13 -0
  138. package/dist/utils/normalze-table-name.js.map +1 -0
  139. package/dist/utils/query-builder.d.ts +61 -0
  140. package/dist/utils/query-builder.d.ts.map +1 -0
  141. package/dist/utils/query-builder.js +791 -0
  142. package/dist/utils/query-builder.js.map +1 -0
  143. package/dist/utils/sync/configuration.d.ts +17 -0
  144. package/dist/utils/sync/configuration.d.ts.map +1 -0
  145. package/dist/utils/sync/configuration.js +114 -0
  146. package/dist/utils/sync/configuration.js.map +1 -0
  147. package/dist/utils/sync/orchestrator.d.ts +33 -0
  148. package/dist/utils/sync/orchestrator.d.ts.map +1 -0
  149. package/dist/utils/sync/orchestrator.js +195 -0
  150. package/dist/utils/sync/orchestrator.js.map +1 -0
  151. package/package.json +45 -0
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # Index Module
@@ -0,0 +1,6 @@
1
+ import { IndexModuleService } from "./services";
2
+ declare const _default: import("@acmekit/types").ModuleExports<typeof IndexModuleService> & {
3
+ linkable: Record<string, any>;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;;;;AAI9C,wBAGE"}
package/dist/index.js ADDED
@@ -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
+ const _services_1 = require("./services");
7
+ const utils_1 = require("@acmekit/framework/utils");
8
+ const index_1 = __importDefault(require("./loaders/index"));
9
+ exports.default = (0, utils_1.Module)(utils_1.Modules.INDEX, {
10
+ service: _services_1.IndexModuleService,
11
+ loaders: [index_1.default],
12
+ });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,yCAA8C;AAC9C,oDAA0D;AAC1D,4DAA6C;AAE7C,kBAAe,IAAA,cAAM,EAAC,eAAO,CAAC,KAAK,EAAE;IACnC,OAAO,EAAE,8BAAkB;IAC3B,OAAO,EAAE,CAAC,eAAe,CAAC;CAC3B,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { LoaderOptions } from "@acmekit/framework/types";
2
+ declare const _default: ({ container, options }: LoaderOptions) => Promise<void>;
3
+ export default _default;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/loaders/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;yBAElC,wBAAwB,aAAa,KAAG,OAAO,CAAC,IAAI,CAAC;AAA3E,wBAsBC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const awilix_1 = require("@acmekit/framework/awilix");
4
+ const postgres_provider_1 = require("../services/postgres-provider");
5
+ const utils_1 = require("@acmekit/framework/utils");
6
+ const _services_1 = require("../services");
7
+ exports.default = async ({ container, options }) => {
8
+ container.register({
9
+ baseRepository: (0, awilix_1.asClass)(utils_1.MikroOrmBaseRepository).singleton(),
10
+ searchModuleService: (0, awilix_1.asClass)(_services_1.IndexModuleService).singleton(),
11
+ });
12
+ container.register("storageProviderCtrOptions", (0, awilix_1.asValue)(undefined));
13
+ container.register("storageProviderCtr", (0, awilix_1.asValue)(postgres_provider_1.PostgresProvider));
14
+ /*if (!options?.customAdapter) {
15
+ container.register("storageProviderCtr", asValue(PostgresProvider))
16
+ } else {
17
+ container.register(
18
+ "storageProviderCtr",
19
+ asValue(options.customAdapter.constructor)
20
+ )
21
+ container.register(
22
+ "storageProviderCtrOptions",
23
+ asValue(options.customAdapter.options)
24
+ )
25
+ }*/
26
+ };
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/loaders/index.ts"],"names":[],"mappings":";;AAAA,sDAA4D;AAC5D,qEAAgE;AAChE,oDAAmF;AACnF,yCAA8C;AAG9C,kBAAe,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAiB,EAAiB,EAAE;IAC5E,SAAS,CAAC,QAAQ,CAAC;QACjB,cAAc,EAAE,IAAA,gBAAO,EAAC,8BAAc,CAAC,CAAC,SAAS,EAAE;QACnD,mBAAmB,EAAE,IAAA,gBAAO,EAAC,8BAAkB,CAAC,CAAC,SAAS,EAAE;KAC7D,CAAC,CAAA;IAEF,SAAS,CAAC,QAAQ,CAAC,2BAA2B,EAAE,IAAA,gBAAO,EAAC,SAAS,CAAC,CAAC,CAAA;IAEnE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,IAAA,gBAAO,EAAC,oCAAgB,CAAC,CAAC,CAAA;IAEnE;;;;;;;;;;;OAWG;AACL,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20231019174230 extends Migration {
3
+ up(): Promise<void>;
4
+ }
5
+ //# sourceMappingURL=Migration20231019174230.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20231019174230.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20231019174230.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAS1B"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20231019174230 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20231019174230 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`create table IF NOT EXISTS "index_data" ("id" text not null, "name" text not null, "data" jsonb not null default '{}', constraint "index_data_pkey" primary key ("id", "name")) PARTITION BY LIST("name");`);
8
+ this.addSql(`create table IF NOT EXISTS "index_relation" ("id" bigserial, "pivot" text not null, "parent_id" text not null, "parent_name" text not null, "child_id" text not null, "child_name" text not null, constraint "index_relation_pkey" primary key ("id", "pivot")) PARTITION BY LIST("pivot");`);
9
+ }
10
+ }
11
+ exports.Migration20231019174230 = Migration20231019174230;
12
+ //# sourceMappingURL=Migration20231019174230.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20231019174230.js","sourceRoot":"","sources":["../../src/migrations/Migration20231019174230.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CACT,4MAA4M,CAC7M,CAAA;QAED,IAAI,CAAC,MAAM,CACT,6RAA6R,CAC9R,CAAA;IACH,CAAC;CACF;AAVD,0DAUC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20241209173313 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20241209173313.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20241209173313.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20241209173313.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAe5B"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20241209173313 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20241209173313 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ ALTER TABLE "index_data"
9
+ ADD COLUMN IF NOT EXISTS "created_at" timestamptz NOT NULL DEFAULT now(),
10
+ ADD COLUMN IF NOT EXISTS "updated_at" timestamptz NOT NULL DEFAULT now(),
11
+ ADD COLUMN IF NOT EXISTS "deleted_at" timestamptz NULL;
12
+ `);
13
+ this.addSql(`
14
+ ALTER TABLE "index_relation"
15
+ ADD COLUMN IF NOT EXISTS "created_at" timestamptz NOT NULL DEFAULT now(),
16
+ ADD COLUMN IF NOT EXISTS "updated_at" timestamptz NOT NULL DEFAULT now(),
17
+ ADD COLUMN IF NOT EXISTS "deleted_at" timestamptz NULL;
18
+ `);
19
+ }
20
+ async down() {
21
+ this.addSql(`
22
+ ALTER TABLE "index_data"
23
+ DROP COLUMN IF EXISTS "created_at",
24
+ DROP COLUMN IF EXISTS "updated_at",
25
+ DROP COLUMN IF EXISTS "deleted_at";
26
+ `);
27
+ this.addSql(`
28
+ ALTER TABLE "index_relation"
29
+ DROP COLUMN IF EXISTS "created_at",
30
+ DROP COLUMN IF EXISTS "updated_at",
31
+ DROP COLUMN IF EXISTS "deleted_at";
32
+ `);
33
+ }
34
+ }
35
+ exports.Migration20241209173313 = Migration20241209173313;
36
+ //# sourceMappingURL=Migration20241209173313.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20241209173313.js","sourceRoot":"","sources":["../../src/migrations/Migration20241209173313.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC;;;;;KAKX,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC;;;;;KAKX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC;;;;;KAKX,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC;;;;;KAKX,CAAC,CAAA;IACJ,CAAC;CACF;AAhCD,0DAgCC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20250122154720 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20250122154720.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250122154720.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250122154720.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAYnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20250122154720 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20250122154720 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`create table if not exists "index_metadata" ("id" text not null, "entity" text not null, "fields" text not null, "fields_hash" text not null, "status" text check ("status" in ('pending', 'processing', 'done', 'error')) not null default 'pending', "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "index_metadata_pkey" primary key ("id"));`);
8
+ this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_index_metadata_deleted_at" ON "index_metadata" (deleted_at) WHERE deleted_at IS NULL;`);
9
+ this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_index_metadata_entity" ON "index_metadata" (entity) WHERE deleted_at IS NULL;`);
10
+ }
11
+ async down() {
12
+ this.addSql(`drop table if exists "index_metadata" cascade;`);
13
+ }
14
+ }
15
+ exports.Migration20250122154720 = Migration20250122154720;
16
+ //# sourceMappingURL=Migration20250122154720.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250122154720.js","sourceRoot":"","sources":["../../src/migrations/Migration20250122154720.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,+aAA+a,CAChb,CAAA;QACD,IAAI,CAAC,MAAM,CACT,uHAAuH,CACxH,CAAA;QACD,IAAI,CAAC,MAAM,CACT,sHAAsH,CACvH,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,gDAAgD,CAAC,CAAA;IAC/D,CAAC;CACF;AAhBD,0DAgBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20250127105159 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20250127105159.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250127105159.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250127105159.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IASnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAQrC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20250127105159 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20250127105159 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`alter table if exists "index_relation" alter column "id" set not null;`);
8
+ this.addSql(`alter table if exists "index_relation" add constraint "IDX_index_relation_id_pivot_parent_name_child_name_parent_id_child_id_unique" unique ("parent_id", "child_id", "child_name", "parent_name", "pivot");`);
9
+ }
10
+ async down() {
11
+ this.addSql(`alter table if exists "index_relation" drop constraint "IDX_index_relation_id_pivot_parent_name_child_name_parent_id_child_id_unique";`);
12
+ this.addSql(`alter table if exists "index_relation" alter column "id" drop not null;`);
13
+ }
14
+ }
15
+ exports.Migration20250127105159 = Migration20250127105159;
16
+ //# sourceMappingURL=Migration20250127105159.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250127105159.js","sourceRoot":"","sources":["../../src/migrations/Migration20250127105159.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,wEAAwE,CACzE,CAAA;QACD,IAAI,CAAC,MAAM,CACT,8MAA8M,CAC/M,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CACT,wIAAwI,CACzI,CAAA;QACD,IAAI,CAAC,MAAM,CACT,yEAAyE,CAC1E,CAAA;IACH,CAAC;CACF;AAlBD,0DAkBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20250127144442 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20250127144442.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250127144442.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250127144442.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAUnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CASrC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20250127144442 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20250127144442 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`alter table if exists "index_data" add column if not exists "staled_at" timestamptz null;`);
8
+ this.addSql(`alter table if exists "index_relation" add column if not exists "staled_at" timestamptz null;`);
9
+ }
10
+ async down() {
11
+ this.addSql(`alter table if exists "index_data" drop column if exists "staled_at";`);
12
+ this.addSql(`alter table if exists "index_relation" drop column if exists "staled_at";`);
13
+ }
14
+ }
15
+ exports.Migration20250127144442 = Migration20250127144442;
16
+ //# sourceMappingURL=Migration20250127144442.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250127144442.js","sourceRoot":"","sources":["../../src/migrations/Migration20250127144442.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,2FAA2F,CAC5F,CAAA;QAED,IAAI,CAAC,MAAM,CACT,+FAA+F,CAChG,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CACT,uEAAuE,CACxE,CAAA;QAED,IAAI,CAAC,MAAM,CACT,2EAA2E,CAC5E,CAAA;IACH,CAAC;CACF;AApBD,0DAoBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20250128132404 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20250128132404.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250128132404.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250128132404.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAYnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20250128132404 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20250128132404 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`create table if not exists "index_sync" ("id" text not null, "entity" text not null, "last_key" text null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "index_sync_pkey" primary key ("id"));`);
8
+ this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_index_sync_deleted_at" ON "index_sync" (deleted_at) WHERE deleted_at IS NULL;`);
9
+ this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_index_sync_entity" ON "index_sync" (entity) WHERE deleted_at IS NULL;`);
10
+ }
11
+ async down() {
12
+ this.addSql(`drop table if exists "index_sync" cascade;`);
13
+ }
14
+ }
15
+ exports.Migration20250128132404 = Migration20250128132404;
16
+ //# sourceMappingURL=Migration20250128132404.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250128132404.js","sourceRoot":"","sources":["../../src/migrations/Migration20250128132404.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,+RAA+R,CAChS,CAAA;QACD,IAAI,CAAC,MAAM,CACT,+GAA+G,CAChH,CAAA;QACD,IAAI,CAAC,MAAM,CACT,8GAA8G,CAC/G,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,4CAA4C,CAAC,CAAA;IAC3D,CAAC;CACF;AAhBD,0DAgBC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20250218132404 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20250218132404.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250218132404.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250218132404.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IA2CnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAMrC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20250218132404 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20250218132404 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ ALTER TABLE index_data
9
+ ADD COLUMN document_tsv tsvector;
10
+ `);
11
+ this.addSql(`
12
+ UPDATE index_data
13
+ SET document_tsv = to_tsvector('simple', (
14
+ SELECT string_agg(value, ' ')
15
+ FROM jsonb_each_text(data)
16
+ ));
17
+ `);
18
+ this.addSql(`
19
+ CREATE INDEX idx_documents_document_tsv
20
+ ON index_data
21
+ USING gin(document_tsv);
22
+ `);
23
+ this.addSql(`
24
+ CREATE OR REPLACE FUNCTION update_document_tsv() RETURNS trigger AS $$
25
+ BEGIN
26
+ NEW.document_tsv := to_tsvector('simple', (
27
+ SELECT string_agg(value, ' ')
28
+ FROM jsonb_each_text(NEW.data)
29
+ ));
30
+ RETURN NEW;
31
+ END;
32
+ $$ LANGUAGE plpgsql;
33
+
34
+ CREATE TRIGGER trg_update_document_tsv
35
+ BEFORE INSERT OR UPDATE ON index_data
36
+ FOR EACH ROW
37
+ EXECUTE FUNCTION update_document_tsv();
38
+ `);
39
+ }
40
+ async down() {
41
+ this.addSql(`DROP TRIGGER IF EXISTS trg_update_document_tsv ON index_data;`);
42
+ this.addSql(`DROP FUNCTION IF EXISTS update_document_tsv;`);
43
+ this.addSql(`DROP INDEX IF EXISTS idx_documents_document_tsv;`);
44
+ this.addSql(`ALTER TABLE index_data DROP COLUMN IF EXISTS document_tsv;`);
45
+ }
46
+ }
47
+ exports.Migration20250218132404 = Migration20250218132404;
48
+ //# sourceMappingURL=Migration20250218132404.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250218132404.js","sourceRoot":"","sources":["../../src/migrations/Migration20250218132404.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT;;;OAGC,CACF,CAAA;QACD,IAAI,CAAC,MAAM,CACT;;;;;;OAMC,CACF,CAAA;QACD,IAAI,CAAC,MAAM,CACT;;;;OAIC,CACF,CAAA;QACD,IAAI,CAAC,MAAM,CACT;;;;;;;;;;;;;;;OAeC,CACF,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,+DAA+D,CAAC,CAAA;QAC5E,IAAI,CAAC,MAAM,CAAC,8CAA8C,CAAC,CAAA;QAC3D,IAAI,CAAC,MAAM,CAAC,kDAAkD,CAAC,CAAA;QAC/D,IAAI,CAAC,MAAM,CAAC,4DAA4D,CAAC,CAAA;IAC3E,CAAC;CACF;AAlDD,0DAkDC"}
@@ -0,0 +1,6 @@
1
+ import { Migration } from "@acmekit/framework/mikro-orm/migrations";
2
+ export declare class Migration20250515161913 extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=Migration20250515161913.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250515161913.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250515161913.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAsDnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CACrC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Migration20250515161913 = void 0;
4
+ const migrations_1 = require("@acmekit/framework/mikro-orm/migrations");
5
+ class Migration20250515161913 extends migrations_1.Migration {
6
+ async up() {
7
+ this.addSql(`
8
+ DO $$
9
+ DECLARE
10
+ r RECORD;
11
+ protected_tables TEXT[] := ARRAY[
12
+ 'cat_linkproductsaleschannel',
13
+ 'cat_linkproductvariantpriceset',
14
+ 'cat_price',
15
+ 'cat_priceset',
16
+ 'cat_product',
17
+ 'cat_productvariant',
18
+ 'cat_saleschannel',
19
+ 'cat_pivot_linkproductsaleschannelsaleschannel',
20
+ 'cat_pivot_linkproductvariantpricesetpriceset',
21
+ 'cat_pivot_pricesetprice',
22
+ 'cat_pivot_productlinkproductsaleschannel',
23
+ 'cat_pivot_productproductvariant',
24
+ 'cat_pivot_productvariantlinkproductvariantpriceset'
25
+ ];
26
+ BEGIN
27
+ FOR r IN
28
+ SELECT tablename
29
+ FROM pg_tables
30
+ WHERE schemaname = 'public' AND tablename LIKE 'cat\_%'
31
+ LOOP
32
+ IF r.tablename <> ALL (protected_tables) THEN
33
+ EXECUTE format('DROP TABLE IF EXISTS public.%I CASCADE;', r.tablename);
34
+ END IF;
35
+ END LOOP;
36
+ END $$;
37
+
38
+ UPDATE index_sync SET last_key = NULL WHERE entity NOT IN (
39
+ 'Product',
40
+ 'ProductVariant',
41
+ 'LinkProductVariantPriceSet',
42
+ 'LinkProductSalesChannel',
43
+ 'Price',
44
+ 'PriceSet',
45
+ 'SalesChannel'
46
+ );
47
+
48
+ UPDATE index_metadata SET status = 'pending' WHERE entity NOT IN (
49
+ 'Product',
50
+ 'ProductVariant',
51
+ 'LinkProductVariantPriceSet',
52
+ 'LinkProductSalesChannel',
53
+ 'Price',
54
+ 'PriceSet',
55
+ 'SalesChannel'
56
+ );
57
+ `);
58
+ }
59
+ async down() { }
60
+ }
61
+ exports.Migration20250515161913 = Migration20250515161913;
62
+ //# sourceMappingURL=Migration20250515161913.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20250515161913.js","sourceRoot":"","sources":["../../src/migrations/Migration20250515161913.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEnE,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkDX,CAAC,CAAA;IACJ,CAAC;IAEQ,KAAK,CAAC,IAAI,KAAmB,CAAC;CACxC;AAxDD,0DAwDC"}
@@ -0,0 +1,8 @@
1
+ declare const IndexData: import("@acmekit/framework/utils").DmlEntity<import("@acmekit/framework/utils").DMLEntitySchemaBuilder<{
2
+ id: import("@acmekit/framework/utils").PrimaryKeyModifier<string, import("@acmekit/framework/utils").TextProperty>;
3
+ name: import("@acmekit/framework/utils").PrimaryKeyModifier<string, import("@acmekit/framework/utils").TextProperty>;
4
+ data: import("@acmekit/framework/utils").JSONProperty;
5
+ staled_at: import("@acmekit/framework/utils").NullableModifier<Date, import("@acmekit/framework/utils").DateTimeProperty>;
6
+ }>, "IndexData">;
7
+ export default IndexData;
8
+ //# sourceMappingURL=index-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-data.d.ts","sourceRoot":"","sources":["../../src/models/index-data.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS;;;;;gBAMb,CAAA;AAEF,eAAe,SAAS,CAAA"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@acmekit/framework/utils");
4
+ const IndexData = utils_1.model.define("IndexData", {
5
+ id: utils_1.model.text().primaryKey(),
6
+ name: utils_1.model.text().primaryKey(),
7
+ data: utils_1.model.json().default({}),
8
+ staled_at: utils_1.model.dateTime().nullable(),
9
+ // document_tsv: model.tsvector(), NOTE: This is not supported and it is here for reference of its counter part in the migration
10
+ });
11
+ exports.default = IndexData;
12
+ //# sourceMappingURL=index-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-data.js","sourceRoot":"","sources":["../../src/models/index-data.ts"],"names":[],"mappings":";;AAAA,oDAAgD;AAEhD,MAAM,SAAS,GAAG,aAAK,CAAC,MAAM,CAAC,WAAW,EAAE;IAC1C,EAAE,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IAC7B,IAAI,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IAC/B,IAAI,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9B,SAAS,EAAE,aAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,gIAAgI;CACjI,CAAC,CAAA;AAEF,kBAAe,SAAS,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { IndexMetadataStatus } from "../utils/index-metadata-status";
2
+ declare const IndexMetadata: import("@acmekit/framework/utils").DmlEntity<import("@acmekit/framework/utils").DMLEntitySchemaBuilder<{
3
+ id: import("@acmekit/framework/utils").PrimaryKeyModifier<string, import("@acmekit/framework/utils").IdProperty>;
4
+ entity: import("@acmekit/framework/utils").TextProperty;
5
+ fields: import("@acmekit/framework/utils").TextProperty;
6
+ fields_hash: import("@acmekit/framework/utils").TextProperty;
7
+ status: import("@acmekit/framework/utils").EnumProperty<typeof IndexMetadataStatus>;
8
+ }>, "IndexMetadata">;
9
+ export default IndexMetadata;
10
+ //# sourceMappingURL=index-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-metadata.d.ts","sourceRoot":"","sources":["../../src/models/index-metadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAEpE,QAAA,MAAM,aAAa;;;;;;oBAgBf,CAAA;AAEJ,eAAe,aAAa,CAAA"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@acmekit/framework/utils");
4
+ const index_metadata_status_1 = require("../utils/index-metadata-status");
5
+ const IndexMetadata = utils_1.model
6
+ .define("IndexMetadata", {
7
+ id: utils_1.model.id({ prefix: "idxmeta" }).primaryKey(),
8
+ entity: utils_1.model.text(),
9
+ fields: utils_1.model.text(),
10
+ fields_hash: utils_1.model.text(),
11
+ status: utils_1.model
12
+ .enum(index_metadata_status_1.IndexMetadataStatus)
13
+ .default(index_metadata_status_1.IndexMetadataStatus.PENDING),
14
+ })
15
+ .indexes([
16
+ {
17
+ name: "IDX_index_metadata_entity",
18
+ on: ["entity"],
19
+ unique: true,
20
+ },
21
+ ]);
22
+ exports.default = IndexMetadata;
23
+ //# sourceMappingURL=index-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-metadata.js","sourceRoot":"","sources":["../../src/models/index-metadata.ts"],"names":[],"mappings":";;AAAA,oDAAgD;AAChD,0EAAoE;AAEpE,MAAM,aAAa,GAAG,aAAK;KACxB,MAAM,CAAC,eAAe,EAAE;IACvB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE;IAChD,MAAM,EAAE,aAAK,CAAC,IAAI,EAAE;IACpB,MAAM,EAAE,aAAK,CAAC,IAAI,EAAE;IACpB,WAAW,EAAE,aAAK,CAAC,IAAI,EAAE;IACzB,MAAM,EAAE,aAAK;SACV,IAAI,CAAC,2CAAmB,CAAC;SACzB,OAAO,CAAC,2CAAmB,CAAC,OAAO,CAAC;CACxC,CAAC;KACD,OAAO,CAAC;IACP;QACE,IAAI,EAAE,2BAA2B;QACjC,EAAE,EAAE,CAAC,QAAQ,CAAC;QACd,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAA;AAEJ,kBAAe,aAAa,CAAA"}
@@ -0,0 +1,11 @@
1
+ declare const IndexRelation: import("@acmekit/framework/utils").DmlEntity<import("@acmekit/framework/utils").DMLEntitySchemaBuilder<{
2
+ id: import("@acmekit/framework/utils").PrimaryKeyModifier<number, import("@acmekit/framework/utils").AutoIncrementProperty>;
3
+ pivot: import("@acmekit/framework/utils").TextProperty;
4
+ parent_name: import("@acmekit/framework/utils").TextProperty;
5
+ parent_id: import("@acmekit/framework/utils").TextProperty;
6
+ child_name: import("@acmekit/framework/utils").TextProperty;
7
+ child_id: import("@acmekit/framework/utils").TextProperty;
8
+ staled_at: import("@acmekit/framework/utils").NullableModifier<Date, import("@acmekit/framework/utils").DateTimeProperty>;
9
+ }>, "IndexRelation">;
10
+ export default IndexRelation;
11
+ //# sourceMappingURL=index-relation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-relation.d.ts","sourceRoot":"","sources":["../../src/models/index-relation.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,aAAa;;;;;;;;oBAQjB,CAAA;AAEF,eAAe,aAAa,CAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@acmekit/framework/utils");
4
+ const IndexRelation = utils_1.model.define("IndexRelation", {
5
+ id: utils_1.model.autoincrement().primaryKey(),
6
+ pivot: utils_1.model.text(),
7
+ parent_name: utils_1.model.text(),
8
+ parent_id: utils_1.model.text(),
9
+ child_name: utils_1.model.text(),
10
+ child_id: utils_1.model.text(),
11
+ staled_at: utils_1.model.dateTime().nullable(),
12
+ });
13
+ exports.default = IndexRelation;
14
+ //# sourceMappingURL=index-relation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-relation.js","sourceRoot":"","sources":["../../src/models/index-relation.ts"],"names":[],"mappings":";;AAAA,oDAAgD;AAEhD,MAAM,aAAa,GAAG,aAAK,CAAC,MAAM,CAAC,eAAe,EAAE;IAClD,EAAE,EAAE,aAAK,CAAC,aAAa,EAAE,CAAC,UAAU,EAAE;IACtC,KAAK,EAAE,aAAK,CAAC,IAAI,EAAE;IACnB,WAAW,EAAE,aAAK,CAAC,IAAI,EAAE;IACzB,SAAS,EAAE,aAAK,CAAC,IAAI,EAAE;IACvB,UAAU,EAAE,aAAK,CAAC,IAAI,EAAE;IACxB,QAAQ,EAAE,aAAK,CAAC,IAAI,EAAE;IACtB,SAAS,EAAE,aAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAA;AAEF,kBAAe,aAAa,CAAA"}
@@ -0,0 +1,7 @@
1
+ declare const IndexSync: import("@acmekit/framework/utils").DmlEntity<import("@acmekit/framework/utils").DMLEntitySchemaBuilder<{
2
+ id: import("@acmekit/framework/utils").PrimaryKeyModifier<string, import("@acmekit/framework/utils").IdProperty>;
3
+ entity: import("@acmekit/framework/utils").TextProperty;
4
+ last_key: import("@acmekit/framework/utils").NullableModifier<string, import("@acmekit/framework/utils").TextProperty>;
5
+ }>, "IndexSync">;
6
+ export default IndexSync;
7
+ //# sourceMappingURL=index-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-sync.d.ts","sourceRoot":"","sources":["../../src/models/index-sync.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS;;;;gBAYX,CAAA;AAEJ,eAAe,SAAS,CAAA"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@acmekit/framework/utils");
4
+ const IndexSync = utils_1.model
5
+ .define("IndexSync", {
6
+ id: utils_1.model.id({ prefix: "idxsync" }).primaryKey(),
7
+ entity: utils_1.model.text(),
8
+ last_key: utils_1.model.text().nullable(),
9
+ })
10
+ .indexes([
11
+ {
12
+ name: "IDX_index_sync_entity",
13
+ on: ["entity"],
14
+ unique: true,
15
+ },
16
+ ]);
17
+ exports.default = IndexSync;
18
+ //# sourceMappingURL=index-sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-sync.js","sourceRoot":"","sources":["../../src/models/index-sync.ts"],"names":[],"mappings":";;AAAA,oDAAgD;AAEhD,MAAM,SAAS,GAAG,aAAK;KACpB,MAAM,CAAC,WAAW,EAAE;IACnB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE;IAChD,MAAM,EAAE,aAAK,CAAC,IAAI,EAAE;IACpB,QAAQ,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC;KACD,OAAO,CAAC;IACP;QACE,IAAI,EAAE,uBAAuB;QAC7B,EAAE,EAAE,CAAC,QAAQ,CAAC;QACd,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAA;AAEJ,kBAAe,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { default as IndexData } from "./index-data";
2
+ export { default as IndexMetadata } from "./index-metadata";
3
+ export { default as IndexRelation } from "./index-relation";
4
+ export { default as IndexSync } from "./index-sync";
5
+ //# 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,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,15 @@
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.IndexSync = exports.IndexRelation = exports.IndexMetadata = exports.IndexData = void 0;
7
+ var index_data_1 = require("./index-data");
8
+ Object.defineProperty(exports, "IndexData", { enumerable: true, get: function () { return __importDefault(index_data_1).default; } });
9
+ var index_metadata_1 = require("./index-metadata");
10
+ Object.defineProperty(exports, "IndexMetadata", { enumerable: true, get: function () { return __importDefault(index_metadata_1).default; } });
11
+ var index_relation_1 = require("./index-relation");
12
+ Object.defineProperty(exports, "IndexRelation", { enumerable: true, get: function () { return __importDefault(index_relation_1).default; } });
13
+ var index_sync_1 = require("./index-sync");
14
+ Object.defineProperty(exports, "IndexSync", { enumerable: true, get: function () { return __importDefault(index_sync_1).default; } });
15
+ //# sourceMappingURL=index.js.map