0f1a6d865d
Applications can now declare a `credentials:` list in the YAML manifest.
Each entry holds a static `client_id` (and optional `secret`) that is
provisioned via POST /applications/{id}/extcredentials when the application
is first created. Existing applications are never modified.
Also adds CHANGELOG.md and ROADMAP.md for the v0.1.0 initial release.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
68 lines
1.4 KiB
Python
68 lines
1.4 KiB
Python
from dataclasses import dataclass, field
|
|
|
|
|
|
@dataclass
|
|
class ApiAccess:
|
|
api_name: str
|
|
api_version: str = ""
|
|
|
|
|
|
@dataclass
|
|
class AppCredential:
|
|
client_id: str
|
|
secret: str = ""
|
|
|
|
|
|
@dataclass
|
|
class AppSpec:
|
|
name: str
|
|
org_name: str
|
|
description: str = ""
|
|
email: str = ""
|
|
phone: str = ""
|
|
enabled: bool = True
|
|
apis: list["ApiAccess"] = field(default_factory=list)
|
|
environments: list[str] = field(default_factory=list)
|
|
credentials: list["AppCredential"] = field(default_factory=list)
|
|
|
|
|
|
@dataclass
|
|
class OrgSpec:
|
|
name: str
|
|
description: str = ""
|
|
email: str = ""
|
|
phone: str = ""
|
|
enabled: bool = True
|
|
development: bool = False
|
|
environments: list[str] = field(default_factory=list)
|
|
|
|
|
|
@dataclass
|
|
class Manifest:
|
|
organizations: list[OrgSpec] = field(default_factory=list)
|
|
applications: list[AppSpec] = field(default_factory=list)
|
|
|
|
|
|
@dataclass
|
|
class EnvConfig:
|
|
name: str
|
|
url: str
|
|
username: str
|
|
password: str
|
|
verify_ssl: bool = False
|
|
|
|
|
|
@dataclass
|
|
class Action:
|
|
kind: str # "create_org" | "create_app" | "grant_api"
|
|
env_name: str
|
|
description: str
|
|
detail: dict = field(default_factory=dict)
|
|
|
|
|
|
@dataclass
|
|
class NormResult:
|
|
actions_done: list[Action] = field(default_factory=list)
|
|
actions_skipped: list[Action] = field(default_factory=list)
|
|
errors: list[str] = field(default_factory=list)
|