@b2bc-devkit/sheetorm 0.1.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 (151) hide show
  1. package/dist/npm/SheetOrm.d.ts +41 -0
  2. package/dist/npm/SheetOrm.d.ts.map +1 -0
  3. package/dist/npm/SheetOrm.js +41 -0
  4. package/dist/npm/SheetOrm.js.map +1 -0
  5. package/dist/npm/core/Decorators.d.ts +145 -0
  6. package/dist/npm/core/Decorators.d.ts.map +1 -0
  7. package/dist/npm/core/Decorators.js +226 -0
  8. package/dist/npm/core/Decorators.js.map +1 -0
  9. package/dist/npm/core/Record.d.ts +167 -0
  10. package/dist/npm/core/Record.d.ts.map +1 -0
  11. package/dist/npm/core/Record.js +298 -0
  12. package/dist/npm/core/Record.js.map +1 -0
  13. package/dist/npm/core/RecordConstructor.d.ts +20 -0
  14. package/dist/npm/core/RecordConstructor.d.ts.map +1 -0
  15. package/dist/npm/core/RecordConstructor.js +2 -0
  16. package/dist/npm/core/RecordConstructor.js.map +1 -0
  17. package/dist/npm/core/RecordStatic.d.ts +19 -0
  18. package/dist/npm/core/RecordStatic.d.ts.map +1 -0
  19. package/dist/npm/core/RecordStatic.js +2 -0
  20. package/dist/npm/core/RecordStatic.js.map +1 -0
  21. package/dist/npm/core/Registry.d.ts +100 -0
  22. package/dist/npm/core/Registry.d.ts.map +1 -0
  23. package/dist/npm/core/Registry.js +206 -0
  24. package/dist/npm/core/Registry.js.map +1 -0
  25. package/dist/npm/core/SheetRepository.d.ts +331 -0
  26. package/dist/npm/core/SheetRepository.d.ts.map +1 -0
  27. package/dist/npm/core/SheetRepository.js +1041 -0
  28. package/dist/npm/core/SheetRepository.js.map +1 -0
  29. package/dist/npm/core/cache/MemoryCache.d.ts +67 -0
  30. package/dist/npm/core/cache/MemoryCache.d.ts.map +1 -0
  31. package/dist/npm/core/cache/MemoryCache.js +112 -0
  32. package/dist/npm/core/cache/MemoryCache.js.map +1 -0
  33. package/dist/npm/core/types/Entity.d.ts +21 -0
  34. package/dist/npm/core/types/Entity.d.ts.map +1 -0
  35. package/dist/npm/core/types/Entity.js +2 -0
  36. package/dist/npm/core/types/Entity.js.map +1 -0
  37. package/dist/npm/core/types/FieldDefinition.d.ts +21 -0
  38. package/dist/npm/core/types/FieldDefinition.d.ts.map +1 -0
  39. package/dist/npm/core/types/FieldDefinition.js +2 -0
  40. package/dist/npm/core/types/FieldDefinition.js.map +1 -0
  41. package/dist/npm/core/types/FieldType.d.ts +12 -0
  42. package/dist/npm/core/types/FieldType.d.ts.map +1 -0
  43. package/dist/npm/core/types/FieldType.js +2 -0
  44. package/dist/npm/core/types/FieldType.js.map +1 -0
  45. package/dist/npm/core/types/Filter.d.ts +16 -0
  46. package/dist/npm/core/types/Filter.d.ts.map +1 -0
  47. package/dist/npm/core/types/Filter.js +2 -0
  48. package/dist/npm/core/types/Filter.js.map +1 -0
  49. package/dist/npm/core/types/FilterOperator.d.ts +16 -0
  50. package/dist/npm/core/types/FilterOperator.d.ts.map +1 -0
  51. package/dist/npm/core/types/FilterOperator.js +2 -0
  52. package/dist/npm/core/types/FilterOperator.js.map +1 -0
  53. package/dist/npm/core/types/GroupResult.d.ts +14 -0
  54. package/dist/npm/core/types/GroupResult.d.ts.map +1 -0
  55. package/dist/npm/core/types/GroupResult.js +2 -0
  56. package/dist/npm/core/types/GroupResult.js.map +1 -0
  57. package/dist/npm/core/types/ICacheProvider.d.ts +20 -0
  58. package/dist/npm/core/types/ICacheProvider.d.ts.map +1 -0
  59. package/dist/npm/core/types/ICacheProvider.js +2 -0
  60. package/dist/npm/core/types/ICacheProvider.js.map +1 -0
  61. package/dist/npm/core/types/ISheetAdapter.d.ts +54 -0
  62. package/dist/npm/core/types/ISheetAdapter.d.ts.map +1 -0
  63. package/dist/npm/core/types/ISheetAdapter.js +2 -0
  64. package/dist/npm/core/types/ISheetAdapter.js.map +1 -0
  65. package/dist/npm/core/types/ISpreadsheetAdapter.d.ts +34 -0
  66. package/dist/npm/core/types/ISpreadsheetAdapter.d.ts.map +1 -0
  67. package/dist/npm/core/types/ISpreadsheetAdapter.js +2 -0
  68. package/dist/npm/core/types/ISpreadsheetAdapter.js.map +1 -0
  69. package/dist/npm/core/types/IndexDefinition.d.ts +16 -0
  70. package/dist/npm/core/types/IndexDefinition.d.ts.map +1 -0
  71. package/dist/npm/core/types/IndexDefinition.js +2 -0
  72. package/dist/npm/core/types/IndexDefinition.js.map +1 -0
  73. package/dist/npm/core/types/LifecycleHooks.d.ts +32 -0
  74. package/dist/npm/core/types/LifecycleHooks.d.ts.map +1 -0
  75. package/dist/npm/core/types/LifecycleHooks.js +2 -0
  76. package/dist/npm/core/types/LifecycleHooks.js.map +1 -0
  77. package/dist/npm/core/types/PaginatedResult.d.ts +18 -0
  78. package/dist/npm/core/types/PaginatedResult.d.ts.map +1 -0
  79. package/dist/npm/core/types/PaginatedResult.js +2 -0
  80. package/dist/npm/core/types/PaginatedResult.js.map +1 -0
  81. package/dist/npm/core/types/QueryOptions.d.ts +21 -0
  82. package/dist/npm/core/types/QueryOptions.d.ts.map +1 -0
  83. package/dist/npm/core/types/QueryOptions.js +2 -0
  84. package/dist/npm/core/types/QueryOptions.js.map +1 -0
  85. package/dist/npm/core/types/SortClause.d.ts +10 -0
  86. package/dist/npm/core/types/SortClause.d.ts.map +1 -0
  87. package/dist/npm/core/types/SortClause.js +2 -0
  88. package/dist/npm/core/types/SortClause.js.map +1 -0
  89. package/dist/npm/core/types/SystemColumns.d.ts +16 -0
  90. package/dist/npm/core/types/SystemColumns.d.ts.map +1 -0
  91. package/dist/npm/core/types/SystemColumns.js +16 -0
  92. package/dist/npm/core/types/SystemColumns.js.map +1 -0
  93. package/dist/npm/core/types/TableSchema.d.ts +24 -0
  94. package/dist/npm/core/types/TableSchema.d.ts.map +1 -0
  95. package/dist/npm/core/types/TableSchema.js +2 -0
  96. package/dist/npm/core/types/TableSchema.js.map +1 -0
  97. package/dist/npm/index/IndexMeta.d.ts +16 -0
  98. package/dist/npm/index/IndexMeta.d.ts.map +1 -0
  99. package/dist/npm/index/IndexMeta.js +2 -0
  100. package/dist/npm/index/IndexMeta.js.map +1 -0
  101. package/dist/npm/index/IndexStore.d.ts +399 -0
  102. package/dist/npm/index/IndexStore.d.ts.map +1 -0
  103. package/dist/npm/index/IndexStore.js +1104 -0
  104. package/dist/npm/index/IndexStore.js.map +1 -0
  105. package/dist/npm/index.d.ts +115 -0
  106. package/dist/npm/index.d.ts.map +1 -0
  107. package/dist/npm/index.js +367 -0
  108. package/dist/npm/index.js.map +1 -0
  109. package/dist/npm/query/Query.d.ts +176 -0
  110. package/dist/npm/query/Query.d.ts.map +1 -0
  111. package/dist/npm/query/Query.js +270 -0
  112. package/dist/npm/query/Query.js.map +1 -0
  113. package/dist/npm/query/QueryEngine.d.ts +140 -0
  114. package/dist/npm/query/QueryEngine.d.ts.map +1 -0
  115. package/dist/npm/query/QueryEngine.js +453 -0
  116. package/dist/npm/query/QueryEngine.js.map +1 -0
  117. package/dist/npm/storage/GoogleSheetAdapter.d.ts +120 -0
  118. package/dist/npm/storage/GoogleSheetAdapter.d.ts.map +1 -0
  119. package/dist/npm/storage/GoogleSheetAdapter.js +239 -0
  120. package/dist/npm/storage/GoogleSheetAdapter.js.map +1 -0
  121. package/dist/npm/storage/GoogleSpreadsheetAdapter.d.ts +55 -0
  122. package/dist/npm/storage/GoogleSpreadsheetAdapter.d.ts.map +1 -0
  123. package/dist/npm/storage/GoogleSpreadsheetAdapter.js +99 -0
  124. package/dist/npm/storage/GoogleSpreadsheetAdapter.js.map +1 -0
  125. package/dist/npm/testing/ParityCatalog.d.ts +38 -0
  126. package/dist/npm/testing/ParityCatalog.d.ts.map +1 -0
  127. package/dist/npm/testing/ParityCatalog.js +400 -0
  128. package/dist/npm/testing/ParityCatalog.js.map +1 -0
  129. package/dist/npm/testing/RuntimeBenchmark.d.ts +37 -0
  130. package/dist/npm/testing/RuntimeBenchmark.d.ts.map +1 -0
  131. package/dist/npm/testing/RuntimeBenchmark.js +449 -0
  132. package/dist/npm/testing/RuntimeBenchmark.js.map +1 -0
  133. package/dist/npm/testing/RuntimeParity.d.ts +62 -0
  134. package/dist/npm/testing/RuntimeParity.d.ts.map +1 -0
  135. package/dist/npm/testing/RuntimeParity.js +4030 -0
  136. package/dist/npm/testing/RuntimeParity.js.map +1 -0
  137. package/dist/npm/utils/Serialization.d.ts +111 -0
  138. package/dist/npm/utils/Serialization.d.ts.map +1 -0
  139. package/dist/npm/utils/Serialization.js +281 -0
  140. package/dist/npm/utils/Serialization.js.map +1 -0
  141. package/dist/npm/utils/SheetOrmLogger.d.ts +31 -0
  142. package/dist/npm/utils/SheetOrmLogger.d.ts.map +1 -0
  143. package/dist/npm/utils/SheetOrmLogger.js +42 -0
  144. package/dist/npm/utils/SheetOrmLogger.js.map +1 -0
  145. package/dist/npm/utils/Uuid.d.ts +29 -0
  146. package/dist/npm/utils/Uuid.d.ts.map +1 -0
  147. package/dist/npm/utils/Uuid.js +86 -0
  148. package/dist/npm/utils/Uuid.js.map +1 -0
  149. package/license.md +18 -0
  150. package/package.json +77 -0
  151. package/readme.md +672 -0
@@ -0,0 +1,32 @@
1
+ import type { Entity } from "./Entity.js";
2
+ /**
3
+ * Optional lifecycle hooks that can be attached to a SheetRepository.
4
+ *
5
+ * Hooks run synchronously during save / delete operations and can
6
+ * modify entities (beforeSave), validate data (onValidate), or
7
+ * perform side-effects (afterSave, afterDelete).
8
+ *
9
+ * @typeParam T - The entity type managed by the repository.
10
+ */
11
+ export interface LifecycleHooks<T extends Entity> {
12
+ /**
13
+ * Called before an entity is written to the sheet.
14
+ * Return a modified partial to alter the data, or void to keep it unchanged.
15
+ */
16
+ beforeSave?(entity: Partial<T>, isNew: boolean): Partial<T> | void;
17
+ /** Called after an entity has been persisted to the sheet. */
18
+ afterSave?(entity: T, isNew: boolean): void;
19
+ /**
20
+ * Called before an entity is deleted.
21
+ * Return false to cancel the deletion.
22
+ */
23
+ beforeDelete?(id: string): boolean | void;
24
+ /** Called after an entity has been removed from the sheet. */
25
+ afterDelete?(id: string): void;
26
+ /**
27
+ * Validate entity data before save.
28
+ * Return an array of error messages to abort the save, or void to pass.
29
+ */
30
+ onValidate?(entity: Partial<T>): string[] | void;
31
+ }
32
+ //# sourceMappingURL=LifecycleHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LifecycleHooks.d.ts","sourceRoot":"","sources":["../../../../src/core/types/LifecycleHooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM;IAC9C;;;OAGG;IACH,UAAU,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEnE,8DAA8D;IAC9D,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAE5C;;;OAGG;IACH,YAAY,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAE1C,8DAA8D;IAC9D,WAAW,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;;OAGG;IACH,UAAU,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;CAClD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LifecycleHooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LifecycleHooks.js","sourceRoot":"","sources":["../../../../src/core/types/LifecycleHooks.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Paginated query result returned by select() / Query.select().
3
+ *
4
+ * @typeParam T - Entity type of the paginated items.
5
+ */
6
+ export interface PaginatedResult<T> {
7
+ /** Entities in the current page. */
8
+ items: T[];
9
+ /** Total number of entities matching the query (before pagination). */
10
+ total: number;
11
+ /** 0-based offset of the first item in the page. */
12
+ offset: number;
13
+ /** Maximum number of items per page. */
14
+ limit: number;
15
+ /** True if there are more items beyond this page. */
16
+ hasNext: boolean;
17
+ }
18
+ //# sourceMappingURL=PaginatedResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginatedResult.d.ts","sourceRoot":"","sources":["../../../../src/core/types/PaginatedResult.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,oCAAoC;IACpC,KAAK,EAAE,CAAC,EAAE,CAAC;IAEX,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IAEd,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IAEd,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PaginatedResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginatedResult.js","sourceRoot":"","sources":["../../../../src/core/types/PaginatedResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import type { Filter } from "./Filter.js";
2
+ import type { SortClause } from "./SortClause.js";
3
+ /**
4
+ * Declarative query descriptor used by SheetRepository.find() / count() / deleteAll().
5
+ *
6
+ * Supports AND-connected filters (where), OR-connected filter groups (whereGroups),
7
+ * multi-column sorting (orderBy), and pagination (offset / limit).
8
+ */
9
+ export interface QueryOptions {
10
+ /** Filters combined with AND logic (mutually exclusive with whereGroups). */
11
+ where?: Filter[];
12
+ /** Filter groups combined with OR logic; each inner array is AND-connected. */
13
+ whereGroups?: Filter[][];
14
+ /** Sort clauses applied in order after filtering. */
15
+ orderBy?: SortClause[];
16
+ /** Maximum number of results to return. */
17
+ limit?: number;
18
+ /** Number of results to skip before returning (0-based). */
19
+ offset?: number;
20
+ }
21
+ //# sourceMappingURL=QueryOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryOptions.d.ts","sourceRoot":"","sources":["../../../../src/core/types/QueryOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAEzB,qDAAqD;IACrD,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IAEvB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=QueryOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryOptions.js","sourceRoot":"","sources":["../../../../src/core/types/QueryOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A single sort instruction used in QueryOptions.orderBy.
3
+ */
4
+ export interface SortClause {
5
+ /** Entity field name to sort by (supports dot-separated nested paths). */
6
+ field: string;
7
+ /** Sort direction: ascending or descending. */
8
+ direction: "asc" | "desc";
9
+ }
10
+ //# sourceMappingURL=SortClause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortClause.d.ts","sourceRoot":"","sources":["../../../../src/core/types/SortClause.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IAEd,+CAA+C;IAC/C,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SortClause.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortClause.js","sourceRoot":"","sources":["../../../../src/core/types/SortClause.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Constants for the three system-managed column names.
3
+ *
4
+ * These columns are always present in every SheetORM table and occupy
5
+ * the first three columns of the header row:
6
+ * [__id, __createdAt, __updatedAt, ...userFields]
7
+ */
8
+ export declare class SystemColumns {
9
+ /** Primary key column — holds the UUID v4 identifier. */
10
+ static readonly ID = "__id";
11
+ /** Auto-set to the ISO 8601 timestamp when the record is first created. */
12
+ static readonly CREATED_AT = "__createdAt";
13
+ /** Auto-updated to the ISO 8601 timestamp on every save. */
14
+ static readonly UPDATED_AT = "__updatedAt";
15
+ }
16
+ //# sourceMappingURL=SystemColumns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemColumns.d.ts","sourceRoot":"","sources":["../../../../src/core/types/SystemColumns.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qBAAa,aAAa;IACxB,yDAAyD;IACzD,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU;IAE5B,2EAA2E;IAC3E,MAAM,CAAC,QAAQ,CAAC,UAAU,iBAAiB;IAE3C,4DAA4D;IAC5D,MAAM,CAAC,QAAQ,CAAC,UAAU,iBAAiB;CAC5C"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Constants for the three system-managed column names.
3
+ *
4
+ * These columns are always present in every SheetORM table and occupy
5
+ * the first three columns of the header row:
6
+ * [__id, __createdAt, __updatedAt, ...userFields]
7
+ */
8
+ export class SystemColumns {
9
+ }
10
+ /** Primary key column — holds the UUID v4 identifier. */
11
+ SystemColumns.ID = "__id";
12
+ /** Auto-set to the ISO 8601 timestamp when the record is first created. */
13
+ SystemColumns.CREATED_AT = "__createdAt";
14
+ /** Auto-updated to the ISO 8601 timestamp on every save. */
15
+ SystemColumns.UPDATED_AT = "__updatedAt";
16
+ //# sourceMappingURL=SystemColumns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemColumns.js","sourceRoot":"","sources":["../../../../src/core/types/SystemColumns.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,OAAO,aAAa;;AACxB,yDAAyD;AACzC,gBAAE,GAAG,MAAM,CAAC;AAE5B,2EAA2E;AAC3D,wBAAU,GAAG,aAAa,CAAC;AAE3C,4DAA4D;AAC5C,wBAAU,GAAG,aAAa,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { FieldDefinition } from "./FieldDefinition.js";
2
+ import type { IndexDefinition } from "./IndexDefinition.js";
3
+ /**
4
+ * Complete schema descriptor for a SheetORM-managed table.
5
+ *
6
+ * Built automatically by Registry.ensureRepository() from the
7
+ * Record subclass's static tableName / indexTableName and the
8
+ * decorator-collected field and index metadata.
9
+ */
10
+ export interface TableSchema {
11
+ /** Name of the data sheet tab (e.g. "tbl_Cars"). */
12
+ tableName: string;
13
+ /**
14
+ * Name of the combined index sheet tab (e.g. "idx_Cars").
15
+ * Omitted when the class has no @Indexed fields — avoids
16
+ * unnecessary getSheetByName() API calls on every save.
17
+ */
18
+ indexTableName?: string;
19
+ /** All user-defined fields discovered from decorators and class properties. */
20
+ fields: FieldDefinition[];
21
+ /** Secondary index definitions from @Indexed() decorators. */
22
+ indexes: IndexDefinition[];
23
+ }
24
+ //# sourceMappingURL=TableSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSchema.d.ts","sourceRoot":"","sources":["../../../../src/core/types/TableSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,+EAA+E;IAC/E,MAAM,EAAE,eAAe,EAAE,CAAC;IAE1B,8DAA8D;IAC9D,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TableSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSchema.js","sourceRoot":"","sources":["../../../../src/core/types/TableSchema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Lightweight metadata describing a single secondary index entry
3
+ * as stored in the combined index sheet.
4
+ *
5
+ * Used by IndexStore to track which fields are indexed and whether
6
+ * they enforce uniqueness.
7
+ */
8
+ export interface IndexMeta {
9
+ /** Name of the entity table that owns this index (e.g. "tbl_Cars"). */
10
+ tableName: string;
11
+ /** Name of the indexed field (e.g. "make", "email"). */
12
+ field: string;
13
+ /** When true, the index enforces that no two entities share the same field value. */
14
+ unique: boolean;
15
+ }
16
+ //# sourceMappingURL=IndexMeta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexMeta.d.ts","sourceRoot":"","sources":["../../../src/index/IndexMeta.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAElB,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IAEd,qFAAqF;IACrF,MAAM,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IndexMeta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexMeta.js","sourceRoot":"","sources":["../../../src/index/IndexMeta.ts"],"names":[],"mappings":""}
@@ -0,0 +1,399 @@
1
+ /**
2
+ * IndexStore — secondary index manager for SheetORM.
3
+ *
4
+ * Manages per-class index sheets that accelerate lookup and full-text
5
+ * search operations. Each Record class with `@Indexed` fields gets a
6
+ * single index sheet named `idx_{ClassName}s` (e.g. `idx_Cars`).
7
+ *
8
+ * **Sheet layout** (3-column, no header row since J1 optimisation):
9
+ * ```
10
+ * Col A (field) Col B (value) Col C (entityId)
11
+ * "brand" "Toyota" "abc-123"
12
+ * "model" "Corolla" "abc-123"
13
+ * ```
14
+ *
15
+ * **Search strategy**: Solr-like n-gram search (trigram by default).
16
+ * Text is normalised → tokenised → trigram-indexed. Queries intersect
17
+ * posting lists and verify candidates with a substring match.
18
+ *
19
+ * **Performance optimisations** (codenames reference the B-series and
20
+ * C-series GAS API reduction work):
21
+ *
22
+ * - **B3/B5**: Known row count avoids `getAllData()` on the write path.
23
+ * - **B6**: Empty-table detection skips `getAllData()` entirely.
24
+ * - **C1**: `createCombinedIndex` seeds `indexRowCount` with one
25
+ * `getLastRow()` call so subsequent appends never need a full read.
26
+ * - **J1**: Newly created index sheets skip `setHeaders()` — column
27
+ * positions are hard-coded (0=field, 1=value, 2=entityId).
28
+ * - Sheet references are memoised in `indexSheetCache` to avoid
29
+ * repeated `getSheetByName()` API calls (~300 ms each in GAS).
30
+ * - Batch mode (`beginIndexBatch` / `flushIndexBatch`) accumulates
31
+ * all index writes in memory and flushes them in a single
32
+ * `writeRowsAt()` call per index table.
33
+ *
34
+ * @module IndexStore
35
+ */
36
+ import type { ISpreadsheetAdapter } from "../core/types/ISpreadsheetAdapter.js";
37
+ import type { ISheetAdapter } from "../core/types/ISheetAdapter.js";
38
+ import type { ICacheProvider } from "../core/types/ICacheProvider.js";
39
+ import type { IndexMeta } from "./IndexMeta.js";
40
+ /**
41
+ * Manages secondary index sheets and provides n-gram text search.
42
+ *
43
+ * One IndexStore instance is owned by a {@link Registry} and shared
44
+ * across all SheetRepository instances created from that registry.
45
+ */
46
+ export declare class IndexStore {
47
+ /** Spreadsheet-level adapter for creating/deleting/finding sheets. */
48
+ private adapter;
49
+ /** Optional cache provider for memoising raw index data between reads. */
50
+ private cache;
51
+ /** Registry of all declared indexes: key = "tableName::field" → IndexMeta. */
52
+ private indexRegistry;
53
+ /** Lazy-built n-gram search indexes, keyed by "tableName::field". */
54
+ private searchIndexCache;
55
+ /** Pending batch writes (tableName → rows), or null when batch mode is off. */
56
+ private indexBatch;
57
+ /** Memoised sheet references — avoids duplicate getSheetByName() API calls within a session. */
58
+ private indexSheetCache;
59
+ /** Tracks known row count per index table — avoids full getAllData() reads to determine append position. */
60
+ private indexRowCount;
61
+ /** Character-level n-gram length used for search indexing (trigram = 3). */
62
+ private static readonly NGRAM_SIZE;
63
+ /**
64
+ * @param adapter - Spreadsheet adapter for sheet-level operations.
65
+ * @param cache - Optional cache provider (e.g. MemoryCache) for index data.
66
+ */
67
+ constructor(adapter: ISpreadsheetAdapter, cache?: ICacheProvider);
68
+ /**
69
+ * Build a composite registry key for a (tableName, field) pair.
70
+ * Used as the key in `indexRegistry` and for search cache invalidation.
71
+ */
72
+ private registryKey;
73
+ /**
74
+ * Retrieve all registered {@link IndexMeta} entries for a given table.
75
+ *
76
+ * @param tableName - Index table name (e.g. `"idx_Cars"`).
77
+ * @returns Array of IndexMeta for every indexed field in that table.
78
+ */
79
+ getIndexedFields(tableName: string): IndexMeta[];
80
+ /**
81
+ * Register an indexed field during schema initialisation.
82
+ *
83
+ * Called by {@link Registry.registerClass} for each `@Indexed` decorator
84
+ * found on a Record subclass.
85
+ *
86
+ * @param tableName - Index table name (e.g. `"idx_Cars"`).
87
+ * @param field - Field name to index (e.g. `"brand"`).
88
+ * @param unique - Whether the index enforces uniqueness.
89
+ */
90
+ registerIndex(tableName: string, field: string, unique: boolean): void;
91
+ /**
92
+ * Activate batch mode — subsequent `addAllFieldsToCombined` calls will
93
+ * buffer rows instead of writing to the sheet.
94
+ *
95
+ * Must be paired with either {@link flushIndexBatch} (commit) or
96
+ * {@link cancelIndexBatch} (rollback).
97
+ */
98
+ beginIndexBatch(): void;
99
+ /**
100
+ * Flush all buffered index rows to their respective index sheets.
101
+ *
102
+ * For each index table with pending rows:
103
+ * - **With cache**: reads combined data, appends rows via `writeRowsAt`,
104
+ * and updates the in-memory cache array.
105
+ * - **Without cache (B5)**: uses the known row count to write at the
106
+ * correct offset, or falls back to `appendRows`.
107
+ *
108
+ * After flushing, batch mode is deactivated and the search index cache
109
+ * is invalidated for affected tables.
110
+ */
111
+ flushIndexBatch(): void;
112
+ /**
113
+ * Discard all buffered index rows without writing (error/rollback path).
114
+ */
115
+ cancelIndexBatch(): void;
116
+ /**
117
+ * Return a memoised sheet reference for the given index table name.
118
+ *
119
+ * On the first call for a table name, delegates to `adapter.getSheetByName()`
120
+ * (a GAS API call costing ~300 ms). Subsequent calls return the cached
121
+ * reference from `indexSheetCache`.
122
+ *
123
+ * @param indexTableName - Sheet name (e.g. `"idx_Cars"`).
124
+ * @returns Sheet adapter, or `null` if the sheet does not exist.
125
+ */
126
+ private getIndexSheet;
127
+ /**
128
+ * Create or recognise the combined index sheet for a Record class.
129
+ *
130
+ * - If the sheet does **not** exist: creates it via `insertSheet()` and
131
+ * skips the header row (J1 optimisation — saves ~700 ms).
132
+ * - If the sheet **already** exists: seeds `indexRowCount` with a single
133
+ * `getLastRow()` call (C1 optimisation) so subsequent writes can append
134
+ * without reading all data.
135
+ *
136
+ * The caller can pass a pre-loaded sheet reference or `null` (confirmed
137
+ * non-existent) to avoid a redundant `getSheetByName()` lookup.
138
+ *
139
+ * @param indexTableName - Sheet name (e.g. `"idx_Cars"`).
140
+ * @param preloadedSheet - Optional: already-fetched sheet, or `null` to
141
+ * signal the sheet definitely does not exist.
142
+ */
143
+ createCombinedIndex(indexTableName: string, preloadedSheet?: ISheetAdapter | null): void;
144
+ /**
145
+ * Check whether a combined index sheet exists for the given table name.
146
+ * Uses the memoised sheet cache when available.
147
+ */
148
+ existsCombined(indexTableName: string): boolean;
149
+ /**
150
+ * Add a single (field, value, entityId) entry to the combined index sheet.
151
+ *
152
+ * Enforces unique index constraints: if a unique index already contains
153
+ * the value for a different entity, throws an error.
154
+ *
155
+ * @param indexTableName - Sheet name.
156
+ * @param field - Indexed field name.
157
+ * @param value - Field value to index.
158
+ * @param entityId - Owning entity's UUID.
159
+ * @throws Error on unique index violation.
160
+ */
161
+ addToCombined(indexTableName: string, field: string, value: unknown, entityId: string): void;
162
+ /**
163
+ * Add index entries for **all** indexed fields of a single entity in one
164
+ * batch operation. Reduces N separate `appendRow()` API calls to a single
165
+ * `writeRowsAt()` call (or buffers them if batch mode is active).
166
+ *
167
+ * Unique constraint checks are performed against both the existing sheet
168
+ * data AND any pending (unflushed) batch entries.
169
+ *
170
+ * @param indexTableName - Sheet name.
171
+ * @param entries - Array of { field, value } pairs to index.
172
+ * @param entityId - Owning entity's UUID.
173
+ * @throws Error on unique index violation.
174
+ */
175
+ addAllFieldsToCombined(indexTableName: string, entries: Array<{
176
+ field: string;
177
+ value: unknown;
178
+ }>, entityId: string): void;
179
+ /**
180
+ * Remove **all** index entries for a single entity from the combined sheet.
181
+ *
182
+ * Reads the sheet data once, filters out rows belonging to `entityId`,
183
+ * and rewrites the entire sheet with `replaceAllData()`. This is far
184
+ * cheaper than N individual `deleteRow()` calls (each ~300 ms in GAS
185
+ * plus O(n) row-shifting).
186
+ *
187
+ * @param indexTableName - Sheet name.
188
+ * @param entityId - Entity UUID whose entries should be removed.
189
+ */
190
+ removeAllFromCombined(indexTableName: string, entityId: string): void;
191
+ /**
192
+ * Remove index entries for **multiple** entities in a single bulk operation.
193
+ *
194
+ * Reads sheet data once, filters out all rows whose entityId is in the
195
+ * provided set, and rewrites with `replaceAllData()`. Use this instead
196
+ * of calling `removeAllFromCombined()` in a loop — it avoids N redundant
197
+ * sheet reads and writes.
198
+ *
199
+ * @param indexTableName - Sheet name.
200
+ * @param entityIds - Array of entity UUIDs to remove.
201
+ */
202
+ removeMultipleFromCombined(indexTableName: string, entityIds: string[]): void;
203
+ /**
204
+ * Update index entries for an entity after its field values have changed.
205
+ *
206
+ * Reads the sheet data **once**, diffs old vs new values for each indexed
207
+ * field, then applies the minimal set of writes. Two paths exist:
208
+ *
209
+ * 1. **In-place update** (fast): when no field is being cleared (old→null),
210
+ * each changed row is overwritten at its current position with a single
211
+ * `writeRowsAt()`. New fields that previously had no value are appended.
212
+ * 2. **Fallback delete+insert**: when a field is cleared, the affected rows
213
+ * are removed with `replaceAllData()` and new rows appended.
214
+ *
215
+ * Unique constraint checks run on the snapshot **before** any writes to
216
+ * prevent inconsistent state.
217
+ *
218
+ * @param indexTableName - Sheet name.
219
+ * @param entityId - Entity UUID.
220
+ * @param oldValues - Previous field values (before the update).
221
+ * @param newValues - New field values (after the update).
222
+ * @throws Error on unique index violation.
223
+ */
224
+ updateInCombined(indexTableName: string, entityId: string, oldValues: Record<string, unknown>, newValues: Record<string, unknown>): void;
225
+ /**
226
+ * Look up entity IDs that match a specific (field, value) pair in the index.
227
+ *
228
+ * Performs a linear scan of the combined data. Deduplicates results
229
+ * using a Set to handle potential index corruption.
230
+ *
231
+ * @param indexTableName - Sheet name.
232
+ * @param field - Indexed field name.
233
+ * @param value - Value to look up.
234
+ * @returns Array of matching entity UUIDs (deduplicated).
235
+ */
236
+ lookupCombined(indexTableName: string, field: string, value: unknown): string[];
237
+ /**
238
+ * Delete an entire combined index sheet and unregister all its fields.
239
+ *
240
+ * The sheet is physically deleted via the adapter, all caches are cleared,
241
+ * and the field registry entries are removed. Cache must be cleared
242
+ * **before** removing registry entries because `clearCache()` iterates
243
+ * the registry to find cache keys to invalidate.
244
+ *
245
+ * @param indexTableName - Sheet name to drop.
246
+ */
247
+ dropCombinedIndex(indexTableName: string): void;
248
+ /**
249
+ * Normalise a string for search indexing and querying.
250
+ *
251
+ * Steps: lowercase → trim → convert dashes/underscores/em-dashes to spaces
252
+ * → remove commas → collapse whitespace.
253
+ *
254
+ * @param s - Raw string to normalise.
255
+ * @returns Normalised lowercase string.
256
+ */
257
+ static normalizeForSearch(s: string): string;
258
+ /**
259
+ * Tokenise a normalised string into individual search tokens.
260
+ *
261
+ * @param normalized - Already-normalised string (via {@link normalizeForSearch}).
262
+ * @returns Array of non-empty tokens split on spaces.
263
+ */
264
+ static tokenize(normalized: string): string[];
265
+ /**
266
+ * Generate character-level n-grams from a string.
267
+ *
268
+ * Whitespace is stripped before generating grams so that token boundaries
269
+ * do not create artificial gaps. For the default `NGRAM_SIZE = 3`, the
270
+ * string "toyota" produces {"toy", "oyo", "yot", "ota"}.
271
+ *
272
+ * @param s - Input string.
273
+ * @param n - N-gram length (typically 3 = trigram).
274
+ * @returns Set of unique n-gram substrings.
275
+ */
276
+ static ngrams(s: string, n: number): Set<string>;
277
+ /**
278
+ * Build an in-memory {@link SearchIndex} for a (tableName, field) pair.
279
+ *
280
+ * Scans all index rows for `field`, normalises each value, and builds:
281
+ * - **Token postings**: exact-token → list of entry indices.
282
+ * - **Trigram postings**: character-trigram → list of entry indices.
283
+ * Trigrams are generated from both individual tokens and the
284
+ * compacted (whitespace-free) normalised form.
285
+ *
286
+ * The result is cached in `searchIndexCache` and reused until the
287
+ * index table is modified.
288
+ *
289
+ * @param indexTableName - Sheet name.
290
+ * @param field - Indexed field to build the search index for.
291
+ * @returns Fully populated SearchIndex.
292
+ */
293
+ private buildSearchIndex;
294
+ /**
295
+ * Approximate a token's posting list using trigram intersection.
296
+ *
297
+ * When a query token does not appear verbatim in the `tokenIndex`, we
298
+ * fall back to n-gram matching: decompose the token into trigrams, look
299
+ * up each trigram's posting list, and intersect them all. This yields
300
+ * candidate entries that share every trigram with the query token —
301
+ * a superset of true matches that is refined later by substring
302
+ * verification in {@link searchCombined}.
303
+ *
304
+ * @param token - The query token to approximate.
305
+ * @param ngramIndex - Trigram → posting-list map from the search index.
306
+ * @returns Intersection of all trigram posting lists / empty if a trigram is missing.
307
+ */
308
+ private static postingsForTokenViaNgrams;
309
+ /**
310
+ * Intersect N sorted posting lists into a single sorted result.
311
+ *
312
+ * Reduces pairwise from the first list onward. Callers typically
313
+ * pre-sort the input lists by ascending length so the intermediate
314
+ * result stays small.
315
+ *
316
+ * @param lists - Array of sorted posting lists.
317
+ * @returns Sorted array of indices present in every input list.
318
+ */
319
+ private static intersectPostingLists;
320
+ /**
321
+ * Two-pointer intersection of two sorted integer arrays.
322
+ *
323
+ * Both `a` and `b` must be sorted in ascending order. The output
324
+ * contains only values present in both arrays, preserving order.
325
+ *
326
+ * @param a - First sorted posting list.
327
+ * @param b - Second sorted posting list.
328
+ * @returns Sorted intersection.
329
+ */
330
+ private static intersectTwo;
331
+ /**
332
+ * Search for entity IDs in a combined index by field using n-gram text search.
333
+ *
334
+ * Implements a Solr-like search algorithm (ported from TyreSizeCatalog):
335
+ *
336
+ * 1. **Normalise & tokenise** the query string.
337
+ * 2. **Token lookup**: for each query token, look up the exact posting
338
+ * list. If not found, fall back to trigram-based approximation
339
+ * via {@link postingsForTokenViaNgrams}. Tokens shorter than
340
+ * `NGRAM_SIZE` skip trigram lookup and include all candidates.
341
+ * 3. **Intersect** posting lists across all query tokens — only entries
342
+ * that match *every* token survive.
343
+ * 4. **Verify** each candidate by checking whether the normalised
344
+ * query string is a substring of the normalised index value.
345
+ * This eliminates trigram false-positives.
346
+ * 5. **Deduplicate** results by entity ID (multiple index rows can
347
+ * reference the same entity via different field values).
348
+ *
349
+ * @param indexTableName - Combined index sheet name.
350
+ * @param field - Indexed field to search within.
351
+ * @param query - Free-text search query.
352
+ * @param limit - Optional maximum number of results.
353
+ * @returns Array of matching entity IDs, up to `limit`.
354
+ */
355
+ searchCombined(indexTableName: string, field: string, query: string, limit?: number): string[];
356
+ /**
357
+ * Retrieve the raw rows of a combined index sheet, with transparent caching.
358
+ *
359
+ * Avoids redundant `getAllData()` GAS API calls when multiple operations
360
+ * (lookup, search, update) access the same index sheet within a single
361
+ * save cycle. The cache is invalidated via {@link clearCache} after any
362
+ * write operation.
363
+ *
364
+ * **B6 optimisation**: when `indexRowCount` records 0 rows for the table
365
+ * (e.g. immediately after {@link createCombinedIndex}), the method skips
366
+ * the `getAllData()` call entirely and returns an empty array, saving
367
+ * ~300 ms per call in Google Apps Script.
368
+ *
369
+ * @param indexTableName - Combined index sheet name.
370
+ * @returns 2-D array of raw row data (`[field, value, entityId]` per row).
371
+ */
372
+ private getCombinedData;
373
+ /**
374
+ * Invalidate search-index cache entries for a specific index table.
375
+ *
376
+ * Iterates over all keys in `searchIndexCache` and removes any whose
377
+ * prefix matches `indexTableName::`. Called after write operations so
378
+ * that subsequent searches rebuild their in-memory posting lists.
379
+ *
380
+ * @param indexTableName - Sheet name whose search cache should be cleared.
381
+ */
382
+ private invalidateSearchCacheForTable;
383
+ /**
384
+ * Clear all internal index caches — both in-memory search indexes and
385
+ * the data-level cache entries (prefixed `cidx:`).
386
+ *
387
+ * Does not clear the entire shared {@link ICacheProvider}; instead it
388
+ * selectively deletes only index-related keys to preserve other cached
389
+ * data (e.g. entity caches).
390
+ */
391
+ private clearCache;
392
+ /**
393
+ * Public entry point for clearing all index caches (search + data).
394
+ * Called by {@link Registry.clearCache} to ensure full cache coherence
395
+ * when the Registry's data is invalidated.
396
+ */
397
+ clearAllCaches(): void;
398
+ }
399
+ //# sourceMappingURL=IndexStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexStore.d.ts","sourceRoot":"","sources":["../../../src/index/IndexStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAqBhD;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,sEAAsE;IACtE,OAAO,CAAC,OAAO,CAAsB;IACrC,0EAA0E;IAC1E,OAAO,CAAC,KAAK,CAAwB;IACrC,8EAA8E;IAC9E,OAAO,CAAC,aAAa,CAAqC;IAC1D,qEAAqE;IACr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