fix(psa): move CW clientId to server config, remove from user input

ClientId is a product-level GUID registered at developer.connectwise.com,
not per-MSP. Moved to settings.CW_CLIENT_ID env var. MSPs now only
provide site URL, company ID, public key, and private key.

Also added newline handling note to post_note() — CW Developer Guide
states \n is unsupported in JSON bodies. Needs sandbox testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-03-15 00:15:04 -04:00
parent db305f54e7
commit 7f3f054583
7 changed files with 26 additions and 28 deletions

View File

@@ -12,7 +12,7 @@ class PsaConnectionCreate(BaseModel):
company_id: str = Field(min_length=1, max_length=100)
public_key: str = Field(min_length=1)
private_key: str = Field(min_length=1)
client_id: str = Field(min_length=1)
# Note: client_id is NOT per-MSP — it's a product-level GUID from settings.CW_CLIENT_ID
class PsaConnectionUpdate(BaseModel):
@@ -21,7 +21,6 @@ class PsaConnectionUpdate(BaseModel):
company_id: str | None = None
public_key: str | None = None
private_key: str | None = None
client_id: str | None = None
class PsaConnectionResponse(BaseModel):