![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@dotdev/apparel21-sdk
Advanced tools
This SDK wraps AP21 API and returns the response formatted as regular JavaScript objects.
The following endpoints are wrapped by this SDK:
GET /ReferenceTypes
GET /ReferenceTypes/{id}
GET /Products
GET /Products/{id}
GET /ProductsSimple
GET /ProductsSimpleWithPagination
GET /ProductsSimple/{id}
GET /ProductNotes/{id}
GET /ProductColourNotes/{id}
GET /Colours
GET /Sizes
GET /Persons
GET /Persons/{id}
POST /Persons
PUT /Persons/{id}
GET /Persons/{id}/Orders
GET /Persons/{id/Orders/{id}
GET /Persons/{id}/Shipments/{orderId}
POST /Persons/{id}/Orders
GET /Persons/{id}/RetailTransactions
POST /Persons/{id}/Orders/{id}/Returns
GET /Persons/{id}/Orders/{id}/Returns/{id}
GET /Vouchers/{number}/?pin={pin}
GET /Voucher/GVValid/{number}?pin={pin}&amount={amount}
GET /Voucher/Lock/{number}?ValidationId={id}&LockSeconds={seconds}
GET /Freestock/style/{id}
GET /Freestock/clr/{id}
GET /Freestock/sku/{id}
GET /StockChanged?ChangedSince={date}
GET /Stores
GET /Stores/{id}
GET /Orders?UpdatedAfter={date}
We have implemented these for Tony Bianco loyalty. However, they're the only ones currently using this module. We will need to support it at some point but not a top priority for now.
GET /Rewards/Programs
GET /Rewards/Accounts/{id}
POST /Rewards/Accounts
These ones will be great to support but not currently needed (we don't "change" the loyalty account in any way right now, it's all done internally at AP21).
PUT /Rewards/Accounts
GET /Rewards/Accounts/{id}/Transactions
POST /Rewards/Accounts/{id}/Rewards
POST /Rewards/Accounts/{id}/Gifts
POST /Rewards/Accounts/{id}/Points
POST /Rewards/Accounts/{id}/Rewards/Redemptions
POST /Rewards/Accounts/{id}/Gifts/Redemptions
POST /Rewards/Accounts/{id}/Points/Redemptions
POST /Rewards/Confirmation?requestId={id}
POST /Rewards/Reversal?requestId={id}
For more details on these endpoints see the wiki page
The SDK has automatic tests for each exposed method of the AP21 instance and its modules. There is an integration test file, however, coverage is not full. Most integration tests are commented out since details of the tests are tied to particual AP21 instances (such as person, product etc ids). To run the integration tests you first need to add a secret config (use credentials from 1password), see the example config file.
Each endpoint is mocked in the ./src/__mocks__/axios.ts
file.
There are mock XML payloads in the ExamplePayloads folder. These are based on a combination of real payloads and AP21 documentation examples
This SDK has primarily been developed against the AP21 documentation.
However, a lot of endpoints listed above are lacking proper setup in the AP21 test instance meaning they have not been verified to work against a live environment (see list below).
The AP21 documentation example payloads are full of errors and are often invalid XML. Meaning some of the covered endpoints may need updates once tested against a live environment and real payloads.
The first step should be to battle test the SDK against various live environments to ensure it reads and remaps the required data from XML to JS.
To test and verify the non-safe endpoints the AP21 test instance should be configured for gift vouchers and rewards.
The following have not been possible to verify against a live environment:
Entity | Reason |
---|---|
Rewards | No rewards set up in test instance |
Vouchers | No vouchers set up in test instace |
Returns | Not able to create a return. Could be due to order status? |
Shipments | Need to run against real instance or have status updated in test instance |
FAQs
Apparel21 Interface Library
The npm package @dotdev/apparel21-sdk receives a total of 293 weekly downloads. As such, @dotdev/apparel21-sdk popularity was classified as not popular.
We found that @dotdev/apparel21-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.