Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
264 changes: 250 additions & 14 deletions .openapi-generator/FILES

Large diffs are not rendered by default.

225 changes: 205 additions & 20 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quantcdn/quant-php-client",
"version": "4.9.0",
"version": "4.19.0",
"description": "Unified API for QuantCDN Admin and QuantCloud Platform services",
"keywords": [
"openapitools",
Expand Down
213 changes: 145 additions & 68 deletions composer.lock

Large diffs are not rendered by default.

191 changes: 191 additions & 0 deletions docs/Api/AIAgentsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ All URIs are relative to https://dashboard.quantcdn.io, except if the operation
| [**chatWithAIAgent()**](AIAgentsApi.md#chatWithAIAgent) | **POST** /api/v3/organizations/{organisation}/ai/agents/{agentId}/chat | Chat with AI Agent |
| [**createAIAgent()**](AIAgentsApi.md#createAIAgent) | **POST** /api/v3/organizations/{organisation}/ai/agents | Create AI Agent |
| [**deleteAIAgent()**](AIAgentsApi.md#deleteAIAgent) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Delete Agent |
| [**deleteAgentOverlay()**](AIAgentsApi.md#deleteAgentOverlay) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Delete Agent Overlay |
| [**getAIAgent()**](AIAgentsApi.md#getAIAgent) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Get Agent Details |
| [**getAgentOverlay()**](AIAgentsApi.md#getAgentOverlay) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Get Agent Overlay |
| [**listAIAgents()**](AIAgentsApi.md#listAIAgents) | **GET** /api/v3/organizations/{organisation}/ai/agents | List AI Agents |
| [**updateAIAgent()**](AIAgentsApi.md#updateAIAgent) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Update Agent |
| [**upsertAgentOverlay()**](AIAgentsApi.md#upsertAgentOverlay) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Upsert Agent Overlay |


## `chatWithAIAgent()`
Expand Down Expand Up @@ -200,6 +203,68 @@ try {
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `deleteAgentOverlay()`

```php
deleteAgentOverlay($organisation, $agent_id): \QuantClient\Model\DeleteAgentOverlay200Response
```

Delete Agent Overlay

Removes the per-organisation overlay for a global agent, reverting it to platform defaults.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$organisation = 'organisation_example'; // string | The organisation ID
$agent_id = 'agent_id_example'; // string | Global agent identifier

try {
$result = $apiInstance->deleteAgentOverlay($organisation, $agent_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AIAgentsApi->deleteAgentOverlay: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **organisation** | **string**| The organisation ID | |
| **agent_id** | **string**| Global agent identifier | |

### Return type

[**\QuantClient\Model\DeleteAgentOverlay200Response**](../Model/DeleteAgentOverlay200Response.md)

### Authorization

[BearerAuth](../../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `getAIAgent()`

```php
Expand Down Expand Up @@ -262,6 +327,68 @@ try {
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `getAgentOverlay()`

```php
getAgentOverlay($organisation, $agent_id): \QuantClient\Model\GetAgentOverlay200Response
```

Get Agent Overlay

Returns the per-organisation overlay for a global agent, plus base agent metadata for UI context. If no overlay exists the response contains `overlay: null`. Overlays can only be created for global agents.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$organisation = 'organisation_example'; // string | The organisation ID
$agent_id = 'agent_id_example'; // string | Global agent identifier (e.g., 'quantgov-code')

try {
$result = $apiInstance->getAgentOverlay($organisation, $agent_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AIAgentsApi->getAgentOverlay: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **organisation** | **string**| The organisation ID | |
| **agent_id** | **string**| Global agent identifier (e.g., &#39;quantgov-code&#39;) | |

### Return type

[**\QuantClient\Model\GetAgentOverlay200Response**](../Model/GetAgentOverlay200Response.md)

### Authorization

[BearerAuth](../../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listAIAgents()`

```php
Expand Down Expand Up @@ -387,3 +514,67 @@ try {
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `upsertAgentOverlay()`

```php
upsertAgentOverlay($organisation, $agent_id, $upsert_agent_overlay_request): \QuantClient\Model\UpsertAgentOverlay200Response
```

Upsert Agent Overlay

Creates or replaces the per-organisation overlay for a global agent. PUT is full replacement — omitted optional fields are removed. Include `version` from a prior GET to enable compare-and-swap (409 on conflict). Omit for last-writer-wins.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$organisation = 'organisation_example'; // string | The organisation ID
$agent_id = 'agent_id_example'; // string | Global agent identifier
$upsert_agent_overlay_request = new \QuantClient\Model\UpsertAgentOverlayRequest(); // \QuantClient\Model\UpsertAgentOverlayRequest

try {
$result = $apiInstance->upsertAgentOverlay($organisation, $agent_id, $upsert_agent_overlay_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AIAgentsApi->upsertAgentOverlay: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **organisation** | **string**| The organisation ID | |
| **agent_id** | **string**| Global agent identifier | |
| **upsert_agent_overlay_request** | [**\QuantClient\Model\UpsertAgentOverlayRequest**](../Model/UpsertAgentOverlayRequest.md)| | |

### Return type

[**\QuantClient\Model\UpsertAgentOverlay200Response**](../Model/UpsertAgentOverlay200Response.md)

### Authorization

[BearerAuth](../../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
77 changes: 77 additions & 0 deletions docs/Api/AIApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# QuantClient\AIApi

All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**getAIUsageStats()**](AIApi.md#getAIUsageStats) | **GET** /api/v3/organizations/{organisation}/ai/usage | Organisation AI usage breakdown (subscription page parity) |


## `getAIUsageStats()`

```php
getAIUsageStats($organisation, $month, $group_by, $include, $user_id, $token_id)
```

Organisation AI usage breakdown (subscription page parity)

AI usage from the subscription page's source (cloud-api monthly-usage). Parameterized by month, groupBy (model|user|token) and optional daily series. NOTE: as of API 4.19.0 this endpoint requires the update_subscription permission + subscription:read scope (previously use_ai_services + ai:use). For per-caller spend use /ai/usage/me.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$organisation = 'organisation_example'; // string
$month = 'month_example'; // string | YYYY-MM, defaults to current month
$group_by = 'model'; // string
$include = 'include_example'; // string | Set to 'daily' to append a 30-day series
$user_id = 'user_id_example'; // string | Scope the daily series to a user
$token_id = 'token_id_example'; // string | Scope the daily series to a token

try {
$apiInstance->getAIUsageStats($organisation, $month, $group_by, $include, $user_id, $token_id);
} catch (Exception $e) {
echo 'Exception when calling AIApi->getAIUsageStats: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **organisation** | **string**| | |
| **month** | **string**| YYYY-MM, defaults to current month | [optional] |
| **group_by** | **string**| | [optional] [default to &#39;model&#39;] |
| **include** | **string**| Set to &#39;daily&#39; to append a 30-day series | [optional] |
| **user_id** | **string**| Scope the daily series to a user | [optional] |
| **token_id** | **string**| Scope the daily series to a token | [optional] |

### Return type

void (empty response body)

### Authorization

[BearerAuth](../../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
67 changes: 65 additions & 2 deletions docs/Api/AICustomToolsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All URIs are relative to https://dashboard.quantcdn.io, except if the operation
| ------------- | ------------- | ------------- |
| [**createCustomTool()**](AICustomToolsApi.md#createCustomTool) | **POST** /api/v3/organizations/{organisation}/ai/custom-tools | Register Custom Edge Function Tool |
| [**deleteCustomTool()**](AICustomToolsApi.md#deleteCustomTool) | **DELETE** /api/v3/organizations/{organisation}/ai/custom-tools/{toolName} | Delete Custom Tool |
| [**getCustomTool()**](AICustomToolsApi.md#getCustomTool) | **GET** /api/v3/organizations/{organisation}/ai/custom-tools/{toolName} | Get Custom Tool |
| [**listCustomTools()**](AICustomToolsApi.md#listCustomTools) | **GET** /api/v3/organizations/{organisation}/ai/custom-tools | List Custom Tools |


Expand All @@ -17,7 +18,7 @@ createCustomTool($organisation, $create_custom_tool_request): \QuantClient\Model

Register Custom Edge Function Tool

Registers a custom edge function as a tool that AI models can invoke. This enables customers to create their own tools backed by edge functions. * * **Edge Function Contract:** * - Edge functions must accept POST requests with JSON payload * - Expected request format: `{ 'toolName': '...', 'input': {...}, 'orgId': '...' }` * - Must return JSON response with either `result` or `error` field * * **Async Tools:** * Set `isAsync: true` for operations >5 seconds. The edge function should return `{ executionId: '...' }` and the AI will poll for completion.
Registers a custom edge function as a tool that AI models can invoke. Provide `edgeFunctionCode` (JavaScript) and the API will deploy it to the CDN, compute the edge function URL, and register the tool. * * **Edge Function Contract:** * - Edge functions must accept POST requests with JSON payload * - Expected request format: `{ 'toolName': '...', 'input': {...}, 'orgId': '...' }` * - Must return JSON response with either `result` or `error` field * * **Idempotent Updates:** * POSTing with the same `name` will update the existing tool — the edge function code is redeployed to the same UUID and the tool registration is updated. * * **Async Tools:** * Set `isAsync: true` for operations >5 seconds. The edge function should return `{ executionId: '...' }` and the AI will poll for completion.

### Example

Expand Down Expand Up @@ -79,7 +80,7 @@ deleteCustomTool($organisation, $tool_name): \QuantClient\Model\DeleteCustomTool

Delete Custom Tool

Deletes a custom tool registration. The underlying edge function is not affected.
Deletes a custom tool registration and its deployed edge function.

### Example

Expand Down Expand Up @@ -133,6 +134,68 @@ try {
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `getCustomTool()`

```php
getCustomTool($organisation, $tool_name): \QuantClient\Model\GetCustomTool200Response
```

Get Custom Tool

Retrieves a single registered custom tool by name.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AICustomToolsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$organisation = 'organisation_example'; // string | The organisation ID
$tool_name = 'tool_name_example'; // string | The tool name to retrieve

try {
$result = $apiInstance->getCustomTool($organisation, $tool_name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AICustomToolsApi->getCustomTool: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **organisation** | **string**| The organisation ID | |
| **tool_name** | **string**| The tool name to retrieve | |

### Return type

[**\QuantClient\Model\GetCustomTool200Response**](../Model/GetCustomTool200Response.md)

### Authorization

[BearerAuth](../../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listCustomTools()`

```php
Expand Down
Loading
Loading