Releases: squarecloudofc/api-types
Releases · squarecloudofc/api-types
v2.0.0
v1.0.0
Major Changes
-
Port the ~30 missing v10.5 endpoint typings from the Node.js SDK draft, and
realign the existing Network Analytics typings with the current OpenAPI
(v10.5.0). New coverage:- Branded
DatabaseIdandWorkspaceIdplus a shared
RuntimeStatsListItem<TId, Running>used by bothAPIApplicationStatusAll
andAPIDatabaseStatusListItem. APIEnvVarspayload and POST/PUT/DELETE bodies for/v2/apps/{appId}/envs.APIMetrics(24h × 5min points) for/v2/apps/{appId}/metricsand
/v2/databases/{databaseId}/metrics.- Snapshot restore body and
RESTGetAPIUserSnapshotsQuerywith the new
SnapshotScope("applications" | "databases"). APIGithubAppLinkResponse,RESTPostAPIGithubAppJSONBody, and the
app: { id, name, branch }field onAPIDeploymentCurrent.- Full Network category:
APINetworkAnalyticsBucket,
APINetworkAnalyticsTimeBucket,APINetworkErrors,APINetworkLogs,
APINetworkPerformance, plusRESTAPINetworkRangeQuery/
RESTAPINetworkErrorsQuery. - Full Databases category:
APIDatabase,APIDatabaseSummary,
APIDatabaseCreated,APIDatabaseStatus(alias ofAPIApplicationStatus),
APIDatabaseStatusListItem, certificate + credentials reset typings, plus
POST/PATCH/DELETE/start/stop bodies. - Full Workspaces category:
APIWorkspace, members, applications, invite
code, and all mutation bodies. APIRealtimeSystemEventunion for SSE protocol events.RESTGetAPIApplicationStatusAllQueryadds the new optionalworkspaceId
query parameter onGET /v2/apps/status.
APIDeploymentrealigned with production response (the OpenAPI 10.5
description of this endpoint was incorrect — verified against a live response):APIDeployPayload.responseis nowAPIDeployment[][](nested) — outer is
the list of recent deploys, inner is the timeline of events for each
deploy.APIDeploymentis now a discriminated union onstate:cloneevents carrybranch: stringcommitevents carryfiles: { added, removed, modified }- all other states have only
{ id, state, date }
DeploymentStateadds"commit"and"restarting".APIDeployment.idis nowstring(40-char SHA-1 commit hash) instead of
the previous`git-${string}`template literal.
Realigned pre-existing endpoint typings with production (all validated
against live responses with the API team):APINetworkDNSPayloadshape replaced. The endpoint returns a single object
{ ownership: { type, name, value }, ssl: { status } }, not the array of
DNS records the previous type declared.APINetworkDNSStatusnow describes
the SSL validation state, applied toAPINetworkDNS.ssl.status.APIListedFile.lastModifiedis nowISODateString(wasnumber).APIReadFile.typeis now the literal"Buffer"(wasstring).RESTPutAPIFileUpsertJSONBody.contentacceptsstring | APIReadFile
(string or Node-style Buffer JSON object), not juststring.RESTPutAPIFileUpsertResultPayloadnow carriesresponse: { written: boolean }
instead of being status-only.RESTPostAPIApplicationUploadResultsimplified to{ id, name, lang, ram }
to match the actual upload response.RESTPostAPIApplicationUploadResultLanguage
is removed;langis a plainstringslug (e.g."nodejs").RESTPostAPIGithubWebhookResultPayloadis no longer
APIPayload<{ webhook }>becauseresponseis absent when the webhook is
removed (access_token: "@"). It now extendsAPIPayloadStatusOnlywith an
optionalresponse.UserPlanNamerewritten. Paid tiers are always suffixed with their RAM
size in GB (hobby-1/hobby-2,standard-4/standard-6/standard-8,
pro-12/pro-16/pro-24,enterprise-<N>); onlyfreehas no suffix.
The previous union accepted plain"hobby"/"standard"/"pro"(without
size) which the backend never returns. The"advanced"tier is removed
(no such tier exists in production). AddedHobbyPlanSizes,
StandardPlanSizes,ProPlanSizestype helpers; theUserPlanName
helper now requires a size for paid tiers
(UserPlanName.Pro(16)→"pro-16").APIWorkspaceApp.langis nowApplicationLanguage(wasstring) — same
vocabulary asAPIApplication.languageandAPIUserApplication.lang.RESTPostAPIApplicationUploadResult.langis nowApplicationLanguage(was
string).APIApplicationgains requiredcreated_at: ISODateString(backend has
always returned it; the type just didn't declare it).APIWebsiteApplication
inherits it.APIWorkspaceMember.joinedAtis now required (was optional).RESTPostAPIApplicationCommitResultPayloadsimplified to
APIPayloadStatusOnly. The previousmessage?: stringfield was a vestige
of an old shared success/error interface and never appears on real success
responses.APINetworkPerformancePayloadnow allows the empty-object response variant
(APIPayload<APINetworkPerformance | Record<string, never>>) — consistent
with analytics and errors. Backend returns{}when the requested window
precedes the application's creation date.
Breaking changes vs 0.6.0:
APINetworkAnalyticsresponse shape replaced. The new shape matches the
OpenAPINetworkAnalytics: per-dimension breakdowns (visits,countries,
devices,os,browsers,protocols,methods,paths,referers,
providers) each as arrays of 15-minute buckets. Fields removed from the
previous shape:hostname,total,agents,hosts. Fields renamed:
deviceTypes→devices,operatingSystems→os. The endpoint now also
requiresstart/endISO timestamps (RESTGetAPINetworkAnalyticsQuery).
APINetworkAnalyticsPayloadis nowAPIPayload<APINetworkAnalytics | Record<string, never>>
because the backend returns{}when the requested window precedes the
application's creation date.APINetworkErrorsPayloadlikewise becomes
APIPayload<APINetworkErrors | Record<string, never>>for the same reason.APINetworkErrorsTopPath.methodandAPINetworkErrorsByMethod.methodare
nowstring | null(edge may not attribute a method).APIDeploymentCurrent.webhookis now optional. Eitherapp,webhook, or
both may be present.APIUsergains requiredlocaleandcreated_at.APIUserApplicationgains requireddomain: string | null,
custom: string | null, andcreated_atto match the OpenAPIAppSummary.APIUserInfogains requireddatabases: APIDatabaseSummary[].
- Branded
Minor Changes
- 4153b54: Remove deprecated backup typings
v0.6.0
v0.5.0
v0.4.0
v0.3.3
v0.3.2
v0.3.1
v0.3.0
Minor Changes
- ef69efb: Add typings for
/apps/:appId/network/dns(APINetworkDNS) - 78f00c9: Add
RESTPostAPIApplicationBackupand updateAPIApplicationBackup - 211a9d4: Update file-related typings to match new API convention
- 3ef25a4: Implement branded types for UserId and ApplicationId
- 211a9d4: Add typings for
PATCH /apps/:appId/files - 58d009d: Add typings for
/apps/:appId/network/custom(RESTPostAPINetworkCustomDomainJSONBody) - a15ce71: Add typings for
/service/status(APIServiceStatus)
Patch Changes
- b3c226d: Completely remove deprecated
tagandisWebsiteproperties