target-supabase-sdk 0.2.19 → 0.2.21
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/browser.d.ts +2 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/chunks/{task-queue-CUa40Vb5.js → task-queue-FygwujNS.js} +44 -2
- package/dist/chunks/task-queue-FygwujNS.js.map +1 -0
- package/dist/node.js +2 -2
- package/dist/shared/review/index.d.ts +7 -0
- package/dist/shared/review/index.d.ts.map +1 -0
- package/dist/shared/review/review.build.d.ts +16 -0
- package/dist/shared/review/review.build.d.ts.map +1 -0
- package/dist/shared/review/review.interface.d.ts +14 -0
- package/dist/shared/review/review.interface.d.ts.map +1 -0
- package/dist/shared/review/review.query.d.ts +7 -0
- package/dist/shared/review/review.query.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/browser.ts +2 -0
- package/src/shared/review/README.md +127 -0
- package/src/shared/review/index.ts +7 -0
- package/src/shared/review/review.build.ts +34 -0
- package/src/shared/review/review.interface.ts +19 -0
- package/src/shared/review/review.query.ts +16 -0
- package/dist/chunks/task-queue-CUa40Vb5.js.map +0 -1
package/dist/node.js
CHANGED
|
@@ -6,8 +6,8 @@ export { C as CLI_PROD_FLAG, S as SERVICE_ENV_PROFILE_ENV_KEY, w as SERVICE_ENV_
|
|
|
6
6
|
import { randomBytes, createHash } from 'node:crypto';
|
|
7
7
|
import { readFile, unlink, mkdir, writeFile, rename, access, stat, readdir, constants } from 'node:fs/promises';
|
|
8
8
|
import { dirname, resolve, join, isAbsolute } from 'node:path';
|
|
9
|
-
import {
|
|
10
|
-
export { A as ApiMethod, C as CategoryConfig, a as CategoryExtraction, d as CategoryParcel, f as CategoryService, g as CategoryTask, D as DEFAULT_SYSTEM_REGISTRY_SEED_SLOTS,
|
|
9
|
+
import { bx as sha256Hex, bD as getErrorMessage, bE as LOG_TOPIC_NODE, a_ as postRegisterNode, aE as patchChangeNodeStatus, N as NodeStatus, aP as patchStopNode, aM as patchNodeHeartBeat, E as EMPTY_REGISTRY_SLOT_RUNTIME_STATE, bn as runRegistrySlotGuardCheck, bc as registrySlotRuntimePatchFromGuardResult, c as CategoryNode, a1 as evaluateBusyNodeLiveness, aO as patchServiceRuntime, at as isLogEntry, J as claimServiceRegistrySlot, m as ServiceRegistryError, a4 as fetchWithRetry, aw as isRetryableHttpStatus, a3 as fetchBinaryWithRetry, av as isOpaqueChunkUrl, e as CategoryRepo, aq as isHttpUrl, bF as isFeedIngestSource, bG as resolveFeedOriginalStorageProvider, b as CategoryLink, bH as buildFeedTagList, ap as isFeedValue, an as guessMediaMime, M as MEDIA_CONTENT_HASH_ALGORITHM, au as isMediaValue, ay as mediaLinkDedupFilters, B as buildMediaLinkDraft, R as ResultCode, bI as LOG_TOPIC_TASK, o as TASK_REPO_USAGE, ah as getScanRemoteRepoValues, aI as patchClaimTask, bJ as CRITICAL_UNKNOWN_TASK_TRACE_ID, aG as patchChangeTaskStatus, q as TaskStatusAction, bK as toError, b6 as postTaskSchema, bL as createTaskRow, p as TaskStatus } from './chunks/task-queue-FygwujNS.js';
|
|
10
|
+
export { A as ApiMethod, C as CategoryConfig, a as CategoryExtraction, d as CategoryParcel, f as CategoryService, g as CategoryTask, D as DEFAULT_SYSTEM_REGISTRY_SEED_SLOTS, bM as FEED_INGEST_SOURCES, F as FEED_VALUES, L as LINK_MANIFEST_VERSION, h as LIST_MANIFEST_VERSION, i as MEDIA_CONTENT_HASH_PREFIX_LENGTH, j as MEDIA_VALUES, P as POST_TASK_DEFAULT_MAX_ATTEMPTS, k as ParcelManager, l as PostLinkValidator, S as ServiceLifecycleStatus, n as ServiceSlotStatus, T as TARGET_SYSTEM_REGISTRY_KEY, r as apiDetailsSchema, s as appendSystemRegistryEmptySlots, t as assertRegistrySlotAvailable, u as assertRegistrySlotOwner, v as buildEmptyServiceSlots, w as buildFeedLinkDraft, x as buildFeedLinkName, y as buildLinkTargetDraft, z as buildListTargetDraft, G as buildMediaNameFromLocator, H as buildReviewLinkDraft, I as buildSystemRegistryConfigDetails, K as classifyNetworkError, O as countTasksByType, Q as createActiveServiceLifecycle, U as createClaimedRegistrySlotRuntimeState, V as createStorageProviderRegistry, W as createUploadTracker, X as decodeLogBatch, Y as decodeLogBatchList, Z as defaultL3ServiceDetails, _ as deleteParcel, $ as deleteParcelSchema, a0 as escapeIlikePattern, a2 as feedLinkDedupFilters, a5 as fieldDefinitionSchema, a6 as flattenLogBatch, a7 as flattenLogBatches, a8 as formatNetworkError, a9 as getApi, aa as getApiSchema, ab as getConfig, ac as getConfigSchema, ad as getExtraction, ae as getExtractionSchema, af as getParcel, ag as getParcelSchema, ai as getScanRemoteRepoValuesSchema, aj as getService, ak as getServiceSchema, al as getTargetSystemRegistry, am as getValueAtPath, ao as installChunkFetchRegistry, ar as isLocalFilesystemPath, as as isLogBatchList, ax as linkTargetDraftBuildInputSchema, az as parcelDetailsSchema, aA as parseLogBatchMeta, aB as parseProviderPrefixedUrl, aC as parseServiceSlot, aD as parseServiceSlots, aF as patchChangeNodeStatusSchema, aH as patchChangeTaskStatusSchema, aJ as patchClaimTaskSchema, aK as patchExtractionObjects, aL as patchExtractionObjectsSchema, aN as patchNodeHeartBeatSchema, aQ as patchStopNodeSchema, aR as patchTaskProgress, aS as patchTaskProgressSchema, aT as postApi, aU as postApiSchema, aV as postExtraction, aW as postExtractionSchema, aX as postLinkCreate, aY as postParcel, aZ as postParcelSchema, a$ as postRegisterNodeSchema, b0 as postService, b1 as postServiceInstance, b2 as postServiceSchema, b3 as postSystemRegistryConfig, b4 as postSystemRegistryConfigSchema, b5 as postTask, b7 as postTaskWithRetry, b8 as publishParcel, b9 as registerProviderChunkResolver, ba as registerService, bb as registerServiceAtStartup, bd as releaseSystemRegistrySlots, be as releaseSystemRegistrySlotsByServiceId, bf as requestHasBody, bg as resetSystemRegistryConfig, bh as resetSystemRegistryConfigSchema, bi as resolveActiveRegistryServiceId, bj as resolveFetchUrl, bk as restoreParcel, bl as restoreParcelById, bm as reviewLinksForNameFilters, bo as sanitizeFileName, bp as sanitizeParcelFileName, bq as scanExtractionList, br as scanExtractionListSchema, bs as schemaDefinitionSchema, bt as serviceDetailsSchema, bu as serviceLifecycleSchema, bv as serviceNodeSnapshotSchema, bw as serviceRuntimeSchema, by as summarizeTaskQueue, bz as systemRegistrySeedSlotSchema, bA as toPostgrestTextArrayLiteral, bB as unregisterService, bC as unregisterServiceAtShutdown } from './chunks/task-queue-FygwujNS.js';
|
|
11
11
|
import { spawn } from 'node:child_process';
|
|
12
12
|
import { ProxyAgent } from 'undici';
|
|
13
13
|
import { tmpdir } from 'node:os';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review Link — browser-safe barrel.
|
|
3
|
+
*/
|
|
4
|
+
export type { BuildReviewLinkDraftInput } from "./review.build";
|
|
5
|
+
export { buildReviewLinkDraft } from "./review.build";
|
|
6
|
+
export { reviewLinksForNameFilters } from "./review.query";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/review/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TargetDraft } from "../../core.interface";
|
|
2
|
+
import type { Link } from "../../link/link.interface";
|
|
3
|
+
export interface BuildReviewLinkDraftInput {
|
|
4
|
+
/** Written to `Link.name` (caller-defined; often a subject Target id). */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Interaction payload — written to `Link.details.original`. */
|
|
7
|
+
original: unknown;
|
|
8
|
+
tagList?: string[];
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Assemble a review {@link Link} draft (`category=link`, `loaderKey === value === "review"`).
|
|
13
|
+
* Does not validate `name` or write to Supabase.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildReviewLinkDraft(input: BuildReviewLinkDraftInput): TargetDraft<Link>;
|
|
16
|
+
//# sourceMappingURL=review.build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.build.d.ts","sourceRoot":"","sources":["../../../src/shared/review/review.build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGtD,MAAM,WAAW,yBAAyB;IACtC,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,WAAW,CAAC,IAAI,CAAC,CAexF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review Link protocol — Link rows with `value` / `loaderKey` === {@link REVIEW_VALUE}.
|
|
3
|
+
* No separate Target category; category remains `link`.
|
|
4
|
+
*
|
|
5
|
+
* A Review records one user interaction; `Link.name` is caller-defined (often a subject Target id).
|
|
6
|
+
* Many review Links may share the same `name`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const REVIEW_VALUE: "review";
|
|
9
|
+
/** Discriminator stored in both `Link.value` and `details.loaderKey`. */
|
|
10
|
+
export type ReviewValue = typeof REVIEW_VALUE;
|
|
11
|
+
/** Caller-defined payload stored in `Link.details.original`. */
|
|
12
|
+
export type ReviewOriginal = unknown;
|
|
13
|
+
export declare function isReviewValue(value: string): value is ReviewValue;
|
|
14
|
+
//# sourceMappingURL=review.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.interface.d.ts","sourceRoot":"","sources":["../../../src/shared/review/review.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,YAAY,EAAG,QAAiB,CAAC;AAE9C,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC;AAE9C,gEAAgE;AAChE,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;AAErC,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { QueryFilter } from "../../core.interface";
|
|
2
|
+
/**
|
|
3
|
+
* Filters for review Links with `Link.name === name`.
|
|
4
|
+
* Many rows may match — the SDK does not define dedup for reviews.
|
|
5
|
+
*/
|
|
6
|
+
export declare function reviewLinksForNameFilters(name: string): QueryFilter[];
|
|
7
|
+
//# sourceMappingURL=review.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.query.d.ts","sourceRoot":"","sources":["../../../src/shared/review/review.query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAOrE"}
|
package/package.json
CHANGED
package/src/browser.ts
CHANGED
|
@@ -241,6 +241,8 @@ export {
|
|
|
241
241
|
MEDIA_VALUES,
|
|
242
242
|
mediaLinkDedupFilters,
|
|
243
243
|
} from "./shared/media";
|
|
244
|
+
export type { BuildReviewLinkDraftInput } from "./shared/review";
|
|
245
|
+
export { buildReviewLinkDraft, reviewLinksForNameFilters } from "./shared/review";
|
|
244
246
|
export { isHttpUrl, resolveFetchUrl } from "./shared/utils/fetch-url";
|
|
245
247
|
export { getValueAtPath } from "./shared/utils/get-value-at-path";
|
|
246
248
|
export type {
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Review Links (`shared/review`)
|
|
2
|
+
|
|
3
|
+
Review is a **convention on `Link`**, not a new Target category (`category` stays `link`).
|
|
4
|
+
|
|
5
|
+
A **Review** records **one user interaction** (for example: open, play, complete, rate, dismiss). **Each interaction creates a new Review row.** **Many review Links may share the same `Link.name`** — the SDK does not define dedup or idempotent create for reviews.
|
|
6
|
+
|
|
7
|
+
All review code lives under **`src/shared/review/`**. There is no Node-only ingest layer (unlike feed/media register flows) — create drafts on any host and persist with `postTarget` / `createTarget`.
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
src/shared/review/
|
|
11
|
+
index.ts
|
|
12
|
+
review.interface.ts
|
|
13
|
+
review.build.ts
|
|
14
|
+
review.query.ts
|
|
15
|
+
README.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Package entry
|
|
19
|
+
|
|
20
|
+
| Consumer import | What you get |
|
|
21
|
+
|-----------------|--------------|
|
|
22
|
+
| `from "target-supabase-sdk"` | Draft builder, list filters |
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import {
|
|
26
|
+
buildReviewLinkDraft,
|
|
27
|
+
reviewLinksForNameFilters,
|
|
28
|
+
} from "target-supabase-sdk";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Meaning
|
|
34
|
+
|
|
35
|
+
| Concept | Where it lives |
|
|
36
|
+
|---------|----------------|
|
|
37
|
+
| Grouping key | `Link.name` — caller-defined (often a subject Target id, not required) |
|
|
38
|
+
| Interaction body | `Link.details.original` — caller-defined JSON-serializable payload |
|
|
39
|
+
| Review kind | Fixed `Link.value` / `details.loaderKey` = `"review"` |
|
|
40
|
+
| Labels | Optional `tagList` (e.g. interaction type, client, experiment) |
|
|
41
|
+
|
|
42
|
+
Each persisted Review is its **own** Target row (its own `id`). Repeating the same `name` is expected when listing interaction history under one grouping key.
|
|
43
|
+
|
|
44
|
+
`details.original` is intentionally **untyped** (`unknown`) in the SDK so products can store scores, dwell time, UI state, model output, etc., without a shared schema in this package.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Create input → Link mapping
|
|
49
|
+
|
|
50
|
+
Built via `buildReviewLinkDraft` → `buildLinkTargetDraft`.
|
|
51
|
+
|
|
52
|
+
| Create field | Required | Link field |
|
|
53
|
+
|--------------|----------|------------|
|
|
54
|
+
| `name` | yes | `name` |
|
|
55
|
+
| `original` | yes | `details.original` |
|
|
56
|
+
| `tagList` | no | `tagList` (default `[]`) |
|
|
57
|
+
| `description` | no | `details.description` (default `""`) |
|
|
58
|
+
|
|
59
|
+
Fixed at build time (not on create input):
|
|
60
|
+
|
|
61
|
+
| Link field | Value |
|
|
62
|
+
|------------|--------|
|
|
63
|
+
| `value` | `"review"` |
|
|
64
|
+
| `category` | `link` |
|
|
65
|
+
| `details.loaderKey` | `"review"` |
|
|
66
|
+
| `details.manifestVersion` | `0` |
|
|
67
|
+
| `details.preview` | `""` |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Example
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import { buildReviewLinkDraft } from "target-supabase-sdk";
|
|
75
|
+
import { postTarget } from "target-supabase-sdk"; // or your create API
|
|
76
|
+
|
|
77
|
+
const draft = buildReviewLinkDraft({
|
|
78
|
+
name: subjectTargetId,
|
|
79
|
+
original: {
|
|
80
|
+
action: "complete",
|
|
81
|
+
progress: 1,
|
|
82
|
+
at: new Date().toISOString(),
|
|
83
|
+
},
|
|
84
|
+
tagList: ["client:web"],
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
await postTarget(draft);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Every interaction: build a new draft (same `name` is fine) and insert again.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Query
|
|
95
|
+
|
|
96
|
+
List review Links sharing a `Link.name`:
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { reviewLinksForNameFilters, scanTargetList } from "target-supabase-sdk";
|
|
100
|
+
|
|
101
|
+
const reviews = await scanTargetList({
|
|
102
|
+
filters: reviewLinksForNameFilters(subjectTargetId),
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Filters: `category=link`, `value=review`, `name=<trimmed name>`. Use pagination / `scanTargetList` when history is long.
|
|
107
|
+
|
|
108
|
+
There is **no** SDK helper for dedup or “find existing review” — callers always create new rows unless they add their own policy.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Recognizing review Links
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
if (link.category === "link" && link.value === "review") {
|
|
116
|
+
const groupingKey = link.name;
|
|
117
|
+
const payload = link.details.original;
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Related
|
|
124
|
+
|
|
125
|
+
- `src/link/link.build.ts` — `buildLinkTargetDraft`
|
|
126
|
+
- `src/shared/media/README.md` — same Link-convention pattern for media
|
|
127
|
+
- `src/shared/feed/README.md` — feed Links with richer lifecycle
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TargetDraft } from "../../core.interface";
|
|
2
|
+
import { buildLinkTargetDraft } from "../../link/link.build";
|
|
3
|
+
import type { Link } from "../../link/link.interface";
|
|
4
|
+
import { REVIEW_VALUE } from "./review.interface";
|
|
5
|
+
|
|
6
|
+
export interface BuildReviewLinkDraftInput {
|
|
7
|
+
/** Written to `Link.name` (caller-defined; often a subject Target id). */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Interaction payload — written to `Link.details.original`. */
|
|
10
|
+
original: unknown;
|
|
11
|
+
tagList?: string[];
|
|
12
|
+
description?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Assemble a review {@link Link} draft (`category=link`, `loaderKey === value === "review"`).
|
|
17
|
+
* Does not validate `name` or write to Supabase.
|
|
18
|
+
*/
|
|
19
|
+
export function buildReviewLinkDraft(input: BuildReviewLinkDraftInput): TargetDraft<Link> {
|
|
20
|
+
const name = input.name.trim();
|
|
21
|
+
if (name === "") {
|
|
22
|
+
throw new Error("buildReviewLinkDraft: name is empty");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return buildLinkTargetDraft({
|
|
26
|
+
name,
|
|
27
|
+
value: REVIEW_VALUE,
|
|
28
|
+
description: input.description ?? "",
|
|
29
|
+
preview: "",
|
|
30
|
+
loaderKey: REVIEW_VALUE,
|
|
31
|
+
tagList: input.tagList ?? [],
|
|
32
|
+
original: input.original,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review Link protocol — Link rows with `value` / `loaderKey` === {@link REVIEW_VALUE}.
|
|
3
|
+
* No separate Target category; category remains `link`.
|
|
4
|
+
*
|
|
5
|
+
* A Review records one user interaction; `Link.name` is caller-defined (often a subject Target id).
|
|
6
|
+
* Many review Links may share the same `name`.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const REVIEW_VALUE = "review" as const;
|
|
10
|
+
|
|
11
|
+
/** Discriminator stored in both `Link.value` and `details.loaderKey`. */
|
|
12
|
+
export type ReviewValue = typeof REVIEW_VALUE;
|
|
13
|
+
|
|
14
|
+
/** Caller-defined payload stored in `Link.details.original`. */
|
|
15
|
+
export type ReviewOriginal = unknown;
|
|
16
|
+
|
|
17
|
+
export function isReviewValue(value: string): value is ReviewValue {
|
|
18
|
+
return value === REVIEW_VALUE;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { QueryFilter } from "../../core.interface";
|
|
2
|
+
import { CategoryLink } from "../../link/link.interface";
|
|
3
|
+
import { REVIEW_VALUE } from "./review.interface";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Filters for review Links with `Link.name === name`.
|
|
7
|
+
* Many rows may match — the SDK does not define dedup for reviews.
|
|
8
|
+
*/
|
|
9
|
+
export function reviewLinksForNameFilters(name: string): QueryFilter[] {
|
|
10
|
+
const trimmed = name.trim();
|
|
11
|
+
return [
|
|
12
|
+
{ field: "category", operator: "eq", value: CategoryLink.LINK },
|
|
13
|
+
{ field: "value", operator: "eq", value: REVIEW_VALUE },
|
|
14
|
+
{ field: "name", operator: "eq", value: trimmed },
|
|
15
|
+
];
|
|
16
|
+
}
|