@proveanything/smartlinks-utils-ui 1.13.14 → 1.13.16
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/dist/{chunk-I3T36FSI.js → chunk-5NKKNCFT.js} +57 -15
- package/dist/chunk-5NKKNCFT.js.map +1 -0
- package/dist/{chunk-W5ZEH3RT.js → chunk-HC43AGW3.js} +7 -4
- package/dist/chunk-HC43AGW3.js.map +1 -0
- package/dist/components/AssetPicker/index.js +1 -1
- package/dist/components/RecordsAdmin/index.js +11 -11
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/records-UOHHX5FQ.js +3 -0
- package/dist/{records-GPSKUNST.js.map → records-UOHHX5FQ.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-I3T36FSI.js.map +0 -1
- package/dist/chunk-W5ZEH3RT.js.map +0 -1
- package/dist/records-GPSKUNST.js +0 -3
|
@@ -177,8 +177,11 @@ var matchRecords = async (ctx, target, opts = {}) => ctx.SL.app.records.match(
|
|
|
177
177
|
...ctx.recordType ? { recordType: ctx.recordType } : {},
|
|
178
178
|
strategy: opts.strategy ?? "all",
|
|
179
179
|
at: opts.at,
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
// Admin-surface default: surface scheduled + expired records so operators
|
|
181
|
+
// can review and act on them. Public consumers should call match() via
|
|
182
|
+
// the SDK directly (this wrapper is always `admin: true`).
|
|
183
|
+
includeScheduled: opts.includeScheduled ?? true,
|
|
184
|
+
includeExpired: opts.includeExpired ?? true,
|
|
182
185
|
limit: opts.limit
|
|
183
186
|
},
|
|
184
187
|
true
|
|
@@ -237,5 +240,5 @@ var bulkDelete = async (ctx, input) => {
|
|
|
237
240
|
};
|
|
238
241
|
|
|
239
242
|
export { bulkDelete, bulkUpsert, createRecord, getRecordById, listRecords, matchRecords, parsedRefToScope, parsedRefToTarget, removeRecord, restoreRecord, scopesEqual, updateRecord, upsertRecord, upsertRecordForScope };
|
|
240
|
-
//# sourceMappingURL=chunk-
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
243
|
+
//# sourceMappingURL=chunk-HC43AGW3.js.map
|
|
244
|
+
//# sourceMappingURL=chunk-HC43AGW3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/RecordsAdmin/data/scopeBridge.ts","../src/components/RecordsAdmin/data/records.ts"],"names":[],"mappings":";AA4BO,IAAM,gBAAA,GAAmB,CAAC,GAAA,KAAkC;AACjE,EAAA,MAAM,UAAyB,EAAC;AAChC,EAAA,IAAI,GAAA,CAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,GAAY,GAAA,CAAI,SAAA;AAC3C,EAAA,IAAI,GAAA,CAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,GAAY,GAAA,CAAI,SAAA;AAC3C,EAAA,IAAI,GAAA,CAAI,OAAA,EAAS,OAAA,CAAQ,OAAA,GAAU,GAAA,CAAI,OAAA;AACvC,EAAA,IAAI,GAAA,CAAI,OAAA,EAAS,OAAA,CAAQ,OAAA,GAAU,GAAA,CAAI,OAAA;AACvC,EAAA,OAAO,OAAA;AACT;AAEO,IAAM,iBAAA,GAAoB,CAAC,GAAA,KAAiC;AACjE,EAAA,MAAM,SAAuB,EAAC;AAC9B,EAAA,IAAI,GAAA,CAAI,SAAA,EAAW,MAAA,CAAO,SAAA,GAAY,GAAA,CAAI,SAAA;AAC1C,EAAA,IAAI,GAAA,CAAI,SAAA,EAAW,MAAA,CAAO,SAAA,GAAY,GAAA,CAAI,SAAA;AAC1C,EAAA,IAAI,GAAA,CAAI,OAAA,EAAS,MAAA,CAAO,OAAA,GAAU,GAAA,CAAI,OAAA;AACtC,EAAA,IAAI,GAAA,CAAI,OAAA,EAAS,MAAA,CAAO,OAAA,GAAU,GAAA,CAAI,OAAA;AACtC,EAAA,IAAI,GAAA,CAAI,OAAA,IAAW,GAAA,CAAI,UAAA,EAAY;AACjC,IAAA,MAAA,CAAO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AA,MACtB,EAAE,KAAA,EAAO,GAAI,GAAA,CAAI,UAAA,GAAa,EAAE,UAAA,EAAY,GAAA,CAAI,UAAA,EAAW,GAAI,EAAC;AAAG,KACrE;AACA,IAAA,OAAO,EAAE,OAAA,EAAS,GAAA,CAAI,OAAA,IAAW,CAAA,EAAE;AAAA,EACrC;AAEA,EAAA,MAAM,KAAA,GAAQ,GAAA;AACd,EAAA,IAAI,OAAA,GAAU,CAAA;AACd,EAAA,KAAA,IAAS,IAAI,CAAA,EAAG,CAAA,GAAI,MAAM,IAAA,CAAK,MAAA,EAAQ,KAAK,KAAA,EAAO;AACjD,IAAA,MAAM,QAAQ,KAAA,CAAM,IAAA,CAAK,KAAA,CAAM,CAAA,EAAG,IAAI,KAAK,CAAA;AAC3C,IAAA,MAAM,GAAA,GAAwB,MAAM,GAAA,CAAI,EAAA,CAAG,IAAI,OAAA,CAAQ,UAAA;AAAA,MACrD,GAAA,CAAI,YAAA;AAAA,MAAc,GAAA,CAAI,KAAA;AAAA,MACtB,EAAE,IAAA,EAAM,KAAA,EAAO,GAAI,GAAA,CAAI,UAAA,GAAa,EAAE,UAAA,EAAY,GAAA,CAAI,UAAA,EAAW,GAAI,EAAC;AAAG,KAC3E;AACA,IAAA,OAAA,IAAW,IAAI,OAAA,IAAW,CAAA;AAAA,EAC5B;AACA,EAAA,OAAO,EAAE,OAAA,EAAQ;AACnB","file":"chunk-HC43AGW3.js","sourcesContent":["// =============================================================================\r\n// scopeBridge — Convert between our UI `ParsedRef` and the SDK record anchors.\r\n//\r\n// SDK 1.10.2 flattened `AppRecord`: anchor IDs (`productId`, `variantId`,\r\n// `batchId`, `proofId`) live at the top level and the nested `RecordScope`\r\n// type was removed. Facet selection moved to `facetRule` (rule records),\r\n// handled separately via the FacetRuleEditor.\r\n//\r\n// `parsedRefToScope` keeps its public name (it's re-exported from the\r\n// package entrypoint) but now returns the flat anchor object that Upsert /\r\n// Bulk inputs accept directly.\r\n// =============================================================================\r\nimport type { RecordTarget } from './sdkTypes';\r\nimport type { ParsedRef } from '../types';\r\n\r\n/** Flat anchor shape — matches `UpsertRecordInput` / `BulkUpsertItem`. */\r\nexport interface RecordAnchors {\r\n productId?: string | null;\r\n variantId?: string | null;\r\n batchId?: string | null;\r\n proofId?: string | null;\r\n}\r\n\r\n/**\r\n * Project a `ParsedRef` to the flat anchor IDs the SDK writes. Facet\r\n * components on the ref are intentionally ignored — facet targeting now\r\n * lives on `facetRule` (rule records), not as a record anchor.\r\n */\r\nexport const parsedRefToScope = (ref: ParsedRef): RecordAnchors => {\r\n const anchors: RecordAnchors = {};\r\n if (ref.productId) anchors.productId = ref.productId;\r\n if (ref.variantId) anchors.variantId = ref.variantId;\r\n if (ref.batchId) anchors.batchId = ref.batchId;\r\n if (ref.proofId) anchors.proofId = ref.proofId;\r\n return anchors;\r\n};\r\n\r\nexport const parsedRefToTarget = (ref: ParsedRef): RecordTarget => {\r\n const target: RecordTarget = {};\r\n if (ref.productId) target.productId = ref.productId;\r\n if (ref.variantId) target.variantId = ref.variantId;\r\n if (ref.batchId) target.batchId = ref.batchId;\r\n if (ref.proofId) target.proofId = ref.proofId;\r\n if (ref.facetId && ref.facetValue) {\r\n target.facets = { [ref.facetId]: [ref.facetValue] };\r\n }\r\n return target;\r\n};\r\n\r\n/**\r\n * True when two anchor sets refer to the same node. Used to decide\r\n * \"self\" vs \"inherited\" when consuming `match()` results: compare the\r\n * winning record's flat anchor IDs against the editing scope.\r\n */\r\nexport const scopesEqual = (a: RecordAnchors, b: RecordAnchors): boolean => {\r\n if ((a.productId ?? null) !== (b.productId ?? null)) return false;\r\n if ((a.variantId ?? null) !== (b.variantId ?? null)) return false;\r\n if ((a.batchId ?? null) !== (b.batchId ?? null)) return false;\r\n if ((a.proofId ?? null) !== (b.proofId ?? null)) return false;\r\n return true;\r\n};","// =============================================================================\r\n// Thin wrappers over SL.app.records.* — always admin: true here.\r\n//\r\n// As of `@proveanything/smartlinks` 1.9.0 the records surface ships a proper\r\n// `upsert()`, server-side `match()`, and atomic `bulkUpsert` / `bulkDelete`.\r\n// We delegate to those rather than rolling our own list+update sequences,\r\n// which were racy and ignored facet AND-of-OR semantics.\r\n//\r\n// Identity model (1.10.3+): every record has a stable UUID `id`. The shell\r\n// addresses existing records by id (`update`, `remove`); only genuinely new\r\n// records go via `upsert` (or `create`). We deliberately do NOT synthesise\r\n// a `ref` from anchor IDs anymore — anchors alone are sufficient for the\r\n// server to address the record, and a synthetic ref masks bugs by making\r\n// the editor \"find\" records that don't exist yet.\r\n// =============================================================================\r\nimport type {\r\n AppRecord, RecordTarget, BulkUpsertItem, BulkDeleteResult,\r\n MatchResult, FacetRule,\r\n} from './sdkTypes';\r\nimport type { ParsedRef, SmartLinksSDK } from '../types';\r\nimport { parsedRefToScope, type RecordAnchors } from './scopeBridge';\r\n\r\nexport interface RecordsCtx {\r\n SL: SmartLinksSDK;\r\n collectionId: string;\r\n appId: string;\r\n /** Optional — when omitted, records are stored against the app id alone\r\n * (no type qualifier). Set this only when an app uses multiple record types\r\n * and needs to query/scope by type. */\r\n recordType?: string;\r\n}\r\n\r\n/**\r\n * Shape of a single record write. SDK 1.10.2 takes flat anchor IDs\r\n * directly on the upsert payload (`productId`, `variantId`, `batchId`,\r\n * `proofId`); the legacy nested `scope` object is gone. Set `facetRule`\r\n * for rule records — mutually exclusive with anchor IDs.\r\n */\r\nexport interface RecordWrite<T = unknown> {\r\n /**\r\n * Optional caller-supplied external ref (e.g. a SKU or user-typed key).\r\n * When omitted the server addresses the record by anchors / facetRule\r\n * alone — we no longer synthesise one from anchor IDs client-side.\r\n */\r\n ref?: string;\r\n /** Flat anchor IDs. Drives specificity and `match()` server-side. */\r\n scope: RecordAnchors;\r\n data: T;\r\n visibility?: 'public' | 'owner' | 'admin';\r\n status?: string;\r\n startsAt?: string | null;\r\n expiresAt?: string | null;\r\n customId?: string;\r\n sourceSystem?: string;\r\n /**\r\n * Optional facet rule. When set, the record is targeted via this rule and\r\n * anchor IDs must be empty (SDK enforces mutual exclusion). Used by\r\n * the rule editor / Targeting section.\r\n */\r\n facetRule?: FacetRule | null;\r\n}\r\n\r\nexport const listRecords = async (\r\n ctx: RecordsCtx,\r\n params: {\r\n ref?: string;\r\n refPrefix?: string;\r\n q?: string;\r\n limit?: number;\r\n offset?: number;\r\n sort?: string;\r\n /**\r\n * Include records past their `expiresAt`. Defaults to `true` — the admin\r\n * shell needs to see expired records so operators can review, extend or\r\n * delete them. Pass `false` on public-facing surfaces that should only\r\n * see currently-live records.\r\n */\r\n includeExpired?: boolean;\r\n /**\r\n * Include records whose `startsAt` is in the future. Defaults to `true`\r\n * for the same admin-surface reason as `includeExpired`.\r\n */\r\n includeScheduled?: boolean;\r\n } = {},\r\n): Promise<{ data: AppRecord[]; total: number; hasMore: boolean }> => {\r\n const {\r\n limit = 100, offset, ref, refPrefix, q, sort,\r\n includeExpired = true, includeScheduled = true,\r\n } = params;\r\n const res = await ctx.SL.app.records.list(\r\n ctx.collectionId,\r\n ctx.appId,\r\n {\r\n ...(ctx.recordType ? { recordType: ctx.recordType } : {}),\r\n limit, offset, ref, refPrefix, q, sort,\r\n includeExpired, includeScheduled,\r\n },\r\n true,\r\n );\r\n return {\r\n data: res?.data ?? [],\r\n total: res?.pagination?.total ?? (res?.data?.length ?? 0),\r\n hasMore: res?.pagination?.hasMore ?? false,\r\n };\r\n};\r\n\r\n/**\r\n * Look up a single record by its UUID id. The id-primary read path used by\r\n * deep-link restore (`?recordId=`).\r\n */\r\nexport const getRecordById = async (\r\n ctx: RecordsCtx,\r\n recordId: string,\r\n): Promise<AppRecord | null> => {\r\n try {\r\n const record = await ctx.SL.app.records.get(ctx.collectionId, ctx.appId, recordId, true);\r\n return record;\r\n } catch (error) {\r\n // Some host environments appear to lag the id-primary `get()` path even\r\n // though the same record is visible in `list()`. Fall back to a bounded\r\n // scan so item selection still resolves instead of looking dead.\r\n // eslint-disable-next-line no-console\r\n console.warn('[RecordsAdmin/getRecordById] direct get failed, falling back to list scan', {\r\n recordId,\r\n error: error instanceof Error ? error.message : String(error),\r\n });\r\n let offset = 0;\r\n const limit = 100;\r\n for (let page = 0; page < 10; page += 1) {\r\n const res = await listRecords(ctx, { limit, offset }).catch(() => null);\r\n const hit = res?.data.find((rec) => rec.id === recordId) ?? null;\r\n if (hit) {\r\n return hit;\r\n }\r\n if (!res?.hasMore) break;\r\n offset += res.data.length;\r\n }\r\n // eslint-disable-next-line no-console\r\n console.warn('[RecordsAdmin/getRecordById] record not found after fallback scan', { recordId });\r\n return null;\r\n }\r\n};\r\n\r\n/**\r\n * Create-or-update by (anchors + recordType) — used when we don't yet know\r\n * the record's UUID id. The server addresses the row by anchors (or the\r\n * supplied `ref`/`facetRule`) and returns the row with its stable `id`.\r\n *\r\n * Prefer `updateRecord(ctx, id, …)` whenever an id is already in hand:\r\n * it's an unambiguous PATCH against a known row and never accidentally\r\n * resurrects a sibling at the same anchor.\r\n */\r\nexport const upsertRecord = async <T,>(\r\n ctx: RecordsCtx,\r\n write: RecordWrite<T>,\r\n): Promise<{ record: AppRecord; isCreate: boolean }> => {\r\n const payload: Record<string, unknown> = {\r\n ...(ctx.recordType ? { recordType: ctx.recordType } : {}),\r\n data: write.data as Record<string, unknown>,\r\n status: write.status,\r\n startsAt: write.startsAt,\r\n expiresAt: write.expiresAt,\r\n customId: write.customId,\r\n sourceSystem: write.sourceSystem,\r\n };\r\n // Only send `ref` when the caller supplied one explicitly (external key\r\n // such as a SKU). We no longer synthesise one from anchors.\r\n if (write.ref) payload.ref = write.ref;\r\n\r\n // SDK 1.10.3 enforces mutual exclusion between anchor IDs and `facetRule`.\r\n // Send exactly one. When a rule is supplied the server resolves matches\r\n // against it; otherwise the flat anchor IDs drive specificity.\r\n if (write.facetRule && write.facetRule.all && write.facetRule.all.length > 0) {\r\n payload.facetRule = write.facetRule;\r\n } else {\r\n if (write.scope.productId) payload.productId = write.scope.productId;\r\n if (write.scope.variantId) payload.variantId = write.scope.variantId;\r\n if (write.scope.batchId) payload.batchId = write.scope.batchId;\r\n if (write.scope.proofId) payload.proofId = write.scope.proofId;\r\n }\r\n const res = await ctx.SL.app.records.upsert(\r\n ctx.collectionId, ctx.appId, payload as Parameters<typeof ctx.SL.app.records.upsert>[2],\r\n );\r\n return { record: res, isCreate: !!res?.created };\r\n};\r\n\r\n/**\r\n * Create a brand-new record. Use this for collection-cardinality items\r\n * where each save must produce a distinct row (no upsert key collision).\r\n * Unlike `upsert`, the server allows omitting `ref` here — every call\r\n * inserts a new row and returns its UUID.\r\n */\r\nexport const createRecord = async <T,>(\r\n ctx: RecordsCtx,\r\n write: RecordWrite<T>,\r\n): Promise<AppRecord> => {\r\n const payload: Record<string, unknown> = {\r\n ...(ctx.recordType ? { recordType: ctx.recordType } : {}),\r\n data: write.data as Record<string, unknown>,\r\n status: write.status,\r\n startsAt: write.startsAt,\r\n expiresAt: write.expiresAt,\r\n customId: write.customId,\r\n sourceSystem: write.sourceSystem,\r\n };\r\n if (write.ref) payload.ref = write.ref;\r\n if (write.facetRule && write.facetRule.all && write.facetRule.all.length > 0) {\r\n payload.facetRule = write.facetRule;\r\n } else {\r\n if (write.scope.productId) payload.productId = write.scope.productId;\r\n if (write.scope.variantId) payload.variantId = write.scope.variantId;\r\n if (write.scope.batchId) payload.batchId = write.scope.batchId;\r\n if (write.scope.proofId) payload.proofId = write.scope.proofId;\r\n }\r\n return ctx.SL.app.records.create(\r\n ctx.collectionId, ctx.appId,\r\n payload as Parameters<typeof ctx.SL.app.records.create>[2],\r\n true,\r\n );\r\n};\r\n\r\n/**\r\n * PATCH an existing record by its UUID id. The id-primary save path —\r\n * preferred over `upsertRecord` whenever the resolver has handed us a\r\n * `recordId`. Anchors are passed through verbatim; pass `null` for an\r\n * anchor to clear it.\r\n */\r\nexport const updateRecord = async <T,>(\r\n ctx: RecordsCtx,\r\n recordId: string,\r\n patch: {\r\n data?: T;\r\n scope?: RecordAnchors;\r\n facetRule?: FacetRule | null;\r\n status?: string;\r\n startsAt?: string | null;\r\n expiresAt?: string | null;\r\n },\r\n): Promise<AppRecord> => {\r\n const payload: Record<string, unknown> = {\r\n ...(ctx.recordType ? { recordType: ctx.recordType } : {}),\r\n };\r\n if (patch.data !== undefined) payload.data = patch.data as Record<string, unknown>;\r\n if (patch.status !== undefined) payload.status = patch.status;\r\n if (patch.startsAt !== undefined) payload.startsAt = patch.startsAt;\r\n if (patch.expiresAt !== undefined) payload.expiresAt = patch.expiresAt;\r\n if (patch.scope) {\r\n if (patch.scope.productId !== undefined) payload.productId = patch.scope.productId;\r\n if (patch.scope.variantId !== undefined) payload.variantId = patch.scope.variantId;\r\n if (patch.scope.batchId !== undefined) payload.batchId = patch.scope.batchId;\r\n if (patch.scope.proofId !== undefined) payload.proofId = patch.scope.proofId;\r\n }\r\n if (patch.facetRule !== undefined) payload.facetRule = patch.facetRule;\r\n return ctx.SL.app.records.update(\r\n ctx.collectionId, ctx.appId, recordId,\r\n payload as Parameters<typeof ctx.SL.app.records.update>[3],\r\n true,\r\n );\r\n};\r\n\r\n/** Delete a record by its UUID id. The id-primary delete path. */\r\nexport const removeRecord = async (\r\n ctx: RecordsCtx,\r\n recordId: string,\r\n): Promise<void> => {\r\n await ctx.SL.app.records.remove(ctx.collectionId, ctx.appId, recordId, true);\r\n};\r\n\r\n/**\r\n * Convenience wrapper for callers that only have a `ParsedRef` and a payload —\r\n * matches the previous (`ref`, `data`) call shape used by the editor hook.\r\n */\r\nexport const upsertRecordForScope = async <T,>(\r\n ctx: RecordsCtx,\r\n scope: ParsedRef,\r\n data: T,\r\n extra: { visibility?: 'public' | 'owner' | 'admin' } = {},\r\n) => upsertRecord<T>(ctx, {\r\n ref: scope.raw || undefined,\r\n scope: parsedRefToScope(scope),\r\n data,\r\n visibility: extra.visibility,\r\n});\r\n\r\n/** Restore a soft-deleted record by ID (admin only). */\r\nexport const restoreRecord = async (\r\n ctx: RecordsCtx,\r\n recordId: string,\r\n): Promise<AppRecord> => ctx.SL.app.records.restore(ctx.collectionId, ctx.appId, recordId);\r\n\r\n/**\r\n * Server-side match — single round trip that returns every record whose\r\n * `scope` is satisfied by `target`, ordered by descending `specificity`.\r\n * Replaces the per-scope N+1 chain walk we used pre-1.9.\r\n */\r\nexport const matchRecords = async (\r\n ctx: RecordsCtx,\r\n target: RecordTarget,\r\n opts: {\r\n strategy?: 'all' | 'best';\r\n at?: string;\r\n includeScheduled?: boolean;\r\n includeExpired?: boolean;\r\n limit?: number;\r\n } = {},\r\n): Promise<MatchResult> => ctx.SL.app.records.match(\r\n ctx.collectionId,\r\n ctx.appId,\r\n {\r\n target,\r\n ...(ctx.recordType ? { recordType: ctx.recordType } : {}),\r\n strategy: opts.strategy ?? 'all',\r\n at: opts.at,\r\n // Admin-surface default: surface scheduled + expired records so operators\r\n // can review and act on them. Public consumers should call match() via\r\n // the SDK directly (this wrapper is always `admin: true`).\r\n includeScheduled: opts.includeScheduled ?? true,\r\n includeExpired: opts.includeExpired ?? true,\r\n limit: opts.limit,\r\n },\r\n true,\r\n);\r\n\r\n/**\r\n * Server-side bulk upsert. Up to 500 rows per call; any leftover is chunked.\r\n * Each row is error-isolated by the server.\r\n */\r\nexport const bulkUpsert = async <T,>(\r\n ctx: RecordsCtx,\r\n entries: Array<{ ref?: string; scope: RecordAnchors; data: T; status?: string }>,\r\n): Promise<{ saved: number; failed: number }> => {\r\n const CHUNK = 500;\r\n let saved = 0;\r\n let failed = 0;\r\n for (let i = 0; i < entries.length; i += CHUNK) {\r\n const slice = entries.slice(i, i + CHUNK);\r\n const items: BulkUpsertItem[] = slice.map((e) => {\r\n const item: BulkUpsertItem = {\r\n ...(ctx.recordType ? { recordType: ctx.recordType } : {}),\r\n productId: e.scope.productId ?? null,\r\n variantId: e.scope.variantId ?? null,\r\n batchId: e.scope.batchId ?? null,\r\n proofId: e.scope.proofId ?? null,\r\n data: e.data as Record<string, unknown>,\r\n status: e.status,\r\n } as BulkUpsertItem;\r\n // Caller-supplied external refs only — we no longer derive one from\r\n // anchors. Bulk imports without an external key rely on the server\r\n // matching on (recordType + anchors) for the upsert key.\r\n if (e.ref) (item as { ref?: string }).ref = e.ref;\r\n return item;\r\n });\r\n const res = await ctx.SL.app.records.bulkUpsert(ctx.collectionId, ctx.appId, items)\r\n .catch((): { saved: number; failed: number } => ({ saved: 0, failed: items.length }));\r\n saved += res.saved ?? 0;\r\n failed += res.failed ?? 0;\r\n }\r\n return { saved, failed };\r\n};\r\n\r\n/**\r\n * Server-side bulk delete. Accepts an explicit ref list (max 1000 per call,\r\n * chunked here) or a scope anchor (single call).\r\n */\r\nexport const bulkDelete = async (\r\n ctx: RecordsCtx,\r\n input: { refs: string[] } | { scope: RecordAnchors },\r\n): Promise<{ removed: number }> => {\r\n if ('scope' in input) {\r\n // SDK `BulkDeleteInput.scope` accepts the flat anchor object directly.\r\n const scope: Record<string, string> = {};\r\n if (input.scope.productId) scope.productId = input.scope.productId;\r\n if (input.scope.variantId) scope.variantId = input.scope.variantId;\r\n if (input.scope.batchId) scope.batchId = input.scope.batchId;\r\n if (input.scope.proofId) scope.proofId = input.scope.proofId;\r\n const res: BulkDeleteResult = await ctx.SL.app.records.bulkDelete(\r\n ctx.collectionId, ctx.appId,\r\n { scope, ...(ctx.recordType ? { recordType: ctx.recordType } : {}) },\r\n );\r\n return { removed: res.deleted ?? 0 };\r\n }\r\n\r\n const CHUNK = 1000;\r\n let removed = 0;\r\n for (let i = 0; i < input.refs.length; i += CHUNK) {\r\n const slice = input.refs.slice(i, i + CHUNK);\r\n const res: BulkDeleteResult = await ctx.SL.app.records.bulkDelete(\r\n ctx.collectionId, ctx.appId,\r\n { refs: slice, ...(ctx.recordType ? { recordType: ctx.recordType } : {}) },\r\n );\r\n removed += res.deleted ?? 0;\r\n }\r\n return { removed };\r\n};"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AssetPicker, useAppRegistry, useAssets } from '../../chunk-
|
|
1
|
+
export { AssetPicker, useAppRegistry, useAssets } from '../../chunk-5NKKNCFT.js';
|
|
2
2
|
import '../../chunk-OLYC54YT.js';
|
|
3
3
|
import '../../chunk-5UQQYXCX.js';
|
|
4
4
|
import '../../chunk-L7FQ52F5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parsedRefToTarget, parsedRefToScope, matchRecords, scopesEqual, getRecordById, listRecords, upsertRecord, updateRecord, createRecord, removeRecord } from '../../chunk-
|
|
2
|
-
export { bulkDelete, bulkUpsert, createRecord, getRecordById, listRecords, matchRecords, parsedRefToScope, parsedRefToTarget, removeRecord, restoreRecord, scopesEqual, upsertRecord } from '../../chunk-
|
|
1
|
+
import { parsedRefToTarget, parsedRefToScope, matchRecords, scopesEqual, getRecordById, listRecords, upsertRecord, updateRecord, createRecord, removeRecord } from '../../chunk-HC43AGW3.js';
|
|
2
|
+
export { bulkDelete, bulkUpsert, createRecord, getRecordById, listRecords, matchRecords, parsedRefToScope, parsedRefToTarget, removeRecord, restoreRecord, scopesEqual, upsertRecord } from '../../chunk-HC43AGW3.js';
|
|
3
3
|
import { useIntroState, ErrorBoundary, AdminPageHeader } from '../../chunk-XASZS7EA.js';
|
|
4
4
|
export { ErrorBoundary } from '../../chunk-XASZS7EA.js';
|
|
5
5
|
import { FacetRuleEditor } from '../../chunk-WVCNIX7N.js';
|
|
@@ -2660,7 +2660,7 @@ function useShellNavigation(args) {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
}
|
|
2662
2662
|
try {
|
|
2663
|
-
const { removeRecord: removeRecord2 } = await import('../../records-
|
|
2663
|
+
const { removeRecord: removeRecord2 } = await import('../../records-UOHHX5FQ.js');
|
|
2664
2664
|
await removeRecord2(ctx, itemId);
|
|
2665
2665
|
onTelemetry?.({ type: "item.delete", recordType, scopeRef: baseScopeRef, itemId });
|
|
2666
2666
|
if (selectedItemId === itemId) setSelectedItemId(null);
|
|
@@ -9610,7 +9610,7 @@ function RecordsAdminShellInner(props) {
|
|
|
9610
9610
|
drillTab,
|
|
9611
9611
|
classify: classify3,
|
|
9612
9612
|
pageSize: railPageSize,
|
|
9613
|
-
activeStatuses,
|
|
9613
|
+
activeStatuses: resolvedActiveStatuses,
|
|
9614
9614
|
searchCorpus: ruleSearchCorpus
|
|
9615
9615
|
});
|
|
9616
9616
|
const {
|
|
@@ -9631,13 +9631,13 @@ function RecordsAdminShellInner(props) {
|
|
|
9631
9631
|
ctx,
|
|
9632
9632
|
scopeKind: "rule",
|
|
9633
9633
|
enabled: true,
|
|
9634
|
-
activeStatuses
|
|
9634
|
+
activeStatuses: resolvedActiveStatuses
|
|
9635
9635
|
});
|
|
9636
9636
|
const globalScopedList = useRecordList({
|
|
9637
9637
|
ctx,
|
|
9638
9638
|
scopeKind: "collection",
|
|
9639
9639
|
enabled: cardinality === "singleton",
|
|
9640
|
-
activeStatuses
|
|
9640
|
+
activeStatuses: resolvedActiveStatuses
|
|
9641
9641
|
});
|
|
9642
9642
|
const pinnedProduct = useSingleProduct({
|
|
9643
9643
|
SL,
|
|
@@ -9662,7 +9662,7 @@ function RecordsAdminShellInner(props) {
|
|
|
9662
9662
|
if (cardinality !== "singleton") return [];
|
|
9663
9663
|
if (recordList.isLoading) return [];
|
|
9664
9664
|
if (recordList.isFetchingNextPage || recordList.hasNextPage) return [];
|
|
9665
|
-
return groupSingletonConflicts(recordList.items,
|
|
9665
|
+
return groupSingletonConflicts(recordList.items, resolvedActiveStatuses);
|
|
9666
9666
|
},
|
|
9667
9667
|
[
|
|
9668
9668
|
cardinality,
|
|
@@ -9670,7 +9670,7 @@ function RecordsAdminShellInner(props) {
|
|
|
9670
9670
|
recordList.isLoading,
|
|
9671
9671
|
recordList.isFetchingNextPage,
|
|
9672
9672
|
recordList.hasNextPage,
|
|
9673
|
-
|
|
9673
|
+
resolvedActiveStatuses
|
|
9674
9674
|
]
|
|
9675
9675
|
);
|
|
9676
9676
|
const hasSingletonConflicts = singletonConflicts.length > 0;
|
|
@@ -10214,7 +10214,7 @@ function RecordsAdminShellInner(props) {
|
|
|
10214
10214
|
};
|
|
10215
10215
|
function buildLifecycleAction(record) {
|
|
10216
10216
|
if (!record.id) return null;
|
|
10217
|
-
const allow =
|
|
10217
|
+
const allow = resolvedActiveStatuses;
|
|
10218
10218
|
const s = record.lifecycleStatus;
|
|
10219
10219
|
const active = s == null || s === "" || allow.includes(s);
|
|
10220
10220
|
const next = active ? "archived" : "active";
|
|
@@ -11013,10 +11013,10 @@ function RecordsAdminShellInner(props) {
|
|
|
11013
11013
|
return leftItems.filter((r) => {
|
|
11014
11014
|
const s = r.lifecycleStatus;
|
|
11015
11015
|
if (s == null || s === "") return true;
|
|
11016
|
-
const allow =
|
|
11016
|
+
const allow = resolvedActiveStatuses;
|
|
11017
11017
|
return allow.includes(s);
|
|
11018
11018
|
});
|
|
11019
|
-
}, [leftItems, railShowsHistoryDisclosure,
|
|
11019
|
+
}, [leftItems, railShowsHistoryDisclosure, resolvedActiveStatuses]);
|
|
11020
11020
|
const railHistoryBySlot = useMemo(() => {
|
|
11021
11021
|
if (!railShowsHistoryDisclosure) return void 0;
|
|
11022
11022
|
return recordList.historyBySlot;
|