/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 553055503718 */ import { syncAcquire } from "../funcs/syncAcquire.js"; import { syncContext } from "../funcs/syncContext.js"; import { syncList } from "../funcs/syncList.js"; import { syncReconcile } from "../funcs/syncReconcile.js"; import { syncRelease } from "../funcs/syncRelease.js"; import { syncRenew } from "../funcs/syncRenew.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Sync extends ClientSDK { /** * List full deployment records for manager operational loops. This endpoint is intentionally separate from the public deployments list, which returns lightweight UI rows. */ async list( request?: models.SyncListRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(syncList( this, request, options, )); } /** * Get computed deployment state and configuration for a manager-side operation without acquiring the deployment reconciliation lock. */ async context( request?: models.SyncContextRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(syncContext( this, request, options, )); } /** * Acquire a batch of deployments for processing. Used by Manager to atomically lock deployments matching filters. Each deployment in the batch must be released after processing. */ async acquire( request?: models.SyncAcquireRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(syncAcquire( this, request, options, )); } /** * Reconcile deployment state. Push model requests that include a session verify lock ownership. Pull model state reports are accepted as authz-gated agent progress even when they carry an agent-sync session. Accepts full DeploymentState after step() execution. */ async reconcile( request: models.SyncReconcileRequest, options?: RequestOptions, ): Promise { return unwrapAsync(syncReconcile( this, request, options, )); } async renew( request: models.SyncRenewRequest, options?: RequestOptions, ): Promise { return unwrapAsync(syncRenew( this, request, options, )); } /** * Release a deployment lock. Must be called after processing an acquired deployment, even if processing failed. This is critical to avoid deadlocks. */ async release( request: models.SyncReleaseRequest, options?: RequestOptions, ): Promise { return unwrapAsync(syncRelease( this, request, options, )); } }