PolyAPI  >  Developers  >  Release Notes

PolyAPI – Release 10

April 30, 2024
Days since last production release: 35 Days

General Improvements

  • Runtime Flow Improvement Implemented caching to speed up function execution and variable retrieval times.
  • SOC 2 – Completed Internal Preparations for Upcoming SOC 2 Audit.

Python Client

  • Python Security FX – Webhooks now support Python security functions, enabling custom security checks written in Python when webhook events are received before the event is delivered to subscribers.
  • Error Handler – Added support for error_handler.on() function for subscribing to Poly Proxy specific error events.
    • Multiple Error Handlers – Added support for running multiple Python error handlers at once in the same script.
  • Multiple Webhook Handlers – Added support for running multiple Python Webhook Handlers at once in the same script. 
  • Webhook to Server FX Triggers – Added support for Python Server Functions to be triggered by Webhook Events.
  • Client FX Deployment – Added support for the deployment and client SDKgeneration of Python client functions.
  • Server FX Status Codes – Added support for Python server functions to enable setting of specific response status codes and content types through ‘.polyCustom’.
  • Bug Fixes
    • Python Response Type Fix – Corrected issues with Python custom function response types. Now, using typing.TypedDict in functions triggers a clear error message, guiding developers to use typing_extensions for correct modeling.
    • External Library Contamination – Fixed a bug where one custom server function in a context required other functions in the context to import the same external library dependencies. 
    • Webhook Control Improvements – Improved the sStreamlined the start and stop process for webhooks using Ctrl+C to exit with clearer messaging.
    • Error Messaging – Improved the clarity of ‘500’ error response messages for server functions, ensuring more detailed and helpful error diagnostics.

Java Client

  • Java WH – Added ability to receive and handle headers and params when using webhook handlers.
  • Added support for Java server functions to be triggered by inbound Webhook events using Poly Trigger configurations. 
  • Deployment Optimization – Added a filtering feature to allow deployment of only specific functions.
  • Java FX polyCustom – Extended support for polyCustom to Java server functions and webhook handlers.

Node Client

  • Open API Spec Training
    • Parameter Handling – Updated to automatically set removeIfNotPresentOnExecute: true for all non-required parameters, including headers and query params.
    • API Call Optimization – Improved ‘npx model train’ to make individual API function calls to prevent server overloads.
    • Tier Checkings – Implemented tier checking when training to avoid exceeding the maximum allowed threshold of functions for a tier.
    • Argument Properties – Updated to include a ‘required’ argument for each parameter in the generated JSON, allowing for easier editing before committing the model.
    • Disable AI Generation – Added the option –disable-ai to skip AI based generation of descriptions for functions and arguments when not found in the OAS when running ‘npx poly model generate’. 
    • Support Serialization – Updated handling of query parameters and headers. 
      • For Query Params – style: form|deepObject, explode:true|false
      • For Headers – style: simple, explode:true|false
    • Optimized Model Generation Performance – Deployed improvements for faster generation and added a fallback to use requestBody.description when schema descriptions are absent, reducing processing demands.
    • Minor Version Support – Improved support for minor version changes in OpenAPI specifications.
    • OAS Source URL Input – Updated ‘npx poly model generate’ to accept URLs or file paths for OpenAPI specifications, enabling easier model generation.
    • oAuth2 Security – is now saved as a bearer token auth argument. 
  • TS Interface Naming Conflict – Added a custom error message for interface naming conflicts with global TypeScript types, advising to rename the interface to avoid errors.

PolyUI Beta:

  • Dynamic UI for Variable Management – Created the first page for administering Poly using our upcoming Canopy service which will allow for the programmatic rendering of UIs based on Poly functions & a config file. 

Minor Server Improvements: 

  • Variables Endpoint – Updated variable values to only appear on /variables/{id}, removing them from the /variables list view.
  • Raw String Query Parameter Support – Improved functionality to allow sending query parameters as raw strings, enabling direct entry of complex queries like ‘ids[]=foo&ids[]=bar’
  • Library Tree Copy Issue – Fixed an issue where the ‘Click to copy’ from Library Tree does not capture the copy webhook handler.
  • Payload Argument Modeling – Addressed an issue in the JSON generation process where payload arguments were not correctly modeled.
  • Tier ID Update – Resolved a caching issue that prevented updates to tier IDs for self hosted instances.
  • Webhook Creation Error – Fixed an issue where creating webhooks resulted in a 500 Internal Server Error, despite successful creation.
  • Webhook Timeout Error Handling – Corrected an issue where webhooks timing out returned a 200 status code. Now, timeouts properly return an error response code.
  • polyCustom Fix – Resolved an issue where responseContentType was not resetting after each function execution.