@aventurevc/api-schemas 0.8.341 → 0.8.342

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.
@@ -226,6 +226,7 @@ declare const EntityNaturalSearchSchemaDefinition: z.ZodObject<{
226
226
  search: z.ZodType<{
227
227
  answerModel?: string | null | undefined;
228
228
  cacheMode?: "bypass" | "refresh" | "use" | undefined;
229
+ freshness?: "auto" | "cached" | undefined;
229
230
  mode?: string | undefined;
230
231
  model?: string | null | undefined;
231
232
  modelCatalogRevision?: number | null | undefined;
@@ -236,6 +237,7 @@ declare const EntityNaturalSearchSchemaDefinition: z.ZodObject<{
236
237
  }, import("../natural/search.ts").NaturalSearchSchemaInput, z.core.$ZodTypeInternals<{
237
238
  answerModel?: string | null | undefined;
238
239
  cacheMode?: "bypass" | "refresh" | "use" | undefined;
240
+ freshness?: "auto" | "cached" | undefined;
239
241
  mode?: string | undefined;
240
242
  model?: string | null | undefined;
241
243
  modelCatalogRevision?: number | null | undefined;
@@ -229,6 +229,10 @@ declare const FederatedNaturalSearchSchemaDefinition: z.ZodObject<{
229
229
  min?: number | null | undefined;
230
230
  }, import("../int/range.ts").IntRangeSchemaInput>>>>;
231
231
  }, z.core.$strict>>;
232
+ freshness: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
233
+ auto: "auto";
234
+ cached: "cached";
235
+ }>>>;
232
236
  mode: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
233
237
  auto: "auto";
234
238
  exact: "exact";
@@ -3,6 +3,7 @@ import { z } from "zod/v4";
3
3
  import { EntityFilterSchema } from "../entity/filter.js";
4
4
  import { ReasoningEffortSchema } from "../reasoning/effort.js";
5
5
  import { SearchCacheModeSchema } from "../search/cache-mode.js";
6
+ import { SearchFreshnessSchema } from "../search/freshness.js";
6
7
  import { SearchModeSchema } from "../search/mode.js";
7
8
  const FederatedNaturalSearchSchemaDefinition = z.object({
8
9
  /** Optional supported model for the written answer, which also supplies the page heading, title, and description. Omit it to use the default; an unsupported model answers 422. */
@@ -11,6 +12,8 @@ const FederatedNaturalSearchSchemaDefinition = z.object({
11
12
  cacheMode: SearchCacheModeSchema.default("use").optional(),
12
13
  /** Explicit entity constraints for the entity scope only, as on POST /v1/search/natural/entities: caller-supplied fields override planner values. The person and news scopes ignore it. Omitted defaults suppress non-operating entities, matching the aventure.vc search page; natural entity search is unchanged. */
13
14
  entityFilter: EntityFilterSchema.optional(),
15
+ /** auto refreshes date-sensitive queries before cache admission; cached permits ordinary cache reuse. Explicit admitted bypass or refresh wins. */
16
+ freshness: SearchFreshnessSchema.default("auto").optional(),
14
17
  /** Search strategy to run. Defaults to `auto`: the fast name layer runs first (a single-token query as keyword search, a multiword query as an exact normalized name) and the language-model planner runs only on a miss, so name lookups never pay for planning. Any other value forces exactly that strategy: `exact` and `keyword` skip planner model resolution and its rate limit. Entity and person natural-search take every value but `hybrid`; news and federated search accept only `auto` and `keyword`; content search accepts `auto`, `keyword`, `semantic`, and `hybrid` (`semantic` and `hybrid` only for one entity's or person's content). */
15
18
  mode: SearchModeSchema.default("auto").optional(),
16
19
  /** Optional supported model for planning the search. Omit it to use the default; an unsupported model answers 422. */
@@ -6,6 +6,10 @@ declare const NaturalSearchSchemaDefinition: z.ZodObject<{
6
6
  refresh: "refresh";
7
7
  use: "use";
8
8
  }>>>;
9
+ freshness: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
10
+ auto: "auto";
11
+ cached: "cached";
12
+ }>>>;
9
13
  mode: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
10
14
  auto: "auto";
11
15
  exact: "exact";
@@ -2,12 +2,15 @@
2
2
  import { z } from "zod/v4";
3
3
  import { ReasoningEffortSchema } from "../reasoning/effort.js";
4
4
  import { SearchCacheModeSchema } from "../search/cache-mode.js";
5
+ import { SearchFreshnessSchema } from "../search/freshness.js";
5
6
  import { SearchModeSchema } from "../search/mode.js";
6
7
  const NaturalSearchSchemaDefinition = z.object({
7
8
  /** Optional supported model for the written answer, which also supplies the page heading, title, and description. Omit it to use the default; an unsupported model answers 422. */
8
9
  answerModel: z.string().nullish(),
9
10
  /** Cache policy. use reuses earlier search work; bypass and refresh compute fresh results and are honored only for accounts with private-data access. */
10
11
  cacheMode: SearchCacheModeSchema.default("use").optional(),
12
+ /** auto refreshes date-sensitive queries before cache admission; cached permits ordinary cache reuse. Explicit admitted bypass or refresh wins. */
13
+ freshness: SearchFreshnessSchema.default("auto").optional(),
11
14
  /** Search strategy to run. Defaults to `auto`: the fast name layer runs first (a single-token query as keyword search, a multiword query as an exact normalized name) and the language-model planner runs only on a miss, so name lookups never pay for planning. Any other value forces exactly that strategy: `exact` and `keyword` skip planner model resolution and its rate limit. Entity and person natural-search take every value but `hybrid`; news and federated search accept only `auto` and `keyword`; content search accepts `auto`, `keyword`, `semantic`, and `hybrid` (`semantic` and `hybrid` only for one entity's or person's content). */
12
15
  mode: SearchModeSchema.default("auto").optional(),
13
16
  /** Optional supported model for planning the search. Omit it to use the default; an unsupported model answers 422. */
@@ -1173,6 +1173,7 @@ export const OPENAPI_COMPONENT_MANIFEST = Object.freeze({
1173
1173
  modulePath: "search/evidence-source",
1174
1174
  schemaName: "SearchEvidenceSourceSchema",
1175
1175
  },
1176
+ SearchFreshness: { modulePath: "search/freshness", schemaName: "SearchFreshnessSchema" },
1176
1177
  SearchHit: { modulePath: "search/hit", schemaName: "SearchHitSchema" },
1177
1178
  SearchIntent: { modulePath: "search/intent", schemaName: "SearchIntentSchema" },
1178
1179
  SearchInterpretation: {
@@ -551,6 +551,7 @@ declare const PersonNaturalSearchSchemaDefinition: z.ZodObject<{
551
551
  search: z.ZodType<{
552
552
  answerModel?: string | null | undefined;
553
553
  cacheMode?: "bypass" | "refresh" | "use" | undefined;
554
+ freshness?: "auto" | "cached" | undefined;
554
555
  mode?: string | undefined;
555
556
  model?: string | null | undefined;
556
557
  modelCatalogRevision?: number | null | undefined;
@@ -561,6 +562,7 @@ declare const PersonNaturalSearchSchemaDefinition: z.ZodObject<{
561
562
  }, import("../natural/search.ts").NaturalSearchSchemaInput, z.core.$ZodTypeInternals<{
562
563
  answerModel?: string | null | undefined;
563
564
  cacheMode?: "bypass" | "refresh" | "use" | undefined;
565
+ freshness?: "auto" | "cached" | undefined;
564
566
  mode?: string | undefined;
565
567
  model?: string | null | undefined;
566
568
  modelCatalogRevision?: number | null | undefined;
@@ -3,14 +3,17 @@ import { z } from "zod/v4";
3
3
  * Search-stage cache policy: use reuses completed and in-flight work; bypass computes independently without retaining search outputs; refresh computes independently and replaces the normal cache entry. Immutable query vectors and canonical record caches retain their own cache policy.
4
4
  *
5
5
  * @openapiSchema SearchCacheMode
6
+ * @endpoint GET /v1/web/searches/jobs/{jobId}
6
7
  * @endpoint POST /v1/content/search
7
8
  * @endpoint POST /v1/entities/{entityId}/content/search
8
9
  * @endpoint POST /v1/people/{personId}/content/search
9
10
  * @endpoint POST /v1/search
10
11
  * @endpoint POST /v1/search/natural/entities
11
12
  * @endpoint POST /v1/search/natural/people
13
+ * @endpoint POST /v1/web/search
12
14
  * @usedBySchema FederatedNaturalSearchSchema
13
15
  * @usedBySchema NaturalSearchSchema
16
+ * @usedBySchema SearchSchema
14
17
  * @contractShape search.cache-mode
15
18
  * @contractRole canonical
16
19
  */
@@ -4,14 +4,17 @@ import { z } from "zod/v4";
4
4
  * Search-stage cache policy: use reuses completed and in-flight work; bypass computes independently without retaining search outputs; refresh computes independently and replaces the normal cache entry. Immutable query vectors and canonical record caches retain their own cache policy.
5
5
  *
6
6
  * @openapiSchema SearchCacheMode
7
+ * @endpoint GET /v1/web/searches/jobs/{jobId}
7
8
  * @endpoint POST /v1/content/search
8
9
  * @endpoint POST /v1/entities/{entityId}/content/search
9
10
  * @endpoint POST /v1/people/{personId}/content/search
10
11
  * @endpoint POST /v1/search
11
12
  * @endpoint POST /v1/search/natural/entities
12
13
  * @endpoint POST /v1/search/natural/people
14
+ * @endpoint POST /v1/web/search
13
15
  * @usedBySchema FederatedNaturalSearchSchema
14
16
  * @usedBySchema NaturalSearchSchema
17
+ * @usedBySchema SearchSchema
15
18
  * @contractShape search.cache-mode
16
19
  * @contractRole canonical
17
20
  */
@@ -0,0 +1,25 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * auto refreshes relative/current queries and explicit dates from the last 90 days through tomorrow, using UTC. cached permits normal cache reuse for those queries. Explicit bypass or refresh always wins.
4
+ *
5
+ * @openapiSchema SearchFreshness
6
+ * @endpoint GET /v1/web/searches/jobs/{jobId}
7
+ * @endpoint POST /v1/content/search
8
+ * @endpoint POST /v1/entities/{entityId}/content/search
9
+ * @endpoint POST /v1/people/{personId}/content/search
10
+ * @endpoint POST /v1/search
11
+ * @endpoint POST /v1/search/natural/entities
12
+ * @endpoint POST /v1/search/natural/people
13
+ * @endpoint POST /v1/web/search
14
+ * @usedBySchema FederatedNaturalSearchSchema
15
+ * @usedBySchema NaturalSearchSchema
16
+ * @usedBySchema SearchSchema
17
+ * @contractShape search.freshness
18
+ * @contractRole canonical
19
+ */
20
+ export declare const SearchFreshnessSchema: z.ZodEnum<{
21
+ auto: "auto";
22
+ cached: "cached";
23
+ }>;
24
+ export type SearchFreshness = z.infer<typeof SearchFreshnessSchema>;
25
+ //# sourceMappingURL=freshness.d.ts.map
@@ -0,0 +1,22 @@
1
+ // LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
2
+ import { z } from "zod/v4";
3
+ /**
4
+ * auto refreshes relative/current queries and explicit dates from the last 90 days through tomorrow, using UTC. cached permits normal cache reuse for those queries. Explicit bypass or refresh always wins.
5
+ *
6
+ * @openapiSchema SearchFreshness
7
+ * @endpoint GET /v1/web/searches/jobs/{jobId}
8
+ * @endpoint POST /v1/content/search
9
+ * @endpoint POST /v1/entities/{entityId}/content/search
10
+ * @endpoint POST /v1/people/{personId}/content/search
11
+ * @endpoint POST /v1/search
12
+ * @endpoint POST /v1/search/natural/entities
13
+ * @endpoint POST /v1/search/natural/people
14
+ * @endpoint POST /v1/web/search
15
+ * @usedBySchema FederatedNaturalSearchSchema
16
+ * @usedBySchema NaturalSearchSchema
17
+ * @usedBySchema SearchSchema
18
+ * @contractShape search.freshness
19
+ * @contractRole canonical
20
+ */
21
+ export const SearchFreshnessSchema = z.enum(["auto", "cached"]);
22
+ //# sourceMappingURL=freshness.js.map
@@ -3,12 +3,21 @@ declare const SearchSchemaDefinition: z.ZodObject<{
3
3
  allowSuspectedShellStrip: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
4
4
  bypassCache: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5
5
  cacheKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ cacheMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
7
+ bypass: "bypass";
8
+ refresh: "refresh";
9
+ use: "use";
10
+ }>>>;
6
11
  cacheSource: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
7
12
  ANY: "ANY";
8
13
  PROVIDER: "PROVIDER";
9
14
  }>>>;
10
15
  deep: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
11
16
  deferredAiOverview: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
17
+ freshness: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
18
+ auto: "auto";
19
+ cached: "cached";
20
+ }>>>;
12
21
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
22
  provider: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
14
23
  BRIGHT_DATA: "BRIGHT_DATA";
@@ -1,6 +1,8 @@
1
1
  // LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
2
2
  import { z } from "zod/v4";
3
3
  import { EntityPersonOwnerSchema } from "../entity/person-owner.js";
4
+ import { SearchCacheModeSchema } from "./cache-mode.js";
5
+ import { SearchFreshnessSchema } from "./freshness.js";
4
6
  import { WebSearchCacheSourceSchema } from "../web/search-cache-source.js";
5
7
  import { WebSearchProviderSchema } from "../web/search-provider.js";
6
8
  import { WebSearchRecencySchema } from "../web/search-recency.js";
@@ -11,12 +13,16 @@ const SearchSchemaDefinition = z.object({
11
13
  bypassCache: z.boolean().default(false).optional(),
12
14
  /** Stable lookup text for cache keying when generated search text varies between runs */
13
15
  cacheKey: z.string().nullish(),
16
+ /** use permits cached provider evidence; bypass and refresh require a new provider search. Captured evidence is always archived. Legacy bypassCache=true wins. */
17
+ cacheMode: SearchCacheModeSchema.default("use").optional(),
14
18
  /** Permit compatible cached results from ANY provider by default, or restrict to PROVIDER. The provider field independently selects live misses; bypassCache skips every provider's cache. document.provider identifies the serving source. */
15
19
  cacheSource: WebSearchCacheSourceSchema.default("ANY").optional(),
16
20
  /** Deprecated alias for `provider: EXA_DEEP`; `true` with any other `provider` is refused with 400. */
17
21
  deep: z.boolean().default(false).optional(),
18
22
  /** Wait in-request for Google's AI Overview when Google defers it to a follow-up request, as it does for most company and person lookups: one extra SerpAPI search per overview not already stored. An explicit `true` also reruns a stored search older than SerpAPI's one-hour cache to get a fresh token (its one-minute overview token expired and the cache would return it unchanged). Without it, no deferred overview is fetched; one an earlier fetch stored still comes back at no extra cost. A fetch that returns no overview is not retried for six hours. An overview Google returns inline always comes back in `aiOverview` at no extra cost. Exa results never carry one. */
19
23
  deferredAiOverview: z.boolean().default(false).optional(),
24
+ /** auto refreshes date-sensitive queries before cache admission; cached permits ordinary cache reuse. Explicit cacheMode bypass/refresh or bypassCache wins. */
25
+ freshness: SearchFreshnessSchema.default("auto").optional(),
20
26
  /** Search language code */
21
27
  language: z.string().nullish(),
22
28
  /** Provider to search; omitted keeps the default, SerpAPI. EXA runs Exa's instant search with highlights and never falls back to SerpAPI: an Exa failure answers 503. EXA_DEEP runs Exa's slower, broader deep search (higher recall for market and provider questions, about 3-6 s) and falls back to SerpAPI on an Exa failure. Both Exa providers answer synchronously (`Prefer: respond-async` does not apply), are stored apart from SerpAPI results, and are charged like any search. */
@@ -104,9 +104,11 @@ declare const WebSearchSchemaDefinition: z.ZodObject<{
104
104
  allowSuspectedShellStrip?: boolean | null | undefined;
105
105
  bypassCache?: boolean | undefined;
106
106
  cacheKey?: string | null | undefined;
107
+ cacheMode?: "bypass" | "refresh" | "use" | undefined;
107
108
  cacheSource?: "ANY" | "PROVIDER" | undefined;
108
109
  deep?: boolean | undefined;
109
110
  deferredAiOverview?: boolean | undefined;
111
+ freshness?: "auto" | "cached" | undefined;
110
112
  language?: string | null | undefined;
111
113
  provider?: string | null | undefined;
112
114
  recency?: "DAY" | "MONTH" | "WEEK" | "YEAR" | null | undefined;
@@ -122,9 +124,11 @@ declare const WebSearchSchemaDefinition: z.ZodObject<{
122
124
  allowSuspectedShellStrip?: boolean | null | undefined;
123
125
  bypassCache?: boolean | undefined;
124
126
  cacheKey?: string | null | undefined;
127
+ cacheMode?: "bypass" | "refresh" | "use" | undefined;
125
128
  cacheSource?: "ANY" | "PROVIDER" | undefined;
126
129
  deep?: boolean | undefined;
127
130
  deferredAiOverview?: boolean | undefined;
131
+ freshness?: "auto" | "cached" | undefined;
128
132
  language?: string | null | undefined;
129
133
  provider?: string | null | undefined;
130
134
  recency?: "DAY" | "MONTH" | "WEEK" | "YEAR" | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aventurevc/api-schemas",
3
- "version": "0.8.341",
3
+ "version": "0.8.342",
4
4
  "private": false,
5
5
  "description": "Zod v4 schemas and TypeScript types for the aVenture API.",
6
6
  "license": "Apache-2.0",