Skip to content

Move API client to the UI SDK #1692

@tomkis

Description

@tomkis

Remove Deprecated api Client

Goal

Replace openapi-fetch api client with SDK methods in 10 modules, delete deprecated code.

Background

  • SDK has 3 methods, UI uses 21 endpoints
  • 18 endpoints missing from SDK
  • 10 modules need migration

SDK Additions Needed

Endpoints (18)

  • Provider builds: POST/GET builds, GET build/{id}, GET build/{id}/logs (streaming)
  • Providers: GET/POST/DELETE, GET/DELETE /{id}
  • Provider variables: GET/PUT /{id}/variables
  • Configurations: GET /system
  • Feedback: POST
  • Files: POST, DELETE /{id}
  • Variables: GET, PUT
  • Connectors: GET/POST, DELETE /{id}, POST /{id}/connect, POST /{id}/disconnect
  • User: GET
  • Contexts: GET, PATCH /{id}, DELETE /{id}, GET /{id}/history

Features

  • Move ensureData to SDK
  • Streaming: return ReadableStream
  • File uploads: auto-detect File/Blob, create FormData

Migration

  1. Add missing methods to SDK
  2. Update modules:
    • provider-builds/api
    • providers/api
    • configurations/api
    • feedback/api
    • files/api
    • variables/api
    • connectors/api
    • users/api

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In dev

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions