Skip to content

Commit b054dbb

Browse files
authored
[Feat][DEVX-630] Add Checkout API (#1174)
* feat(checkout-api): add checkout api - add functionality for checkout api - add entries for automated generation in makefile - add integration tests * chore(checkout-sdk): improve test coverage - refactor and improve test coverage * Create bright-parrots-smash.md Add release changeset
1 parent c1aabd8 commit b054dbb

File tree

57 files changed

+3796
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3796
-79
lines changed

.changeset/bright-parrots-smash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@commercetools/checkout-sdk": major
3+
---
4+
5+
[Feat][DEVX-630] Add Checkout API

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ CHANGES_PENDING := `git status --porcelain -- ':(exclude)*gen.properties' | grep
33
API_RAML ?= $(RAML_FILE)
44
IMPORT_RAML ?= $(RAML_FILE)
55
HISTORY_RAML ?= $(RAML_FILE)
6+
CHECKOUT_RAML ?= $(RAML_FILE)
67

7-
.PHONY: build build_api_sdk build_import_sdk build_import_sdk build_history_sdk gen_api_sdk gen_import_sdk gen_history_sdk
8+
.PHONY: build build_api_sdk build_import_sdk build_import_sdk build_history_sdk build_checkout_sdk gen_api_sdk gen_import_sdk gen_history_sdk gen_checkout_sdk
89

9-
build: codegen_install gen_api_sdk gen_import_sdk gen_history_sdk post_process prettify verify
10+
build: codegen_install gen_api_sdk gen_import_sdk gen_history_sdk gen_checkout_sdk post_process prettify verify
1011
build_api_sdk: codegen_install gen_api_sdk post_process prettify verify
11-
build_import_sdk: codegen_install gen_import_sdk post_process prettify verify
12-
build_history_sdk: codegen_install gen_history_sdk post_process prettify verify
12+
build_import_sdk: codegen_install gen_import_sdk post_process prettify verify
13+
build_history_sdk: codegen_install gen_history_sdk post_process prettify verify
14+
build_checkout_sdk: codegen_install gen_checkout_sdk post_process prettify verify
1315

1416
gen_api_sdk: generate_api
1517
gen_import_sdk: generate_import
1618
gen_history_sdk: generate_history
19+
gen_checkout_sdk: generate_checkout
1720

1821
yarn_install:
1922
yarn install
@@ -39,6 +42,9 @@ generate_import:
3942
generate_history:
4043
$(MAKE) -C packages LIB_NAME="history" GEN_RAML_FILE=../$(HISTORY_RAML) generate_sdk
4144

45+
generate_checkout:
46+
$(MAKE) -C packages LIB_NAME="checkout" GEN_RAML_FILE=../$(CHECKOUT_RAML) generate_sdk
47+
4248
check_pending:
4349
git status --porcelain -- ':(exclude)*gen.properties'
4450
@echo "CHANGES_PENDING=$(CHANGES_PENDING)" >> $GITHUB_ENV

examples/me/server/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import dotenv from "dotenv"
2-
import server from "./src/app"
1+
import dotenv from 'dotenv'
2+
import server from './src/app'
33

4-
dotenv.config();
4+
dotenv.config()
55

66
// unhandledRejection
77
process.on('unhandledRejection', function (reason, promise) {
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import ApiClient from "./Client"
1+
import ApiClient from './Client'
22

3-
export {
4-
ApiClient
5-
}
3+
export { ApiClient }
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import CustomerController from "./CustomerController";
2-
import ProductController from "./ProductController";
3-
import CartController from "./CartController";
1+
import CustomerController from './CustomerController'
2+
import ProductController from './ProductController'
3+
import CartController from './CartController'
44

5-
export {
6-
CustomerController,
7-
ProductController,
8-
CartController
9-
}
5+
export { CustomerController, ProductController, CartController }
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import Validator from "./Validator";
1+
import Validator from './Validator'
22

3-
export {
4-
Validator,
5-
}
3+
export { Validator }

examples/me/server/src/repository/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@ import CustomerRepository from './CustomerRepository'
22
import ProductRepository from './ProductRepository'
33
import CartRepository from './CartRepository'
44

5-
export {
6-
CustomerRepository,
7-
ProductRepository,
8-
CartRepository
9-
}
5+
export { CustomerRepository, ProductRepository, CartRepository }
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Router } from "express"
2-
import customer from "./customer"
3-
import product from "./product"
1+
import { Router } from 'express'
2+
import customer from './customer'
3+
import product from './product'
44
import cart from './cart'
55

6-
const router = Router();
6+
const router = Router()
77

8-
router.use(customer);
8+
router.use(customer)
99
router.use(product)
1010
router.use(cart)
1111

12-
export default router;
12+
export default router
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import CustomerService from './CustomerService';
2-
import ProductService from './ProductService';
3-
import CartService from './CartService';
1+
import CustomerService from './CustomerService'
2+
import ProductService from './ProductService'
3+
import CartService from './CartService'
44

5-
export {
6-
ProductService,
7-
CustomerService,
8-
CartService
9-
}
5+
export { ProductService, CustomerService, CartService }

packages/checkout-sdk/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @commercetools/checkout-sdk

0 commit comments

Comments
 (0)