Skip to content

Commit

Permalink
Release v2.1.0 (@W-15945047@) (#162)
Browse files Browse the repository at this point in the history
* Download APIs

* Fix CI tests

* Tweak bundle size limit

Different node versions would result in slightly different bundle size.

* CI: bypass the cache for now

* Reinstall dependencies for passing Node 20 tests

* To pass Node 12 tests, add some dependency resolutions

* Revert "To pass Node 12 tests, add some dependency resolutions"

This reverts commit 7a977b0.

* Revert "Reinstall dependencies for passing Node 20 tests"

This reverts commit 77e36b2.

* Remove Node 10 support

This has been decided a few years ago in #68.

* Remove node 20 support for now

It looks like `yarn install` has never worked under Node 20. CI didn't catch this error because it was incorrectly set up (and as a result using Node 18 everywhere).

* CI: reuse the cache

* Update CHANGELOG.md

* Generate the doc

* Increment version

* Update CHANGELOG.md

* CI: create unique cache for each Node version tested
  • Loading branch information
vmarta authored Jun 20, 2024
1 parent 361aed9 commit 0dcac57
Show file tree
Hide file tree
Showing 463 changed files with 3,835 additions and 2,098 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
linux-tests:
strategy:
matrix:
node: [10, 12, 14, 16, 18, 20]
node: [12, 14, 16, 18]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
node-version: ${{ matrix.node }}
cache: npm
- name: Cache node modules
id: cache-nodemodules
Expand All @@ -25,7 +25,7 @@ jobs:
cache-name: cache-node-modules
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
- run: yarn run renderTemplates
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
14
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# CHANGELOG

## v2.1.0

### Enhancements
- Export the parameter keys for each API endpoint [#158](https://github.com/SalesforceCommerceCloud/commerce-sdk-isomorphic/pull/158)

### API Changes
*Shopper Baskets*

| **Endpoint Name** | **Description** |
| ------------- |-----------------------------------|
| updateItemsInBasket | Updates multiple items in a basket. |


## v2.0.0

#### API Changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Salesforce Commerce SDK (Isomorphic) allows easy interaction with the B2C Co

### Requirements

- Node `^12.x`, `^14.x`, `^16.x`, `^18.x` or `^20.x`
- Node `^12.x`, `^14.x`, `^16.x`, `^18.x`


### Installation
Expand Down
4 changes: 2 additions & 2 deletions apis/shopper-baskets/.metadata.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets/2.0.3",
"id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets/2.0.9",
"name": "Shopper Baskets",
"description": "Build a checkout experience.",
"groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8",
"assetId": "shopper-baskets",
"version": "2.0.3",
"version": "2.0.9",
"categories": {
"API layer": [
"Process"
Expand Down
14 changes: 14 additions & 0 deletions apis/shopper-baskets/examples/basket/items-patch-request.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#%RAML 1.0 NamedExample
value:
[{
"itemId": "051e908cca031ebf8ee80cbb0a",
"productId": "green-bag",
"quantity": 1
},{
"itemId": "078a492cca031ebf8ee80739ab",
"optionItems" : [{
"optionId":"Option1",
"optionValueId":"ValueA"
}],
"quantity": 1
}]
184 changes: 184 additions & 0 deletions apis/shopper-baskets/examples/basket/items-patch-response.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
#%RAML 1.0 NamedExample
value:
{
"adjustedMerchandizeTotalTax": 36.5,
"adjustedShippingTotalTax": 0.8,
"agentBasket": false,
"basketId": "a10ff320829cb0eef93ca5310a",
"billingAddress": {
"address1": "4 Main St.",
"address2": "Basement Flat",
"city": "Boston",
"companyName": "Flexo",
"countryCode": "US",
"firstName": "John",
"fullName": "John H. Smith",
"id": "0aa3fce01dec8a51ee50323c9c",
"jobTitle": "Sales Manager",
"lastName": "Smith",
"phone": "+1 33-33-33",
"postalCode": "40982",
"secondName": "H.",
"stateCode": "MA",
"title": "Mr"
},
"channelType": "storefront",
"creationDate": "2019-10-17T10:59:24.503Z",
"currency": "USD",
"customerInfo": {
"customerId": "beQeANXJNsd0xcINsB6cSrobQa",
"email": ""
},
"giftCertificateItems": [
{
"amount": 2,
"giftCertificateItemId": "a9c38be81002962a93310ffd66",
"recipientEmail": "[email protected]",
"shipmentId": "me"
}
],
"lastModified": "2019-10-17T11:00:22.545Z",
"merchandizeTotalTax": 36.5,
"notes": {
},
"orderTotal": 785.24,
"paymentInstruments": [
{
"amount": 10.3,
"paymentInstrumentId": "19ceb7afa36ffe22fcd93c3518",
"paymentMethodId": "BML"
},
{
"amount": 10.4,
"paymentCard": {
"cardType": "Visa",
"creditCardExpired": false
},
"paymentInstrumentId": "74c2fd8a9ede5712be8f18c638",
"paymentMethodId": "CREDIT_CARD"
}
],
"productItems": [
{
"adjustedTax": 30,
"basePrice": 199.99,
"bonusProductLineItem": false,
"gift": false,
"itemId": "051e908cca031ebf8ee80cbb0a",
"itemText": "Green Umbrella - Sustained Edition",
"optionItems": [
{
"adjustedTax": 0,
"basePrice": 0,
"bonusProductLineItem": false,
"gift": false,
"itemId": "1b48e2474f18edefc34577daf8",
"itemText": "We will plant a tree for your order.",
"optionId": "plantATre",
"optionValueId": "000",
"price": 0,
"priceAfterItemDiscount": 0,
"priceAfterOrderDiscount": 0,
"productId": "000",
"productName": "Plant a tree.",
"quantity": 3,
"shipmentId": "me",
"tax": 0,
"taxBasis": 0,
"taxClassId": "standard",
"taxRate": 0.05
}
],
"price": 599.97,
"priceAfterItemDiscount": 599.97,
"priceAfterOrderDiscount": 599.97,
"productId": "green-umbrella",
"productName": "Green Umbrella - Sustained Edition",
"quantity": 3,
"shipmentId": "me",
"tax": 30,
"taxBasis": 599.97,
"taxClassId": "standard",
"taxRate": 0.05
},
{
"adjustedTax": 1.5,
"basePrice": 29.99,
"bonusProductLineItem": false,
"gift": false,
"itemId": "32f71ef20eccbc9b75d2114352",
"itemText": "Green Bag",
"price": 29.99,
"priceAfterItemDiscount": 29.99,
"priceAfterOrderDiscount": 29.99,
"productId": "green-bag",
"productName": "Green Bag",
"quantity": 1,
"shipmentId": "me",
"tax": 1.5,
"taxBasis": 29.99,
"taxClassId": "standard",
"taxRate": 0.05
}
],
"productSubTotal": 729.95,
"productTotal": 729.95,
"shipments": [
{
"adjustedMerchandizeTotalTax": 36.5,
"adjustedShippingTotalTax": 0.8,
"gift": false,
"merchandizeTotalTax": 36.5,
"productSubTotal": 729.95,
"productTotal": 729.95,
"shipmentId": "me",
"shipmentTotal": 785.24,
"shippingAddress": {
"address1": "4 Main St.",
"address2": "Basement Flat",
"city": "Boston",
"companyName": "Flexo",
"countryCode": "US",
"firstName": "John",
"fullName": "John H. Smith",
"id": "c27620f32e6e607c04a35fc2c7",
"jobTitle": "Sales Manager",
"lastName": "Smith",
"phone": "+1 33-33-33",
"postalCode": "40982",
"secondName": "H.",
"stateCode": "MA",
"title": "Mr"
},
"shippingMethod": {
"description": "Order received within 7-10 business days",
"id": "001",
"name": "Ground",
"price": 15.99
},
"shippingStatus": "not_shipped",
"shippingTotal": 15.99,
"shippingTotalTax": 0.8,
"taxTotal": 37.3
}
],
"shippingItems": [
{
"adjustedTax": 0.8,
"basePrice": 15.99,
"itemId": "bf466b517f08b5fae8d553b36c",
"itemText": "Shipping",
"price": 15.99,
"priceAfterItemDiscount": 15.99,
"shipmentId": "me",
"tax": 0.8,
"taxBasis": 15.99,
"taxClassId": "standard",
"taxRate": 0.05
}
],
"shippingTotal": 15.99,
"shippingTotalTax": 0.8,
"taxation": "net",
"taxTotal": 37.3
}
2 changes: 1 addition & 1 deletion apis/shopper-baskets/exchange.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dependencies":[{"version":"1.1.15","assetId":"api-standards","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8"},{"version":"1.0.27","assetId":"commerce-cloud-standards","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8"},{"version":"2.0.1","assetId":"checkout-data-types","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8"}],"version":"2.0.3","originalFormatVersion":"1.0","apiVersion":"v2","descriptorVersion":"0.1.0","classifier":"raml","main":"shopper-baskets.raml","backwardsCompatible":false,"assetId":"shopper-baskets","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8","organizationId":"893f605e-10e2-423a-bdb4-f952f56eb6d8","name":"Shopper Baskets","tags":[],"metadata":{"projectId":"f2e890b0-bc72-4034-a8c6-84d0bafd978d","branchId":"v2","commitId":"2244ac36fde9490da0151b4eb715f8f5ff15e408"}}
{"dependencies":[{"version":"1.1.15","assetId":"api-standards","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8"},{"version":"2.0.5","assetId":"checkout-data-types","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8"},{"version":"2.0.1","assetId":"commerce-cloud-standards","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8"}],"version":"2.0.9","originalFormatVersion":"1.0","apiVersion":"v2","descriptorVersion":"0.1.0","classifier":"raml","main":"shopper-baskets.raml","backwardsCompatible":false,"assetId":"shopper-baskets","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8","organizationId":"893f605e-10e2-423a-bdb4-f952f56eb6d8","name":"Shopper Baskets","tags":[],"metadata":{"projectId":"f2e890b0-bc72-4034-a8c6-84d0bafd978d","branchId":"v2","commitId":"70e1a2438c09143495266999183cbd4e5fd41752"}}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
usage: This library provides all shopper baskets orders data types

uses:
CommerceCloudStandards: /exchange_modules/893f605e-10e2-423a-bdb4-f952f56eb6d8/commerce-cloud-standards/1.0.27/commerce-cloud-standards.raml
CommerceCloudStandards: /exchange_modules/893f605e-10e2-423a-bdb4-f952f56eb6d8/commerce-cloud-standards/2.0.1/commerce-cloud-standards.raml

types:
Basket:
Expand Down Expand Up @@ -719,7 +719,6 @@ types:
quantity?:
description: |-
The ordered quantity of the products represented by this item.
maximum: 999
minimum: 0
type: number
format: double
Expand Down Expand Up @@ -1839,7 +1838,6 @@ types:
quantity?:
description: |-
The quantity of the products represented by this item.
maximum: 999
minimum: 0
type: number
format: double
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"dependencies":[{"version":"2.0.1","assetId":"commerce-cloud-standards","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8"}],"version":"2.0.5","originalFormatVersion":"1.0","apiVersion":"v1","descriptorVersion":"0.1.0","classifier":"raml-fragment","main":"checkout-data-types.raml","assetId":"checkout-data-types","groupId":"893f605e-10e2-423a-bdb4-f952f56eb6d8","organizationId":"893f605e-10e2-423a-bdb4-f952f56eb6d8","name":"Checkout Data Types","tags":[],"metadata":{"projectId":"ac07ef0d-aa14-4469-95b7-95c115af175a","branchId":"v2","commitId":"e7cad8834ddd908357c9160b31f3f9de2939fa01"}}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |
A shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.
The `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.
type: x-custom
type: OAuth 2.0
displayName: ShopperToken

uses:
Expand Down Expand Up @@ -43,4 +43,8 @@ describedBy:
example:
type: "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden"
title: Forbidden
detail: Your token is valid, but you have no permissions to access the resource.
detail: Your access token is valid, but you don’t have the required permissions to access the resource.
settings:
authorizationUri: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize
accessTokenUri: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token
authorizationGrants: [authorization_code,client_credentials]
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"tags": [],
"groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8",
"assetId": "commerce-cloud-standards",
"version": "2.0.0",
"version": "2.0.1",
"organizationId": "893f605e-10e2-423a-bdb4-f952f56eb6d8"
}
Loading

0 comments on commit 0dcac57

Please sign in to comment.