From f3e66d8fe2ae8a4ad2c3611fcb44a512728ca500 Mon Sep 17 00:00:00 2001 From: Aryan Date: Fri, 24 Jul 2026 14:29:27 +0530 Subject: [PATCH] chore: regenerate stale generated artifacts from the memories baseline toggle The memories baseline toggle (#8728) merged without regenerating the artifacts derived from the app-client OpenAPI contract, so several committed files drifted from source: - backend specs: app-client (+PATCH /v3/memories/{memory_id}/baseline), integration-public (+is_baseline field) - app-client client types: Dart memories_wire, Swift OmiApi.generated, TS omiApi.generated (web app / admin / personas, windows renderer) All add the same is_baseline field / baseline route; method counts and every other model are unchanged. The openapi-contract and generated-type contract checks have been red on main and on every PR based off it, and prod-eligibility inherits the failure. Regenerated with the repo's own generators (no hand edits): export_openapi.py --surface {app-client,integration-public} --write ... generate_dart_models.py --all generate_swift_openapi_types.py generate_ts_openapi_types.py Verified all three OpenAPI surfaces report "up to date" and re-running every generator reproduces the committed bytes, via the .openapi-venv (Python 3.11.15). Stacked on #10481, which exempts Sources/Generated/ from the desktop changelog gate so the regenerated Swift needs no changelog fragment. Co-Authored-By: Claude Opus 4.8 --- .../backend/schema/gen/memories_wire.g.dart | 4 + .../Sources/Generated/OmiApi.generated.swift | 35 +++++- .../src/renderer/src/lib/omiApi.generated.ts | 36 +++++- docs/api-reference/app-client-openapi.json | 104 ++++++++++++++++++ .../integration-public-openapi.json | 5 + .../lib/services/omi-api/omiApi.generated.ts | 36 +++++- web/app/src/lib/omiApi.generated.ts | 36 +++++- .../src/lib/omiApi.generated.ts | 36 +++++- 8 files changed, 286 insertions(+), 6 deletions(-) diff --git a/app/lib/backend/schema/gen/memories_wire.g.dart b/app/lib/backend/schema/gen/memories_wire.g.dart index 530d6455b84..56f6db7dd27 100644 --- a/app/lib/backend/schema/gen/memories_wire.g.dart +++ b/app/lib/backend/schema/gen/memories_wire.g.dart @@ -82,6 +82,7 @@ class GeneratedMemoryDB { final String? headline; final String id; final DateTime? invalidAt; + final bool isBaseline; final bool isLocked; final bool kgExtracted; final String? layer; @@ -122,6 +123,7 @@ class GeneratedMemoryDB { this.headline, required this.id, this.invalidAt, + this.isBaseline = false, this.isLocked = false, this.kgExtracted = false, required this.layer, @@ -164,6 +166,7 @@ class GeneratedMemoryDB { headline: _readFieldValue(_readField(json, const ["headline"]), "headline", _readString, requiredField: false, nullable: true), id: _required(_readFieldValue(_readField(json, const ["id"]), "id", _readString, requiredField: true, nullable: false), "id"), invalidAt: _readFieldValue(_readField(json, const ["invalid_at"]), "invalid_at", _readDateTime, requiredField: false, nullable: true), + isBaseline: _required(_readFieldValue(_readField(json, const ["is_baseline"]), "is_baseline", _readBool, requiredField: false, nullable: false, defaultValue: false), "is_baseline"), isLocked: _required(_readFieldValue(_readField(json, const ["is_locked"]), "is_locked", _readBool, requiredField: false, nullable: false, defaultValue: false), "is_locked"), kgExtracted: _required(_readFieldValue(_readField(json, const ["kg_extracted"]), "kg_extracted", _readBool, requiredField: false, nullable: false, defaultValue: false), "kg_extracted"), layer: _readFieldValue(_readField(json, const ["layer"]), "layer", _readString, requiredField: true, nullable: true), @@ -207,6 +210,7 @@ class GeneratedMemoryDB { 'headline': headline, 'id': id, 'invalid_at': invalidAt?.toUtc().toIso8601String(), + 'is_baseline': isBaseline, 'is_locked': isLocked, 'kg_extracted': kgExtracted, 'layer': layer, diff --git a/desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift b/desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift index f8d071b713c..ad7484db6bc 100644 --- a/desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift +++ b/desktop/macos/Desktop/Sources/Generated/OmiApi.generated.swift @@ -2688,6 +2688,7 @@ public enum OmiAPI { public let headline: String? public let id: String public let invalidAt: String? + public let isBaseline: Bool? public let isLocked: Bool? public let kgExtracted: Bool? public let layer: String? @@ -2728,6 +2729,7 @@ public enum OmiAPI { case headline case id case invalidAt = "invalid_at" + case isBaseline = "is_baseline" case isLocked = "is_locked" case kgExtracted = "kg_extracted" case layer @@ -2770,6 +2772,7 @@ public enum OmiAPI { headline = try c.decodeIfPresent(String.self, forKey: .headline) id = try c.decode(String.self, forKey: .id) invalidAt = try c.decodeIfPresent(String.self, forKey: .invalidAt) + isBaseline = try c.decodeIfPresent(Bool.self, forKey: .isBaseline) isLocked = try c.decodeIfPresent(Bool.self, forKey: .isLocked) kgExtracted = try c.decodeIfPresent(Bool.self, forKey: .kgExtracted) layer = try c.decodeIfPresent(String.self, forKey: .layer) @@ -2795,7 +2798,7 @@ public enum OmiAPI { visibility = try c.decodeIfPresent(String.self, forKey: .visibility) } - public init(appId: String?, arguments: [String: OmiAnyCodable]?, captureConfidence: Double?, captureDeviceIds: [String]?, category: MemoryCategory?, content: String, conversationId: String?, createdAt: String, dataProtectionLevel: String?, durability: String?, edited: Bool?, evidence: [Evidence]?, headline: String?, id: String, invalidAt: String?, isLocked: Bool?, kgExtracted: Bool?, layer: String?, manuallyAdded: Bool?, memoryId: String?, memoryTier: MemoryLayer?, objectEntityIds: [String]?, predicate: String?, primaryCaptureDevice: String?, qualifiers: [String: OmiAnyCodable]?, reviewed: Bool?, scoring: String?, subjectAttribution: SubjectAttribution?, subjectEntityId: String?, supersededBy: String?, tags: [String]?, uid: String, uncertaintyReasons: [String]?, updatedAt: String, userReview: Bool?, validAt: String?, veracity: Double?, visibility: String?) { + public init(appId: String?, arguments: [String: OmiAnyCodable]?, captureConfidence: Double?, captureDeviceIds: [String]?, category: MemoryCategory?, content: String, conversationId: String?, createdAt: String, dataProtectionLevel: String?, durability: String?, edited: Bool?, evidence: [Evidence]?, headline: String?, id: String, invalidAt: String?, isBaseline: Bool?, isLocked: Bool?, kgExtracted: Bool?, layer: String?, manuallyAdded: Bool?, memoryId: String?, memoryTier: MemoryLayer?, objectEntityIds: [String]?, predicate: String?, primaryCaptureDevice: String?, qualifiers: [String: OmiAnyCodable]?, reviewed: Bool?, scoring: String?, subjectAttribution: SubjectAttribution?, subjectEntityId: String?, supersededBy: String?, tags: [String]?, uid: String, uncertaintyReasons: [String]?, updatedAt: String, userReview: Bool?, validAt: String?, veracity: Double?, visibility: String?) { self.appId = appId self.arguments = arguments self.captureConfidence = captureConfidence @@ -2811,6 +2814,7 @@ public enum OmiAPI { self.headline = headline self.id = id self.invalidAt = invalidAt + self.isBaseline = isBaseline self.isLocked = isLocked self.kgExtracted = kgExtracted self.layer = layer @@ -14167,6 +14171,33 @@ public enum OmiAPI { return try JSONDecoder().decode(OmiAnyCodable.self, from: data) } + public static func updateMemoryBaselineV3MemoriesMemoryIdBaselinePatch(client: OmiApiClient, memoryId: String, value: Bool, authorization: String? = nil, xAppPlatform: String? = nil, xDeviceIdHash: String? = nil, xAppVersion: String? = nil) async throws -> OmiAnyCodable { + let _path = "/v3/memories/\(memoryId)/baseline" + guard var components = URLComponents(string: client.baseURL + _path) else { + throw OmiApiError.invalidURL + } + var queryItems: [URLQueryItem] = [] + queryItems.append(URLQueryItem(name: "value", value: String(value))) + if !queryItems.isEmpty { components.queryItems = queryItems } + guard let url = components.url else { throw OmiApiError.invalidURL } + var req = URLRequest(url: url) + req.httpMethod = "PATCH" + for (name, value) in client.headers { req.setValue(value, forHTTPHeaderField: name) } + if let token = client.token { + req.setValue("Bearer " + token, forHTTPHeaderField: "Authorization") + } + if let authorization { req.setValue(String(authorization), forHTTPHeaderField: "authorization") } + if let xAppPlatform { req.setValue(String(xAppPlatform), forHTTPHeaderField: "X-App-Platform") } + if let xDeviceIdHash { req.setValue(String(xDeviceIdHash), forHTTPHeaderField: "X-Device-Id-Hash") } + if let xAppVersion { req.setValue(String(xAppVersion), forHTTPHeaderField: "X-App-Version") } + let (data, resp) = try await URLSession.shared.data(for: req) + guard let http = resp as? HTTPURLResponse else { throw OmiApiError.invalidURL } + guard (200..<300).contains(http.statusCode) else { + throw OmiApiError.httpError(status: http.statusCode, data: data) + } + return try JSONDecoder().decode(OmiAnyCodable.self, from: data) + } + public static func reviewMemoryV3MemoriesMemoryIdReviewPost(client: OmiApiClient, memoryId: String, value: Bool, authorization: String? = nil, xAppPlatform: String? = nil, xDeviceIdHash: String? = nil, xAppVersion: String? = nil) async throws -> OmiAnyCodable { let _path = "/v3/memories/\(memoryId)/review" guard var components = URLComponents(string: client.baseURL + _path) else { @@ -14357,5 +14388,5 @@ public enum OmiAPI { return try JSONDecoder().decode(OmiAnyCodable.self, from: data) } - // Total: 382 Swift client methods generated. + // Total: 385 Swift client methods generated. } diff --git a/desktop/windows/src/renderer/src/lib/omiApi.generated.ts b/desktop/windows/src/renderer/src/lib/omiApi.generated.ts index e3ef2fc6b07..fce49778af9 100644 --- a/desktop/windows/src/renderer/src/lib/omiApi.generated.ts +++ b/desktop/windows/src/renderer/src/lib/omiApi.generated.ts @@ -2196,6 +2196,7 @@ export interface MemoryDB { headline?: string | null; id: string; invalid_at?: string | null; + is_baseline?: boolean; is_locked?: boolean; kg_extracted?: boolean; layer: string | null; @@ -8024,6 +8025,17 @@ export interface OmiApiPaths { }; }; }; + "/v3/memories/{memory_id}/baseline": { + patch: { + operationId: "update_memory_baseline_v3_memories__memory_id__baseline_patch"; + responses: { + "200": MemoryMutationResponse; + "401": void; + "404": void; + "422": HTTPValidationError; + }; + }; + }; "/v3/memories/{memory_id}/review": { post: { operationId: "review_memory_v3_memories__memory_id__review_post"; @@ -15507,6 +15519,28 @@ export async function delete_memory_v3_memories__memory_id__delete(path: { memor return _res.status === 204 ? (undefined as any) : await _res.json(); } +export async function update_memory_baseline_v3_memories__memory_id__baseline_patch(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { + const _base = init?.baseURL ?? ""; + const _path = `/v3/memories/${path.memory_id}/baseline`; + const _params = query ? Object.entries(query) + .filter(([, v]) => v !== undefined && v !== null) + .map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`).join('&') : ''; + const _search = _params ? `?${_params}` : ""; + const _res = await fetch(`${_base}${_path}${_search}`, { + method: "PATCH", + headers: { + ...(init?.token ? { Authorization: `Bearer ${init.token}` } : {}), + ...init?.headers, + ...(header.authorization !== undefined ? { "authorization": String(header.authorization) } : {}), + ...(header.X_App_Platform !== undefined ? { "X-App-Platform": String(header.X_App_Platform) } : {}), + ...(header.X_Device_Id_Hash !== undefined ? { "X-Device-Id-Hash": String(header.X_Device_Id_Hash) } : {}), + ...(header.X_App_Version !== undefined ? { "X-App-Version": String(header.X_App_Version) } : {}), + }, + }); + if (!_res.ok) throw new OmiApiError(_res.status, _res); + return _res.status === 204 ? (undefined as any) : await _res.json(); +} + export async function review_memory_v3_memories__memory_id__review_post(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { const _base = init?.baseURL ?? ""; const _path = `/v3/memories/${path.memory_id}/review`; @@ -15654,4 +15688,4 @@ export async function get_speech_profile_v4_speech_profile_get(header: { authori return _res.status === 204 ? (undefined as any) : await _res.json(); } -// Total: 382 client methods generated. +// Total: 385 client methods generated. diff --git a/docs/api-reference/app-client-openapi.json b/docs/api-reference/app-client-openapi.json index 625cda6756d..7c25ecb30de 100644 --- a/docs/api-reference/app-client-openapi.json +++ b/docs/api-reference/app-client-openapi.json @@ -13495,6 +13495,11 @@ ], "title": "Invalid At" }, + "is_baseline": { + "default": false, + "title": "Is Baseline", + "type": "boolean" + }, "is_locked": { "default": false, "title": "Is Locked", @@ -55650,6 +55655,105 @@ ] } }, + "/v3/memories/{memory_id}/baseline": { + "patch": { + "description": "Toggle the baseline flag for a memory.\n\nBaseline memories are always injected first into the AI context window.\nNot supported for canonical-path users: MemoryItem has no is_baseline field,\nso writing to the legacy store would silently have no effect for canonical readers.\nCanonical users receive 503 explicitly rather than a silent wrong-store write.", + "operationId": "update_memory_baseline_v3_memories__memory_id__baseline_patch", + "parameters": [ + { + "in": "path", + "name": "memory_id", + "required": true, + "schema": { + "title": "Memory Id", + "type": "string" + } + }, + { + "in": "query", + "name": "value", + "required": true, + "schema": { + "title": "Value", + "type": "boolean" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "title": "Authorization", + "type": "string" + } + }, + { + "in": "header", + "name": "X-App-Platform", + "required": false, + "schema": { + "title": "X-App-Platform", + "type": "string" + } + }, + { + "in": "header", + "name": "X-Device-Id-Hash", + "required": false, + "schema": { + "title": "X-Device-Id-Hash", + "type": "string" + } + }, + { + "in": "header", + "name": "X-App-Version", + "required": false, + "schema": { + "title": "X-App-Version", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemoryMutationResponse" + } + } + }, + "description": "Successful Response" + }, + "401": { + "$ref": "#/components/responses/Error401" + }, + "404": { + "$ref": "#/components/responses/Error404" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "security": [ + { + "firebaseBearer": [] + } + ], + "summary": "Update Memory Baseline", + "tags": [ + "memories" + ] + } + }, "/v3/memories/{memory_id}/review": { "post": { "operationId": "review_memory_v3_memories__memory_id__review_post", diff --git a/docs/api-reference/integration-public-openapi.json b/docs/api-reference/integration-public-openapi.json index 9e3f3c37703..7ffdf532197 100644 --- a/docs/api-reference/integration-public-openapi.json +++ b/docs/api-reference/integration-public-openapi.json @@ -1086,6 +1086,11 @@ ], "title": "Invalid At" }, + "is_baseline": { + "default": false, + "title": "Is Baseline", + "type": "boolean" + }, "is_locked": { "default": false, "title": "Is Locked", diff --git a/web/admin/lib/services/omi-api/omiApi.generated.ts b/web/admin/lib/services/omi-api/omiApi.generated.ts index e3ef2fc6b07..fce49778af9 100644 --- a/web/admin/lib/services/omi-api/omiApi.generated.ts +++ b/web/admin/lib/services/omi-api/omiApi.generated.ts @@ -2196,6 +2196,7 @@ export interface MemoryDB { headline?: string | null; id: string; invalid_at?: string | null; + is_baseline?: boolean; is_locked?: boolean; kg_extracted?: boolean; layer: string | null; @@ -8024,6 +8025,17 @@ export interface OmiApiPaths { }; }; }; + "/v3/memories/{memory_id}/baseline": { + patch: { + operationId: "update_memory_baseline_v3_memories__memory_id__baseline_patch"; + responses: { + "200": MemoryMutationResponse; + "401": void; + "404": void; + "422": HTTPValidationError; + }; + }; + }; "/v3/memories/{memory_id}/review": { post: { operationId: "review_memory_v3_memories__memory_id__review_post"; @@ -15507,6 +15519,28 @@ export async function delete_memory_v3_memories__memory_id__delete(path: { memor return _res.status === 204 ? (undefined as any) : await _res.json(); } +export async function update_memory_baseline_v3_memories__memory_id__baseline_patch(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { + const _base = init?.baseURL ?? ""; + const _path = `/v3/memories/${path.memory_id}/baseline`; + const _params = query ? Object.entries(query) + .filter(([, v]) => v !== undefined && v !== null) + .map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`).join('&') : ''; + const _search = _params ? `?${_params}` : ""; + const _res = await fetch(`${_base}${_path}${_search}`, { + method: "PATCH", + headers: { + ...(init?.token ? { Authorization: `Bearer ${init.token}` } : {}), + ...init?.headers, + ...(header.authorization !== undefined ? { "authorization": String(header.authorization) } : {}), + ...(header.X_App_Platform !== undefined ? { "X-App-Platform": String(header.X_App_Platform) } : {}), + ...(header.X_Device_Id_Hash !== undefined ? { "X-Device-Id-Hash": String(header.X_Device_Id_Hash) } : {}), + ...(header.X_App_Version !== undefined ? { "X-App-Version": String(header.X_App_Version) } : {}), + }, + }); + if (!_res.ok) throw new OmiApiError(_res.status, _res); + return _res.status === 204 ? (undefined as any) : await _res.json(); +} + export async function review_memory_v3_memories__memory_id__review_post(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { const _base = init?.baseURL ?? ""; const _path = `/v3/memories/${path.memory_id}/review`; @@ -15654,4 +15688,4 @@ export async function get_speech_profile_v4_speech_profile_get(header: { authori return _res.status === 204 ? (undefined as any) : await _res.json(); } -// Total: 382 client methods generated. +// Total: 385 client methods generated. diff --git a/web/app/src/lib/omiApi.generated.ts b/web/app/src/lib/omiApi.generated.ts index e3ef2fc6b07..fce49778af9 100644 --- a/web/app/src/lib/omiApi.generated.ts +++ b/web/app/src/lib/omiApi.generated.ts @@ -2196,6 +2196,7 @@ export interface MemoryDB { headline?: string | null; id: string; invalid_at?: string | null; + is_baseline?: boolean; is_locked?: boolean; kg_extracted?: boolean; layer: string | null; @@ -8024,6 +8025,17 @@ export interface OmiApiPaths { }; }; }; + "/v3/memories/{memory_id}/baseline": { + patch: { + operationId: "update_memory_baseline_v3_memories__memory_id__baseline_patch"; + responses: { + "200": MemoryMutationResponse; + "401": void; + "404": void; + "422": HTTPValidationError; + }; + }; + }; "/v3/memories/{memory_id}/review": { post: { operationId: "review_memory_v3_memories__memory_id__review_post"; @@ -15507,6 +15519,28 @@ export async function delete_memory_v3_memories__memory_id__delete(path: { memor return _res.status === 204 ? (undefined as any) : await _res.json(); } +export async function update_memory_baseline_v3_memories__memory_id__baseline_patch(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { + const _base = init?.baseURL ?? ""; + const _path = `/v3/memories/${path.memory_id}/baseline`; + const _params = query ? Object.entries(query) + .filter(([, v]) => v !== undefined && v !== null) + .map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`).join('&') : ''; + const _search = _params ? `?${_params}` : ""; + const _res = await fetch(`${_base}${_path}${_search}`, { + method: "PATCH", + headers: { + ...(init?.token ? { Authorization: `Bearer ${init.token}` } : {}), + ...init?.headers, + ...(header.authorization !== undefined ? { "authorization": String(header.authorization) } : {}), + ...(header.X_App_Platform !== undefined ? { "X-App-Platform": String(header.X_App_Platform) } : {}), + ...(header.X_Device_Id_Hash !== undefined ? { "X-Device-Id-Hash": String(header.X_Device_Id_Hash) } : {}), + ...(header.X_App_Version !== undefined ? { "X-App-Version": String(header.X_App_Version) } : {}), + }, + }); + if (!_res.ok) throw new OmiApiError(_res.status, _res); + return _res.status === 204 ? (undefined as any) : await _res.json(); +} + export async function review_memory_v3_memories__memory_id__review_post(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { const _base = init?.baseURL ?? ""; const _path = `/v3/memories/${path.memory_id}/review`; @@ -15654,4 +15688,4 @@ export async function get_speech_profile_v4_speech_profile_get(header: { authori return _res.status === 204 ? (undefined as any) : await _res.json(); } -// Total: 382 client methods generated. +// Total: 385 client methods generated. diff --git a/web/personas-open-source/src/lib/omiApi.generated.ts b/web/personas-open-source/src/lib/omiApi.generated.ts index e3ef2fc6b07..fce49778af9 100644 --- a/web/personas-open-source/src/lib/omiApi.generated.ts +++ b/web/personas-open-source/src/lib/omiApi.generated.ts @@ -2196,6 +2196,7 @@ export interface MemoryDB { headline?: string | null; id: string; invalid_at?: string | null; + is_baseline?: boolean; is_locked?: boolean; kg_extracted?: boolean; layer: string | null; @@ -8024,6 +8025,17 @@ export interface OmiApiPaths { }; }; }; + "/v3/memories/{memory_id}/baseline": { + patch: { + operationId: "update_memory_baseline_v3_memories__memory_id__baseline_patch"; + responses: { + "200": MemoryMutationResponse; + "401": void; + "404": void; + "422": HTTPValidationError; + }; + }; + }; "/v3/memories/{memory_id}/review": { post: { operationId: "review_memory_v3_memories__memory_id__review_post"; @@ -15507,6 +15519,28 @@ export async function delete_memory_v3_memories__memory_id__delete(path: { memor return _res.status === 204 ? (undefined as any) : await _res.json(); } +export async function update_memory_baseline_v3_memories__memory_id__baseline_patch(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { + const _base = init?.baseURL ?? ""; + const _path = `/v3/memories/${path.memory_id}/baseline`; + const _params = query ? Object.entries(query) + .filter(([, v]) => v !== undefined && v !== null) + .map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`).join('&') : ''; + const _search = _params ? `?${_params}` : ""; + const _res = await fetch(`${_base}${_path}${_search}`, { + method: "PATCH", + headers: { + ...(init?.token ? { Authorization: `Bearer ${init.token}` } : {}), + ...init?.headers, + ...(header.authorization !== undefined ? { "authorization": String(header.authorization) } : {}), + ...(header.X_App_Platform !== undefined ? { "X-App-Platform": String(header.X_App_Platform) } : {}), + ...(header.X_Device_Id_Hash !== undefined ? { "X-Device-Id-Hash": String(header.X_Device_Id_Hash) } : {}), + ...(header.X_App_Version !== undefined ? { "X-App-Version": String(header.X_App_Version) } : {}), + }, + }); + if (!_res.ok) throw new OmiApiError(_res.status, _res); + return _res.status === 204 ? (undefined as any) : await _res.json(); +} + export async function review_memory_v3_memories__memory_id__review_post(path: { memory_id: string }, query: { value: boolean }, header: { authorization?: string, X_App_Platform?: string, X_Device_Id_Hash?: string, X_App_Version?: string }, init?: OmiApiClientInit): Promise { const _base = init?.baseURL ?? ""; const _path = `/v3/memories/${path.memory_id}/review`; @@ -15654,4 +15688,4 @@ export async function get_speech_profile_v4_speech_profile_get(header: { authori return _res.status === 204 ? (undefined as any) : await _res.json(); } -// Total: 382 client methods generated. +// Total: 385 client methods generated.