(
body: T
)
| 283 | // Last-writer-wins upsert — used to overwrite a persisted *suspended* activity |
| 284 | // result once it finally completes (create-only ops can't transition it). |
| 285 | const upsert = <T extends { readonly id: string; readonly _partitionKey: string }>( |
| 286 | body: T |
| 287 | ): Effect.Effect<void> => |
| 288 | Effect.gen(function*() { |
| 289 | const resp = yield* Effect.promise(() => container.items.upsert<T>(body)) |
| 290 | yield* annotateCosmosResponse({ requestCharge: resp.requestCharge, statusCode: resp.statusCode }) |
| 291 | }) |
| 292 | |
| 293 | const readPoint = <T extends { id: string }>(id: string, executionId: string) => |
| 294 | Effect.promise(() => container.item(id, executionId).read<T>()).pipe( |
no test coverage detected
searching dependent graphs…