-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for setting sales channel when creating a product #6986
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
@@ -35,7 +35,7 @@ export const removeRemoteLinkStep = createStep( | |||
) | |||
await link.delete(grouped) | |||
|
|||
return new StepResponse(void 0, grouped) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typing issue where if you return void 0
you cannot do .config
on the step to change the name
})) | ||
} | ||
) | ||
return createdProducts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we refetch after a workflow, I think it's better to not bother and reconstruct the data for now
ffa378e
to
3dbe35d
Compare
@@ -35,7 +35,7 @@ export const removeRemoteLinkStep = createStep( | |||
) | |||
await link.delete(grouped) | |||
|
|||
return new StepResponse(void 0, grouped) | |||
return new StepResponse(grouped, grouped) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
return new StepResponse(grouped, grouped) | |
return new StepResponse(grouped) |
@@ -202,6 +202,7 @@ export const AdminCreateProduct = z | |||
tags: z.array(AdminUpdateProductTag).optional(), | |||
options: z.array(AdminCreateProductOption).optional(), | |||
variants: z.array(AdminCreateProductVariant).optional(), | |||
sales_channels: z.array(z.object({ id: z.string() })).optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Should we allow string IDs too? I know this would be diverging from 1.0, but I don't see the benefit of constructing objects in the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree, this is due to the legacy usage of providing ids, the naming was always referring to the target object. In other places we do allow the ids too instead of objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olivermrbl I tried not to introduce too many breaking changes in the API, but we can revisit once we have things working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than Carlos' comment, LGTM
3dbe35d
to
a74e782
Compare
No description provided.