(toolkitId: string, policyId: string, owner: Owner)
| 281 | .pipe(Effect.map((entries) => entries.map((entry) => entry.data).sort(comparePositioned))); |
| 282 | |
| 283 | const requirePolicy = (toolkitId: string, policyId: string, owner: Owner) => |
| 284 | storage.policies |
| 285 | .getForOwner({ owner, key: policyId }) |
| 286 | .pipe( |
| 287 | Effect.flatMap((entry) => |
| 288 | entry && entry.data.toolkitId === toolkitId |
| 289 | ? Effect.succeed(entry) |
| 290 | : fail("Toolkit policy not found."), |
| 291 | ), |
| 292 | ); |
| 293 | |
| 294 | const requireConnection = (toolkitId: string, connectionId: string, owner: Owner) => |
| 295 | storage.connections |
no test coverage detected