@x12i/catalox 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -28
- package/dist/src/catalox/catalox-bound.d.ts +119 -0
- package/dist/src/catalox/catalox-bound.d.ts.map +1 -0
- package/dist/src/catalox/catalox-bound.js +166 -0
- package/dist/src/catalox/catalox-bound.js.map +1 -0
- package/dist/src/catalox/catalox.d.ts +7 -2
- package/dist/src/catalox/catalox.d.ts.map +1 -1
- package/dist/src/catalox/catalox.js +27 -8
- package/dist/src/catalox/catalox.js.map +1 -1
- package/dist/src/catalox/create-catalox.d.ts +22 -0
- package/dist/src/catalox/create-catalox.d.ts.map +1 -0
- package/dist/src/catalox/create-catalox.js +65 -0
- package/dist/src/catalox/create-catalox.js.map +1 -0
- package/dist/src/catalox/index.d.ts +2 -0
- package/dist/src/catalox/index.d.ts.map +1 -1
- package/dist/src/catalox/index.js +2 -0
- package/dist/src/catalox/index.js.map +1 -1
- package/dist/src/cli/index.js +15 -41
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/contracts/catalogs.d.ts +17 -0
- package/dist/src/contracts/catalogs.d.ts.map +1 -1
- package/dist/src/contracts/catalogs.js.map +1 -1
- package/dist/src/contracts/index.d.ts +1 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/index.js.map +1 -1
- package/dist/src/embedder.d.ts +17 -0
- package/dist/src/embedder.d.ts.map +1 -0
- package/dist/src/embedder.js +17 -0
- package/dist/src/embedder.js.map +1 -0
- package/dist/src/index.d.ts +2 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -15
- package/dist/src/index.js.map +1 -1
- package/dist/src/operator.d.ts +24 -0
- package/dist/src/operator.d.ts.map +1 -0
- package/dist/src/operator.js +25 -0
- package/dist/src/operator.js.map +1 -0
- package/dist/test/integration/firestore.emulator.test.js +9 -28
- package/dist/test/integration/firestore.emulator.test.js.map +1 -1
- package/package.json +21 -5
package/README.md
CHANGED
|
@@ -23,6 +23,16 @@ This repo is currently set up as a workspace package.
|
|
|
23
23
|
|
|
24
24
|
**Direct dependency:** `@google-cloud/storage` is declared for GCS export/import/compare; it uses the same **Application Default Credentials** pattern as Firestore Admin (bucket IAM required).
|
|
25
25
|
|
|
26
|
+
### Package exports (v3)
|
|
27
|
+
|
|
28
|
+
| Import path | Intended use |
|
|
29
|
+
|-------------|----------------|
|
|
30
|
+
| **`@x12i/catalox`** | Full surface: embedder API + operator tooling (markdown, diagrams, migrations, Firebase stores, backup/GCS helpers, etc.). |
|
|
31
|
+
| **`@x12i/catalox/embedder`** | Catalog runtime only: **`createCatalox`**, **`Catalox`**, **`withContext` / `CataloxBound`**, contracts, errors, adapters, **`validateMappingSpec` / `executeMapping`**. |
|
|
32
|
+
| **`@x12i/catalox/operator`** | Markdown/diagrams/JSX, validation, bindings, **`ContextResolver`**, backup/GCS transfer helpers, identity/json-io, etc. |
|
|
33
|
+
| **`@x12i/catalox/firebase`** | Firestore-backed store classes for advanced wiring. |
|
|
34
|
+
| **`@x12i/catalox/mapping`** | Full mapping module (including **`helper-gap-report`**). |
|
|
35
|
+
|
|
26
36
|
## Configuration (real connections)
|
|
27
37
|
|
|
28
38
|
Catalox is a library: you provide initialized clients + runtime env. For a **full list of environment variables**, CLI vs library behavior, and integration-test requirements, see [`docs/environment.md`](docs/environment.md).
|
|
@@ -87,7 +97,7 @@ The `catalox` binary loads `.env` via `dotenv`. Use **`CATALOX_*`** for **Catalo
|
|
|
87
97
|
- **`CATALOX_APP_ID`** — Default `appId` in CLI context when a command does not pass `--app` (when present, `--app` overrides).
|
|
88
98
|
- **`CATALOX_STORE_ID`** — Default `storeId` for **`report`** and **`export`** when `--store` is omitted (`--store` overrides).
|
|
89
99
|
- **`CATALOX_USER_ID`** — Optional user id / actor for authz-sensitive CLI paths.
|
|
90
|
-
- **`CATALOX_MONGO_URI`** — If set, enables the Mongo catalog adapter in the CLI (
|
|
100
|
+
- **`CATALOX_MONGO_URI`** — If set, enables the Mongo catalog adapter in the CLI (wired via **`createCatalox`** in `src/catalox/create-catalox.ts`, called from `src/cli/index.ts`).
|
|
91
101
|
|
|
92
102
|
**Running commands from this repository:** the shell command `catalox` is only on your `PATH` if the package is installed globally (`npm i -g @x12i/catalox`) or linked (`npm link` from this repo). Otherwise, after `npm run build`, use:
|
|
93
103
|
|
|
@@ -143,39 +153,27 @@ See [`docs/backup.md`](docs/backup.md) for `backupData` / CLI backup (including
|
|
|
143
153
|
|
|
144
154
|
## Core usage (generic from `appId`)
|
|
145
155
|
|
|
146
|
-
### Create
|
|
156
|
+
### Create `Catalox` (recommended)
|
|
147
157
|
|
|
148
|
-
|
|
149
|
-
import { FirestoreStore } from "@x12i/catalox";
|
|
150
|
-
import { AppStore, CatalogStore, BindingStore, DefinitionStore, MappingStore, DescriptorStore, ReferenceStore, NativeItemStore, CatalogDataIndexStore, SnapshotStore, AdapterStore } from "@x12i/catalox";
|
|
151
|
-
import { AuthorizationService, Catalox } from "@x12i/catalox";
|
|
158
|
+
Use **`createCatalox`** so you do not wire every Firestore store by hand. Optional **`mongoUri`** enables Mongo mapped catalogs; API mapped catalogs use an internal adapter unless you set `enableApiAdapter: false`.
|
|
152
159
|
|
|
153
|
-
|
|
160
|
+
```ts
|
|
161
|
+
import { createCatalox } from "@x12i/catalox";
|
|
154
162
|
import { getFirestore } from "firebase-admin/firestore";
|
|
155
163
|
|
|
156
164
|
const firestore = getFirestore();
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
const bindings = new BindingStore(store);
|
|
160
|
-
const deps = {
|
|
161
|
-
apps: new AppStore(store),
|
|
162
|
-
catalogs: new CatalogStore(store),
|
|
163
|
-
bindings,
|
|
164
|
-
definitions: new DefinitionStore(store),
|
|
165
|
-
mappings: new MappingStore(store),
|
|
166
|
-
descriptors: new DescriptorStore(store),
|
|
167
|
-
references: new ReferenceStore(store),
|
|
168
|
-
nativeItems: new NativeItemStore(store),
|
|
169
|
-
catalogDataIndex: new CatalogDataIndexStore(store),
|
|
170
|
-
snapshots: new SnapshotStore(store),
|
|
171
|
-
adapters: new AdapterStore(store),
|
|
172
|
-
firestoreStore: store,
|
|
173
|
-
authz: new AuthorizationService(bindings),
|
|
174
|
-
};
|
|
165
|
+
const catalox = createCatalox({ firestore });
|
|
175
166
|
|
|
176
|
-
|
|
167
|
+
// Optional: bind app/tenant context once (no globals; same semantics as passing context each call).
|
|
168
|
+
const scoped = catalox.withContext({ appId: "myApp" });
|
|
169
|
+
const list = await scoped.listCatalogItems("myCatalog", { limit: 50 });
|
|
170
|
+
// list.listOutcome is "ok" | "mapping_blocked"; empty items with "ok" means zero rows.
|
|
177
171
|
```
|
|
178
172
|
|
|
173
|
+
### Advanced: manual `CataloxDependencies`
|
|
174
|
+
|
|
175
|
+
If you need a non-default dependency graph, import stores from `@x12i/catalox/firebase`, construct `AuthorizationService`, and pass **`new Catalox(deps)`** as before (see source under `src/catalox/catalox.ts`).
|
|
176
|
+
|
|
179
177
|
## Descriptor contract (planning-critical)
|
|
180
178
|
|
|
181
179
|
Catalox is designed so upstream packages can be “generic” (no hardcoded catalog registrations). The stable contract is the persisted **descriptor**:
|
|
@@ -346,8 +344,8 @@ const bootstrap = await catalox.getAppCatalogBootstrap(context, "myAppId");
|
|
|
346
344
|
|
|
347
345
|
1) `listAppCatalogs(appId)` → get catalog list + access
|
|
348
346
|
2) `getAppCatalogBootstrap(appId)` → get descriptors (capabilities/query/identity/fields)
|
|
349
|
-
3) `listCatalogItems(catalogId, filter/sort)` →
|
|
350
|
-
4) `getCatalogItem(catalogId, itemId)` →
|
|
347
|
+
3) `listCatalogItems(catalogId, filter/sort)` → `{ listOutcome, items, issues? }` (`listOutcome` distinguishes OK empty lists vs mapping validation blocking)
|
|
348
|
+
4) `getCatalogItem(catalogId, itemId)` → `{ outcome: "found" | "not_found" | "mapping_blocked", ... }`
|
|
351
349
|
5) Optional: `getCatalogItemReferences(...)`, `validateCatalogItem(...)`
|
|
352
350
|
|
|
353
351
|
## Provisioning (create catalog + bind + descriptor)
|
|
@@ -453,6 +451,7 @@ await catalox.batchUpsertNativeCatalogItems({ appId: "myAppId" }, "signals", ite
|
|
|
453
451
|
const res = await catalox.listCatalogItems({ appId: "myAppId" }, "signals", {
|
|
454
452
|
filter: { categoryId: "core" }
|
|
455
453
|
});
|
|
454
|
+
// `res.listOutcome`: "ok" (list ran) or "mapping_blocked" (see `res.issues`). Empty `items` with "ok" means zero matches.
|
|
456
455
|
```
|
|
457
456
|
|
|
458
457
|
Filtering is performed on `indexed.<field>` in stored native records (payload remains in `data`). **Blank filter values** (`""`, whitespace-only strings, `null`, `undefined`) are **not** sent as Firestore constraints so empty UI fields do not zero out lists; see [`docs/native-catalog-storage-and-api.md`](docs/native-catalog-storage-and-api.md) and **`compactCatalogFilter`** in the published API.
|
|
@@ -508,6 +507,8 @@ Integration tests are **live-only** (no mocks, no emulators). They require:
|
|
|
508
507
|
- `FIREBASE_SERVICE_ACCOUNT_PATH=...`
|
|
509
508
|
- `FIREBASE_PROJECT_ID=...`
|
|
510
509
|
|
|
510
|
+
The **`Firestore live integration`** test (`test/integration/firestore.emulator.test.ts`) uses **`createCatalox`** and asserts v3 contracts: **`listCatalogItems`** returns **`listOutcome: "ok"`**, and **`getCatalogItem`** returns **`{ outcome: "found", item }`** for the seeded row.
|
|
511
|
+
|
|
511
512
|
### Live test safety (read before running)
|
|
512
513
|
|
|
513
514
|
- **Never run against production credentials/projects.** Use a dedicated Firebase project for tests.
|
|
@@ -516,6 +517,14 @@ Integration tests are **live-only** (no mocks, no emulators). They require:
|
|
|
516
517
|
|
|
517
518
|
## Changelog
|
|
518
519
|
|
|
520
|
+
### 3.0.0
|
|
521
|
+
|
|
522
|
+
- **`createCatalox(config)`** — single factory for Firestore-backed stores, authz, optional Mongo/API adapters, optional renderer snippet store (`src/catalox/create-catalox.ts`).
|
|
523
|
+
- **`catalox.withContext(ctx)`** / **`bindCataloxContext(catalox, ctx)`** — **`CataloxBound`**: same APIs without repeating `CataloxContext` on every call (`src/catalox/catalox-bound.ts`).
|
|
524
|
+
- **Breaking — lists:** **`CatalogListResult`** includes **`listOutcome: "ok" | "mapping_blocked"`**. Mapping validation failures use **`mapping_blocked`** (see **`issues`**). Empty **`items`** with **`listOutcome === "ok"`** means zero matching rows.
|
|
525
|
+
- **Breaking — get item:** **`getCatalogItem`** returns **`CatalogGetItemResult`** (`found` | `not_found` | `mapping_blocked`), not **`null`**.
|
|
526
|
+
- **Package:** **`main` / `types`** and **`exports["."]`** resolve to **`dist/src/...`**. Subpaths **`@x12i/catalox/embedder`**, **`/operator`**, **`/mapping`**, **`/firebase`**. Root **`@x12i/catalox`** re-exports embedder + operator (preserves most existing root imports).
|
|
527
|
+
|
|
519
528
|
### 2.7.0
|
|
520
529
|
|
|
521
530
|
- **GCS restore:** **`restoreFirestoreBackupFromGcs`** + CLI **`firestore restore-backup-from-gcs`** — same pre-restore / **`undoFirestoreRestore`** model as mirror restore.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { AppCatalogBootstrap, AppCatalogEntry, CatalogDescriptor, CatalogItemReference, CatalogItemValidationReport, CatalogGetItemResult, CatalogListResult, CatalogQueryOptions, CatalogValidationReport, CreateCatalogInput, ExportInventoryData, ExportInventoryInput, InventoryReportData, InventoryReportInput, ItemId, StoreId, StoreAppBindingRecord, ListAppCatalogsInput, UnifiedCatalogItem, UpdateCatalogInput } from "../contracts/index.js";
|
|
2
|
+
import type { AppId, CatalogId } from "../contracts/ids.js";
|
|
3
|
+
import type { CataloxContext } from "../contracts/context.js";
|
|
4
|
+
import type { BindCatalogInput } from "../contracts/bindings.js";
|
|
5
|
+
import type { BackupDataInput, BackupDataResult } from "../contracts/backup.js";
|
|
6
|
+
import type { ExportAllFirestoreCollectionsToGcsInput, ExportAllFirestoreCollectionsToGcsResult, ExportFirestoreCollectionToGcsInput, ExportFirestoreCollectionToGcsResult, RestoreAllFirestoreCollectionsFromGcsInput, RestoreAllFirestoreCollectionsFromGcsResult, RestoreFirestoreCollectionFromGcsInput, RestoreFirestoreCollectionFromGcsResult } from "../contracts/gcs-firestore-transfer.js";
|
|
7
|
+
import type { CompareAllFirestoreCollectionsWithGcsManifestInput, CompareAllFirestoreCollectionsWithGcsResult, CompareFirestoreCollectionWithGcsInput, CompareFirestoreCollectionWithGcsResult } from "../contracts/gcs-firestore-compare.js";
|
|
8
|
+
import type { RestoreFirestoreBackupInput, RestoreFirestoreBackupResult, RestoreFirestoreBackupFromGcsInput, RestoreFirestoreBackupFromGcsResult, PruneGcsBackupRunsInput, PruneGcsBackupRunsResult, UndoFirestoreRestoreInput, UndoFirestoreRestoreResult } from "../contracts/restore.js";
|
|
9
|
+
import type { CataloxGcsBackupManifestV1, FirestoreGcsExportManifestV1 } from "../contracts/gcs-firestore-transfer.js";
|
|
10
|
+
import type { CatalogListRenderMap, CatalogItemRenderMap } from "../contracts/render-map.js";
|
|
11
|
+
import type { MigrateNativeCatalogLayoutInput, MigrateNativeCatalogLayoutResult } from "../migrations/migrate-native-catalog-layout.js";
|
|
12
|
+
import type { NativeCatalogLayoutDiagnosticRow } from "./native-catalog-layout-diagnostics.js";
|
|
13
|
+
import type { Catalox } from "./catalox.js";
|
|
14
|
+
/**
|
|
15
|
+
* {@link Catalox} with a fixed {@link CataloxContext}: every method omits the first `context` argument.
|
|
16
|
+
* Use {@link Catalox.withContext} or {@link bindCataloxContext}.
|
|
17
|
+
*/
|
|
18
|
+
export declare class CataloxBound {
|
|
19
|
+
private readonly catalox;
|
|
20
|
+
readonly context: CataloxContext;
|
|
21
|
+
constructor(catalox: Catalox, context: CataloxContext);
|
|
22
|
+
buildCatalogListRenderMap(catalogId: CatalogId, options?: {
|
|
23
|
+
limit?: number;
|
|
24
|
+
resolveSources?: boolean;
|
|
25
|
+
maxSourceOptions?: number;
|
|
26
|
+
displayContext?: "grid" | "list" | "cards";
|
|
27
|
+
}): Promise<CatalogListRenderMap>;
|
|
28
|
+
buildCatalogItemRenderMap(catalogId: CatalogId, itemId: ItemId, options?: {
|
|
29
|
+
includeReferences?: boolean;
|
|
30
|
+
resolveSources?: boolean;
|
|
31
|
+
maxSourceOptions?: number;
|
|
32
|
+
displayContext?: "form" | "card" | "grid-row" | "list-row";
|
|
33
|
+
}): Promise<CatalogItemRenderMap>;
|
|
34
|
+
listAppCatalogs(input?: ListAppCatalogsInput): Promise<AppCatalogEntry[]>;
|
|
35
|
+
getCatalogDescriptor(catalogId: CatalogId): Promise<CatalogDescriptor | null>;
|
|
36
|
+
getCatalogRendererSnippet(catalogId: CatalogId, role: "core" | "list" | "grid" | "item" | "report" | "dashboard", mode?: "readonly" | "editable"): Promise<import("../contracts/renderer-snippets.js").CatalogRendererSnippetRecord | null>;
|
|
37
|
+
getAppCatalogBootstrap(appId?: AppId): Promise<AppCatalogBootstrap>;
|
|
38
|
+
listCatalogItems(catalogId: CatalogId, options?: CatalogQueryOptions): Promise<CatalogListResult>;
|
|
39
|
+
getCatalogItem(catalogId: CatalogId, itemId: ItemId): Promise<CatalogGetItemResult>;
|
|
40
|
+
validateCatalog(catalogId: CatalogId): Promise<CatalogValidationReport>;
|
|
41
|
+
validateCatalogItem(catalogId: CatalogId, itemId: ItemId): Promise<CatalogItemValidationReport>;
|
|
42
|
+
getCatalogItemReferences(catalogId: CatalogId, itemId: ItemId): Promise<CatalogItemReference[]>;
|
|
43
|
+
listCatalogReferences(catalogId: CatalogId): Promise<CatalogItemReference[]>;
|
|
44
|
+
getApp(appId?: AppId): Promise<import("../contracts/apps.js").AppRecord | null>;
|
|
45
|
+
createCatalog(input: CreateCatalogInput): Promise<import("../contracts/catalogs.js").CatalogRecord>;
|
|
46
|
+
updateCatalog(catalogId: CatalogId, patch: UpdateCatalogInput): Promise<import("../contracts/catalogs.js").CatalogRecord>;
|
|
47
|
+
getCatalog(catalogId: CatalogId): Promise<import("../contracts/catalogs.js").CatalogRecord | null>;
|
|
48
|
+
listCatalogs(options?: CatalogQueryOptions): Promise<import("../contracts/catalogs.js").CatalogRecord[]>;
|
|
49
|
+
bindCatalogToApp(input: BindCatalogInput): Promise<any>;
|
|
50
|
+
unbindCatalogFromApp(appId: AppId, catalogId: CatalogId): Promise<void>;
|
|
51
|
+
bindAppToStore(input: {
|
|
52
|
+
storeId: StoreId;
|
|
53
|
+
appId: AppId;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
}): Promise<StoreAppBindingRecord>;
|
|
56
|
+
unbindAppFromStore(storeId: StoreId, appId: AppId): Promise<void>;
|
|
57
|
+
listAppsForStore(storeId: StoreId): Promise<StoreAppBindingRecord[]>;
|
|
58
|
+
ensureCatalog(catalog: {
|
|
59
|
+
catalogId: CatalogId;
|
|
60
|
+
name: string;
|
|
61
|
+
status?: "active" | "disabled" | "draft";
|
|
62
|
+
}): Promise<void>;
|
|
63
|
+
ensureBinding(input: {
|
|
64
|
+
appId: AppId;
|
|
65
|
+
catalogId: CatalogId;
|
|
66
|
+
access?: {
|
|
67
|
+
canRead?: boolean;
|
|
68
|
+
canWrite?: boolean;
|
|
69
|
+
canAdmin?: boolean;
|
|
70
|
+
};
|
|
71
|
+
}): Promise<void>;
|
|
72
|
+
createNativeCatalogItem(catalogId: CatalogId, input: Record<string, unknown>): Promise<UnifiedCatalogItem>;
|
|
73
|
+
updateNativeCatalogItem(catalogId: CatalogId, itemId: ItemId, patch: Record<string, unknown>): Promise<UnifiedCatalogItem>;
|
|
74
|
+
deleteNativeCatalogItem(catalogId: CatalogId, itemId: ItemId): Promise<void>;
|
|
75
|
+
upsertNativeCatalogItem(catalogId: CatalogId, input: Record<string, unknown>): Promise<UnifiedCatalogItem>;
|
|
76
|
+
batchUpsertNativeCatalogItems(catalogId: CatalogId, items: Array<Record<string, unknown>>): Promise<void>;
|
|
77
|
+
importCatalogItemsFromJson<T = unknown>(json: string): T;
|
|
78
|
+
exportCatalogItemsToJson(value: unknown, pretty?: boolean): string;
|
|
79
|
+
exportInventory(input?: ExportInventoryInput): Promise<ExportInventoryData>;
|
|
80
|
+
exportInventoryToJson(input?: ExportInventoryInput, pretty?: boolean): Promise<string>;
|
|
81
|
+
generateInventoryReport(input?: InventoryReportInput): Promise<{
|
|
82
|
+
markdown: string;
|
|
83
|
+
data: InventoryReportData;
|
|
84
|
+
}>;
|
|
85
|
+
syncMappedCatalog(catalogId: CatalogId): Promise<{
|
|
86
|
+
syncStatus: "idle";
|
|
87
|
+
lastSyncedAt?: never;
|
|
88
|
+
} | {
|
|
89
|
+
syncStatus: "success";
|
|
90
|
+
lastSyncedAt: string;
|
|
91
|
+
}>;
|
|
92
|
+
backupData(input: BackupDataInput): Promise<BackupDataResult>;
|
|
93
|
+
restoreFirestoreBackup(input: RestoreFirestoreBackupInput): Promise<RestoreFirestoreBackupResult>;
|
|
94
|
+
undoFirestoreRestore(input: UndoFirestoreRestoreInput): Promise<UndoFirestoreRestoreResult>;
|
|
95
|
+
restoreFirestoreBackupFromGcs(input: RestoreFirestoreBackupFromGcsInput): Promise<RestoreFirestoreBackupFromGcsResult>;
|
|
96
|
+
pruneGcsBackupRuns(input: PruneGcsBackupRunsInput): Promise<PruneGcsBackupRunsResult>;
|
|
97
|
+
deleteCataloxGcsBackupRun(input: {
|
|
98
|
+
gcsBucket: string;
|
|
99
|
+
gcsRunFolder: string;
|
|
100
|
+
}): Promise<{
|
|
101
|
+
ok: boolean;
|
|
102
|
+
deleted: number;
|
|
103
|
+
issues: import("../contracts/restore.js").RestoreFirestoreBackupFromGcsIssue[];
|
|
104
|
+
}>;
|
|
105
|
+
cataloxGcsBackupManifestToExportManifest(manifest: CataloxGcsBackupManifestV1, gcsRunFolder: string): FirestoreGcsExportManifestV1;
|
|
106
|
+
reportNativeCatalogLayoutDiagnostics(input?: {
|
|
107
|
+
catalogIds?: CatalogId[];
|
|
108
|
+
appId?: string;
|
|
109
|
+
}): Promise<NativeCatalogLayoutDiagnosticRow[]>;
|
|
110
|
+
migrateNativeCatalogLayout(input: MigrateNativeCatalogLayoutInput): Promise<MigrateNativeCatalogLayoutResult>;
|
|
111
|
+
exportFirestoreCollectionToGcs(input: Omit<ExportFirestoreCollectionToGcsInput, "firestore">): Promise<ExportFirestoreCollectionToGcsResult>;
|
|
112
|
+
exportAllFirestoreCollectionsToGcs(input: Omit<ExportAllFirestoreCollectionsToGcsInput, "firestore">): Promise<ExportAllFirestoreCollectionsToGcsResult>;
|
|
113
|
+
restoreFirestoreCollectionFromGcs(input: Omit<RestoreFirestoreCollectionFromGcsInput, "firestore">): Promise<RestoreFirestoreCollectionFromGcsResult>;
|
|
114
|
+
restoreAllFirestoreCollectionsFromGcsManifest(input: Omit<RestoreAllFirestoreCollectionsFromGcsInput, "firestore">): Promise<RestoreAllFirestoreCollectionsFromGcsResult>;
|
|
115
|
+
compareFirestoreCollectionWithGcsNdjson(input: Omit<CompareFirestoreCollectionWithGcsInput, "firestore">): Promise<CompareFirestoreCollectionWithGcsResult>;
|
|
116
|
+
compareAllFirestoreCollectionsWithGcsManifest(input: Omit<CompareAllFirestoreCollectionsWithGcsManifestInput, "firestore">): Promise<CompareAllFirestoreCollectionsWithGcsResult>;
|
|
117
|
+
}
|
|
118
|
+
export declare function bindCataloxContext(catalox: Catalox, context: CataloxContext): CataloxBound;
|
|
119
|
+
//# sourceMappingURL=catalox-bound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalox-bound.d.ts","sourceRoot":"","sources":["../../../src/catalox/catalox-bound.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,EACN,OAAO,EACP,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,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,IAAI,CAAC,sCAAsC,EAAE,WAAW,CAAC,GAC/D,OAAO,CAAC,uCAAuC,CAAC;IAI7C,6CAA6C,CACjD,KAAK,EAAE,IAAI,CAAC,kDAAkD,EAAE,WAAW,CAAC,GAC3E,OAAO,CAAC,2CAA2C,CAAC;CAGxD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,YAAY,CAE1F"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link Catalox} with a fixed {@link CataloxContext}: every method omits the first `context` argument.
|
|
3
|
+
* Use {@link Catalox.withContext} or {@link bindCataloxContext}.
|
|
4
|
+
*/
|
|
5
|
+
export class CataloxBound {
|
|
6
|
+
catalox;
|
|
7
|
+
context;
|
|
8
|
+
constructor(catalox, context) {
|
|
9
|
+
this.catalox = catalox;
|
|
10
|
+
this.context = context;
|
|
11
|
+
}
|
|
12
|
+
async buildCatalogListRenderMap(catalogId, options) {
|
|
13
|
+
return this.catalox.buildCatalogListRenderMap(this.context, catalogId, options);
|
|
14
|
+
}
|
|
15
|
+
async buildCatalogItemRenderMap(catalogId, itemId, options) {
|
|
16
|
+
return this.catalox.buildCatalogItemRenderMap(this.context, catalogId, itemId, options);
|
|
17
|
+
}
|
|
18
|
+
async listAppCatalogs(input) {
|
|
19
|
+
return this.catalox.listAppCatalogs(this.context, input);
|
|
20
|
+
}
|
|
21
|
+
async getCatalogDescriptor(catalogId) {
|
|
22
|
+
return this.catalox.getCatalogDescriptor(this.context, catalogId);
|
|
23
|
+
}
|
|
24
|
+
async getCatalogRendererSnippet(catalogId, role, mode) {
|
|
25
|
+
return this.catalox.getCatalogRendererSnippet(this.context, catalogId, role, mode);
|
|
26
|
+
}
|
|
27
|
+
async getAppCatalogBootstrap(appId) {
|
|
28
|
+
return this.catalox.getAppCatalogBootstrap(this.context, appId);
|
|
29
|
+
}
|
|
30
|
+
async listCatalogItems(catalogId, options) {
|
|
31
|
+
return this.catalox.listCatalogItems(this.context, catalogId, options);
|
|
32
|
+
}
|
|
33
|
+
async getCatalogItem(catalogId, itemId) {
|
|
34
|
+
return this.catalox.getCatalogItem(this.context, catalogId, itemId);
|
|
35
|
+
}
|
|
36
|
+
async validateCatalog(catalogId) {
|
|
37
|
+
return this.catalox.validateCatalog(this.context, catalogId);
|
|
38
|
+
}
|
|
39
|
+
async validateCatalogItem(catalogId, itemId) {
|
|
40
|
+
return this.catalox.validateCatalogItem(this.context, catalogId, itemId);
|
|
41
|
+
}
|
|
42
|
+
async getCatalogItemReferences(catalogId, itemId) {
|
|
43
|
+
return this.catalox.getCatalogItemReferences(this.context, catalogId, itemId);
|
|
44
|
+
}
|
|
45
|
+
async listCatalogReferences(catalogId) {
|
|
46
|
+
return this.catalox.listCatalogReferences(this.context, catalogId);
|
|
47
|
+
}
|
|
48
|
+
async getApp(appId) {
|
|
49
|
+
return this.catalox.getApp(this.context, appId);
|
|
50
|
+
}
|
|
51
|
+
async createCatalog(input) {
|
|
52
|
+
return this.catalox.createCatalog(this.context, input);
|
|
53
|
+
}
|
|
54
|
+
async updateCatalog(catalogId, patch) {
|
|
55
|
+
return this.catalox.updateCatalog(this.context, catalogId, patch);
|
|
56
|
+
}
|
|
57
|
+
async getCatalog(catalogId) {
|
|
58
|
+
return this.catalox.getCatalog(this.context, catalogId);
|
|
59
|
+
}
|
|
60
|
+
async listCatalogs(options) {
|
|
61
|
+
return this.catalox.listCatalogs(this.context, options);
|
|
62
|
+
}
|
|
63
|
+
async bindCatalogToApp(input) {
|
|
64
|
+
return this.catalox.bindCatalogToApp(this.context, input);
|
|
65
|
+
}
|
|
66
|
+
async unbindCatalogFromApp(appId, catalogId) {
|
|
67
|
+
return this.catalox.unbindCatalogFromApp(this.context, appId, catalogId);
|
|
68
|
+
}
|
|
69
|
+
async bindAppToStore(input) {
|
|
70
|
+
return this.catalox.bindAppToStore(this.context, input);
|
|
71
|
+
}
|
|
72
|
+
async unbindAppFromStore(storeId, appId) {
|
|
73
|
+
return this.catalox.unbindAppFromStore(this.context, storeId, appId);
|
|
74
|
+
}
|
|
75
|
+
async listAppsForStore(storeId) {
|
|
76
|
+
return this.catalox.listAppsForStore(this.context, storeId);
|
|
77
|
+
}
|
|
78
|
+
async ensureCatalog(catalog) {
|
|
79
|
+
return this.catalox.ensureCatalog(this.context, catalog);
|
|
80
|
+
}
|
|
81
|
+
async ensureBinding(input) {
|
|
82
|
+
return this.catalox.ensureBinding(this.context, input);
|
|
83
|
+
}
|
|
84
|
+
async createNativeCatalogItem(catalogId, input) {
|
|
85
|
+
return this.catalox.createNativeCatalogItem(this.context, catalogId, input);
|
|
86
|
+
}
|
|
87
|
+
async updateNativeCatalogItem(catalogId, itemId, patch) {
|
|
88
|
+
return this.catalox.updateNativeCatalogItem(this.context, catalogId, itemId, patch);
|
|
89
|
+
}
|
|
90
|
+
async deleteNativeCatalogItem(catalogId, itemId) {
|
|
91
|
+
return this.catalox.deleteNativeCatalogItem(this.context, catalogId, itemId);
|
|
92
|
+
}
|
|
93
|
+
async upsertNativeCatalogItem(catalogId, input) {
|
|
94
|
+
return this.catalox.upsertNativeCatalogItem(this.context, catalogId, input);
|
|
95
|
+
}
|
|
96
|
+
async batchUpsertNativeCatalogItems(catalogId, items) {
|
|
97
|
+
return this.catalox.batchUpsertNativeCatalogItems(this.context, catalogId, items);
|
|
98
|
+
}
|
|
99
|
+
importCatalogItemsFromJson(json) {
|
|
100
|
+
return this.catalox.importCatalogItemsFromJson(json);
|
|
101
|
+
}
|
|
102
|
+
exportCatalogItemsToJson(value, pretty = true) {
|
|
103
|
+
return this.catalox.exportCatalogItemsToJson(value, pretty);
|
|
104
|
+
}
|
|
105
|
+
async exportInventory(input = {}) {
|
|
106
|
+
return this.catalox.exportInventory(this.context, input);
|
|
107
|
+
}
|
|
108
|
+
async exportInventoryToJson(input = {}, pretty = true) {
|
|
109
|
+
return this.catalox.exportInventoryToJson(this.context, input, pretty);
|
|
110
|
+
}
|
|
111
|
+
async generateInventoryReport(input = {}) {
|
|
112
|
+
return this.catalox.generateInventoryReport(this.context, input);
|
|
113
|
+
}
|
|
114
|
+
async syncMappedCatalog(catalogId) {
|
|
115
|
+
return this.catalox.syncMappedCatalog(this.context, catalogId);
|
|
116
|
+
}
|
|
117
|
+
async backupData(input) {
|
|
118
|
+
return this.catalox.backupData(this.context, input);
|
|
119
|
+
}
|
|
120
|
+
async restoreFirestoreBackup(input) {
|
|
121
|
+
return this.catalox.restoreFirestoreBackup(this.context, input);
|
|
122
|
+
}
|
|
123
|
+
async undoFirestoreRestore(input) {
|
|
124
|
+
return this.catalox.undoFirestoreRestore(this.context, input);
|
|
125
|
+
}
|
|
126
|
+
async restoreFirestoreBackupFromGcs(input) {
|
|
127
|
+
return this.catalox.restoreFirestoreBackupFromGcs(this.context, input);
|
|
128
|
+
}
|
|
129
|
+
async pruneGcsBackupRuns(input) {
|
|
130
|
+
return this.catalox.pruneGcsBackupRuns(this.context, input);
|
|
131
|
+
}
|
|
132
|
+
async deleteCataloxGcsBackupRun(input) {
|
|
133
|
+
return this.catalox.deleteCataloxGcsBackupRun(this.context, input);
|
|
134
|
+
}
|
|
135
|
+
cataloxGcsBackupManifestToExportManifest(manifest, gcsRunFolder) {
|
|
136
|
+
return this.catalox.cataloxGcsBackupManifestToExportManifest(manifest, gcsRunFolder);
|
|
137
|
+
}
|
|
138
|
+
async reportNativeCatalogLayoutDiagnostics(input) {
|
|
139
|
+
return this.catalox.reportNativeCatalogLayoutDiagnostics(this.context, input);
|
|
140
|
+
}
|
|
141
|
+
async migrateNativeCatalogLayout(input) {
|
|
142
|
+
return this.catalox.migrateNativeCatalogLayout(this.context, input);
|
|
143
|
+
}
|
|
144
|
+
async exportFirestoreCollectionToGcs(input) {
|
|
145
|
+
return this.catalox.exportFirestoreCollectionToGcs(this.context, input);
|
|
146
|
+
}
|
|
147
|
+
async exportAllFirestoreCollectionsToGcs(input) {
|
|
148
|
+
return this.catalox.exportAllFirestoreCollectionsToGcs(this.context, input);
|
|
149
|
+
}
|
|
150
|
+
async restoreFirestoreCollectionFromGcs(input) {
|
|
151
|
+
return this.catalox.restoreFirestoreCollectionFromGcs(this.context, input);
|
|
152
|
+
}
|
|
153
|
+
async restoreAllFirestoreCollectionsFromGcsManifest(input) {
|
|
154
|
+
return this.catalox.restoreAllFirestoreCollectionsFromGcsManifest(this.context, input);
|
|
155
|
+
}
|
|
156
|
+
async compareFirestoreCollectionWithGcsNdjson(input) {
|
|
157
|
+
return this.catalox.compareFirestoreCollectionWithGcsNdjson(this.context, input);
|
|
158
|
+
}
|
|
159
|
+
async compareAllFirestoreCollectionsWithGcsManifest(input) {
|
|
160
|
+
return this.catalox.compareAllFirestoreCollectionsWithGcsManifest(this.context, input);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
export function bindCataloxContext(catalox, context) {
|
|
164
|
+
return new CataloxBound(catalox, context);
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=catalox-bound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalox-bound.js","sourceRoot":"","sources":["../../../src/catalox/catalox-bound.ts"],"names":[],"mappings":"AA8DA;;;GAGG;AACH,MAAM,OAAO,YAAY;IAEJ;IACR;IAFX,YACmB,OAAgB,EACxB,OAAuB;QADf,YAAO,GAAP,OAAO,CAAS;QACxB,YAAO,GAAP,OAAO,CAAgB;IAC/B,CAAC;IAEJ,KAAK,CAAC,yBAAyB,CAC7B,SAAoB,EACpB,OAA6H;QAE7H,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,yBAAyB,CAC7B,SAAoB,EACpB,MAAc,EACd,OAKC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;I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+1,4 @@
|
|
|
1
|
-
import type { AppCatalogBootstrap, AppCatalogEntry, CatalogDescriptor, CatalogItemReference, CatalogItemValidationReport, CatalogListResult, CatalogQueryOptions, CatalogValidationReport, CreateCatalogInput, ExportInventoryData, ExportInventoryInput, InventoryReportData, InventoryReportInput, ItemId, StoreId, StoreAppBindingRecord, ListAppCatalogsInput, UnifiedCatalogItem, UpdateCatalogInput } from "../contracts/index.js";
|
|
1
|
+
import type { AppCatalogBootstrap, AppCatalogEntry, CatalogDescriptor, CatalogItemReference, CatalogItemValidationReport, CatalogGetItemResult, CatalogListResult, CatalogQueryOptions, CatalogValidationReport, CreateCatalogInput, ExportInventoryData, ExportInventoryInput, InventoryReportData, InventoryReportInput, ItemId, StoreId, StoreAppBindingRecord, ListAppCatalogsInput, UnifiedCatalogItem, UpdateCatalogInput } from "../contracts/index.js";
|
|
2
2
|
import type { AppId, CatalogId } from "../contracts/ids.js";
|
|
3
3
|
import { ApiCatalogAdapter } from "../adapters/api/api-adapter.js";
|
|
4
4
|
import { MongoCatalogAdapter } from "../adapters/mongo/mongo-adapter.js";
|
|
@@ -27,6 +27,7 @@ import type { CataloxGcsBackupManifestV1, FirestoreGcsExportManifestV1 } from ".
|
|
|
27
27
|
import { runDeleteCataloxGcsBackupRun } from "./restore-firestore-backup-from-gcs.js";
|
|
28
28
|
import { type MigrateNativeCatalogLayoutInput, type MigrateNativeCatalogLayoutResult } from "../migrations/migrate-native-catalog-layout.js";
|
|
29
29
|
import { type NativeCatalogLayoutDiagnosticRow } from "./native-catalog-layout-diagnostics.js";
|
|
30
|
+
import { CataloxBound } from "./catalox-bound.js";
|
|
30
31
|
export type CataloxDependencies = {
|
|
31
32
|
apps: AppStore;
|
|
32
33
|
catalogs: CatalogStore;
|
|
@@ -76,7 +77,7 @@ export declare class Catalox {
|
|
|
76
77
|
getCatalogRendererSnippet(context: CataloxContext, catalogId: CatalogId, role: "core" | "list" | "grid" | "item" | "report" | "dashboard", mode?: "readonly" | "editable"): Promise<import("../contracts/renderer-snippets.js").CatalogRendererSnippetRecord | null>;
|
|
77
78
|
getAppCatalogBootstrap(context: CataloxContext, appId?: AppId): Promise<AppCatalogBootstrap>;
|
|
78
79
|
listCatalogItems(context: CataloxContext, catalogId: CatalogId, options?: CatalogQueryOptions): Promise<CatalogListResult>;
|
|
79
|
-
getCatalogItem(context: CataloxContext, catalogId: CatalogId, itemId: ItemId): Promise<
|
|
80
|
+
getCatalogItem(context: CataloxContext, catalogId: CatalogId, itemId: ItemId): Promise<CatalogGetItemResult>;
|
|
80
81
|
validateCatalog(_context: CataloxContext, _catalogId: CatalogId): Promise<CatalogValidationReport>;
|
|
81
82
|
validateCatalogItem(_context: CataloxContext, _catalogId: CatalogId, _itemId: ItemId): Promise<CatalogItemValidationReport>;
|
|
82
83
|
getCatalogItemReferences(context: CataloxContext, catalogId: CatalogId, itemId: ItemId): Promise<CatalogItemReference[]>;
|
|
@@ -178,5 +179,9 @@ export declare class Catalox {
|
|
|
178
179
|
compareFirestoreCollectionWithGcsNdjson(_context: CataloxContext, input: Omit<CompareFirestoreCollectionWithGcsInput, "firestore">): Promise<CompareFirestoreCollectionWithGcsResult>;
|
|
179
180
|
/** Run `compareFirestoreCollectionWithGcsNdjson` for every entry in an export manifest. */
|
|
180
181
|
compareAllFirestoreCollectionsWithGcsManifest(_context: CataloxContext, input: Omit<CompareAllFirestoreCollectionsWithGcsManifestInput, "firestore">): Promise<CompareAllFirestoreCollectionsWithGcsResult>;
|
|
182
|
+
/**
|
|
183
|
+
* Fix {@link CataloxContext} for subsequent calls so embedders omit it on each method (no globals).
|
|
184
|
+
*/
|
|
185
|
+
withContext(context: CataloxContext): CataloxBound;
|
|
181
186
|
}
|
|
182
187
|
//# sourceMappingURL=catalox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalox.d.ts","sourceRoot":"","sources":["../../../src/catalox/catalox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACn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AE,cAAc,GAAG,YAAY;CAGnD"}
|
|
@@ -33,6 +33,7 @@ import { migrateNativeCatalogLayout as runMigrateNativeCatalogLayout, } from "..
|
|
|
33
33
|
import { reportNativeCatalogLayoutDiagnostics as runReportNativeCatalogLayoutDiagnostics, } from "./native-catalog-layout-diagnostics.js";
|
|
34
34
|
import { exportAllFirestoreCollectionsToGcs, exportFirestoreCollectionToGcs, restoreAllFirestoreCollectionsFromGcsManifest, restoreFirestoreCollectionFromGcs, } from "./firestore-gcs-transfer.js";
|
|
35
35
|
import { compareAllFirestoreCollectionsWithGcsManifest, compareFirestoreCollectionWithGcsNdjson, } from "./firestore-gcs-compare.js";
|
|
36
|
+
import { CataloxBound } from "./catalox-bound.js";
|
|
36
37
|
export class Catalox {
|
|
37
38
|
deps;
|
|
38
39
|
constructor(deps) {
|
|
@@ -194,9 +195,13 @@ export class Catalox {
|
|
|
194
195
|
}
|
|
195
196
|
async buildCatalogItemRenderMap(context, catalogId, itemId, options) {
|
|
196
197
|
const descriptor = await this.getCatalogDescriptor(context, catalogId);
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
198
|
+
const got = await this.getCatalogItem(context, catalogId, itemId);
|
|
199
|
+
if (got.outcome === "mapping_blocked") {
|
|
200
|
+
throw new CatalogAdapterError({ catalogId, reason: "mapping_validation_failed", issues: got.issues });
|
|
201
|
+
}
|
|
202
|
+
if (got.outcome === "not_found")
|
|
199
203
|
throw new CatalogNotFoundError({ catalogId, itemId });
|
|
204
|
+
const item = got.item;
|
|
200
205
|
const sources = this.gatherDescriptorSources(descriptor);
|
|
201
206
|
const resolvedSources = {};
|
|
202
207
|
if (options?.resolveSources !== false) {
|
|
@@ -375,7 +380,7 @@ export class Catalox {
|
|
|
375
380
|
createdAt: r.createdAt,
|
|
376
381
|
updatedAt: r.updatedAt,
|
|
377
382
|
}));
|
|
378
|
-
return { items };
|
|
383
|
+
return { listOutcome: "ok", items };
|
|
379
384
|
}
|
|
380
385
|
const def = await this.deps.definitions.get(catalogId);
|
|
381
386
|
if (!def || def.type !== "mapped")
|
|
@@ -385,7 +390,7 @@ export class Catalox {
|
|
|
385
390
|
throw new CatalogAdapterError({ catalogId, reason: "missing_mapping" });
|
|
386
391
|
const mappingIssues = validateMappingSpec(mapping.mapping);
|
|
387
392
|
if (mappingIssues.some((i) => i.severity === "error")) {
|
|
388
|
-
return { items: [], issues: mappingIssues };
|
|
393
|
+
return { listOutcome: "mapping_blocked", items: [], issues: mappingIssues };
|
|
389
394
|
}
|
|
390
395
|
if (def.adapterType === "mongo") {
|
|
391
396
|
if (!this.deps.mongoAdapter)
|
|
@@ -394,7 +399,9 @@ export class Catalox {
|
|
|
394
399
|
if (!adapterConfig)
|
|
395
400
|
throw new CatalogAdapterError({ catalogId, reason: "missing_adapter" });
|
|
396
401
|
const result = await this.deps.mongoAdapter.listItems(context, catalogId, adapterConfig, { mapping: mapping.mapping, ...(mapping.options ? { options: mapping.options } : {}) }, listQueryOptions);
|
|
397
|
-
return result.issues
|
|
402
|
+
return result.issues?.length
|
|
403
|
+
? { listOutcome: "ok", items: result.items, issues: result.issues }
|
|
404
|
+
: { listOutcome: "ok", items: result.items };
|
|
398
405
|
}
|
|
399
406
|
if (def.adapterType === "api") {
|
|
400
407
|
if (!this.deps.apiAdapter)
|
|
@@ -404,6 +411,7 @@ export class Catalox {
|
|
|
404
411
|
throw new CatalogAdapterError({ catalogId, reason: "missing_adapter" });
|
|
405
412
|
const result = await this.deps.apiAdapter.listItems(context, catalogId, adapterConfig, { responseMapping: mapping.mapping, ...(mapping.options ? { options: mapping.options } : {}) }, listQueryOptions);
|
|
406
413
|
return {
|
|
414
|
+
listOutcome: "ok",
|
|
407
415
|
items: result.items,
|
|
408
416
|
...(result.nextCursor ? { nextCursor: result.nextCursor } : {}),
|
|
409
417
|
...(result.issues ? { issues: result.issues } : {}),
|
|
@@ -419,7 +427,7 @@ export class Catalox {
|
|
|
419
427
|
if (catalog.sourceMode === "native") {
|
|
420
428
|
const rec = await this.deps.nativeItems.get(catalogId, itemId);
|
|
421
429
|
if (!rec)
|
|
422
|
-
return
|
|
430
|
+
return { outcome: "not_found" };
|
|
423
431
|
const base = {
|
|
424
432
|
itemId: rec.itemId,
|
|
425
433
|
catalogId: rec.catalogId,
|
|
@@ -431,15 +439,20 @@ export class Catalox {
|
|
|
431
439
|
createdAt: rec.createdAt,
|
|
432
440
|
updatedAt: rec.updatedAt,
|
|
433
441
|
};
|
|
434
|
-
return this.decorateItem(catalogId, base);
|
|
442
|
+
return { outcome: "found", item: await this.decorateItem(catalogId, base) };
|
|
435
443
|
}
|
|
436
444
|
// For mapped catalogs, use list path with filter if adapter supports.
|
|
437
445
|
const result = await this.listCatalogItems(context, catalogId, {
|
|
438
446
|
limit: 1,
|
|
439
447
|
filter: { itemId },
|
|
440
448
|
});
|
|
449
|
+
if (result.listOutcome === "mapping_blocked") {
|
|
450
|
+
return { outcome: "mapping_blocked", issues: result.issues ?? [] };
|
|
451
|
+
}
|
|
441
452
|
const first = result.items[0];
|
|
442
|
-
|
|
453
|
+
if (!first)
|
|
454
|
+
return { outcome: "not_found" };
|
|
455
|
+
return { outcome: "found", item: await this.decorateItem(catalogId, first) };
|
|
443
456
|
}
|
|
444
457
|
async validateCatalog(_context, _catalogId) {
|
|
445
458
|
return { isValid: true, issues: [] };
|
|
@@ -1153,6 +1166,12 @@ export class Catalox {
|
|
|
1153
1166
|
firestore: this.deps.firestoreStore.firestore,
|
|
1154
1167
|
});
|
|
1155
1168
|
}
|
|
1169
|
+
/**
|
|
1170
|
+
* Fix {@link CataloxContext} for subsequent calls so embedders omit it on each method (no globals).
|
|
1171
|
+
*/
|
|
1172
|
+
withContext(context) {
|
|
1173
|
+
return new CataloxBound(this, context);
|
|
1174
|
+
}
|
|
1156
1175
|
}
|
|
1157
1176
|
// (moved to `src/contracts/bootstrap.ts`)
|
|
1158
1177
|
//# sourceMappingURL=catalox.js.map
|