-
Notifications
You must be signed in to change notification settings - Fork 2
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
FCT-702: add Associate and Associate-Role-Assignment models #481
Conversation
🦋 Changeset detectedLatest commit: 7c7992d The changes in this PR will be included in the next version bump. This PR includes changesets to release 34 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
models/business-unit/src/associate/associate-draft/generator.ts
Outdated
Show resolved
Hide resolved
models/business-unit/src/associate/associate-draft/generator.ts
Outdated
Show resolved
Hide resolved
const customerRef: TReferenceGraphql = Reference.presets.customerReference | ||
.customerReference() |
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.
Is this really the syntax? customerReference
repeated twice??
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.
Looks like this is in fact legal syntax, should probably change this
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.
yeah, who did that??
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 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.
Made a ticket for this 😎
models/business-unit/src/associate-role-assignment/associate-role-assignment-draft/generator.ts
Outdated
Show resolved
Hide resolved
models/business-unit/src/associate-role-assignment/builder.spec.ts
Outdated
Show resolved
Hide resolved
__typename: 'BusinessUnit'; | ||
storesRef: KeyReference; | ||
parentUnitRef: null; | ||
parentUnit?: BusinessUnitKeyReference; |
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.
In a Company
the parentUnit
is always null
and the topLevelUnit
is a self-reference
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.
Thank you @NickDevG! ❤️ I am confused about the distinction between the two in regard to their Graphql entities. I may tag this and work on it in another PR, but is there a good place to read on their differences other than the HTTP or Impex Docs?
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.
@tylermorrisford this is in the http API docs, but maybe is what youre looking for?
https://docs.commercetools.com/api/customers-overview#hierarchies-within-business-units
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.
@NickDevG We're making a new ticket to fix the Company type and to add the CompanyDraft and DivisionDraft transformers in a separate PR.
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.
Pulled it down, ran the tests, checked the shapes, this looks good to me aside from Nico's comments
…nts and uses of typename
cd33c5d
to
f51311b
Compare
Adds the
Associate
andAssociate-Role-Assignment
models, and splits the types/constants for theBusiness-Unit
package so thatCompany
andDivision
have their own types/constants.Reviewers: Beyond the addition of the two models, this PR will appear large but is mostly rearranging the location of types and (admittedly duplicating) constants. Would love your thoughts on the colocation and whether or not we should document this pattern.