Commit b785b33
authored
refactor(auth): use generated OpenAPI type for customer creation (#14852)
## Summary
Replace the hand-rolled `CreateCustomerPayload` in `authStore` with the
generated OpenAPI `CreateCustomerRequest`, now that the comfy-api spec
declares both `turnstile_token` and `signup_source`.
## Changes
- **What**: `createCustomer` types its request body from
`operations['createCustomer']` (the generated `@comfyorg/registry-types`
contract) instead of a local interface, so the field set drift-checks
against the backend at compile time. `signup_source` is always set from
the client build (`DISTRIBUTION`), so the caller-facing param is
`Omit<CreateCustomerRequest, 'signup_source'>` rather than a shape that
advertises a field callers cannot actually set.
- **Breaking**: none. Runtime behavior is unchanged (body is still `{
...payload, signup_source: DISTRIBUTION }`).
## Review Focus
Follow-up to #14528. The inline schema override is removed now that the
backend regenerated types carry `turnstile_token` + `signup_source`, and
the `payload` param no longer exposes the always-overwritten
`signup_source`.
Verified locally: `vue-tsc --noEmit` clean, `authStore.test.ts` 88/88
pass, eslint clean.
## Screenshots (if applicable)1 parent e48b869 commit b785b33
1 file changed
Lines changed: 5 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
64 | 51 | | |
65 | 52 | | |
66 | 53 | | |
| |||
392 | 379 | | |
393 | 380 | | |
394 | 381 | | |
395 | | - | |
| 382 | + | |
396 | 383 | | |
397 | 384 | | |
398 | 385 | | |
| |||
560 | 547 | | |
561 | 548 | | |
562 | 549 | | |
563 | | - | |
| 550 | + | |
564 | 551 | | |
565 | 552 | | |
566 | 553 | | |
| |||
0 commit comments