-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Add and resolve query projection for products and specs respectively #97
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
Merged
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
35406ef
fix:QuerySpecsOptionalResponseModel
52dfaee
fix:PR Comments
58e5bd8
feat: add projection and update response models
Shri2109 b6df853
refactor: update query products response model
Shri2109 fee23c0
feat:NewResponseModel
f94c805
refactor: include a common products response
Shri2109 256b80f
fix:DeleteUnwantedResponseModel
c84db16
refactor: include unqiue models for product request and response
Shri2109 06118e0
refactor: change from ProductRequest to Product
Shri2109 b619beb
fix:PRComments
7872a98
Merge branch 'users/sam-rishi/fix-projection' of https://github.com/s…
10714ad
fix:PRComments
3cf7a28
refactor: add separate projection and order-by enums and add update r…
Shri2109 fb9653a
refactor: update request models and product enums
Shri2109 f0eefca
Merge pull request #3 from shri2k2/users/sam-rishi/fix-spec-response-…
sam-rishi cfb7835
refactor: update specification enum name
Shri2109 e35715b
feat: add retry mechanism for both specs and product clients
Shri2109 1e73458
test: reformat spec column projection test case
Shri2109 070d68f
refactor: change from ProductResponse to Product
Shri2109 8f83083
fix:PRComments
023e3a7
fix:PRComments
d7edfdf
fix:PRComments
1fab252
fix:PRComments
55bed9b
fix:PRComments
110c2da
refactor:SpecsModelsAndProductDocstring
1017a4a
docs: update product doc string
Shri2109 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,14 @@ | ||
| from ._product import Product | ||
| from ._create_products_partial_success import CreateProductsPartialSuccess | ||
| from ._delete_products_partial_success import DeleteProductsPartialSuccess | ||
| from ._paged_products import PagedProducts | ||
| from ._query_products_request import ( | ||
| QueryProductsRequest, | ||
| ProductField, | ||
| ProductOrderBy, | ||
| ProductProjection, | ||
| QueryProductsRequest, | ||
| QueryProductValuesRequest, | ||
| ) | ||
| from ._product_response import ProductResponse | ||
| from ._product_request import CreateProductRequest, UpdateProductRequest | ||
|
|
||
| # flake8: noqa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| from datetime import datetime | ||
| from typing import Dict, List, Optional | ||
|
|
||
| from nisystemlink.clients.core._uplink._json_model import JsonModel | ||
|
|
||
|
|
||
| class ProductResponse(JsonModel): | ||
Shri2109 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| """Contains information about a product, where all the fields are optional. | ||
|
|
||
| - This is because when using query products' projection, user can request for any of the available | ||
| fields. So, we are making sure that all the available fields are optional. | ||
|
|
||
| - Also while creating a product it is not mandatory that the product should be created with all the fields. | ||
| """ | ||
|
|
||
| id: Optional[str] | ||
| """The globally unique id of the product.""" | ||
|
|
||
| part_number: Optional[str] | ||
| """The part number is the unique identifier of a product within a single org. | ||
|
|
||
| Usually the part number refers to a specific revision or version of a given product.""" | ||
|
|
||
| name: Optional[str] | ||
| """The name of the product. | ||
|
|
||
| Usually the name is used to refer to several part numbers that all have the same name but | ||
| different revisions or versions. | ||
| """ | ||
|
|
||
| family: Optional[str] | ||
| """The family that that this product belongs to. | ||
|
|
||
| Usually the family is a grouping above product name. A family usually has multiple product | ||
| names within it. | ||
| """ | ||
|
|
||
| updated_at: Optional[datetime] | ||
| """The last time that this product was updated.""" | ||
|
|
||
| file_ids: Optional[List[str]] | ||
| """A list of file ids that are attached to this product.""" | ||
|
|
||
| keywords: Optional[List[str]] | ||
| """A list of keywords that categorize this product.""" | ||
|
|
||
| properties: Optional[Dict[str, str]] | ||
| """A list of custom properties for this product.""" | ||
|
|
||
| workspace: Optional[str] | ||
| """The id of the workspace that this product belongs to.""" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.