From 2d9e00ac26726225e3a6e5fd19fb9d1cb580afe1 Mon Sep 17 00:00:00 2001 From: CodeMash Date: Wed, 14 Oct 2026 10:46:24 +0300 Subject: [PATCH 1/2] feat(core): language option sends Accept-Language The gateway dropped cultureCode and the CultureCode / norbix-language headers; the only language input is now the standard Accept-Language header. Add a client-level `language` option mirroring `region`: constructor option with NORBIX_LANGUAGE fallback (no default, no header when unset), per-call `language=` wherever per-call `region=` exists, and set_language()/get_language() on sync and async clients. Co-Authored-By: Claude Opus 5.5 --- README.md | 28 +++++ src/norbix_python/client.py | 36 +++++++ src/norbix_python/hub/regions.py | 10 +- src/norbix_python/transport.py | 19 ++++ tests/test_language.py | 171 +++++++++++++++++++++++++++++++ 5 files changed, 262 insertions(+), 2 deletions(-) create mode 100644 tests/test_language.py diff --git a/README.md b/README.md index b7ffd76..da6a9c7 100644 --- a/README.md +++ b/README.md @@ -314,6 +314,7 @@ NORBIX_ACCOUNT_ID=acc_456 NORBIX_API_URL=https://api.norbix.ai NORBIX_HUB_URL=https://hub.norbix.ai NORBIX_REGION=nb-eu-germany +NORBIX_LANGUAGE=lt ``` ```python @@ -409,6 +410,33 @@ norbix.account.create_project( With the combined client the same modules live under `client.hub` (`norbix.hub.regions.list()`, `norbix.hub.account.create_project(...)`). +## Response language (Accept-Language) + +The gateway picks the response language **only** from the standard +`Accept-Language` header (q-values are honoured; the project default language +is used when nothing matches) and reports the chosen one in the +`Content-Language` response header. The old `cultureCode` field and the +`CultureCode` / `norbix-language` headers are gone. + +The SDK has **no default language**: when none is configured, no +`Accept-Language` header is sent. Resolution order: explicit `language=` on +the client → `NORBIX_LANGUAGE` environment variable → unset. + +```python +norbix = Norbix(api_key="sk_live_xxx", project_id="proj_123", language="lt") +norbix = Norbix(api_key="sk_live_xxx", project_id="proj_123", language="lt-LT, en;q=0.8") + +norbix.set_language("en") # subsequent requests send Accept-Language: en +norbix.get_language() # "en" +norbix.set_language(None) # clear — no Accept-Language header is sent + +# Per-call override, wherever a per-call region= is accepted: +norbix.hub.regions.list(language="de") +``` + +`language=` is accepted by `Norbix`, `NorbixApi`, `NorbixHub` and +`AsyncNorbix`. + ### Async ```python diff --git a/src/norbix_python/client.py b/src/norbix_python/client.py index 13beb6d..7d1c856 100644 --- a/src/norbix_python/client.py +++ b/src/norbix_python/client.py @@ -54,6 +54,7 @@ def _build_config( timeout: float | None, default_headers: dict[str, str] | None, client_name: str, + language: str | None = None, ) -> TransportConfig: resolved_project_id = project_id or os.getenv("NORBIX_PROJECT_ID") if not resolved_project_id: @@ -88,6 +89,9 @@ def _build_config( timeout=timeout or DEFAULT_TIMEOUT, env=env or os.getenv("NORBIX_ENV") or "PROD", region=resolved_region, + # Language: explicit setting → NORBIX_LANGUAGE env var → unset (no + # Accept-Language header). + language=language or os.getenv("NORBIX_LANGUAGE") or None, base_url_api_is_default=base_url_api_is_default, base_url_hub_is_default=base_url_hub_is_default, default_headers=default_headers or {}, @@ -154,6 +158,18 @@ def get_region(self) -> str | None: """Current Norbix region the client targets (None when unset).""" return self._transport._cfg.region + def set_language(self, language: str | None) -> None: + """Set the preferred response language for subsequent requests (Accept-Language header). + + Accepts a single tag ("lt") or a full Accept-Language value + ("lt-LT, en;q=0.8"). Pass None to clear it (no header is sent). + """ + self._transport._cfg.language = language or None + + def get_language(self) -> str | None: + """Current Accept-Language value the client sends (None when unset).""" + return self._transport._cfg.language + def is_authenticated(self) -> bool: return bool(self._transport._cfg.bearer_token or self._transport._cfg.api_key) @@ -168,6 +184,7 @@ def __init__( account_id: str | None = None, env: str | None = None, region: str | None = None, + language: str | None = None, base_url_api: str | None = None, base_url_hub: str | None = None, api_version: str | None = None, @@ -183,6 +200,7 @@ def __init__( account_id=account_id, env=env, region=region, + language=language, base_url_api=base_url_api, base_url_hub=base_url_hub, api_version=api_version, @@ -217,6 +235,7 @@ def __init__( account_id: str | None = None, env: str | None = None, region: str | None = None, + language: str | None = None, base_url_api: str | None = None, api_version: str | None = None, timeout: float | None = None, @@ -230,6 +249,7 @@ def __init__( account_id=account_id, env=env, region=region, + language=language, base_url_api=base_url_api, base_url_hub=None, api_version=api_version, @@ -267,6 +287,7 @@ def __init__( account_id: str | None = None, env: str | None = None, region: str | None = None, + language: str | None = None, base_url_hub: str | None = None, hub_version: str | None = None, timeout: float | None = None, @@ -280,6 +301,7 @@ def __init__( account_id=account_id, env=env, region=region, + language=language, base_url_api=None, base_url_hub=base_url_hub, api_version=None, @@ -341,6 +363,7 @@ def __init__( account_id: str | None = None, env: str | None = None, region: str | None = None, + language: str | None = None, base_url_api: str | None = None, base_url_hub: str | None = None, api_version: str | None = None, @@ -356,6 +379,7 @@ def __init__( account_id=account_id, env=env, region=region, + language=language, base_url_api=base_url_api, base_url_hub=base_url_hub, api_version=api_version, @@ -424,5 +448,17 @@ def get_region(self) -> str | None: """Current Norbix region the client targets (None when unset).""" return self._transport._cfg.region + def set_language(self, language: str | None) -> None: + """Set the preferred response language for subsequent requests (Accept-Language header). + + Accepts a single tag ("lt") or a full Accept-Language value + ("lt-LT, en;q=0.8"). Pass None to clear it (no header is sent). + """ + self._transport._cfg.language = language or None + + def get_language(self) -> str | None: + """Current Accept-Language value the client sends (None when unset).""" + return self._transport._cfg.language + def is_authenticated(self) -> bool: return bool(self._transport._cfg.bearer_token or self._transport._cfg.api_key) diff --git a/src/norbix_python/hub/regions.py b/src/norbix_python/hub/regions.py index 0369e21..0020d90 100644 --- a/src/norbix_python/hub/regions.py +++ b/src/norbix_python/hub/regions.py @@ -22,7 +22,7 @@ def __init__(self, transport: Transport) -> None: self._transport = transport def list( - self, *, timeout: float | None = None, bearer_token: str | None = None, region: str | None = None, **request: Any + self, *, timeout: float | None = None, bearer_token: str | None = None, region: str | None = None, language: str | None = None, **request: Any ) -> Any: """GET /{version}/account/regions @@ -39,6 +39,7 @@ def list( timeout=timeout, bearer_token=bearer_token, region=region, + language=language, ) def update_project_regions( @@ -50,6 +51,7 @@ def update_project_regions( timeout: float | None = None, bearer_token: str | None = None, region: str | None = None, + language: str | None = None, **request: Any, ) -> Any: """PATCH /{version}/account/projects/{projectId}/settings/regions @@ -71,6 +73,7 @@ def update_project_regions( timeout=timeout, bearer_token=bearer_token, region=region, + language=language, ) @@ -79,7 +82,7 @@ def __init__(self, transport: AsyncTransport) -> None: self._transport = transport async def list( - self, *, timeout: float | None = None, bearer_token: str | None = None, region: str | None = None, **request: Any + self, *, timeout: float | None = None, bearer_token: str | None = None, region: str | None = None, language: str | None = None, **request: Any ) -> Any: """GET /{version}/account/regions""" return await self._transport.send( @@ -92,6 +95,7 @@ async def list( timeout=timeout, bearer_token=bearer_token, region=region, + language=language, ) async def update_project_regions( @@ -103,6 +107,7 @@ async def update_project_regions( timeout: float | None = None, bearer_token: str | None = None, region: str | None = None, + language: str | None = None, **request: Any, ) -> Any: """PATCH /{version}/account/projects/{projectId}/settings/regions""" @@ -120,4 +125,5 @@ async def update_project_regions( timeout=timeout, bearer_token=bearer_token, region=region, + language=language, ) diff --git a/src/norbix_python/transport.py b/src/norbix_python/transport.py index 35a94b0..b9b3b7c 100644 --- a/src/norbix_python/transport.py +++ b/src/norbix_python/transport.py @@ -42,6 +42,9 @@ class TransportConfig: timeout: float env: str = "PROD" region: str | None = None + # Accept-Language value (e.g. "lt" or "lt-LT, en;q=0.8"). No default — + # when unset no Accept-Language header is sent. + language: str | None = None base_url_api_is_default: bool = False base_url_hub_is_default: bool = False default_headers: dict[str, str] = field(default_factory=dict) @@ -68,6 +71,7 @@ def send( bearer_token: str | None = None, env: str | None = None, region: str | None = None, + language: str | None = None, response_type: ResponseType = "json", follow_redirects: bool = False, extra_headers: dict[str, str] | None = None, @@ -118,6 +122,13 @@ def send( resolved_region = region if region is not None else self._cfg.region if resolved_region: headers["nb-region"] = resolved_region + # Language: per-call override wins over the client default. The + # gateway reads only the standard Accept-Language header (q-values + # honoured; project default when nothing matches). No default here — + # the header is omitted when unset. + resolved_language = language if language is not None else self._cfg.language + if resolved_language: + headers["Accept-Language"] = resolved_language if body is not None: headers["Content-Type"] = "application/json" # Per-call headers win over everything above (e.g. the MCP endpoint @@ -226,6 +237,7 @@ async def send( bearer_token: str | None = None, env: str | None = None, region: str | None = None, + language: str | None = None, response_type: ResponseType = "json", follow_redirects: bool = False, extra_headers: dict[str, str] | None = None, @@ -276,6 +288,13 @@ async def send( resolved_region = region if region is not None else self._cfg.region if resolved_region: headers["nb-region"] = resolved_region + # Language: per-call override wins over the client default. The + # gateway reads only the standard Accept-Language header (q-values + # honoured; project default when nothing matches). No default here — + # the header is omitted when unset. + resolved_language = language if language is not None else self._cfg.language + if resolved_language: + headers["Accept-Language"] = resolved_language if body is not None: headers["Content-Type"] = "application/json" # Per-call headers win over everything above (e.g. the MCP endpoint diff --git a/tests/test_language.py b/tests/test_language.py new file mode 100644 index 0000000..bff590f --- /dev/null +++ b/tests/test_language.py @@ -0,0 +1,171 @@ +from __future__ import annotations + +import asyncio + +import httpx +import pytest + +from norbix_python import AsyncNorbix, Norbix, NorbixApi, NorbixHub + +from .helpers import CaptureTransport +from .test_regions import AsyncCaptureTransport + +# The gateway reads the response language only from the standard +# Accept-Language header. The SDK has no default: when no language is set the +# header is not sent at all, so traffic stays byte-identical. + + +@pytest.fixture(autouse=True) +def _no_language_env(monkeypatch: pytest.MonkeyPatch) -> None: + monkeypatch.delenv("NORBIX_LANGUAGE", raising=False) + + +def _client(language: str | None = None) -> tuple[Norbix, CaptureTransport]: + transport = CaptureTransport() + client = Norbix( + project_id="test-project", + bearer_token="test-token", + account_id="test-account", + language=language, + http_client=httpx.Client(transport=transport), + ) + return client, transport + + +def _async_client(language: str | None = None) -> tuple[AsyncNorbix, AsyncCaptureTransport]: + transport = AsyncCaptureTransport() + client = AsyncNorbix( + project_id="test-project", + bearer_token="test-token", + account_id="test-account", + language=language, + http_client=httpx.AsyncClient(transport=transport), + ) + return client, transport + + +def test_unset_language_omits_header() -> None: + client, transport = _client() + client.hub.regions.list() + assert transport.last_request is not None + assert "accept-language" not in transport.last_request["headers"] + client.api.echo.echo() + assert "accept-language" not in transport.last_request["headers"] + + +def test_client_language_sets_header() -> None: + client, transport = _client(language="lt-LT, en;q=0.8") + client.hub.regions.list() + assert transport.last_request["headers"]["accept-language"] == "lt-LT, en;q=0.8" + client.api.echo.echo() + assert transport.last_request["headers"]["accept-language"] == "lt-LT, en;q=0.8" + + +def test_per_call_language_overrides_default() -> None: + client, transport = _client(language="lt") + client.hub.regions.list(language="de") + assert transport.last_request["headers"]["accept-language"] == "de" + client.hub.regions.list() + assert transport.last_request["headers"]["accept-language"] == "lt" + + +def test_per_call_language_is_not_sent_in_body() -> None: + client, transport = _client() + client.hub.regions.update_project_regions("proj-1", primary_region="nb-eu-germany", language="lt") + assert transport.last_request["headers"]["accept-language"] == "lt" + assert "language" not in transport.last_request["body"] + + +def test_norbix_language_env_var_fallback(monkeypatch: pytest.MonkeyPatch) -> None: + monkeypatch.setenv("NORBIX_LANGUAGE", "lt") + client, transport = _client() + assert client.get_language() == "lt" + client.hub.regions.list() + assert transport.last_request["headers"]["accept-language"] == "lt" + + +def test_explicit_language_beats_env_var(monkeypatch: pytest.MonkeyPatch) -> None: + monkeypatch.setenv("NORBIX_LANGUAGE", "lt") + client, transport = _client(language="en") + client.hub.regions.list() + assert transport.last_request["headers"]["accept-language"] == "en" + + +def test_set_language_runtime_and_clear() -> None: + client, transport = _client() + assert client.get_language() is None + client.set_language("lt") + assert client.get_language() == "lt" + client.hub.regions.list() + assert transport.last_request["headers"]["accept-language"] == "lt" + client.set_language(None) + assert client.get_language() is None + client.hub.regions.list() + assert "accept-language" not in transport.last_request["headers"] + + +def test_api_and_hub_only_clients_accept_language() -> None: + api_transport = CaptureTransport() + api = NorbixApi( + project_id="p", + bearer_token="t", + language="lt", + http_client=httpx.Client(transport=api_transport), + ) + api.echo.echo() + assert api_transport.last_request["headers"]["accept-language"] == "lt" + + hub_transport = CaptureTransport() + hub = NorbixHub( + project_id="p", + bearer_token="t", + language="lt", + http_client=httpx.Client(transport=hub_transport), + ) + hub.regions.list() + assert hub_transport.last_request["headers"]["accept-language"] == "lt" + + +def test_no_legacy_language_headers_or_fields() -> None: + client, transport = _client(language="lt") + client.hub.regions.list() + headers = {k.lower() for k in transport.last_request["headers"]} + assert "culturecode" not in headers + assert "norbix-language" not in headers + assert "cultureCode" not in transport.last_request["url"] + + +def test_async_language_header_override_and_unset() -> None: + async def run() -> None: + client, transport = _async_client() + await client.hub.regions.list() + assert "accept-language" not in transport.last_request["headers"] + + client.set_language("lt") + assert client.get_language() == "lt" + await client.hub.regions.list() + assert transport.last_request["headers"]["accept-language"] == "lt" + + await client.hub.regions.update_project_regions( + "proj-1", primary_region="nb-eu-germany", language="de" + ) + assert transport.last_request["headers"]["accept-language"] == "de" + await client.aclose() + + asyncio.run(run()) + + +def test_async_client_language_and_env(monkeypatch: pytest.MonkeyPatch) -> None: + async def run() -> None: + client, transport = _async_client(language="lt-LT, en;q=0.8") + await client.hub.regions.list() + assert transport.last_request["headers"]["accept-language"] == "lt-LT, en;q=0.8" + await client.aclose() + + monkeypatch.setenv("NORBIX_LANGUAGE", "en") + client2, transport2 = _async_client() + await client2.hub.regions.list() + assert transport2.last_request["headers"]["accept-language"] == "en" + await client2.aclose() + + asyncio.run(run()) From 682c363e50d96b64bfe75500a9ca568d3769e096 Mon Sep 17 00:00:00 2001 From: CodeMash Date: Wed, 14 Oct 2026 11:01:57 +0300 Subject: [PATCH 2/2] chore(types): regenerate reference DTOs from gateway refactoringV2 1c4e974f7 Refreshed in update mode against a private gateway stack on the same head (header options kept; BaseUrl left at the usual localhost value). - cultureCode gone from every request (language is Accept-Language only) - end-user push devices + messages (RegisterOwnPushDeviceRequest & co.) - RepairContactRolesRequest (POST /membership/users/repair-roles) - public echo without licence fields Co-Authored-By: Claude Opus 5.5 --- references/api2.dtos.ts | 548 ++++--- references/api_dtos.py | 483 ++++--- references/hub2.dtos.ts | 2980 +++++++++++++++++++++++++++++++++------ references/hub_dtos.py | 113 +- 4 files changed, 3282 insertions(+), 842 deletions(-) diff --git a/references/api2.dtos.ts b/references/api2.dtos.ts index 3658882..4d23ef6 100644 --- a/references/api2.dtos.ts +++ b/references/api2.dtos.ts @@ -1,6 +1,6 @@ /* Options: -Date: 2025-10-22 10:51:05 -Version: 8.30 +Date: 2026-10-14 08:01:40 +Version: 10.20 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: http://localhost:5002 @@ -45,13 +45,8 @@ export module CodeMashApi2 } // @DataContract(Namespace="http://codemash.io/types/") - export class RequestBase implements ICultureBasedRequest, IVersionBasedRequest, IHasCorrelationIdRequest + export class RequestBase implements IVersionBasedRequest, IHasCorrelationIdRequest { - /** @description Specify culture code when your response from the API should be localised. E.g.: en */ - // @DataMember - // @ApiMember(DataType="string", Description="Specify culture code when your response from the API should be localised. E.g.: en", Name="CultureCode", ParameterType="header") - public cultureCode?: string; - /** @description TimeZone */ // @DataMember // @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") @@ -70,11 +65,6 @@ export module CodeMashApi2 public constructor(init?: Partial) { (Object as any).assign(this, init); } } - export interface ICultureBasedRequest - { - cultureCode?: string; - } - export interface IVersionBasedRequest { version: string; @@ -260,33 +250,6 @@ export module CodeMashApi2 Production = 'Production', } - // @DataContract - export class EchoLicenseDto - { - // @DataMember(Name="domain") - public domain?: string; - - // @DataMember(Name="accountId") - public accountId?: string; - - // @DataMember(Name="email") - public email?: string; - - // @DataMember(Name="release") - public release?: string; - - // @DataMember(Name="expire") - public expire: number; - - // @DataMember(Name="isTrial") - public isTrial: boolean; - - // @DataMember(Name="cap") - public cap: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - export class EchoRegionDto { public code: string; @@ -297,6 +260,17 @@ export module CodeMashApi2 public constructor(init?: Partial) { (Object as any).assign(this, init); } } + export class EchoAgentSnippetDto + { + public client: string; + public kind: string; + public recommended: boolean; + public auth: string; + public config: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } + } + export class EchoAgentDto { public mcpUrl: string; @@ -304,10 +278,23 @@ export module CodeMashApi2 public installationType: string; public onboardingDocsUrl: string; public toolsUrl: string; + public cliPackage: string; + public cliInstallCommand: string; + public deviceAuthorizationUrl: string; + public deviceTokenUrl: string; + public snippets: EchoAgentSnippetDto[] = []; public constructor(init?: Partial) { (Object as any).assign(this, init); } } + export class EchoHostingPlatformDto + { + public provider: string; + public isAws: boolean; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } + } + export class PublicBrandDto { public displayName: string; @@ -622,6 +609,9 @@ export module CodeMashApi2 // @DataMember public names?: { [index:string]: string; }; + // @DataMember + public slug?: string; + // @DataMember public description?: string; @@ -686,6 +676,9 @@ export module CodeMashApi2 // @DataMember public names?: { [index:string]: string; }; + // @DataMember + public slug?: string; + // @DataMember public description?: string; @@ -792,7 +785,7 @@ export module CodeMashApi2 } // @DataContract - export class TriggerDto implements IHasViewId + export class TriggerDto implements IHasViewId, IQueuedTrigger { // @DataMember public type: TriggerType; @@ -815,6 +808,12 @@ export module CodeMashApi2 // @DataMember public activationCode?: string; + // @DataMember + public order?: number; + + // @DataMember + public breakOnError: boolean; + // @DataMember public savedByAuthId?: string; @@ -904,7 +903,7 @@ export module CodeMashApi2 export class FileResourceDto { // @DataMember(Order=1) - public id: string; + public id?: string; // @DataMember(Order=2) public originalFileName: string; @@ -994,207 +993,144 @@ export module CodeMashApi2 } // @DataContract - export class ResponseError - { - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public fieldName: string; - - // @DataMember(Order=3) - public message: string; - - // @DataMember(Order=4) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class ResponseStatus - { - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public message?: string; - - // @DataMember(Order=3) - public stackTrace?: string; - - // @DataMember(Order=4) - public errors?: ResponseError[]; - - // @DataMember(Order=5) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export interface IBindableContract - { - } - - export interface IHasViewId + export class OwnPushDeviceDto { - viewId: string; - } - - export interface ICursorArgs - { - field: string; - order: number; - } + // @DataMember + public id: string; - export class StringFieldDto extends JsonSchemaFieldDto - { // @DataMember - public format?: string; + public provider: string; // @DataMember - public pattern?: string; + public token: string; // @DataMember - public minLength?: number; + public platform?: string; // @DataMember - public maxLength?: number; + public osName?: string; // @DataMember - public translateOptions?: IReadOnlyDictionary; + public osVersion?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } + // @DataMember + public appVersion?: string; - export class DecimalFieldDto extends JsonSchemaFieldDto - { // @DataMember - public minimum?: number; + public deviceName?: string; // @DataMember - public maximum?: number; + public modelName?: string; // @DataMember - public multipleOf?: number; + public brand?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } + // @DataMember + public installationId?: string; - export class CurrencyFieldDto extends JsonSchemaFieldDto - { // @DataMember - public allowedCurrencies?: IReadOnlyList; + public locale?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } + // @DataMember + public timeZone?: string; - export class BooleanFieldDto extends JsonSchemaFieldDto - { + // @DataMember + public updatedAtUtc?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } - export class DateFieldDto extends JsonSchemaFieldDto + // @DataContract + export class OwnPushMessageDto { // @DataMember - public minimum?: number; + public id: string; // @DataMember - public maximum?: number; + public campaignId: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } + // @DataMember + public title?: string; - export class IntegerFieldDto extends JsonSchemaFieldDto - { // @DataMember - public minimum?: number; + public body?: string; // @DataMember - public maximum?: number; + public sentAtUtc?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } + // @DataMember + public isRead: boolean; - export class GeolocationFieldDto extends JsonSchemaFieldDto - { // @DataMember - public allowedTypes?: IReadOnlyList; + public readAtUtc?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } - export class TagsFieldDto extends JsonSchemaFieldDto + // @DataContract + export class ResponseError { + // @DataMember(Order=1) + public errorCode: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } + // @DataMember(Order=2) + public fieldName: string; - export class FileFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public storages?: IReadOnlyList; + // @DataMember(Order=3) + public message: string; + + // @DataMember(Order=4) + public meta?: { [index:string]: string; }; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } - export class TaxonomySelectionFieldDto extends JsonSchemaFieldDto + // @DataContract + export class ResponseStatus { - // @DataMember - public taxonomyId?: string; - - // @DataMember - public multiple: boolean; + // @DataMember(Order=1) + public errorCode: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } + // @DataMember(Order=2) + public message?: string; - export class CollectionSelectionFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public collectionId?: string; + // @DataMember(Order=3) + public stackTrace?: string; - // @DataMember - public displayField?: string; + // @DataMember(Order=4) + public errors?: ResponseError[]; - // @DataMember - public multiple: boolean; + // @DataMember(Order=5) + public meta?: { [index:string]: string; }; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } - export class UserSelectionFieldDto extends JsonSchemaFieldDto + export interface IBindableContract { - // @DataMember - public multiple: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } - export class RoleSelectionFieldDto extends JsonSchemaFieldDto + export interface IHasViewId { - // @DataMember - public multiple: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + viewId: string; } - export class EnumSelectionFieldDto extends JsonSchemaFieldDto + export interface ICursorArgs { - // @DataMember - public values?: IReadOnlyList; - - // @DataMember - public multiple: boolean; + field: string; + order: number; + } - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + export interface IQueuedTrigger + { + viewId: string; + name: string; + order?: number; + breakOnError: boolean; } export class EchoResponse { - public containerName?: string; - public ip: string; public release: CodeMashRelease; public runtime: CodeMashRuntime; public managedServiceHubUrl: string; @@ -1203,19 +1139,12 @@ export module CodeMashApi2 public apiUrl: string; public apiVersion: string; public hubVersion: string; - public mjmlUrl: string; public adminUrlTemplate?: string; - public license?: EchoLicenseDto; - public askForEnterpriseLicenseEmail?: string; public emailServiceConfigured: boolean; public rootBootstrapPasswordSource?: string; public regions?: EchoRegionDto[]; - public isProductionInstallation: boolean; - public licensingMode: string; - public graceDaysLeft?: number; - public installationDomain?: string; - public licensingDocsUrl?: string; public agent?: EchoAgentDto; + public hostingPlatform?: EchoHostingPlatformDto; public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -1492,6 +1421,15 @@ export module CodeMashApi2 public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } + export class GetFileByIdResponse extends ResponseBase + { + public file?: FileResourceRefDto; + public isPublic?: boolean; + public publicUrl?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + } + export class GetFileInfoResponse extends ResponseBase { public file?: FileResourceRefDto; @@ -1533,6 +1471,20 @@ export module CodeMashApi2 public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } + export class GetOwnPushDevicesResponse extends ResponseBase + { + public items: OwnPushDeviceDto[] = []; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + } + + export class GetOwnPushMessagesResponse extends ResponseBase + { + public list?: PaginatedResponse; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + } + // @DataContract export class AuthenticateResponse implements IHasSessionId, IHasBearerToken { @@ -2749,6 +2701,11 @@ export module CodeMashApi2 // @DataContract export class FindMergedTermTreeRequest extends CodeMashRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + // @DataMember public taxonomyName: string; @@ -2767,6 +2724,11 @@ export module CodeMashApi2 // @DataContract export class FindTaxonomyTreeRequest extends CodeMashRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + // @DataMember public includeTerms: boolean; @@ -2785,6 +2747,11 @@ export module CodeMashApi2 // @DataContract export class FindTermsRequest extends CodeMashListPaginationRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + // @DataMember public taxonomyName: string; @@ -2812,6 +2779,11 @@ export module CodeMashApi2 // @DataContract export class FindTermsChildrenRequest extends CodeMashListPaginationRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + // @DataMember public taxonomyName: string; @@ -2839,6 +2811,11 @@ export module CodeMashApi2 // @DataContract export class FindTermTreeRequest extends CodeMashRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + // @DataMember public taxonomyName: string; @@ -3079,6 +3056,12 @@ export module CodeMashApi2 // @DataMember public sortOrder?: number; + // @DataMember + public expandReferences: boolean; + + // @DataMember + public allLanguages: boolean; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'FindRequest'; } public getMethod() { return 'GET'; } @@ -3100,6 +3083,12 @@ export module CodeMashApi2 // @DataMember public databaseIntegrationId?: string; + // @DataMember + public expandReferences: boolean; + + // @DataMember + public allLanguages: boolean; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'FindOneRequest'; } public getMethod() { return 'GET'; } @@ -3127,6 +3116,14 @@ export module CodeMashApi2 // @DataMember public pagingArgs?: PagingArgs; + /** @description Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. */ + // @DataMember + // @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") + public expandReferences: boolean; + + // @DataMember + public allLanguages: boolean; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'FindOwnRequest'; } public getMethod() { return 'GET'; } @@ -3220,6 +3217,9 @@ export module CodeMashApi2 // @DataMember public update: string; + // @DataMember + public arrayFilters?: string; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'UpdateManyRequest'; } public getMethod() { return 'PUT'; } @@ -3244,6 +3244,9 @@ export module CodeMashApi2 // @DataMember public update: string; + // @DataMember + public arrayFilters?: string; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'UpdateOneRequest'; } public getMethod() { return 'PUT'; } @@ -3373,6 +3376,24 @@ export module CodeMashApi2 public createResponse() { return new Blob(); } } + /** @description Files */ + // @Route("/{version}/files/{filesIntegrationId}/by-id/{id}", "GET") + // @Api(Description="Files") + // @DataContract + export class GetFileByIdRequest extends CodeMashRequestBase implements IReturn + { + // @DataMember + public filesIntegrationId: string; + + // @DataMember + public id: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetFileByIdRequest'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetFileByIdResponse(); } + } + /** @description Files */ // @Route("/{version}/files/{filesIntegrationId}/info", "GET") // @Api(Description="Files") @@ -3487,6 +3508,165 @@ export module CodeMashApi2 public createResponse() { return new TestFilesIntegrationResponse(); } } + /** @description Files */ + // @Route("/{version}/files/{filesIntegrationId}/use", "POST") + // @Api(Description="Files") + // @DataContract + export class UseFileRequest extends CodeMashRequestBase implements IReturn + { + // @DataMember + public filesIntegrationId: string; + + // @DataMember + public path: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'UseFileRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new IdResponse(); } + } + + /** @description Registers or refreshes a push device for the signed-in user. */ + // @Route("/{version}/notifications/push/devices", "POST") + // @Api(Description="Registers or refreshes a push device for the signed-in user.") + export class RegisterOwnPushDeviceRequest extends CodeMashRequestBase implements IReturn + { + /** @description Who issued the token: expo (getExpoPushTokenAsync), fcm (Android / Firebase) or apns (iOS). */ + // @ApiMember(Description="Who issued the token: expo (getExpoPushTokenAsync), fcm (Android / Firebase) or apns (iOS).", IsRequired=true) + public provider: string; + + /** @description The push token, exactly as the provider gave it. */ + // @ApiMember(Description="The push token, exactly as the provider gave it.", IsRequired=true) + public token: string; + + /** @description The app's platform: ios, android or web. */ + // @ApiMember(Description="The app's platform: ios, android or web.") + public platform?: string; + + /** @description Operating system name, e.g. iOS. */ + // @ApiMember(Description="Operating system name, e.g. iOS.") + public osName?: string; + + /** @description Operating system version, e.g. 18.1. */ + // @ApiMember(Description="Operating system version, e.g. 18.1.") + public osVersion?: string; + + /** @description The app version, e.g. 2.4.1. */ + // @ApiMember(Description="The app version, e.g. 2.4.1.") + public appVersion?: string; + + /** @description The device name the user sees, e.g. Anna's iPhone. */ + // @ApiMember(Description="The device name the user sees, e.g. Anna's iPhone.") + public deviceName?: string; + + /** @description The device model, e.g. iPhone 15. */ + // @ApiMember(Description="The device model, e.g. iPhone 15.") + public modelName?: string; + + public brand?: string; + public manufacturer?: string; + /** @description A stable id the app keeps for this installation (not the token). */ + // @ApiMember(Description="A stable id the app keeps for this installation (not the token).") + public installationId?: string; + + /** @description The device locale, e.g. lt-LT. */ + // @ApiMember(Description="The device locale, e.g. lt-LT.") + public locale?: string; + + /** @description The device time zone (IANA), e.g. Europe/Vilnius. */ + // @ApiMember(Description="The device time zone (IANA), e.g. Europe/Vilnius.") + public timeZone?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'RegisterOwnPushDeviceRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new IdResponse(); } + } + + /** @description Lists the signed-in user's own push devices. */ + // @Route("/{version}/notifications/push/devices", "GET") + // @Api(Description="Lists the signed-in user's own push devices.") + export class GetOwnPushDevicesRequest extends CodeMashRequestBase implements IReturn + { + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetOwnPushDevicesRequest'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetOwnPushDevicesResponse(); } + } + + /** @description Removes one of the signed-in user's own push devices by id. */ + // @Route("/{version}/notifications/push/devices/{Id}", "DELETE") + // @Api(Description="Removes one of the signed-in user's own push devices by id.") + export class DeleteOwnPushDeviceRequest extends CodeMashRequestBase implements IReturn + { + /** @description The device id (pnd_…) from the devices list or the register answer. */ + // @ApiMember(Description="The device id (pnd_…) from the devices list or the register answer.", IsRequired=true) + public id: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'DeleteOwnPushDeviceRequest'; } + public getMethod() { return 'DELETE'; } + public createResponse() { return new EmptyResponse(); } + } + + /** @description Removes the signed-in user's push device registered with a token (sign-out). */ + // @Route("/{version}/notifications/push/devices", "DELETE") + // @Api(Description="Removes the signed-in user's push device registered with a token (sign-out).") + export class DeleteOwnPushDeviceByTokenRequest extends CodeMashRequestBase implements IReturn + { + /** @description The push token the device was registered with. */ + // @ApiMember(Description="The push token the device was registered with.", IsRequired=true) + public token: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'DeleteOwnPushDeviceByTokenRequest'; } + public getMethod() { return 'DELETE'; } + public createResponse() { return new EmptyResponse(); } + } + + /** @description Lists the push messages sent to the signed-in user. */ + // @Route("/{version}/notifications/push/messages", "GET") + // @Api(Description="Lists the push messages sent to the signed-in user.") + export class GetOwnPushMessagesRequest extends CodeMashListPaginationRequestBase implements IReturn + { + /** @description Only messages the caller has not marked read. */ + // @ApiMember(Description="Only messages the caller has not marked read.") + public unreadOnly: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetOwnPushMessagesRequest'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetOwnPushMessagesResponse(); } + } + + /** @description Marks one push message sent to the signed-in user read. */ + // @Route("/{version}/notifications/push/messages/{Id}/read", "POST") + // @Api(Description="Marks one push message sent to the signed-in user read.") + export class MarkOwnPushMessageReadRequest extends CodeMashRequestBase implements IReturn + { + /** @description The message id (ntf_…) from the messages list. */ + // @ApiMember(Description="The message id (ntf_…) from the messages list.", IsRequired=true) + public id: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'MarkOwnPushMessageReadRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new EmptyResponse(); } + } + + /** @description Marks every push message sent to the signed-in user read. */ + // @Route("/{version}/notifications/push/messages/read", "POST") + // @Api(Description="Marks every push message sent to the signed-in user read.") + export class MarkAllOwnPushMessagesReadRequest extends CodeMashRequestBase implements IReturn + { + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'MarkAllOwnPushMessagesReadRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new EmptyResponse(); } + } + /** @description Sign In */ // @Route("/auth", "GET,POST") // @Route("/auth/{provider}", "GET,POST") diff --git a/references/api_dtos.py b/references/api_dtos.py index a1d4c17..31fe756 100644 --- a/references/api_dtos.py +++ b/references/api_dtos.py @@ -1,5 +1,5 @@ """ Options: -Date: 2026-10-07 10:03:25 +Date: 2026-10-14 08:01:41 Version: 10.20 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: http://localhost:5002 @@ -29,14 +29,7 @@ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass -class RequestBase(ICultureBasedRequest, IVersionBasedRequest, IHasCorrelationIdRequest): - # @ApiMember(DataType="string", Description="Specify culture code when your response from the API should be localised. E.g.: en", Name="CultureCode", ParameterType="header") - culture_code: Optional[str] = None - """ - Specify culture code when your response from the API should be localised. E.g.: en - """ - - +class RequestBase(IVersionBasedRequest, IHasCorrelationIdRequest): # @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") time_zone_id: Optional[str] = None """ @@ -58,10 +51,6 @@ class RequestBase(ICultureBasedRequest, IVersionBasedRequest, IHasCorrelationIdR """ -class ICultureBasedRequest: - culture_code: Optional[str] = None - - class IVersionBasedRequest: version: Optional[str] = None @@ -248,18 +237,6 @@ class CodeMashRuntime(str, Enum): PRODUCTION = 'Production' -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoLicenseDto: - domain: Optional[str] = None - account_id: Optional[str] = None - email: Optional[str] = None - release: Optional[str] = None - expire: int = 0 - is_trial: bool = False - projects_cap: int = 0 - - @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class EchoRegionDto: @@ -269,6 +246,16 @@ class EchoRegionDto: hub_url: Optional[str] = None +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class EchoAgentSnippetDto: + client: Optional[str] = None + kind: Optional[str] = None + recommended: bool = False + auth: Optional[str] = None + config: Optional[str] = None + + @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class EchoAgentDto: @@ -277,6 +264,18 @@ class EchoAgentDto: installation_type: Optional[str] = None onboarding_docs_url: Optional[str] = None tools_url: Optional[str] = None + cli_package: Optional[str] = None + cli_install_command: Optional[str] = None + device_authorization_url: Optional[str] = None + device_token_url: Optional[str] = None + snippets: List[EchoAgentSnippetDto] = field(default_factory=list) + + +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class EchoHostingPlatformDto: + provider: Optional[str] = None + is_aws: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @@ -647,7 +646,7 @@ class TriggerActionDto: @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass -class TriggerDto(IHasViewId): +class TriggerDto(IHasViewId, IQueuedTrigger): type: Optional[TriggerType] = None view_id: Optional[str] = None name: Optional[str] = None @@ -655,6 +654,8 @@ class TriggerDto(IHasViewId): description: Optional[str] = None is_enabled: bool = False activation_code: Optional[str] = None + order: Optional[int] = None + break_on_error: bool = False saved_by_auth_id: Optional[str] = None @@ -744,170 +745,60 @@ class IntegrationTestResultItemDto: errors: Optional[IReadOnlyList[str]] = None -class IBindableContract: - pass - - -class IHasViewId: - view_id: Optional[str] = None - - -class ICursorArgs: - field: Optional[str] = None - order: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StringFieldDto(JsonSchemaFieldDto): - format: Optional[str] = None - pattern: Optional[str] = None - min_length: Optional[int] = None - max_length: Optional[int] = None - translate_options: Optional[IReadOnlyDictionary[str, str]] = None - default: Optional[str] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DecimalFieldDto(JsonSchemaFieldDto): - minimum: Optional[Decimal] = None - maximum: Optional[Decimal] = None - multiple_of: Optional[Decimal] = None - default: Optional[Decimal] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CurrencyDefaultDto: - value: Decimal = decimal.Decimal(0) - currency: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CurrencyFieldDto(JsonSchemaFieldDto): - allowed_currencies: Optional[IReadOnlyList[str]] = None - multiple_of: Optional[Decimal] = None - minimum: Optional[Decimal] = None - maximum: Optional[Decimal] = None - default: Optional[CurrencyDefaultDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BooleanFieldDto(JsonSchemaFieldDto): - default: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DateFieldDto(JsonSchemaFieldDto): - minimum: Optional[int] = None - maximum: Optional[int] = None - default: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IntegerFieldDto(JsonSchemaFieldDto): - minimum: Optional[int] = None - maximum: Optional[int] = None - default: Optional[int] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GeolocationFieldDto(JsonSchemaFieldDto): - allowed_types: Optional[IReadOnlyList[str]] = None - - @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass -class TagsFieldDto(JsonSchemaFieldDto): - min_items: Optional[int] = None - max_items: Optional[int] = None - default: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileFieldDto(JsonSchemaFieldDto): - storages: Optional[IReadOnlyList[str]] = None - min_items: Optional[int] = None - max_items: Optional[int] = None - allowed_file_type: Optional[str] = None - max_size_mb: Optional[Decimal] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomySelectionFieldDto(JsonSchemaFieldDto): - taxonomy_id: Optional[str] = None - multiple: bool = False - display_field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CollectionSelectionFieldDto(JsonSchemaFieldDto): - collection_id: Optional[str] = None - display_field: Optional[str] = None - multiple: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserSelectionFieldDto(JsonSchemaFieldDto): - multiple: bool = False - display_field: Optional[str] = None +class OwnPushDeviceDto: + id: Optional[str] = None + provider: Optional[str] = None + token: Optional[str] = None + platform: Optional[str] = None + os_name: Optional[str] = None + os_version: Optional[str] = None + app_version: Optional[str] = None + device_name: Optional[str] = None + model_name: Optional[str] = None + brand: Optional[str] = None + installation_id: Optional[str] = None + locale: Optional[str] = None + time_zone: Optional[str] = None + updated_at_utc: Optional[datetime.datetime] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass -class RoleSelectionFieldDto(JsonSchemaFieldDto): - multiple: bool = False - display_field: Optional[str] = None +class OwnPushMessageDto: + id: Optional[str] = None + campaign_id: Optional[str] = None + title: Optional[str] = None + body: Optional[str] = None + sent_at_utc: Optional[datetime.datetime] = None + is_read: bool = False + read_at_utc: Optional[datetime.datetime] = None -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnumSelectionFieldDto(JsonSchemaFieldDto): - values: Optional[IReadOnlyList[str]] = None - multiple: bool = False - default: Optional[IReadOnlyList[str]] = None +class IBindableContract: + pass -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ObjectFieldDto(JsonSchemaFieldDto): - properties: Optional[IReadOnlyList[JsonSchemaFieldDto]] = None - required: Optional[IReadOnlyList[str]] = None +class IHasViewId: + view_id: Optional[str] = None -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ArrayFieldDto(JsonSchemaFieldDto): - items: Optional[JsonSchemaFieldDto] = None - min_items: Optional[int] = None - max_items: Optional[int] = None - unique_items: Optional[bool] = None +class ICursorArgs: + field: Optional[str] = None + order: int = 0 -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class JsonFieldDto(JsonSchemaFieldDto): - max_bytes: Optional[int] = None +class IQueuedTrigger: + view_id: Optional[str] = None + name: Optional[str] = None + order: Optional[int] = None + break_on_error: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class EchoResponse: - container_name: Optional[str] = None - ip: Optional[str] = None release: Optional[CodeMashRelease] = None runtime: Optional[CodeMashRuntime] = None managed_service_hub_url: Optional[str] = None @@ -916,19 +807,12 @@ class EchoResponse: api_url: Optional[str] = None api_version: Optional[str] = None hub_version: Optional[str] = None - mjml_url: Optional[str] = None admin_url_template: Optional[str] = None - license: Optional[EchoLicenseDto] = None - ask_for_enterprise_license_email: Optional[str] = None email_service_configured: bool = False root_bootstrap_password_source: Optional[str] = None regions: Optional[List[EchoRegionDto]] = None - is_production_installation: bool = False - licensing_mode: Optional[str] = None - grace_days_left: Optional[int] = None - installation_domain: Optional[str] = None - licensing_docs_url: Optional[str] = None agent: Optional[EchoAgentDto] = None + hosting_platform: Optional[EchoHostingPlatformDto] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @@ -1195,6 +1079,18 @@ class TestFilesIntegrationResponse(ResponseBase): items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class GetOwnPushDevicesResponse(ResponseBase): + items: List[OwnPushDeviceDto] = field(default_factory=list) + + +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class GetOwnPushMessagesResponse(ResponseBase): + list: Optional[PaginatedResponse[OwnPushMessageDto]] = None + + # @Route("/{version}/echo", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass @@ -2289,6 +2185,13 @@ class FindMergedTermTreeRequest(CodeMashRequestBase, IReturn[FindMergedTermTreeR Database """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + taxonomy_name: Optional[str] = None database_integration_id: Optional[str] = None @@ -2302,6 +2205,13 @@ class FindTaxonomyTreeRequest(CodeMashRequestBase, IReturn[FindTaxonomyTreeRespo Database """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + include_terms: bool = False database_integration_id: Optional[str] = None @@ -2315,6 +2225,13 @@ class FindTermsRequest(CodeMashListPaginationRequestBase, IReturn[FindTermsRespo Database """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + taxonomy_name: Optional[str] = None database_integration_id: Optional[str] = None filter: Optional[str] = None @@ -2331,6 +2248,13 @@ class FindTermsChildrenRequest(CodeMashListPaginationRequestBase, IReturn[FindTe Database """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + taxonomy_name: Optional[str] = None parent_id: Optional[str] = None database_integration_id: Optional[str] = None @@ -2347,6 +2271,13 @@ class FindTermTreeRequest(CodeMashRequestBase, IReturn[FindTermTreeResponse]): Database """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + taxonomy_name: Optional[str] = None root_term_id: Optional[str] = None depth: Optional[int] = None @@ -2498,6 +2429,7 @@ class FindRequest(CodeMashListPaginationRequestBase, IReturn[FindResponse]): sort_by: Optional[str] = None sort_order: Optional[int] = None expand_references: bool = False + all_languages: bool = False # @Route("/{version}/database/collections/{collectionName}/{id}", "GET") @@ -2513,6 +2445,7 @@ class FindOneRequest(CodeMashRequestBase, IReturn[FindOneResponse]): id: Optional[str] = None database_integration_id: Optional[str] = None expand_references: bool = False + all_languages: bool = False # @Route("/{version}/database/collections/{collectionName}/own", "GET") @@ -2536,6 +2469,9 @@ class FindOwnRequest(CodeMashListPaginationRequestBase, IReturn[FindResponse]): """ + all_languages: bool = False + + # @Route("/{version}/database/collections/{collectionName}/many", "POST") # @Api(Description="Database") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @@ -2787,3 +2723,192 @@ class TestFilesIntegrationRequest(CodeMashRequestBase, IReturn[TestFilesIntegrat files_integration_id: Optional[str] = None + +# @Route("/{version}/files/{filesIntegrationId}/use", "POST") +# @Api(Description="Files") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class UseFileRequest(CodeMashRequestBase, IReturn[IdResponse]): + """ + Files + """ + + files_integration_id: Optional[str] = None + path: Optional[str] = None + + +# @Route("/{version}/notifications/push/devices", "POST") +# @Api(Description="Registers or refreshes a push device for the signed-in user.") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class RegisterOwnPushDeviceRequest(CodeMashRequestBase, IReturn[IdResponse]): + """ + Registers or refreshes a push device for the signed-in user. + """ + + # @ApiMember(Description="Who issued the token: expo (getExpoPushTokenAsync), fcm (Android / Firebase) or apns (iOS).", IsRequired=true) + provider: Optional[str] = None + """ + Who issued the token: expo (getExpoPushTokenAsync), fcm (Android / Firebase) or apns (iOS). + """ + + + # @ApiMember(Description="The push token, exactly as the provider gave it.", IsRequired=true) + token: Optional[str] = None + """ + The push token, exactly as the provider gave it. + """ + + + # @ApiMember(Description="The app's platform: ios, android or web.") + platform: Optional[str] = None + """ + The app's platform: ios, android or web. + """ + + + # @ApiMember(Description="Operating system name, e.g. iOS.") + os_name: Optional[str] = None + """ + Operating system name, e.g. iOS. + """ + + + # @ApiMember(Description="Operating system version, e.g. 18.1.") + os_version: Optional[str] = None + """ + Operating system version, e.g. 18.1. + """ + + + # @ApiMember(Description="The app version, e.g. 2.4.1.") + app_version: Optional[str] = None + """ + The app version, e.g. 2.4.1. + """ + + + # @ApiMember(Description="The device name the user sees, e.g. Anna's iPhone.") + device_name: Optional[str] = None + """ + The device name the user sees, e.g. Anna's iPhone. + """ + + + # @ApiMember(Description="The device model, e.g. iPhone 15.") + model_name: Optional[str] = None + """ + The device model, e.g. iPhone 15. + """ + + + brand: Optional[str] = None + manufacturer: Optional[str] = None + # @ApiMember(Description="A stable id the app keeps for this installation (not the token).") + installation_id: Optional[str] = None + """ + A stable id the app keeps for this installation (not the token). + """ + + + # @ApiMember(Description="The device locale, e.g. lt-LT.") + locale: Optional[str] = None + """ + The device locale, e.g. lt-LT. + """ + + + # @ApiMember(Description="The device time zone (IANA), e.g. Europe/Vilnius.") + time_zone: Optional[str] = None + """ + The device time zone (IANA), e.g. Europe/Vilnius. + """ + + +# @Route("/{version}/notifications/push/devices", "GET") +# @Api(Description="Lists the signed-in user's own push devices.") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class GetOwnPushDevicesRequest(CodeMashRequestBase, IReturn[GetOwnPushDevicesResponse]): + """ + Lists the signed-in user's own push devices. + """ + + pass + + +# @Route("/{version}/notifications/push/devices/{Id}", "DELETE") +# @Api(Description="Removes one of the signed-in user's own push devices by id.") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class DeleteOwnPushDeviceRequest(CodeMashRequestBase, IReturn[EmptyResponse]): + """ + Removes one of the signed-in user's own push devices by id. + """ + + # @ApiMember(Description="The device id (pnd_…) from the devices list or the register answer.", IsRequired=true) + id: Optional[str] = None + """ + The device id (pnd_…) from the devices list or the register answer. + """ + + +# @Route("/{version}/notifications/push/devices", "DELETE") +# @Api(Description="Removes the signed-in user's push device registered with a token (sign-out).") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class DeleteOwnPushDeviceByTokenRequest(CodeMashRequestBase, IReturn[EmptyResponse]): + """ + Removes the signed-in user's push device registered with a token (sign-out). + """ + + # @ApiMember(Description="The push token the device was registered with.", IsRequired=true) + token: Optional[str] = None + """ + The push token the device was registered with. + """ + + +# @Route("/{version}/notifications/push/messages", "GET") +# @Api(Description="Lists the push messages sent to the signed-in user.") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class GetOwnPushMessagesRequest(CodeMashListPaginationRequestBase, IReturn[GetOwnPushMessagesResponse]): + """ + Lists the push messages sent to the signed-in user. + """ + + # @ApiMember(Description="Only messages the caller has not marked read.") + unread_only: bool = False + """ + Only messages the caller has not marked read. + """ + + +# @Route("/{version}/notifications/push/messages/{Id}/read", "POST") +# @Api(Description="Marks one push message sent to the signed-in user read.") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class MarkOwnPushMessageReadRequest(CodeMashRequestBase, IReturn[EmptyResponse]): + """ + Marks one push message sent to the signed-in user read. + """ + + # @ApiMember(Description="The message id (ntf_…) from the messages list.", IsRequired=true) + id: Optional[str] = None + """ + The message id (ntf_…) from the messages list. + """ + + +# @Route("/{version}/notifications/push/messages/read", "POST") +# @Api(Description="Marks every push message sent to the signed-in user read.") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class MarkAllOwnPushMessagesReadRequest(CodeMashRequestBase, IReturn[EmptyResponse]): + """ + Marks every push message sent to the signed-in user read. + """ + + pass + diff --git a/references/hub2.dtos.ts b/references/hub2.dtos.ts index 0e10cd1..5739242 100644 --- a/references/hub2.dtos.ts +++ b/references/hub2.dtos.ts @@ -1,5 +1,5 @@ /* Options: -Date: 2026-10-05 16:14:43 +Date: 2026-10-14 08:01:42 Version: 10.20 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: http://localhost:5001 @@ -154,6 +154,17 @@ export enum TokenMappingResolverType EmailFooters = 'EmailFooters', Old = 'Old', New = 'New', + RequestInput = 'RequestInput', + IntegrationConfig = 'IntegrationConfig', + IntegrationSecret = 'IntegrationSecret', +} + +export enum SecretValueFormat +{ + Raw = 'Raw', + Bearer = 'Bearer', + Basic = 'Basic', + Prefixed = 'Prefixed', } // @DataContract @@ -168,6 +179,12 @@ export class TokenMappingDto // @DataMember public resolver: TokenMappingResolverType; + // @DataMember + public secretKeys?: string[]; + + // @DataMember + public secretFormat?: SecretValueFormat; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -289,6 +306,8 @@ export class SaveTriggerRequest public description?: string; public isEnabled: boolean; public preExecuteCode?: string; + public order?: number; + public breakOnError: boolean; public action: TriggerActionDto; public constructor(init?: Partial) { (Object as any).assign(this, init); } @@ -1012,8 +1031,16 @@ export class PushIntegrationRequest export class EdgeWebPushIntegrationRequest extends PushIntegrationRequest { public provider: PushProvider; + /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ + // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) public vapidPublicKey: string; + + /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ + // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) public vapidPrivateKey: string; + + /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ + // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") public subject?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -1022,9 +1049,20 @@ export class EdgeWebPushIntegrationRequest extends PushIntegrationRequest export class ChromePluginPushIntegrationRequest extends PushIntegrationRequest { public provider: PushProvider; + /** @description The extension's Chrome id: 32 lower-case letters a–p, as shown on chrome://extensions. */ + // @ApiMember(Description="The extension's Chrome id: 32 lower-case letters a–p, as shown on chrome://extensions.", IsRequired=true) public extensionId: string; + + /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ + // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) public vapidPublicKey: string; + + /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ + // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) public vapidPrivateKey: string; + + /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ + // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") public subject?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -1043,8 +1081,16 @@ export class SafariPushIntegrationRequest extends PushIntegrationRequest export class ChromeWebPushIntegrationRequest extends PushIntegrationRequest { public provider: PushProvider; + /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ + // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) public vapidPublicKey: string; + + /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ + // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) public vapidPrivateKey: string; + + /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ + // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") public subject?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -1053,8 +1099,16 @@ export class ChromeWebPushIntegrationRequest extends PushIntegrationRequest export class FirefoxWebPushIntegrationRequest extends PushIntegrationRequest { public provider: PushProvider; + /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ + // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) public vapidPublicKey: string; + + /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ + // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) public vapidPrivateKey: string; + + /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ + // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") public subject?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -1094,6 +1148,7 @@ export enum CodeProvider Netlify = 'Netlify', SupabaseEdge = 'SupabaseEdge', Modal = 'Modal', + Fake = 'Fake', } export class CodeIntegrationRequest @@ -1428,7 +1483,7 @@ export class FileChecksumDto export class FileResourceDto { // @DataMember(Order=1) - public id: string; + public id?: string; // @DataMember(Order=2) public originalFileName: string; @@ -1696,6 +1751,33 @@ export class TriggerActionPushDto extends TriggerActionDto public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +// @DataContract +export class FunctionRefDto +{ + // @DataMember + public integrationId: string; + + // @DataMember + public provider?: CodeProvider; + + // @DataMember + public functionId: string; + + // @DataMember + public qualifier?: string; + + // @DataMember + public displayName?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export enum CodeInvocationType +{ + Sync = 'Sync', + Async = 'Async', +} + // @DataContract export class CodeDeliverySettingsDto { @@ -1709,10 +1791,28 @@ export class CodeDeliverySettingsDto export class TriggerActionCodeDto extends TriggerActionDto { // @DataMember - public functionId: string; + public functionRef?: FunctionRefDto; // @DataMember - public deliverySettings: CodeDeliverySettingsDto; + public runAsUserId?: string; + + // @DataMember + public invocationType: CodeInvocationType; + + // @DataMember + public config?: string; + + // @DataMember + public deliverySettings?: CodeDeliverySettingsDto; + + // @DataMember + public functionId?: string; + + // @DataMember + public activationCode?: string; + + // @DataMember + public meta?: { [index:string]: string; }; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } @@ -1837,17 +1937,15 @@ export class TriggerActionMarketplaceDto extends TriggerActionDto // @DataMember public payload?: { [index:string]: string; }; + // @DataMember + public runAsUserId?: string; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } // @DataContract(Namespace="http://codemash.io/types/") -export class RequestBase implements ICultureBasedRequest, IVersionBasedRequest, IHasCorrelationIdRequest +export class RequestBase implements IVersionBasedRequest, IHasCorrelationIdRequest { - /** @description Specify culture code when your response from the API should be localised. E.g.: en */ - // @DataMember - // @ApiMember(DataType="string", Description="Specify culture code when your response from the API should be localised. E.g.: en", Name="CultureCode", ParameterType="header") - public cultureCode?: string; - /** @description TimeZone */ // @DataMember // @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") @@ -2760,6 +2858,7 @@ export class DatabaseIntegrationDto extends IntegrationDto { public provider: DatabaseProvider; public isSystemOwned: boolean; + public canManageIndexes?: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } @@ -2894,6 +2993,8 @@ export class AppleApnsPushIntegrationDto extends PushIntegrationDto { public teamId: string; public appBundleId: string; + public keyId?: string; + public isProduction: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } @@ -3044,6 +3145,7 @@ export enum SchedulerTaskType SmsCampaign = 'SmsCampaign', CodeFunctionalCall = 'CodeFunctionalCall', WebhookCall = 'WebhookCall', + MarketplaceFunctionCall = 'MarketplaceFunctionCall', } // @DataContract @@ -3088,6 +3190,15 @@ export class SchedulerTaskDto // @DataMember public updatedAtUnix?: number; + // @DataMember + public isFailing: boolean; + + // @DataMember + public lastFailureReason?: string; + + // @DataMember + public lastFailedAtUnix?: number; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -3289,6 +3400,33 @@ export enum MarketplaceCategory Calendar = 'Calendar', } +// @DataContract +export class MarketplaceValidationStepResultDto +{ + // @DataMember + public key: string; + + // @DataMember + public label: string; + + // @DataMember + public requiredForFunctions: boolean; + + // @DataMember + public succeeded: boolean; + + // @DataMember + public skipped: boolean; + + // @DataMember + public message?: string; + + // @DataMember + public errorCode?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + // @DataContract export class MarketplaceIntegrationDto extends IntegrationDto { @@ -3310,47 +3448,43 @@ export class MarketplaceIntegrationDto extends IntegrationDto // @DataMember public config: IReadOnlyDictionary; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} + // @DataMember + public lastValidationSteps?: MarketplaceValidationStepResultDto[]; -export enum MarketplaceTokenResolverKind -{ - Static = 'Static', - Request = 'Request', - Project = 'Project', - Initiator = 'Initiator', - Custom = 'Custom', - IntegrationConfig = 'IntegrationConfig', - IntegrationSecret = 'IntegrationSecret', -} + // @DataMember + public signedIn: boolean; -export enum MarketplaceSecretValueFormat -{ - Raw = 'Raw', - Bearer = 'Bearer', - Basic = 'Basic', - Prefixed = 'Prefixed', + // @DataMember + public signedInBy?: string; + + // @DataMember + public signedInAt?: string; + + // @DataMember + public tokenExpiresAt?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } // @DataContract -export class MarketplaceTokenMappingDto +export class MarketplaceFunctionParameterDto { // @DataMember - public token: string; + public name: string; // @DataMember - public resolver: MarketplaceTokenResolverKind; + public type: string; // @DataMember - public value?: string; + public description?: string; // @DataMember - public secretKeys?: string[]; + public isRequired: boolean; // @DataMember - public format: MarketplaceSecretValueFormat; + public defaultValue?: string; - public constructor(init?: Partial) { (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract @@ -3375,14 +3509,27 @@ export class MarketplaceFunctionDto implements IHasViewId public isEnabled: boolean; // @DataMember - public requestTemplate: string; + public requestTemplate?: string; + + // @DataMember + public arguments: { [index:string]: string; } = {}; + + // @DataMember + public inputs: MarketplaceFunctionParameterDto[] = []; // @DataMember - public mappedTokens: MarketplaceTokenMappingDto[] = []; + public mappedTokens: TokenMappingDto[] = []; public constructor(init?: Partial) { (Object as any).assign(this, init); } } +export enum MarketplaceAvailability +{ + Development = 'Development', + Staging = 'Staging', + Production = 'Production', +} + export enum MarketplaceFieldType { String = 'String', @@ -3431,24 +3578,18 @@ export class MarketplaceFieldDefinitionDto } // @DataContract -export class MarketplaceFunctionParameterDto +export class MarketplaceInstallFormDto { // @DataMember - public name: string; - - // @DataMember - public type: string; - - // @DataMember - public description?: string; + public dataSchema: string; // @DataMember - public isRequired: boolean; + public uiSchema: string; // @DataMember - public defaultValue?: string; + public secretKeys: string[] = []; - public constructor(init?: Partial) { (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } export enum MarketplaceParameterLocation @@ -3507,6 +3648,37 @@ export class MarketplaceHttpRequestSpecDto public constructor(init?: Partial) { (Object as any).assign(this, init); } } +// @DataContract +export class MarketplaceValidationStepDto +{ + // @DataMember + public key: string; + + // @DataMember + public label: string; + + // @DataMember + public description?: string; + + // @DataMember + public requiredForFunctions: boolean; + + // @DataMember + public probe?: MarketplaceHttpRequestSpecDto; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export enum MarketplaceFormKind +{ + Generic = 'Generic', + DatabaseQuery = 'DatabaseQuery', + DatabaseWrite = 'DatabaseWrite', + Message = 'Message', + Prompt = 'Prompt', + Web = 'Web', +} + // @DataContract export class MarketplaceFunctionDefinitionDto { @@ -3525,6 +3697,12 @@ export class MarketplaceFunctionDefinitionDto // @DataMember public group?: string; + // @DataMember + public formKind: MarketplaceFormKind; + + // @DataMember + public inputs: IReadOnlyList; + // @DataMember public parameters: IReadOnlyList; @@ -3538,7 +3716,7 @@ export class MarketplaceFunctionDefinitionDto public request?: MarketplaceHttpRequestSpecDto; // @DataMember - public defaultTokenMappings: MarketplaceTokenMappingDto[] = []; + public defaultTokenMappings: TokenMappingDto[] = []; public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -3573,6 +3751,18 @@ export class MarketplaceListingDto implements IHasViewId // @DataMember public documentationUrl?: string; + // @DataMember + public videoUrl?: string; + + // @DataMember + public availability: MarketplaceAvailability; + + // @DataMember + public connectSteps: IReadOnlyList; + + // @DataMember + public oAuthRedirectUrl?: string; + // @DataMember public isOfficial: boolean; @@ -3588,6 +3778,12 @@ export class MarketplaceListingDto implements IHasViewId // @DataMember public secretFields: IReadOnlyList; + // @DataMember + public installForm?: MarketplaceInstallFormDto; + + // @DataMember + public validationSteps: IReadOnlyList; + // @DataMember public functions: IReadOnlyList; @@ -3827,84 +4023,706 @@ export class ConversationSnapshotEntryWireDto extends AiChatEntryWireDto public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } -export interface ICultureBasedRequest +export class JsonSchemaFieldDto { - cultureCode?: string; -} + // @DataMember + public fieldName: string; -export interface IVersionBasedRequest -{ - version: string; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } -export interface IHasCorrelationIdRequest +export class StringFieldDto extends JsonSchemaFieldDto { - correlationId?: string; -} + // @DataMember + public format?: string; -export interface IHasProjectId -{ - projectId: string; -} + // @DataMember + public pattern?: string; -export interface IHasEnv -{ - env?: string; -} + // @DataMember + public minLength?: number; -export enum SubscriptionType -{ - ManagedService = 'ManagedService', - License = 'License', -} + // @DataMember + public maxLength?: number; -export interface IHasAccountId -{ - accountId: string; -} + // @DataMember + public translateOptions?: IReadOnlyDictionary; -// @DataContract -export class TagDescriptionDto -{ // @DataMember - public title: string; + public default?: string; // @DataMember - public description?: string; + public unique?: boolean; - public constructor(init?: Partial) { (Object as any).assign(this, init); } + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } -// @DataContract -export class TagTranslationDto +export class DecimalFieldDto extends JsonSchemaFieldDto { // @DataMember - public language: string; + public minimum?: number; // @DataMember - public content: TagDescriptionDto; + public maximum?: number; - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} + // @DataMember + public multipleOf?: number; -// @DataContract -export class TagDefinitionBaseDto -{ // @DataMember - public tag: string; + public default?: number; // @DataMember - public translations: TagTranslationDto[] = []; + public unique?: boolean; - public constructor(init?: Partial) { (Object as any).assign(this, init); } + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } -// @DataContract -export class GroupDefinitionDto extends TagDefinitionBaseDto +export class CurrencyDefaultDto { + // @DataMember + public value: number; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} + // @DataMember + public currency: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export class CurrencyFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public allowedCurrencies?: IReadOnlyList; + + // @DataMember + public multipleOf?: number; + + // @DataMember + public minimum?: number; + + // @DataMember + public maximum?: number; + + // @DataMember + public default?: CurrencyDefaultDto; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class BooleanFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public default?: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class DateFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public minimum?: number; + + // @DataMember + public maximum?: number; + + // @DataMember + public default?: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class IntegerFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public minimum?: number; + + // @DataMember + public maximum?: number; + + // @DataMember + public default?: number; + + // @DataMember + public unique?: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class GeolocationFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public allowedTypes?: IReadOnlyList; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class TagsFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public minItems?: number; + + // @DataMember + public maxItems?: number; + + // @DataMember + public default?: IReadOnlyList; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class FileFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public storages?: IReadOnlyList; + + // @DataMember + public minItems?: number; + + // @DataMember + public maxItems?: number; + + // @DataMember + public allowedFileType?: string; + + // @DataMember + public maxSizeMb?: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class TaxonomySelectionFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public taxonomyId?: string; + + // @DataMember + public multiple: boolean; + + // @DataMember + public displayField?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class CollectionSelectionFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public collectionId?: string; + + // @DataMember + public displayField?: string; + + // @DataMember + public multiple: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class UserSelectionFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public multiple: boolean; + + // @DataMember + public displayField?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class RoleSelectionFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public multiple: boolean; + + // @DataMember + public displayField?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class EnumSelectionFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public values?: IReadOnlyList; + + // @DataMember + public multiple: boolean; + + // @DataMember + public default?: IReadOnlyList; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class ObjectFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public properties: IReadOnlyList; + + // @DataMember + public required?: IReadOnlyList; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class ArrayFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public items: JsonSchemaFieldDto; + + // @DataMember + public minItems?: number; + + // @DataMember + public maxItems?: number; + + // @DataMember + public uniqueItems?: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class JsonFieldDto extends JsonSchemaFieldDto +{ + // @DataMember + public maxBytes?: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export enum CodeFunctionSource +{ + Database = 'Database', + Membership = 'Membership', + Files = 'Files', + Payments = 'Payments', + Ai = 'Ai', + Scheduler = 'Scheduler', + Manual = 'Manual', +} + +export enum CodeFunctionCallerKind +{ + User = 'User', + ApiKey = 'ApiKey', + System = 'System', +} + +// @DataContract +export class CodeFunctionCallerDto +{ + // @DataMember + public userId: string; + + // @DataMember + public email?: string; + + // @DataMember + public kind: CodeFunctionCallerKind; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class CodeFunctionRunAsDto +{ + // @DataMember + public userId: string; + + // @DataMember + public accessToken?: string; + + // @DataMember + public expiresAt?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class CodeFunctionContextDto +{ + // @DataMember + public accountId: string; + + // @DataMember + public projectId: string; + + // @DataMember + public environment: string; + + // @DataMember + public region?: string; + + // @DataMember + public hubUrl: string; + + // @DataMember + public apiUrl: string; + + // @DataMember + public echoUrl: string; + + // @DataMember + public triggerId?: string; + + // @DataMember + public taskId?: string; + + // @DataMember + public correlationId?: string; + + // @DataMember + public caller?: CodeFunctionCallerDto; + + // @DataMember + public runAs?: CodeFunctionRunAsDto; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export enum ResourceKindDto +{ + Contact = 'contact', + Document = 'document', + File = 'file', + PaymentCustomer = 'paymentCustomer', + Order = 'order', + Payment = 'payment', + Product = 'product', + Integration = 'integration', +} + +export class ResourceRefDto +{ + public projectId: string; + public integrationId?: string; + public kind: ResourceKindDto; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export class DocumentRefDto extends ResourceRefDto +{ + public kind: ResourceKindDto; + public databaseIntegrationId: string; + public schemaId: string; + public externalId: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +// @DataContract +export class DatabaseRecordChangeDto +{ + // @DataMember + public collection: string; + + // @DataMember + public schemaId: string; + + // @DataMember + public schemaVersion?: number; + + // @DataMember + public recordId?: string; + + // @DataMember + public old?: { [index:string]: Object; }; + + // @DataMember + public new?: { [index:string]: Object; }; + + // @DataMember + public truncated: boolean; + + // @DataMember + public oldRef?: DocumentRefDto; + + // @DataMember + public newRef?: DocumentRefDto; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class UserChangeDto +{ + // @DataMember + public userId: string; + + // @DataMember + public old?: { [index:string]: Object; }; + + // @DataMember + public new?: { [index:string]: Object; }; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class FileChangeDto +{ + // @DataMember + public old?: { [index:string]: Object; }; + + // @DataMember + public new?: { [index:string]: Object; }; + + // @DataMember + public path?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class PaymentFactDto +{ + // @DataMember + public integrationId: string; + + // @DataMember + public provider: string; + + // @DataMember + public providerEventId: string; + + // @DataMember + public eventName: string; + + // @DataMember + public status: string; + + // @DataMember + public amountMinor?: number; + + // @DataMember + public currency?: string; + + // @DataMember + public externalIds?: { [index:string]: string; }; + + // @DataMember + public occurredOn?: string; + + // @DataMember + public receivedOn: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class AiUsageEventDto +{ + // @DataMember + public payload: { [index:string]: Object; } = {}; + + // @DataMember + public targetUserId?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class ScheduledTaskInfoDto +{ + // @DataMember + public taskId: string; + + // @DataMember + public name: string; + + // @DataMember + public firedAt: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceFunctionCallDto +{ + // @DataMember + public functionId: string; + + // @DataMember + public functionKey: string; + + // @DataMember + public integrationId: string; + + // @DataMember + public payload: { [index:string]: Object; } = {}; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class CodeFunctionDataDto +{ + // @DataMember + public database?: DatabaseRecordChangeDto; + + // @DataMember + public user?: UserChangeDto; + + // @DataMember + public file?: FileChangeDto; + + // @DataMember + public payment?: PaymentFactDto; + + // @DataMember + public ai?: AiUsageEventDto; + + // @DataMember + public task?: ScheduledTaskInfoDto; + + // @DataMember + public payload?: { [index:string]: Object; }; + + // @DataMember + public marketplace?: MarketplaceFunctionCallDto; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class CodeFunctionEventDto +{ + // @DataMember + public specVersion: string; + + // @DataMember + public id: string; + + // @DataMember + public eventId: string; + + // @DataMember + public event: string; + + // @DataMember + public source: CodeFunctionSource; + + // @DataMember + public createdOn: string; + + // @DataMember + public context: CodeFunctionContextDto; + + // @DataMember + public data: CodeFunctionDataDto; + + // @DataMember + public config?: { [index:string]: Object; }; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export class FakeCodeIntegrationDto extends CodeIntegrationDto +{ + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class FakeCodeIntegrationRequest extends CodeIntegrationRequest +{ + public provider: CodeProvider; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class CodeFunctionSchedulerTaskRequest extends SchedulerTaskRequest +{ + public type: SchedulerTaskType; + public functionRef?: FunctionRefDto; + public invocationType: CodeInvocationType; + public config?: string; + public mappedTokens?: TokenMappingDto[]; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class MarketplaceFunctionSchedulerTaskRequest extends SchedulerTaskRequest +{ + public type: SchedulerTaskType; + public functionId?: string; + public payload?: { [index:string]: string; }; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export interface IVersionBasedRequest +{ + version: string; +} + +export interface IHasCorrelationIdRequest +{ + correlationId?: string; +} + +export interface IHasProjectId +{ + projectId: string; +} + +export interface IHasEnv +{ + env?: string; +} + +export enum SubscriptionType +{ + ManagedService = 'ManagedService', + License = 'License', +} + +export interface IHasAccountId +{ + accountId: string; +} + +// @DataContract +export class TagDescriptionDto +{ + // @DataMember + public title: string; + + // @DataMember + public description?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class TagTranslationDto +{ + // @DataMember + public language: string; + + // @DataMember + public content: TagDescriptionDto; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class TagDefinitionBaseDto +{ + // @DataMember + public tag: string; + + // @DataMember + public translations: TagTranslationDto[] = []; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class GroupDefinitionDto extends TagDefinitionBaseDto +{ + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} export enum DeliveryChannel { @@ -4052,21 +4870,15 @@ export class ProjectAiAssistantRequestBase extends CodeMashRequestBase } // @DataContract -export class AiScopeDto +export class AiProjectRoleIdsDto { // @DataMember - public reach: string; - - // @DataMember - public projectId?: string; - - // @DataMember - public rights: string; + public projectId: string; // @DataMember - public envs: string[] = []; + public roleIds: string[] = []; - public constructor(init?: Partial) { (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract @@ -4331,6 +5143,16 @@ export class SmsIntegrationRequest public constructor(init?: Partial) { (Object as any).assign(this, init); } } +export enum MarketplaceAccessLevel +{ + None = 'None', + Viewer = 'Viewer', + FunctionsOnly = 'FunctionsOnly', + ReadOnly = 'ReadOnly', + FullAccess = 'FullAccess', + Manage = 'Manage', +} + export class SavePushTemplate extends CodeMashRequestBase { /** @description The template's display name. */ @@ -4432,27 +5254,6 @@ export class EmbeddingIntegrationRequest public constructor(init?: Partial) { (Object as any).assign(this, init); } } -export enum ResourceKindDto -{ - Contact = 'contact', - Document = 'document', - File = 'file', - PaymentCustomer = 'paymentCustomer', - Order = 'order', - Payment = 'payment', - Product = 'product', - Integration = 'integration', -} - -export class ResourceRefDto -{ - public projectId: string; - public integrationId?: string; - public kind: ResourceKindDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - export enum CaseResolutionFixKind { CodeFix = 'CodeFix', @@ -4503,33 +5304,6 @@ export enum CodeMashRuntime Production = 'Production', } -// @DataContract -export class EchoLicenseDto -{ - // @DataMember(Name="domain") - public domain?: string; - - // @DataMember(Name="accountId") - public accountId?: string; - - // @DataMember(Name="email") - public email?: string; - - // @DataMember(Name="release") - public release?: string; - - // @DataMember(Name="expire") - public expire: number; - - // @DataMember(Name="isTrial") - public isTrial: boolean; - - // @DataMember(Name="cap") - public cap: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - export class EchoRegionDto { public code: string; @@ -4540,6 +5314,17 @@ export class EchoRegionDto public constructor(init?: Partial) { (Object as any).assign(this, init); } } +export class EchoAgentSnippetDto +{ + public client: string; + public kind: string; + public recommended: boolean; + public auth: string; + public config: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + export class EchoAgentDto { public mcpUrl: string; @@ -4547,10 +5332,23 @@ export class EchoAgentDto public installationType: string; public onboardingDocsUrl: string; public toolsUrl: string; + public cliPackage: string; + public cliInstallCommand: string; + public deviceAuthorizationUrl: string; + public deviceTokenUrl: string; + public snippets: EchoAgentSnippetDto[] = []; public constructor(init?: Partial) { (Object as any).assign(this, init); } } +export class EchoHostingPlatformDto +{ + public provider: string; + public isAws: boolean; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + export class PublicBrandDto { public displayName: string; @@ -4688,6 +5486,12 @@ export class AccountStatusDto // @DataMember public trialWasIssued: boolean; + // @DataMember + public emailVerified: boolean; + + // @DataMember + public joinedByInvitation: boolean; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -5018,7 +5822,7 @@ export class ProjectAiSettingsDto } // @DataContract -export class TriggerDto implements IHasViewId +export class TriggerDto implements IHasViewId, IQueuedTrigger { // @DataMember public type: TriggerType; @@ -5041,6 +5845,12 @@ export class TriggerDto implements IHasViewId // @DataMember public activationCode?: string; + // @DataMember + public order?: number; + + // @DataMember + public breakOnError: boolean; + // @DataMember public savedByAuthId?: string; @@ -5150,6 +5960,7 @@ export class PolicyItemDto public name: string; public description?: string; public isSystem: boolean; + public version: string; public permissions?: PermissionDto[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } @@ -5712,6 +6523,14 @@ export enum ApplicationModule Compliance = 8192, Contacts = 16384, Marketplace = 32768, + Diagnostics = 65536, +} + +export enum LanguageGapKind +{ + Template = 'Template', + Footer = 'Footer', + Signature = 'Signature', } // @DataContract @@ -5720,6 +6539,9 @@ export class TemplateLanguageGapDto // @DataMember public module: ApplicationModule; + // @DataMember + public kind: LanguageGapKind; + // @DataMember public templateId: string; @@ -6037,6 +6859,33 @@ export class LicenseHeartbeatVerdictDto public constructor(init?: Partial) { (Object as any).assign(this, init); } } +// @DataContract +export class InstallationLicenseDetailsDto +{ + // @DataMember(Name="domain") + public domain?: string; + + // @DataMember(Name="accountId") + public accountId?: string; + + // @DataMember(Name="email") + public email?: string; + + // @DataMember(Name="release") + public release?: string; + + // @DataMember(Name="expire") + public expire: number; + + // @DataMember(Name="isTrial") + public isTrial: boolean; + + // @DataMember(Name="cap") + public cap: number; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + // @DataContract export class InstallationLicenseStatusDto { @@ -6076,12 +6925,60 @@ export class InstallationLicenseStatusDto // @DataMember(Name="licenseExpireUtc") public licenseExpireUtc?: string; + // @DataMember(Name="lastHeartbeatOutcome") + public lastHeartbeatOutcome?: string; + + // @DataMember(Name="lastHeartbeatError") + public lastHeartbeatError?: string; + // @DataMember(Name="message") public message?: string; + // @DataMember(Name="license") + public license?: InstallationLicenseDetailsDto; + + // @DataMember(Name="licensingDocsUrl") + public licensingDocsUrl?: string; + + // @DataMember(Name="askForEnterpriseLicenseEmail") + public askForEnterpriseLicenseEmail?: string; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } +// @DataContract +export class AiRoleDto +{ + // @DataMember + public id: string; + + // @DataMember + public name: string; + + // @DataMember + public description: string; + + // @DataMember + public isSystem: boolean; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class AiProjectRolesDto +{ + // @DataMember + public id: string; + + // @DataMember + public name: string; + + // @DataMember + public roles: AiRoleDto[] = []; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + // @DataContract export class AiServiceUserKeyDto { @@ -6107,7 +7004,10 @@ export class AiServiceUserDto public name: string; // @DataMember - public scope: AiScopeDto; + public accountRoles: AiRoleDto[] = []; + + // @DataMember + public projects: AiProjectRolesDto[] = []; // @DataMember public createdAt: string; @@ -6124,6 +7024,7 @@ export class ServiceUserApiKeyDto public name: string; public visibleKey?: string; public scopes: string[] = []; + public environment?: string; public createdDate: string; public expiryDate?: string; public cancelledDate?: string; @@ -6139,7 +7040,7 @@ export class GetTriggerResponse extends ResponseBase } // @DataContract -export class TriggerProjectionList implements IHasViewId +export class TriggerProjectionList implements IHasViewId, IQueuedTrigger { // @DataMember public viewId: string; @@ -6156,6 +7057,12 @@ export class TriggerProjectionList implements IHasViewId // @DataMember public isEnabled: boolean; + // @DataMember + public order?: number; + + // @DataMember + public breakOnError: boolean; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -6393,14 +7300,6 @@ export class SchemaTriggerProjectionList extends TriggerProjectionList public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } -export class JsonSchemaFieldDto -{ - // @DataMember - public fieldName: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - export class DataSchemaDto { // @DataMember @@ -6529,6 +7428,9 @@ export class TermTreeDto // @DataMember public names?: { [index:string]: string; }; + // @DataMember + public slug?: string; + // @DataMember public description?: string; @@ -6593,6 +7495,9 @@ export class TermDto // @DataMember public names?: { [index:string]: string; }; + // @DataMember + public slug?: string; + // @DataMember public description?: string; @@ -6729,15 +7634,87 @@ export class SchemaListProjection implements IHasViewId export class SchemaDraftDto { // @DataMember - public dataSchema: DataSchemaDto; + public dataSchema: DataSchemaDto; + + // @DataMember + public visualSchema: VisualSchemaDto; + + // @DataMember + public updatedAt: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export class SchemaIndexDto +{ + // @DataMember + public name: string; + + // @DataMember + public keys: string[] = []; + + // @DataMember + public unique: boolean; + + // @DataMember + public reason: string; + + // @DataMember + public field: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export class SchemaIndexIntegrationStatusDto +{ + // @DataMember + public integrationId: string; + + // @DataMember + public state: string; + + // @DataMember + public wanted: SchemaIndexDto[] = []; + + // @DataMember + public created: string[] = []; + + // @DataMember + public dropped: string[] = []; + + // @DataMember + public overCap: SchemaIndexDto[] = []; + + // @DataMember + public refusedReason?: string; + + // @DataMember + public lastRunUtc: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export class SchemaIndexStatusDto +{ + // @DataMember + public schemaId: string; + + // @DataMember + public env: string; + + // @DataMember + public collection: string; + + // @DataMember + public state: string; // @DataMember - public visualSchema: VisualSchemaDto; + public integrations: SchemaIndexIntegrationStatusDto[] = []; // @DataMember - public updatedAt: string; + public lastRunUtc: string; - public constructor(init?: Partial) { (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class SchemaDiffDto @@ -6796,6 +7773,9 @@ export class CollectionIndexDto // @DataMember public keys: CollectionIndexKeyDto[] = []; + // @DataMember + public createdByNorbix: boolean; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -7153,6 +8133,17 @@ export class HtmlFromMjmlResponse export class SystemEmailTemplateListProjection extends EmailTemplateListProjection { + // @DataMember + public imagePreview?: string; + + // @DataMember + public description?: string; + + // @DataMember + public theme?: SystemEmailTemplateTheme; + + // @DataMember + public systemTags?: string[]; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } @@ -7659,9 +8650,123 @@ export class MarketplaceListingProjection implements IHasViewId // @DataMember public functionCount: number; + // @DataMember + public availability: MarketplaceAvailability; + + // @DataMember + public videoUrl?: string; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } +// @DataContract +export class MarketplaceAccessCustomPolicyDto +{ + // @DataMember + public policyId: string; + + // @DataMember + public name: string; + + // @DataMember + public usedByRoles: number; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceAccessRoleDto +{ + // @DataMember + public roleId: string; + + // @DataMember + public name: string; + + // @DataMember + public scope: string; + + // @DataMember + public isSystem: boolean; + + // @DataMember + public fixed: boolean; + + // @DataMember + public package: MarketplaceAccessLevel; + + // @DataMember + public isCustom: boolean; + + // @DataMember + public manage: boolean; + + // @DataMember + public custom: IReadOnlyList; + + // @DataMember + public defaultNotApplied?: string; + + // @DataMember + public canChange: boolean; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceAccessPackageDto +{ + // @DataMember + public kind: MarketplaceAccessLevel; + + // @DataMember + public policyId: string; + + // @DataMember + public name: string; + + // @DataMember + public exists: boolean; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceAccessToolDto +{ + // @DataMember + public name: string; + + // @DataMember + public readOnly: boolean; + + // @DataMember + public grantable: boolean; + + // @DataMember + public curated: boolean; + + // @DataMember + public excludedFromFullAccess: boolean; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceAccessFunctionDto +{ + // @DataMember + public functionId: string; + + // @DataMember + public name: string; + + // @DataMember + public functionKey: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + // @DataContract export class MarketplaceIntegrationListProjection implements IHasViewId { @@ -7687,53 +8792,248 @@ export class MarketplaceIntegrationListProjection implements IHasViewId public transport: MarketplaceTransport; // @DataMember - public lastIntegrationTestAtUtc?: string; + public lastIntegrationTestAtUtc?: string; + + // @DataMember + public lastIntegrationTestSucceeded?: boolean; + + // @DataMember + public lastIntegrationTestErrors: IReadOnlyList; + + // @DataMember + public humanDeliveryConfirmedAtUtc?: string; + + // @DataMember + public requiresHumanDeliveryConfirmation: boolean; + + // @DataMember + public signedIn: boolean; + + // @DataMember + public signedInAt?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceMcpToolDto +{ + // @DataMember + public name: string; + + // @DataMember + public title?: string; + + // @DataMember + public description?: string; + + // @DataMember + public inputSchema: string; + + // @DataMember + public readOnlyHint?: boolean; + + // @DataMember + public destructiveHint?: boolean; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceAccessChangesDto +{ + // @DataMember + public readOnlyAdded: IReadOnlyList; + + // @DataMember + public readOnlyRemoved: IReadOnlyList; + + // @DataMember + public notGrantable: IReadOnlyList; + + // @DataMember + public readOnlyHintOverridden: IReadOnlyList; + + // @DataMember + public excludedFromFullAccess: IReadOnlyList; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceFunctionProjection implements IHasViewId +{ + // @DataMember + public viewId: string; + + // @DataMember + public integrationViewId: string; + + // @DataMember + public functionKey: string; + + // @DataMember + public displayName: string; + + // @DataMember + public isEnabled: boolean; + + // @DataMember + public mappingCount: number; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +// @DataContract +export class MarketplaceFunctionRunDto +{ + // @DataMember + public firedAt: string; + + // @DataMember + public event: string; + + // @DataMember + public source: string; + + // @DataMember + public functionId: string; + + // @DataMember + public runAsUserId?: string; + + // @DataMember + public succeeded: boolean; + + // @DataMember + public status?: string; + + // @DataMember + public durationMs?: number; + + // @DataMember + public error?: string; + + // @DataMember + public vendorRequestId?: string; + + // @DataMember + public correlationId?: string; + + // @DataMember + public hasDetails: boolean; + + // @DataMember + public triggerId?: string; + + // @DataMember + public taskId?: string; + + // @DataMember + public input?: string; + + // @DataMember + public integrationId?: string; + + // @DataMember + public toolName?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export class CodeIntegrationListProjection extends IntegrationListProjection +{ + // @DataMember + public provider: CodeProvider; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +// @DataContract +export class CodeFunctionDescriptorDto +{ + // @DataMember + public functionId: string; + + // @DataMember + public displayName: string; + + // @DataMember + public runtime?: string; + + // @DataMember + public region?: string; + + // @DataMember + public description?: string; + + // @DataMember + public lastModified?: string; + + // @DataMember + public tags?: { [index:string]: string; }; + + // @DataMember + public arn?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + +export enum CodeFunctionQualifierKindDto +{ + Alias = 'Alias', + Version = 'Version', +} +// @DataContract +export class CodeFunctionQualifierDto +{ // @DataMember - public lastIntegrationTestSucceeded?: boolean; + public name: string; // @DataMember - public lastIntegrationTestErrors: IReadOnlyList; + public kind: CodeFunctionQualifierKindDto; // @DataMember - public humanDeliveryConfirmedAtUtc?: string; + public description?: string; // @DataMember - public requiresHumanDeliveryConfirmation: boolean; + public targetVersion?: string; - public constructor(init?: Partial) { (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract -export class MarketplaceFunctionProjection implements IHasViewId +export class CodeFunctionRunDto { // @DataMember - public viewId: string; + public firedAt: string; // @DataMember - public integrationViewId: string; + public event: string; // @DataMember - public functionKey: string; + public source: string; // @DataMember - public displayName: string; + public succeeded: boolean; // @DataMember - public isEnabled: boolean; + public statusCode?: number; // @DataMember - public mappingCount: number; + public durationMs?: number; - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} + // @DataMember + public error?: string; -export class CodeIntegrationListProjection extends IntegrationListProjection -{ // @DataMember - public provider: CodeProvider; + public requestId?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + // @DataMember + public input?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract @@ -7800,6 +9100,24 @@ export class PushDeviceListProjection // @DataMember public platformApiLevel?: number; + // @DataMember + public platform?: string; + + // @DataMember + public appVersion?: string; + + // @DataMember + public installationId?: string; + + // @DataMember + public locale?: string; + + // @DataMember + public timeZone?: string; + + // @DataMember + public updatedAtUtc?: string; + public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -7881,6 +9199,18 @@ export class PushCampaignBatchDto extends CampaignBatchDto public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +// @DataContract +export class NotificationReadMarkDto +{ + // @DataMember + public userId: string; + + // @DataMember + public readAtUtc: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + // @DataContract export class PushCampaignBatchNotificationDto extends CampaignBatchNotificationDto { @@ -7893,6 +9223,9 @@ export class PushCampaignBatchNotificationDto extends CampaignBatchNotificationD // @DataMember public content?: PushMessageContentDto; + // @DataMember + public readBy?: NotificationReadMarkDto[]; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } @@ -7900,6 +9233,7 @@ export class PaymentsWebhookLogEntry { public integrationId: string; public source: string; + public env?: string; public eventName?: string; public providerEventId?: string; public statusCode: number; @@ -7973,6 +9307,9 @@ export class TenantLogEntryDto // @DataMember public spanId?: string; + // @DataMember + public env: string; + // @DataMember public meta?: IReadOnlyDictionary; @@ -7984,6 +9321,8 @@ export class AgentOnboardingSnippet public client: string; public config: string; public auth: string; + public kind: string; + public recommended: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -8543,12 +9882,55 @@ export class SchedulerTaskListProjection implements IHasViewId // @DataMember public isEnabled: boolean; + // @DataMember + public isFailing: boolean; + + // @DataMember + public lastFailureReason?: string; + + // @DataMember + public lastFailedAtUnix?: number; + // @DataMember public viewId: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } +export enum SchedulerTaskRunOutcome +{ + Fired = 1, + Failed = 2, + Skipped = 3, +} + +// @DataContract +export class SchedulerTaskRunDto +{ + // @DataMember + public logId: string; + + // @DataMember + public atUtc: string; + + // @DataMember + public atUnix: number; + + // @DataMember + public outcome: SchedulerTaskRunOutcome; + + // @DataMember + public reason?: string; + + // @DataMember + public detail?: string; + + // @DataMember + public correlationId?: string; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + export enum ResolvedRefStatus { Ok = 'ok', @@ -8670,6 +10052,30 @@ export class UserDto public constructor(init?: Partial) { (Object as any).assign(this, init); } } +// @DataContract +export class ContactRolesRepairDto +{ + // @DataMember(Name="dryRun") + public dryRun: boolean; + + // @DataMember(Name="contactsWithoutRoles") + public contactsWithoutRoles: number; + + // @DataMember(Name="contactsToRepair") + public contactsToRepair: number; + + // @DataMember(Name="contactsRepaired") + public contactsRepaired: number; + + // @DataMember(Name="contactsWithoutLoginRoleIds") + public contactsWithoutLoginRoleIds: number; + + // @DataMember(Name="legacyRoleNamesIgnored") + public legacyRoleNamesIgnored: number; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} + export class ConsentPurposeDto { public key: string; @@ -9158,244 +10564,106 @@ export class DiagnosticRedisInspectDto } // @DataContract -export class DiagnosticHealthCheckDto -{ - // @DataMember - public checkId: string; - - // @DataMember - public isHealthy: boolean; - - // @DataMember - public statusCode: number; - - // @DataMember - public detail?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ResponseError -{ - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public fieldName: string; - - // @DataMember(Order=3) - public message: string; - - // @DataMember(Order=4) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ResponseStatus -{ - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public message?: string; - - // @DataMember(Order=3) - public stackTrace?: string; - - // @DataMember(Order=4) - public errors?: ResponseError[]; - - // @DataMember(Order=5) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export interface ILlmApiKeyRequest -{ - apiKey: string; -} - -export interface IHasViewId -{ - viewId: string; -} - -export interface IHasDatabaseId -{ - id?: string; -} - -export interface IBindableContract -{ -} - -export interface IHasRazorTemplateCode -{ -} - -export interface IHasResponsibleUserId -{ - userId: string; -} - -export interface ICursorArgs -{ - field: string; - order: number; -} - -export class StringFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public format?: string; - - // @DataMember - public pattern?: string; - - // @DataMember - public minLength?: number; - - // @DataMember - public maxLength?: number; - - // @DataMember - public translateOptions?: IReadOnlyDictionary; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DecimalFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public multipleOf?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CurrencyFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public allowedCurrencies?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class BooleanFieldDto extends JsonSchemaFieldDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DateFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class IntegerFieldDto extends JsonSchemaFieldDto +export class DiagnosticHealthCheckDto { // @DataMember - public minimum?: number; + public checkId: string; // @DataMember - public maximum?: number; + public isHealthy: boolean; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} + // @DataMember + public statusCode: number; -export class GeolocationFieldDto extends JsonSchemaFieldDto -{ // @DataMember - public allowedTypes?: IReadOnlyList; + public detail?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public constructor(init?: Partial) { (Object as any).assign(this, init); } } -export class TagsFieldDto extends JsonSchemaFieldDto +// @DataContract +export class ResponseError { + // @DataMember(Order=1) + public errorCode: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} + // @DataMember(Order=2) + public fieldName: string; -export class FileFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public storages?: IReadOnlyList; + // @DataMember(Order=3) + public message: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + // @DataMember(Order=4) + public meta?: { [index:string]: string; }; + + public constructor(init?: Partial) { (Object as any).assign(this, init); } } -export class TaxonomySelectionFieldDto extends JsonSchemaFieldDto +// @DataContract +export class ResponseStatus { - // @DataMember - public taxonomyId?: string; + // @DataMember(Order=1) + public errorCode: string; - // @DataMember - public multiple: boolean; + // @DataMember(Order=2) + public message?: string; - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} + // @DataMember(Order=3) + public stackTrace?: string; -export class CollectionSelectionFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public collectionId?: string; + // @DataMember(Order=4) + public errors?: ResponseError[]; - // @DataMember - public displayField?: string; + // @DataMember(Order=5) + public meta?: { [index:string]: string; }; - // @DataMember - public multiple: boolean; + public constructor(init?: Partial) { (Object as any).assign(this, init); } +} - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +export interface ILlmApiKeyRequest +{ + apiKey: string; } -export class UserSelectionFieldDto extends JsonSchemaFieldDto +export interface IHasViewId { - // @DataMember - public multiple: boolean; + viewId: string; +} - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +export interface IHasDatabaseId +{ + id?: string; } -export class RoleSelectionFieldDto extends JsonSchemaFieldDto +export interface IBindableContract { - // @DataMember - public multiple: boolean; +} - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +export interface IHasRazorTemplateCode +{ } -export class EnumSelectionFieldDto extends JsonSchemaFieldDto +export interface IQueuedTrigger { - // @DataMember - public values?: IReadOnlyList; + viewId: string; + name: string; + order?: number; + breakOnError: boolean; +} - // @DataMember - public multiple: boolean; +export interface IHasResponsibleUserId +{ + userId: string; +} - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +export interface ICursorArgs +{ + field: string; + order: number; } export class EchoResponse { - public containerName?: string; - public ip: string; public release: CodeMashRelease; public runtime: CodeMashRuntime; public managedServiceHubUrl: string; @@ -9404,19 +10672,12 @@ export class EchoResponse public apiUrl: string; public apiVersion: string; public hubVersion: string; - public mjmlUrl: string; public adminUrlTemplate?: string; - public license?: EchoLicenseDto; - public askForEnterpriseLicenseEmail?: string; public emailServiceConfigured: boolean; public rootBootstrapPasswordSource?: string; public regions?: EchoRegionDto[]; - public isProductionInstallation: boolean; - public licensingMode: string; - public graceDaysLeft?: number; - public installationDomain?: string; - public licensingDocsUrl?: string; public agent?: EchoAgentDto; + public hostingPlatform?: EchoHostingPlatformDto; public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -9474,6 +10735,11 @@ export class GetAccountStatusResponse extends ResponseBase // @DataContract export class CreateStripeCheckoutSessionResponse extends IdResponse { + // @DataMember + public trialIncluded: boolean; + + // @DataMember + public noTrialReason?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } @@ -9745,6 +11011,13 @@ export class GetInstallationLicenseStatusResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class GetLicenseKeyResponse extends ResponseBase +{ + public key?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + // @DataContract export class CreateAiServiceUserResponse extends ResponseBase { @@ -9786,6 +11059,8 @@ export class IssueServiceUserApiKeyResponse public id: number; public name: string; public key: string; + public environment?: string; + public responseStatus?: CodeMashResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -9793,6 +11068,7 @@ export class IssueServiceUserApiKeyResponse export class ListServiceUserApiKeysResponse { public keys: ServiceUserApiKeyDto[] = []; + public responseStatus?: CodeMashResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } @@ -9981,6 +11257,13 @@ export class GetDatabaseSchemaDraftResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class GetDatabaseSchemaIndexStatusResponse extends ResponseBase +{ + public status?: SchemaIndexStatusDto; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class GetDatabaseSchemaListSettingsResponse extends ResponseBase { public settings?: SchemaListSettingsDto; @@ -10195,6 +11478,15 @@ export class GetFileResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class GetFileByIdResponse extends ResponseBase +{ + public file?: FileResourceRefDto; + public isPublic?: boolean; + public publicUrl?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class GetFolderFilesResponse extends ResponseBase { public list?: PaginatedResponse; @@ -10538,6 +11830,42 @@ export class GetMarketplaceListingsResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +// @DataContract +export class GetMarketplaceIntegrationAccessResponse extends ResponseBase +{ + // @DataMember + public roles: IReadOnlyList; + + // @DataMember + public packages: IReadOnlyList; + + // @DataMember + public tools: IReadOnlyList; + + // @DataMember + public functions: IReadOnlyList; + + // @DataMember + public canManage: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +// @DataContract +export class SaveMarketplaceIntegrationCustomAccessResponse extends ResponseBase +{ + // @DataMember + public policyId?: string; + + // @DataMember + public created: boolean; + + // @DataMember + public usedByRoles: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class GetMarketplaceIntegrationResponse extends ResponseBase { public integration?: MarketplaceIntegrationDto; @@ -10552,6 +11880,33 @@ export class GetMarketplaceIntegrationsResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class GetMarketplaceIntegrationToolsResponse extends ResponseBase +{ + public tools: IReadOnlyList; + public listedAt?: string; + public catalogHash?: string; + public truncated: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class StartMarketplaceIntegrationSignInResponse extends ResponseBase +{ + public authorizeUrl?: string; + public redirectUrl?: string; + public expiresAt?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class SignOutMarketplaceIntegrationResponse extends ResponseBase +{ + public wasSignedIn: boolean; + public revoke?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class EmptyMarketplaceSecretsResponse extends ResponseBase { @@ -10571,6 +11926,12 @@ export class TestMarketplaceIntegrationResponse extends ResponseBase // @DataMember public items?: IReadOnlyList; + // @DataMember + public steps?: IReadOnlyList; + + // @DataMember + public accessChanges?: MarketplaceAccessChangesDto; + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } @@ -10601,6 +11962,13 @@ export class GetMarketplaceFunctionCatalogResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class GetMarketplaceFunctionRunsResponse extends ResponseBase +{ + public runs: MarketplaceFunctionRunDto[] = []; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class InvokeMarketplaceFunctionResponse extends ResponseBase { public isSuccess: boolean; @@ -10633,6 +12001,45 @@ export class TestCodeIntegrationResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class GetCodeFunctionsResponse extends ResponseBase +{ + public list?: PaginatedResponse; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class GetCodeFunctionEventSampleResponse extends ResponseBase +{ + public sample?: CodeFunctionEventDto; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class GetCodeFunctionQualifiersResponse extends ResponseBase +{ + public qualifiers?: IReadOnlyList; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class GetCodeFunctionRunsResponse extends ResponseBase +{ + public runs: CodeFunctionRunDto[] = []; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class InvokeCodeFunctionResponse extends ResponseBase +{ + public statusCode: number; + public output?: Object; + public durationMs: number; + public requestId?: string; + public logs?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class GetPushTemplateResponse extends ResponseBase { public item?: PushTemplateDto; @@ -11030,6 +12437,75 @@ export class GetAiTriggerResponse extends GetTriggerResponse public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class AuthDeviceStartResponse extends ResponseBase +{ + public deviceCode?: string; + public userCode?: string; + public verificationUri?: string; + public verificationUriComplete?: string; + public expiresIn: number; + public interval: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class AuthDeviceTokenResponse extends ResponseBase +{ + public error?: string; + public errorDescription?: string; + public errorCode?: string; + public reason?: string; + public bearerToken?: string; + public refreshToken?: string; + public expiresIn?: number; + public clientId?: string; + public userId?: string; + public userName?: string; + public displayName?: string; + public accountId?: string; + public projectId?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class AuthDeviceConsentResponse extends ResponseBase +{ + public clientName: string; + public deviceName: string; + public userCode: string; + public projectId?: string; + public accountRoles: AiRoleDto[] = []; + public projects: AiProjectRolesDto[] = []; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class AuthDeviceConsentDecisionResponse extends ResponseBase +{ + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class OAuthConsentResponse extends ResponseBase +{ + public clientName: string; + public redirectHost: string; + public clientHost: string; + public redirectIsLoopback: boolean; + public consentTicket: string; + public accountRoles: AiRoleDto[] = []; + public projects: AiProjectRolesDto[] = []; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + +export class OAuthConsentDecisionResponse extends ResponseBase +{ + public redirectUrl?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class GetEmbeddingIntegrationResponse extends ResponseBase { public item?: EmbeddingIntegrationDto; @@ -11172,6 +12648,14 @@ export class GetSchedulerTasksResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class GetSchedulerTaskRunsResponse extends ResponseBase +{ + public logsEnabled: boolean; + public runs: SchedulerTaskRunDto[] = []; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class ResolveResourcesResponse extends ResponseBase { public resolved: IReadOnlyList; @@ -11194,6 +12678,13 @@ export class GetAllContactsResponse extends ResponseBase public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } +export class RepairContactRolesResponse extends ResponseBase +{ + public result?: ContactRolesRepairDto; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } +} + export class GetComplianceSettingsResponse extends ResponseBase { public settings?: ProjectComplianceDto; @@ -11439,19 +12930,6 @@ export class ConfirmCodeIntegrationHumanDeliveryRequest extends CodeMashRequestB public createResponse() { return new EmptyResponse(); } } -// @Route("/{version}/code/integrations/{Id}/default", "PUT") -export class SetCodeIntegrationAsDefault extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_code_integrations. */ - // @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetCodeIntegrationAsDefault'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - // @Route("/{version}/code/integrations/{Id}", "DELETE") export class DeleteCodeIntegrationRequest extends CodeMashRequestBase implements IReturn { @@ -11991,7 +13469,6 @@ export class InternalsTypeGen public typegen_205_SaveCodeIntegration?: SaveCodeIntegration; public typegen_206_TestCodeIntegration?: TestCodeIntegration; public typegen_207_ConfirmCodeIntegrationHumanDeliveryRequest?: ConfirmCodeIntegrationHumanDeliveryRequest; - public typegen_208_SetCodeIntegrationAsDefault?: SetCodeIntegrationAsDefault; public typegen_209_DeleteCodeIntegrationRequest?: DeleteCodeIntegrationRequest; public typegen_210_EnableCodeIntegrationRequest?: EnableCodeIntegrationRequest; public typegen_211_DisableCodeIntegrationRequest?: DisableCodeIntegrationRequest; @@ -12027,6 +13504,39 @@ export class InternalsTypeGen public typegen_243_ActionPendingEntryWireDto?: ActionPendingEntryWireDto; public typegen_244_NoticeEntryWireDto?: NoticeEntryWireDto; public typegen_245_ConversationSnapshotEntryWireDto?: ConversationSnapshotEntryWireDto; + public typegen_252_StringFieldDto?: StringFieldDto; + public typegen_253_DecimalFieldDto?: DecimalFieldDto; + public typegen_254_CurrencyFieldDto?: CurrencyFieldDto; + public typegen_255_BooleanFieldDto?: BooleanFieldDto; + public typegen_256_DateFieldDto?: DateFieldDto; + public typegen_257_IntegerFieldDto?: IntegerFieldDto; + public typegen_258_GeolocationFieldDto?: GeolocationFieldDto; + public typegen_259_TagsFieldDto?: TagsFieldDto; + public typegen_260_FileFieldDto?: FileFieldDto; + public typegen_261_TaxonomySelectionFieldDto?: TaxonomySelectionFieldDto; + public typegen_262_CollectionSelectionFieldDto?: CollectionSelectionFieldDto; + public typegen_263_UserSelectionFieldDto?: UserSelectionFieldDto; + public typegen_264_RoleSelectionFieldDto?: RoleSelectionFieldDto; + public typegen_265_EnumSelectionFieldDto?: EnumSelectionFieldDto; + public typegen_266_ObjectFieldDto?: ObjectFieldDto; + public typegen_267_ArrayFieldDto?: ArrayFieldDto; + public typegen_268_JsonFieldDto?: JsonFieldDto; + public typegen_269_FunctionRefDto?: FunctionRefDto; + public typegen_270_CodeFunctionEventDto?: CodeFunctionEventDto; + public typegen_271_CodeFunctionContextDto?: CodeFunctionContextDto; + public typegen_272_CodeFunctionCallerDto?: CodeFunctionCallerDto; + public typegen_273_CodeFunctionRunAsDto?: CodeFunctionRunAsDto; + public typegen_274_CodeFunctionDataDto?: CodeFunctionDataDto; + public typegen_275_DatabaseRecordChangeDto?: DatabaseRecordChangeDto; + public typegen_276_UserChangeDto?: UserChangeDto; + public typegen_277_FileChangeDto?: FileChangeDto; + public typegen_278_PaymentFactDto?: PaymentFactDto; + public typegen_279_AiUsageEventDto?: AiUsageEventDto; + public typegen_280_ScheduledTaskInfoDto?: ScheduledTaskInfoDto; + public typegen_281_FakeCodeIntegrationDto?: FakeCodeIntegrationDto; + public typegen_282_FakeCodeIntegrationRequest?: FakeCodeIntegrationRequest; + public typegen_283_CodeFunctionSchedulerTaskRequest?: CodeFunctionSchedulerTaskRequest; + public typegen_284_MarketplaceFunctionSchedulerTaskRequest?: MarketplaceFunctionSchedulerTaskRequest; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'InternalsTypeGen'; } @@ -12137,13 +13647,13 @@ export class UpdateAccountProfile extends RequestBase implements IReturn { public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'ResendAccountVerificationToken'; } - public getMethod() { return 'GET'; } + public getMethod() { return 'POST'; } public createResponse() { return new EmptyResponse(); } } @@ -12237,7 +13747,7 @@ export class GetAccountUsageBilling extends RequestBase implements IReturn, IHasAccountId { public token: string; @@ -12245,7 +13755,7 @@ export class VerifyAccount extends RequestBase implements IReturn public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'VerifyAccount'; } - public getMethod() { return 'GET'; } + public getMethod() { return 'POST'; } public createResponse() { return new EmptyResponse(); } } @@ -13600,10 +15110,21 @@ export class PostLicenseHeartbeat extends RequestBase implements IReturn { - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetInstallationLicenseStatus'; } + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetInstallationLicenseStatus'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetInstallationLicenseStatusResponse(); } +} + +// @Route("/{version}/account/licenses/{Id}/key", "GET") +export class GetLicenseKey extends RequestBase implements IReturn +{ + public id?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetLicenseKey'; } public getMethod() { return 'GET'; } - public createResponse() { return new GetInstallationLicenseStatusResponse(); } + public createResponse() { return new GetLicenseKeyResponse(); } } // @Route("/{version}/account/ai/service-users", "POST") @@ -13613,9 +15134,13 @@ export class CreateAiServiceUserRequest extends RequestBase implements IReturn) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'CreateAiServiceUserRequest'; } @@ -14450,6 +15975,11 @@ export class GetDatabaseTaxonomies extends CodeMashListPaginationRequestBase imp // @DataContract export class GetDatabaseTaxonomyTreeRequest extends CodeMashRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + /** @description When true, each taxonomy node also carries its own term tree (heavier response). */ // @DataMember // @ApiMember(Description="When true, each taxonomy node also carries its own term tree (heavier response).") @@ -14573,6 +16103,11 @@ export class DeleteManyDatabaseTaxonomyTermsRequest extends CodeMashRequestBase // @DataContract export class GetDatabaseTaxonomyTermRequest extends CodeMashRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + /** @description Taxonomy id from get_database_taxonomies. */ // @DataMember // @ApiMember(Description="Taxonomy id from get_database_taxonomies.", IsRequired=true) @@ -14600,6 +16135,11 @@ export class GetDatabaseTaxonomyTermRequest extends CodeMashRequestBase implemen // @DataContract export class GetDatabaseMergedTermTreeRequest extends CodeMashRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + /** @description Root taxonomy slug/name (from get_database_taxonomies). Its terms are the roots; child-taxonomy terms nest under them. */ // @DataMember // @ApiMember(Description="Root taxonomy slug/name (from get_database_taxonomies). Its terms are the roots; child-taxonomy terms nest under them.", IsRequired=true) @@ -14622,6 +16162,11 @@ export class GetDatabaseMergedTermTreeRequest extends CodeMashRequestBase implem // @DataContract export class GetDatabaseTaxonomyTermTreeRequest extends CodeMashRequestBase implements IReturn { + /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ + // @DataMember + // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + public allLanguages: boolean; + /** @description Taxonomy slug/name to fetch the term tree for, from get_database_taxonomies. */ // @DataMember // @ApiMember(Description="Taxonomy slug/name to fetch the term tree for, from get_database_taxonomies.", IsRequired=true) @@ -14664,9 +16209,9 @@ export class SaveDatabaseTaxonomyTermRequest extends CodeMashRequestBase impleme // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") public databaseIntegrationId?: string; - /** @description The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents ("additional categories": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {"name":"France","order":1}. */ + /** @description The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; slug (optional — the URL-safe name, unique inside the taxonomy; derived from name when omitted, e.g. 'France' → 'france', with a -2, -3… suffix when another term of the taxonomy already has that derived slug; an explicit slug another term has is refused, CM-ERRORS-TAXONOMIES-012); order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents ("additional categories": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {"name":"France","order":1}. */ // @DataMember - // @ApiMember(Description="The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents (\"additional categories\": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {\"name\":\"France\",\"order\":1}.", IsRequired=true) + // @ApiMember(Description="The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; slug (optional — the URL-safe name, unique inside the taxonomy; derived from name when omitted, e.g. 'France' → 'france', with a -2, -3… suffix when another term of the taxonomy already has that derived slug; an explicit slug another term has is refused, CM-ERRORS-TAXONOMIES-012); order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents (\"additional categories\": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {\"name\":\"France\",\"order\":1}.", IsRequired=true) public document: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -14696,9 +16241,9 @@ export class UpdateDatabaseTaxonomyTermRequest extends CodeMashRequestBase imple // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") public databaseIntegrationId?: string; - /** @description Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents ("additional categories": array of {taxonomyId, parentId}). Example to rank a term: {"order":1}. */ + /** @description Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map — a new name re-derives the slug unless 'slug' is sent too; a derived slug another term has gets a -2, -3… suffix); slug (optional — set explicitly, unique inside the taxonomy, CM-ERRORS-TAXONOMIES-012 when another term has it); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents ("additional categories": array of {taxonomyId, parentId}). Example to rank a term: {"order":1}. */ // @DataMember - // @ApiMember(Description="Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents (\"additional categories\": array of {taxonomyId, parentId}). Example to rank a term: {\"order\":1}.", IsRequired=true) + // @ApiMember(Description="Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map — a new name re-derives the slug unless 'slug' is sent too; a derived slug another term has gets a -2, -3… suffix); slug (optional — set explicitly, unique inside the taxonomy, CM-ERRORS-TAXONOMIES-012 when another term has it); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents (\"additional categories\": array of {taxonomyId, parentId}). Example to rank a term: {\"order\":1}.", IsRequired=true) public update: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -14828,6 +16373,23 @@ export class GetDatabaseSchemaDraft extends CodeMashRequestBase implements IRetu public createResponse() { return new GetDatabaseSchemaDraftResponse(); } } +/** @description Gets the Norbix index status of a database schema */ +// @Route("/{version}/database/schemas/{Id}/index-status", "GET") +// @Api(Description="Gets the Norbix index status of a database schema") +// @DataContract +export class GetDatabaseSchemaIndexStatus extends CodeMashRequestBase implements IReturn +{ + /** @description Schema id from get_database_schemas. */ + // @DataMember + // @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) + public id: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetDatabaseSchemaIndexStatus'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetDatabaseSchemaIndexStatusResponse(); } +} + /** @description Gets database schema records-list display settings */ // @Route("/{version}/database/schemas/{Id}/list-settings", "GET") // @Api(Description="Gets database schema records-list display settings") @@ -14978,9 +16540,9 @@ export class UpdateDatabaseSchemaDraftRequest extends CodeMashRequestBase implem // @ApiMember(Description="Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json) for the draft's data schema.") public dataSchema?: string; - /** @description OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or invalid, the backend auto-generates a flat-list form from the data schema. */ + /** @description OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or empty (no field cell), the backend auto-generates a flat-list form from the data schema; a layout that fails the meta-schema is refused with the key named. */ // @DataMember - // @ApiMember(Description="OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or invalid, the backend auto-generates a flat-list form from the data schema.") + // @ApiMember(Description="OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or empty (no field cell), the backend auto-generates a flat-list form from the data schema; a layout that fails the meta-schema is refused with the key named.") public visualSchema?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -15238,6 +16800,11 @@ export class FindRecords extends CodeMashListPaginationRequestBase implements IR public pagingArgs?: PagingArgs; public sortBy?: string; public sortOrder?: number; + /** @description Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. */ + // @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") + public expandReferences: boolean; + + public allLanguages: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'FindRecords'; } @@ -15259,6 +16826,11 @@ export class FindOneRecord extends CodeMashRequestBase implements IReturn) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'FindOneRecord'; } @@ -15388,10 +16960,14 @@ export class UpdateManyRecords extends CodeMashRequestBase implements IReturn) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'UpdateManyRecords'; } public getMethod() { return 'PUT'; } @@ -15412,10 +16988,14 @@ export class UpdateOneRecord extends CodeMashRequestBase implements IReturn) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'UpdateOneRecord'; } public getMethod() { return 'PUT'; } @@ -16087,6 +17667,23 @@ export class GetFile extends CodeMashRequestBase implements IReturn +{ + /** @description The files integration id to read from, from get_files_integrations. */ + // @ApiMember(Description="The files integration id to read from, from get_files_integrations.", IsRequired=true) + public filesIntegrationId: string; + + /** @description The file id — nbfl_… as the Files endpoints return it, or its bare UUID. */ + // @ApiMember(Description="The file id — nbfl_… as the Files endpoints return it, or its bare UUID.", IsRequired=true) + public id: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetFileById'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetFileByIdResponse(); } +} + // @Route("/{version}/files/folder", "GET") export class GetFolderFiles extends CodeMashListPaginationRequestBase implements IReturn { @@ -16104,6 +17701,23 @@ export class GetFolderFiles extends CodeMashListPaginationRequestBase implements public createResponse() { return new GetFolderFilesResponse(); } } +// @Route("/{version}/files/item/use", "POST") +export class UseFileRequest extends CodeMashRequestBase implements IReturn +{ + /** @description The files integration the file lives on. */ + // @ApiMember(Description="The files integration the file lives on.", IsRequired=true) + public filesIntegrationId: string; + + /** @description Path of the file, relative to the integration. */ + // @ApiMember(Description="Path of the file, relative to the integration.", IsRequired=true) + public path: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'UseFileRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new IdResponse(); } +} + /** @description Disable email service */ // @Route("/{version}/notifications/email/disable", "PUT") // @Api(Description="Disable email service") @@ -17547,6 +19161,133 @@ export class GetSmsCampaignMessagesRequest extends CodeMashListPaginationRequest public createResponse() { return new GetSmsCampaignMessagesResponse(); } } +// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access", "GET") +export class GetMarketplaceIntegrationAccess extends CodeMashRequestBase implements IReturn +{ + /** @description Integration view id, from get_marketplace_integrations. */ + // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) + public integrationViewId: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetMarketplaceIntegrationAccess'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetMarketplaceIntegrationAccessResponse(); } +} + +// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access/roles", "PUT") +// @DataContract +export class SetMarketplaceIntegrationRoleAccess extends CodeMashRequestBase implements IReturn +{ + /** @description Integration view id, from get_marketplace_integrations. */ + // @DataMember + // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) + public integrationViewId: string; + + /** @description The role's composite id: acc_…_nr_… (account / team role) or pr_…_nr_… (project role). */ + // @DataMember + // @ApiMember(Description="The role's composite id: acc_…_nr_… (account / team role) or pr_…_nr_… (project role).", IsRequired=true) + public roleId: string; + + /** @description None, Viewer, FunctionsOnly, ReadOnly or FullAccess. */ + // @DataMember + // @ApiMember(Description="None, Viewer, FunctionsOnly, ReadOnly or FullAccess.") + public package: MarketplaceAccessLevel; + + /** @description True to also give the Manage package (edit the connection, its secrets, validation and functions). */ + // @DataMember + // @ApiMember(Description="True to also give the Manage package (edit the connection, its secrets, validation and functions).") + public manage: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'SetMarketplaceIntegrationRoleAccess'; } + public getMethod() { return 'PUT'; } + public createResponse() { return new IdResponse(); } +} + +// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access/roles/custom", "POST") +// @DataContract +export class SaveMarketplaceIntegrationCustomAccess extends CodeMashRequestBase implements IReturn +{ + /** @description Integration view id, from get_marketplace_integrations. */ + // @DataMember + // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) + public integrationViewId: string; + + /** @description The role's composite id: acc_…_nr_… or pr_…_nr_…. */ + // @DataMember + // @ApiMember(Description="The role's composite id: acc_…_nr_… or pr_…_nr_….", IsRequired=true) + public roleId: string; + + /** @description The package to start from: None, Viewer, FunctionsOnly, ReadOnly or FullAccess. */ + // @DataMember + // @ApiMember(Description="The package to start from: None, Viewer, FunctionsOnly, ReadOnly or FullAccess.") + public basePackage: MarketplaceAccessLevel; + + /** @description Tool names the role may run (from the connection's tools). */ + // @DataMember + // @ApiMember(Description="Tool names the role may run (from the connection's tools).") + public tools: string[] = []; + + /** @description Function ids (func_…) of this connection the role may run. */ + // @DataMember + // @ApiMember(Description="Function ids (func_…) of this connection the role may run.") + public functions: string[] = []; + + /** @description True to include the Manage rights (edit the connection, its secrets, validation and functions). */ + // @DataMember + // @ApiMember(Description="True to include the Manage rights (edit the connection, its secrets, validation and functions).") + public manage: boolean; + + /** @description True to write a new policy for this role only when its current custom policy is shared with other roles. */ + // @DataMember + // @ApiMember(Description="True to write a new policy for this role only when its current custom policy is shared with other roles.") + public newPolicyForThisRoleOnly: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'SaveMarketplaceIntegrationCustomAccess'; } + public getMethod() { return 'POST'; } + public createResponse() { return new SaveMarketplaceIntegrationCustomAccessResponse(); } +} + +// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/tools", "GET") +export class GetMarketplaceIntegrationTools extends CodeMashRequestBase implements IReturn +{ + /** @description Integration view id, from get_marketplace_integrations. */ + // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) + public integrationViewId: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetMarketplaceIntegrationTools'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetMarketplaceIntegrationToolsResponse(); } +} + +// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/oauth/start", "POST") +export class StartMarketplaceIntegrationSignIn extends CodeMashRequestBase implements IReturn +{ + /** @description Integration view id, from get_marketplace_integrations. */ + // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) + public integrationViewId: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'StartMarketplaceIntegrationSignIn'; } + public getMethod() { return 'POST'; } + public createResponse() { return new StartMarketplaceIntegrationSignInResponse(); } +} + +// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/oauth/sign-out", "POST") +export class SignOutMarketplaceIntegration extends CodeMashRequestBase implements IReturn +{ + /** @description Integration view id, from get_marketplace_integrations. */ + // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) + public integrationViewId: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'SignOutMarketplaceIntegration'; } + public getMethod() { return 'POST'; } + public createResponse() { return new SignOutMarketplaceIntegrationResponse(); } +} + // @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/secrets", "PUT") // @DataContract export class ReplaceMarketplaceIntegrationSecretsRequest extends CodeMashRequestBase implements IReturn @@ -17590,7 +19331,7 @@ export class SetMarketplaceIntegrationTokenMappingsRequest extends CodeMashReque public integrationViewId: string; // @DataMember - public tokenMappings: MarketplaceTokenMappingDto[] = []; + public tokenMappings: TokenMappingDto[] = []; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'SetMarketplaceIntegrationTokenMappingsRequest'; } @@ -17611,6 +19352,148 @@ export class GetMarketplaceFunctionCatalog extends CodeMashRequestBase implement public createResponse() { return new GetMarketplaceFunctionCatalogResponse(); } } +// @Route("/{version}/code/marketplace/functions/runs", "GET") +export class GetMarketplaceFunctionRuns extends CodeMashRequestBase implements IReturn +{ + /** @description The marketplace function whose runs to list, from every source (func_…). One of functionId / triggerId / taskId. */ + // @ApiMember(Description="The marketplace function whose runs to list, from every source (func_…). One of functionId / triggerId / taskId.") + public functionId?: string; + + /** @description The trigger whose marketplace function runs to list (trg_…). One of functionId / triggerId / taskId. */ + // @ApiMember(Description="The trigger whose marketplace function runs to list (trg_…). One of functionId / triggerId / taskId.") + public triggerId?: string; + + /** @description The scheduler task whose marketplace function runs to list (tsk_…). One of functionId / triggerId / taskId. */ + // @ApiMember(Description="The scheduler task whose marketplace function runs to list (tsk_…). One of functionId / triggerId / taskId.") + public taskId?: string; + + /** @description The MCP connection whose tool runs to list — the calls an AI chat made to one of its tools without a saved function (int_…). One of functionId / triggerId / taskId / integrationId. */ + // @ApiMember(Description="The MCP connection whose tool runs to list — the calls an AI chat made to one of its tools without a saved function (int_…). One of functionId / triggerId / taskId / integrationId.") + public integrationId?: string; + + /** @description How many runs, newest first: 1-50. Default 20. */ + // @ApiMember(DataType="integer", Description="How many runs, newest first: 1-50. Default 20.") + public limit?: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetMarketplaceFunctionRuns'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetMarketplaceFunctionRunsResponse(); } +} + +// @Route("/{version}/code/functions", "GET") +export class GetCodeFunctions extends CodeMashListPaginationRequestBase implements IReturn +{ + /** @description Code integration id (int_…), from get_code_integrations. */ + // @ApiMember(Description="Code integration id (int_…), from get_code_integrations.", IsRequired=true) + public integrationId: string; + + /** @description Only functions whose id starts with this. */ + // @ApiMember(Description="Only functions whose id starts with this.") + public prefix?: string; + + /** @description Only functions carrying this tag: "key" or "key=value". */ + // @ApiMember(Description="Only functions carrying this tag: \"key\" or \"key=value\".") + public tag?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetCodeFunctions'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetCodeFunctionsResponse(); } +} + +// @Route("/{version}/code/functions/event-sample", "GET") +export class GetCodeFunctionEventSample extends CodeMashRequestBase implements IReturn +{ + /** @description Database | Membership | Files | Payments | Ai | Scheduler | Manual. */ + // @ApiMember(Description="Database | Membership | Files | Payments | Ai | Scheduler | Manual.", IsRequired=true) + public source: CodeFunctionSource; + + /** @description The event name, e.g. database.record.inserted; omitted = the source's usual one. */ + // @ApiMember(Description="The event name, e.g. database.record.inserted; omitted = the source's usual one.") + public event?: string; + + /** @description The schema id to put into data.database.schemaId (Database source). */ + // @ApiMember(Description="The schema id to put into data.database.schemaId (Database source).") + public schemaId?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetCodeFunctionEventSample'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetCodeFunctionEventSampleResponse(); } +} + +// @Route("/{version}/code/functions/qualifiers", "GET") +export class GetCodeFunctionQualifiers extends CodeMashRequestBase implements IReturn +{ + /** @description Code integration id (int_…), from get_code_integrations. */ + // @ApiMember(Description="Code integration id (int_…), from get_code_integrations.", IsRequired=true) + public integrationId: string; + + /** @description Provider-native function id, from get_code_functions. */ + // @ApiMember(Description="Provider-native function id, from get_code_functions.", IsRequired=true) + public functionId: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetCodeFunctionQualifiers'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetCodeFunctionQualifiersResponse(); } +} + +// @Route("/{version}/code/functions/runs", "GET") +export class GetCodeFunctionRuns extends CodeMashRequestBase implements IReturn +{ + /** @description The trigger whose function runs to list (trg_…). One of triggerId / taskId. */ + // @ApiMember(Description="The trigger whose function runs to list (trg_…). One of triggerId / taskId.") + public triggerId?: string; + + /** @description The scheduler task whose function runs to list (tsk_…). One of triggerId / taskId. */ + // @ApiMember(Description="The scheduler task whose function runs to list (tsk_…). One of triggerId / taskId.") + public taskId?: string; + + /** @description How many runs, newest first: 1-50. Default 20. */ + // @ApiMember(DataType="integer", Description="How many runs, newest first: 1-50. Default 20.") + public limit?: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetCodeFunctionRuns'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetCodeFunctionRunsResponse(); } +} + +// @Route("/{version}/code/functions/invoke", "POST") +// @DataContract +export class InvokeCodeFunction extends CodeMashRequestBase implements IReturn +{ + /** @description Which function: { integrationId, functionId, qualifier? }. */ + // @DataMember + // @ApiMember(Description="Which function: { integrationId, functionId, qualifier? }.", IsRequired=true) + public functionRef: FunctionRefDto; + + // @DataMember + public payload?: { [index:string]: Object; }; + + /** @description Sync (wait for the result, default) or Async (fire and forget). */ + // @DataMember + // @ApiMember(Description="Sync (wait for the result, default) or Async (fire and forget).") + public invocationType: CodeInvocationType; + + /** @description The service user the function acts as (usr_…); omitted = you. */ + // @DataMember + // @ApiMember(Description="The service user the function acts as (usr_…); omitted = you.") + public runAsUserId?: string; + + /** @description A JSON object → envelope config. No bindings: a manual call has nothing to bind them with. */ + // @DataMember + // @ApiMember(Description="A JSON object → envelope config. No bindings: a manual call has nothing to bind them with.") + public config?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'InvokeCodeFunction'; } + public getMethod() { return 'POST'; } + public createResponse() { return new InvokeCodeFunctionResponse(); } +} + /** @description Disable push service */ // @Route("/{version}/notifications/push/disable", "PUT") // @Api(Description="Disable push service") @@ -17948,14 +19831,14 @@ export class TestPushIntegration extends CodeMashRequestBase implements IReturn< // @ApiMember(Description="The push integration id to test. Get it from get_push_integrations.", IsRequired=true) public integrationId: string; - /** @description Optional device token to send the test notification to. Requires DeliveryFamily when set. */ + /** @description The device token the test is sent to — a device registered for the person receiving the test (get it from get_push_devices). Required for every real provider (only the Fake integration tests without one). For a web device it is the browser subscription JSON. Requires DeliveryFamily. */ // @DataMember - // @ApiMember(Description="Optional device token to send the test notification to. Requires DeliveryFamily when set.") + // @ApiMember(Description="The device token the test is sent to — a device registered for the person receiving the test (get it from get_push_devices). Required for every real provider (only the Fake integration tests without one). For a web device it is the browser subscription JSON. Requires DeliveryFamily.") public testToken?: string; - /** @description Optional delivery family for the test token (ios, android, chrome or safari). Requires TestToken when set. */ + /** @description The delivery family of TestToken: ios, android, chrome (any browser web push) or safari. Requires TestToken. */ // @DataMember - // @ApiMember(Description="Optional delivery family for the test token (ios, android, chrome or safari). Requires TestToken when set.") + // @ApiMember(Description="The delivery family of TestToken: ios, android, chrome (any browser web push) or safari. Requires TestToken.") public deliveryFamily?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } @@ -18737,6 +20620,14 @@ export class GetLogs extends CodeMashListPaginationRequestBase implements IRetur // @ApiMember(DataType="string", Description="Free-text search over title and message.", Name="search", ParameterType="query") public search?: string; + /** @description Meta key to filter on (e.g. taskId). Letters, digits and _ only. Must come with metaValue. */ + // @ApiMember(DataType="string", Description="Meta key to filter on (e.g. taskId). Letters, digits and _ only. Must come with metaValue.", Name="metaKey", ParameterType="query") + public metaKey?: string; + + /** @description Exact Meta value for metaKey (e.g. a task id tsk_...). Must come with metaKey. */ + // @ApiMember(DataType="string", Description="Exact Meta value for metaKey (e.g. a task id tsk_...). Must come with metaKey.", Name="metaValue", ParameterType="query") + public metaValue?: string; + /** @description Start of the timestamp range (inclusive, UTC). Optional. */ // @ApiMember(Description="Start of the timestamp range (inclusive, UTC). Optional.") public fromUtc?: string; @@ -19287,6 +21178,86 @@ export class DeleteAiProjectTrigger extends DeleteTrigger implements IReturn +{ + /** @description Who asks, shown on the dashboard, e.g. "norbix-cli". 1–80 printable characters. */ + // @ApiMember(Description="Who asks, shown on the dashboard, e.g. \"norbix-cli\". 1–80 printable characters.", IsRequired=true) + public clientName: string; + + /** @description The computer name, shown on the dashboard and part of the AI service user's name (cleaned, at most 40 characters). */ + // @ApiMember(Description="The computer name, shown on the dashboard and part of the AI service user's name (cleaned, at most 40 characters).") + public deviceName?: string; + + /** @description The project the CLI wants to work in. It must be a project of the account of the person who allows the sign-in. */ + // @ApiMember(Description="The project the CLI wants to work in. It must be a project of the account of the person who allows the sign-in.") + public projectId?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'AuthDeviceStartRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new AuthDeviceStartResponse(); } +} + +/** @description Polls a CLI browser sign-in (RFC 8628). Always HTTP 200: an error name (authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request) or the tokens, once. */ +// @Route("/{version}/auth/device/token", "POST") +// @Api(Description="Polls a CLI browser sign-in (RFC 8628). Always HTTP 200: an error name (authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request) or the tokens, once.") +export class AuthDeviceTokenRequest extends RequestBase implements IReturn +{ + /** @description The deviceCode from POST /auth/device/start. */ + // @ApiMember(Description="The deviceCode from POST /auth/device/start.", IsRequired=true) + public deviceCode: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'AuthDeviceTokenRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new AuthDeviceTokenResponse(); } +} + +/** @description The dashboard screen for a CLI browser sign-in: the client and computer that asked, and the roles the signed-in person may give. */ +// @Route("/{version}/auth/device/consent", "GET") +// @Api(Description="The dashboard screen for a CLI browser sign-in: the client and computer that asked, and the roles the signed-in person may give.") +export class AuthDeviceConsentRequest extends RequestBase implements IReturn +{ + /** @description The code the terminal shows, XXXX-XXXX (case, spaces and the dash do not matter). */ + // @ApiMember(Description="The code the terminal shows, XXXX-XXXX (case, spaces and the dash do not matter).", IsRequired=true) + public userCode: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'AuthDeviceConsentRequest'; } + public getMethod() { return 'GET'; } + public createResponse() { return new AuthDeviceConsentResponse(); } +} + +/** @description The signed-in person's decision on a CLI browser sign-in: allow with Membership roles, or deny. */ +// @Route("/{version}/auth/device/consent", "POST") +// @Api(Description="The signed-in person's decision on a CLI browser sign-in: allow with Membership roles, or deny.") +export class AuthDeviceConsentDecisionRequest extends RequestBase implements IReturn +{ + /** @description The code the terminal shows, XXXX-XXXX. */ + // @ApiMember(Description="The code the terminal shows, XXXX-XXXX.", IsRequired=true) + public userCode: string; + + /** @description allow | deny. */ + // @ApiMember(Description="allow | deny.", IsRequired=true) + public decision: string; + + /** @description For allow: account role ids (acc_…_nr_…) to give. */ + // @ApiMember(Description="For allow: account role ids (acc_…_nr_…) to give.") + public accountRoleIds?: string[]; + + /** @description For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }]. */ + // @ApiMember(Description="For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }].") + public projectRoles?: AiProjectRoleIdsDto[]; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'AuthDeviceConsentDecisionRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new AuthDeviceConsentDecisionResponse(); } +} + /** @description OAuth protected-resource metadata (RFC 9728) for the Hub MCP endpoint. */ // @Route("/.well-known/oauth-protected-resource", "GET") // @Route("/.well-known/oauth-protected-resource/{Path*}", "GET") @@ -19329,9 +21300,9 @@ export class OAuthRegisterRequest implements IReturn public createResponse() { return ''; } } -/** @description OAuth authorization endpoint: sign-in hint or the consent page (HTML). */ +/** @description OAuth authorization endpoint: checks the request and redirects to the dashboard consent screen. */ // @Route("/{version}/oauth/authorize", "GET") -// @Api(Description="OAuth authorization endpoint: sign-in hint or the consent page (HTML).") +// @Api(Description="OAuth authorization endpoint: checks the request and redirects to the dashboard consent screen.") export class OAuthAuthorizeRequest implements IReturn { public version?: string; @@ -19342,17 +21313,106 @@ export class OAuthAuthorizeRequest implements IReturn public createResponse() { return ''; } } -/** @description OAuth authorization endpoint: the person's decision from the consent page. */ -// @Route("/{version}/oauth/authorize", "POST") -// @Api(Description="OAuth authorization endpoint: the person's decision from the consent page.") -export class OAuthAuthorizeDecisionRequest implements IReturn +/** @description The dashboard consent screen for an AI tool: the client, where it returns to, and the roles the signed-in person may give. */ +// @Route("/{version}/oauth/consent", "GET") +// @Api(Description="The dashboard consent screen for an AI tool: the client, where it returns to, and the roles the signed-in person may give.") +export class OAuthConsentRequest extends RequestBase implements IReturn { - public version?: string; + /** @description OAuth response_type from the authorize request (must be "code"). */ + // @ApiMember(Description="OAuth response_type from the authorize request (must be \"code\").") + public responseType?: string; + + /** @description OAuth client_id from the authorize request. */ + // @ApiMember(Description="OAuth client_id from the authorize request.") + public clientId?: string; + + /** @description OAuth redirect_uri from the authorize request. */ + // @ApiMember(Description="OAuth redirect_uri from the authorize request.") + public redirectUri?: string; + + /** @description PKCE code_challenge from the authorize request. */ + // @ApiMember(Description="PKCE code_challenge from the authorize request.") + public codeChallenge?: string; + + /** @description PKCE code_challenge_method from the authorize request (must be "S256"). */ + // @ApiMember(Description="PKCE code_challenge_method from the authorize request (must be \"S256\").") + public codeChallengeMethod?: string; + + /** @description OAuth state from the authorize request; returned to the client unchanged. */ + // @ApiMember(Description="OAuth state from the authorize request; returned to the client unchanged.") + public state?: string; + + /** @description OAuth resource (RFC 8707) from the authorize request. */ + // @ApiMember(Description="OAuth resource (RFC 8707) from the authorize request.") + public resource?: string; + + /** @description OAuth scope from the authorize request. */ + // @ApiMember(Description="OAuth scope from the authorize request.") + public scope?: string; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'OAuthConsentRequest'; } + public getMethod() { return 'GET'; } + public createResponse() { return new OAuthConsentResponse(); } +} + +/** @description The signed-in person's decision on the consent screen: allow with roles, or deny. Returns the address to send the browser to. */ +// @Route("/{version}/oauth/consent", "POST") +// @Api(Description="The signed-in person's decision on the consent screen: allow with roles, or deny. Returns the address to send the browser to.") +export class OAuthConsentDecisionRequest extends RequestBase implements IReturn +{ + /** @description OAuth response_type from the authorize request (must be "code"). */ + // @ApiMember(Description="OAuth response_type from the authorize request (must be \"code\").") + public responseType?: string; + + /** @description OAuth client_id from the authorize request. */ + // @ApiMember(Description="OAuth client_id from the authorize request.") + public clientId?: string; + + /** @description OAuth redirect_uri from the authorize request. */ + // @ApiMember(Description="OAuth redirect_uri from the authorize request.") + public redirectUri?: string; + + /** @description PKCE code_challenge from the authorize request. */ + // @ApiMember(Description="PKCE code_challenge from the authorize request.") + public codeChallenge?: string; + + /** @description PKCE code_challenge_method from the authorize request (must be "S256"). */ + // @ApiMember(Description="PKCE code_challenge_method from the authorize request (must be \"S256\").") + public codeChallengeMethod?: string; + + /** @description OAuth state from the authorize request; returned to the client unchanged. */ + // @ApiMember(Description="OAuth state from the authorize request; returned to the client unchanged.") + public state?: string; + + /** @description OAuth resource (RFC 8707) from the authorize request. */ + // @ApiMember(Description="OAuth resource (RFC 8707) from the authorize request.") + public resource?: string; + + /** @description OAuth scope from the authorize request. */ + // @ApiMember(Description="OAuth scope from the authorize request.") + public scope?: string; + + /** @description The consentTicket from GET /oauth/consent. */ + // @ApiMember(Description="The consentTicket from GET /oauth/consent.", IsRequired=true) + public consentTicket: string; + + /** @description allow | deny. */ + // @ApiMember(Description="allow | deny.", IsRequired=true) + public decision: string; + + /** @description For allow: account role ids (acc_…_nr_…) to give. */ + // @ApiMember(Description="For allow: account role ids (acc_…_nr_…) to give.") + public accountRoleIds?: string[]; - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthAuthorizeDecisionRequest'; } + /** @description For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }]. */ + // @ApiMember(Description="For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }].") + public projectRoles?: AiProjectRoleIdsDto[]; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'OAuthConsentDecisionRequest'; } public getMethod() { return 'POST'; } - public createResponse() { return ''; } + public createResponse() { return new OAuthConsentDecisionResponse(); } } /** @description OAuth token endpoint: authorization code (PKCE S256) or refresh token → access token. */ @@ -19680,6 +21740,7 @@ export class UpdateWebhookIntegrationExtraHeadersRequest extends CodeMashRequest // @Route("/{version}/webhooks/{source}/{integrationInstanceId}", "POST") export class ReceiveWebhook implements IReturnVoid { + public version?: string; public source: string; public integrationInstanceId: string; public requestStream: string; @@ -19847,6 +21908,22 @@ export class GetSchedulerTasks extends CodeMashListPaginationRequestBase impleme public createResponse() { return new GetSchedulerTasksResponse(); } } +/** @description Gets the latest runs of a scheduled task */ +// @Route("/{version}/scheduler/tasks/{id}/runs", "GET") +// @Api(Description="Gets the latest runs of a scheduled task") +export class GetSchedulerTaskRuns extends CodeMashRequestBase implements IReturn +{ + public id: string; + /** @description How many runs to return, newest first: 1-50. Default 10. */ + // @ApiMember(DataType="integer", Description="How many runs to return, newest first: 1-50. Default 10.", Name="take", ParameterType="query") + public take?: number; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'GetSchedulerTaskRuns'; } + public getMethod() { return 'GET'; } + public createResponse() { return new GetSchedulerTaskRunsResponse(); } +} + /** @description Save scheduled task */ // @Route("/{version}/scheduler/tasks", "POST") // @Api(Description="Save scheduled task") @@ -20016,6 +22093,21 @@ export class MergeContactsRequest extends CodeMashRequestBase implements IReturn public createResponse() { return new EmptyResponse(); } } +/** @description Repair contact roles from their logins */ +// @Route("/{version}/membership/users/repair-roles", "POST") +// @Api(Description="Repair contact roles from their logins") +export class RepairContactRolesRequest extends CodeMashRequestBase implements IReturn +{ + /** @description True (default) = only count what would change. False = write. */ + // @ApiMember(Description="True (default) = only count what would change. False = write.") + public dryRun: boolean; + + public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } + public getTypeName() { return 'RepairContactRolesRequest'; } + public getMethod() { return 'POST'; } + public createResponse() { return new RepairContactRolesResponse(); } +} + /** @description Update a contact */ // @Route("/{version}/membership/users/{contactId}", "PATCH") // @Api(Description="Update a contact") diff --git a/references/hub_dtos.py b/references/hub_dtos.py index a848f7f..a046e84 100644 --- a/references/hub_dtos.py +++ b/references/hub_dtos.py @@ -1,5 +1,5 @@ """ Options: -Date: 2026-10-13 16:21:29 +Date: 2026-10-14 08:01:43 Version: 10.20 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: http://localhost:5001 @@ -1582,14 +1582,7 @@ class TriggerActionMarketplaceDto(TriggerActionDto): @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass -class RequestBase(ICultureBasedRequest, IVersionBasedRequest, IHasCorrelationIdRequest): - # @ApiMember(DataType="string", Description="Specify culture code when your response from the API should be localised. E.g.: en", Name="CultureCode", ParameterType="header") - culture_code: Optional[str] = None - """ - Specify culture code when your response from the API should be localised. E.g.: en - """ - - +class RequestBase(IVersionBasedRequest, IHasCorrelationIdRequest): # @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") time_zone_id: Optional[str] = None """ @@ -3537,10 +3530,6 @@ class MarketplaceFunctionSchedulerTaskRequest(SchedulerTaskRequest): payload: Optional[Dict[str, str]] = None -class ICultureBasedRequest: - culture_code: Optional[str] = None - - class IVersionBasedRequest: version: Optional[str] = None @@ -4087,18 +4076,6 @@ class CodeMashRuntime(str, Enum): PRODUCTION = 'Production' -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoLicenseDto: - domain: Optional[str] = None - account_id: Optional[str] = None - email: Optional[str] = None - release: Optional[str] = None - expire: int = 0 - is_trial: bool = False - projects_cap: int = 0 - - @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class EchoRegionDto: @@ -5008,6 +4985,18 @@ class LicenseHeartbeatVerdictDto: message: Optional[str] = None +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class InstallationLicenseDetailsDto: + domain: Optional[str] = None + account_id: Optional[str] = None + email: Optional[str] = None + release: Optional[str] = None + expire: int = 0 + is_trial: bool = False + projects_cap: int = 0 + + @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class InstallationLicenseStatusDto: @@ -5026,6 +5015,9 @@ class InstallationLicenseStatusDto: last_heartbeat_outcome: Optional[str] = None last_heartbeat_error: Optional[str] = None message: Optional[str] = None + license: Optional[InstallationLicenseDetailsDto] = None + licensing_docs_url: Optional[str] = None + ask_for_enterprise_license_email: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @@ -6856,6 +6848,17 @@ class UserDto: marketing_preferences: Optional[Dict[str, ChannelSubscriptionStateDto]] = None +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class ContactRolesRepairDto: + dry_run: bool = False + contacts_without_roles: int = 0 + contacts_to_repair: int = 0 + contacts_repaired: int = 0 + contacts_without_login_role_ids: int = 0 + legacy_role_names_ignored: int = 0 + + @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ConsentPurposeDto: @@ -7189,8 +7192,6 @@ class ICursorArgs: @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class EchoResponse: - container_name: Optional[str] = None - ip: Optional[str] = None release: Optional[CodeMashRelease] = None runtime: Optional[CodeMashRuntime] = None managed_service_hub_url: Optional[str] = None @@ -7199,18 +7200,10 @@ class EchoResponse: api_url: Optional[str] = None api_version: Optional[str] = None hub_version: Optional[str] = None - mjml_url: Optional[str] = None admin_url_template: Optional[str] = None - license: Optional[EchoLicenseDto] = None - ask_for_enterprise_license_email: Optional[str] = None email_service_configured: bool = False root_bootstrap_password_source: Optional[str] = None regions: Optional[List[EchoRegionDto]] = None - is_production_installation: bool = False - licensing_mode: Optional[str] = None - grace_days_left: Optional[int] = None - installation_domain: Optional[str] = None - licensing_docs_url: Optional[str] = None agent: Optional[EchoAgentDto] = None hosting_platform: Optional[EchoHostingPlatformDto] = None @@ -8867,6 +8860,12 @@ class GetAllContactsResponse(ResponseBase): next_cursor: Optional[str] = None +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class RepairContactRolesResponse(ResponseBase): + result: Optional[ContactRolesRepairDto] = None + + @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GetComplianceSettingsResponse(ResponseBase): @@ -11982,6 +11981,13 @@ class GetDatabaseTaxonomyTreeRequest(CodeMashRequestBase, IReturn[GetDatabaseTax Returns the single-parent taxonomy structure tree """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + # @ApiMember(Description="When true, each taxonomy node also carries its own term tree (heavier response).") include_terms: bool = False """ @@ -12123,6 +12129,13 @@ class GetDatabaseTaxonomyTermRequest(CodeMashRequestBase, IReturn[GetDatabaseTax Get a single term from a taxonomy by id """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + # @ApiMember(Description="Taxonomy id from get_database_taxonomies.", IsRequired=true) taxonomy_id: Optional[str] = None """ @@ -12153,6 +12166,13 @@ class GetDatabaseMergedTermTreeRequest(CodeMashRequestBase, IReturn[GetDatabaseM Returns a merged term tree across a taxonomy and its child taxonomies """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + # @ApiMember(Description="Root taxonomy slug/name (from get_database_taxonomies). Its terms are the roots; child-taxonomy terms nest under them.", IsRequired=true) taxonomy_name: Optional[str] = None """ @@ -12176,6 +12196,13 @@ class GetDatabaseTaxonomyTermTreeRequest(CodeMashRequestBase, IReturn[GetDatabas Returns the whole term tree of a taxonomy (or a sub-tree) in one call """ + # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") + all_languages: bool = False + """ + Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. + """ + + # @ApiMember(Description="Taxonomy slug/name to fetch the term tree for, from get_database_taxonomies.", IsRequired=true) taxonomy_name: Optional[str] = None """ @@ -18545,6 +18572,22 @@ class MergeContactsRequest(CodeMashRequestBase, IReturn[EmptyResponse]): """ +# @Route("/{version}/membership/users/repair-roles", "POST") +# @Api(Description="Repair contact roles from their logins") +@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) +@dataclass +class RepairContactRolesRequest(CodeMashRequestBase, IReturn[RepairContactRolesResponse]): + """ + Repair contact roles from their logins + """ + + # @ApiMember(Description="True (default) = only count what would change. False = write.") + dry_run: bool = False + """ + True (default) = only count what would change. False = write. + """ + + # @Route("/{version}/membership/users/{contactId}", "PATCH") # @Api(Description="Update a contact") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)