Expose gateway billing flows from the synced server baseline

The preserved local work adds PopiNewAPI billing checkout, gateway account binding, and matching web console/pricing surfaces on top of the current test-server baseline. During the merge, the start-end video helpers from the deployed baseline were kept alongside the actionGenerate prompt handling from the WIP.

Constraint: Current usable baseline is 7054436, already deployed on the test server.

Rejected: Commit the WIP before syncing the baseline | would have hidden conflicts with the deployed start-end-frame changes.

Confidence: medium

Scope-risk: broad

Directive: Do not deploy this commit to the test server without rechecking gateway credentials and billing checkout behavior in that environment.

Tested: go test ./...

Tested: make build

Tested: cd web && npm run build
This commit is contained in:
wtgoku
2026-05-21 16:53:07 +08:00
parent 7054436a99
commit baba209519
31 changed files with 6035 additions and 86 deletions
+27 -9
View File
@@ -12,18 +12,23 @@ type user struct {
}
type session struct {
Token string
UserID string
UpstreamKey string
User user
CreatedAt time.Time
ExpiresAt time.Time
Token string
UserID string
UpstreamKey string
GatewayUserID int
GatewayAccessToken string
User user
CreatedAt time.Time
ExpiresAt time.Time
}
type authSessionView struct {
User user `json:"user"`
SessionKey string `json:"session_key,omitempty"`
UpstreamKeyMasked string `json:"upstream_key_masked,omitempty"`
User user `json:"user"`
SessionKey string `json:"session_key,omitempty"`
UpstreamKeyMasked string `json:"upstream_key_masked,omitempty"`
GatewayUserID int `json:"gateway_user_id,omitempty"`
GatewayAccessTokenMasked string `json:"gateway_access_token_masked,omitempty"`
GatewayBound bool `json:"gateway_bound"`
}
type skill struct {
@@ -138,3 +143,16 @@ type model struct {
Capabilities []string `json:"capabilities"`
Pricing map[string]any `json:"pricing"`
}
type billingPlan struct {
ID string `json:"id"`
ProductType string `json:"product_type"`
Badge string `json:"badge"`
Name string `json:"name"`
Price string `json:"price"`
Cadence string `json:"cadence"`
Summary string `json:"summary"`
Features []string `json:"features"`
CTA string `json:"cta"`
Highlight bool `json:"highlight,omitempty"`
}