-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pangolin 3184: staged quote model (#433)
* feat(staged quote model): yakshaving for staged quote model package * feat(staged quote model): implement model for StagedQuote, begin on StagedQuoteDraft * feat(staged quote model): implement model for StagedQuoteDraft * feat(staged quote model): add changeset * feat(quote request model): update types, builder, and transformers to reflect that there is only a cartRef returned by the graphql api, it does not return the full cart data, also update staged quote types to reflect that quotationCartRef and quoteRequestRef are non-nullable * feat(quote request model): more fun with arcane typescript warnings and the things we do to silence them * feat(staged quote model): actually export the draft in src/index.ts * feat(quote request model): even more fun with types and how to make them happy
- Loading branch information
1 parent
eacafc8
commit 3622e5d
Showing
24 changed files
with
715 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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,6 @@ | ||
--- | ||
'@commercetools-test-data/quote-request': minor | ||
'@commercetools-test-data/staged-quote': patch | ||
--- | ||
|
||
feat(staged quote) add test data package for staged quote model |
This file contains 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 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 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 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 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 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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) commercetools GmbH | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains 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,25 @@ | ||
# @commercetools-test-data/quote | ||
|
||
This package provides the data model for the commercetools platform `StagedQuote` type | ||
|
||
https://docs.commercetools.com/api/projects/staged-quotes | ||
|
||
# Install | ||
|
||
```bash | ||
$ pnpm add -D @commercetools-test-data/staged-quote | ||
``` | ||
|
||
# Usage | ||
|
||
```ts | ||
import { | ||
StagedQuote, | ||
StagedQuoteDraft, | ||
type TStagedQuote, | ||
type TStagedQuoteDraft, | ||
} from '@commercetools-test-data/quote-request'; | ||
|
||
const stagedQuote = StagedQuote.random().build<TStagedQuote>(); | ||
const stagedQuoteDraft = StagedQuoteDraft.random().build<TStagedQuoteDraft>(); | ||
``` |
This file contains 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,34 @@ | ||
{ | ||
"name": "@commercetools-test-data/staged-quote", | ||
"version": "6.5.0", | ||
"description": "Data model for commercetools API StagedQuote", | ||
"bugs": "https://github.com/commercetools/test-data/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/commercetools/test-data.git", | ||
"directory": "models/quote" | ||
}, | ||
"keywords": ["javascript", "typescript", "test-data"], | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "dist/commercetools-test-data-staged-quote.cjs.js", | ||
"module": "dist/commercetools-test-data-staged-quote.esm.js", | ||
"files": ["dist", "package.json", "LICENSE", "README.md"], | ||
"dependencies": { | ||
"@babel/runtime": "^7.17.9", | ||
"@babel/runtime-corejs3": "^7.17.9", | ||
"@commercetools-test-data/business-unit": "6.5.0", | ||
"@commercetools-test-data/cart": "6.5.0", | ||
"@commercetools-test-data/commons": "6.5.0", | ||
"@commercetools-test-data/core": "6.5.0", | ||
"@commercetools-test-data/customer": "6.5.0", | ||
"@commercetools-test-data/customer-group": "6.5.0", | ||
"@commercetools-test-data/quote-request": "6.5.0", | ||
"@commercetools-test-data/store": "6.5.0", | ||
"@commercetools-test-data/utils": "6.5.0", | ||
"@commercetools/platform-sdk": "^6.0.0", | ||
"@faker-js/faker": "^8.0.0" | ||
} | ||
} |
Oops, something went wrong.