Skip to content

fix(social-ugig): use current gig input schema - #979

Open
WNZhao wants to merge 1 commit into
profullstack:masterfrom
WNZhao:fix/ugig-current-gig-schema
Open

fix(social-ugig): use current gig input schema#979
WNZhao wants to merge 1 commit into
profullstack:masterfrom
WNZhao:fix/ugig-current-gig-schema

Conversation

@WNZhao

@WNZhao WNZhao commented Aug 24, 2026

Copy link
Copy Markdown

Problem

social-ugig still posts the legacy payload (content, tags, and price_cents). The current uGig POST /api/gigs contract requires skills_required, budget_type, and location_type, with fixed prices represented by budget_min / budget_max. Real non-dry-run publishing therefore receives a validation error instead of creating a gig.

The old adapter also leaves listing intent ambiguous, which can place a seller offer in the hiring feed.

Fix

  • emit the current GigInput fields
  • default social publishing to listing_type: for_hire, with an explicit hiring override
  • map hashtags/default skills to required skills_required
  • convert defaultPriceCents to dollar-valued fixed budgets
  • support payment coin, duration, and preferred AI tools
  • enforce uGig title/description minimums before the network request
  • use the full current 5,000-character description limit
  • redact the bearer token if an API error echoes it
  • graduate the adapter from smoke coverage to the social contract suite

Verification

  • pnpm exec vitest run packages/social/ugig/src/index.test.ts --reporter=dot — 8/8 passed
  • pnpm --filter @profullstack/sh1pt-social-ugig typecheck — passed
  • pnpm --filter @profullstack/sh1pt-social-ugig build — passed
  • git diff --check — passed

The request fields and limits were checked against uGig's live /openapi.json; listing_type was additionally checked against the live create/edit UI payload and response model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant