@propeller-commerce/propeller-sdk-v2 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/cjs/generated/operationVariables.d.ts +4 -0
- package/dist/cjs/generated/operations/cluster.js +3 -1
- package/dist/cjs/generated/operations/product.js +3 -1
- package/dist/esm/generated/operations/cluster.js +3 -1
- package/dist/esm/generated/operations/product.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,42 @@
|
|
|
3
3
|
All notable changes to `@propeller-commerce/propeller-sdk-v2` are documented here.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
|
+
## [0.18.0] - 2026-09-24
|
|
7
|
+
|
|
8
|
+
`product` and `cluster` can now be scoped to a contact and a company, so a
|
|
9
|
+
storefront can ask the assortment question the API was always able to answer.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`userId` and `companyId` on the `product` and `cluster` queries.** Both
|
|
14
|
+
arguments have always existed on the schema — the generated operations simply
|
|
15
|
+
did not declare or forward them, so there was no way to reach them through the
|
|
16
|
+
SDK and every call resolved against the bearer token's own identity.
|
|
17
|
+
|
|
18
|
+
This is what left a direct link to a product outside the company's POSITIVE
|
|
19
|
+
orderlist opening normally while listings and search correctly hid it: the
|
|
20
|
+
listing queries scope by identity, the single-entity ones could not. With the
|
|
21
|
+
arguments in place, `product(productId:, userId:, companyId:)` answers
|
|
22
|
+
`PRODUCT_NOT_FOUND` for a product outside the contact's assortment, which is
|
|
23
|
+
the correct answer and what a host needs in order to 404 the page. (PWP-1015)
|
|
24
|
+
|
|
25
|
+
Both are optional and default to undefined, so every existing call is
|
|
26
|
+
unchanged.
|
|
27
|
+
|
|
28
|
+
### Notes for consumers
|
|
29
|
+
|
|
30
|
+
- The API rejects a `companyId` the contact does not belong to ("Unauthorized
|
|
31
|
+
use of companyId"), so a company restored from storage must be validated
|
|
32
|
+
against the contact's companies before it is sent.
|
|
33
|
+
- Three adjacent gaps were found while checking this and are deliberately NOT
|
|
34
|
+
in this release, because each is a behaviour change rather than an additive
|
|
35
|
+
argument: `product`/`cluster` also accept `hidden`, `clusterConfig` forwards
|
|
36
|
+
only `clusterId` (so it is not identity-scoped either), and
|
|
37
|
+
`orderGetPDF`/`quoteGetPDF` accept a `revisionNumber`. Say the word and they
|
|
38
|
+
can go in one follow-up rather than three.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
6
42
|
|
|
7
43
|
## [0.17.0] - 2026-09-23
|
|
8
44
|
|
|
@@ -1798,6 +1798,8 @@ export interface ClusterVariables {
|
|
|
1798
1798
|
language?: string;
|
|
1799
1799
|
applyOrderlists?: boolean;
|
|
1800
1800
|
orderlistIds?: number[];
|
|
1801
|
+
userId?: number;
|
|
1802
|
+
companyId?: number;
|
|
1801
1803
|
priceCalculateProductInput?: PriceCalculateProductInput;
|
|
1802
1804
|
userBulkPriceProductInput?: UserBulkPriceProductInput;
|
|
1803
1805
|
attributeResultSearchInput?: AttributeResultSearchInput;
|
|
@@ -3820,6 +3822,8 @@ export interface ProductVariables {
|
|
|
3820
3822
|
language?: string;
|
|
3821
3823
|
applyOrderlists?: boolean;
|
|
3822
3824
|
orderlistIds?: number[];
|
|
3825
|
+
userId?: number;
|
|
3826
|
+
companyId?: number;
|
|
3823
3827
|
priceCalculateProductInput?: PriceCalculateProductInput;
|
|
3824
3828
|
userBulkPriceProductInput?: UserBulkPriceProductInput;
|
|
3825
3829
|
attributeResultSearchInput?: AttributeResultSearchInput;
|
|
@@ -842,13 +842,15 @@ fragment ClusterConfigSettingFields on ClusterConfigSetting {
|
|
|
842
842
|
priority
|
|
843
843
|
}
|
|
844
844
|
|
|
845
|
-
query cluster(\$clusterId: Int, \$slug: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
845
|
+
query cluster(\$clusterId: Int, \$slug: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$userId: Int, \$companyId: Int, \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
846
846
|
cluster(
|
|
847
847
|
clusterId: \$clusterId
|
|
848
848
|
slug: \$slug
|
|
849
849
|
language: \$language
|
|
850
850
|
applyOrderlists: \$applyOrderlists
|
|
851
851
|
orderlistIds: \$orderlistIds
|
|
852
|
+
userId: \$userId
|
|
853
|
+
companyId: \$companyId
|
|
852
854
|
) {
|
|
853
855
|
...ClusterFields
|
|
854
856
|
}
|
|
@@ -712,7 +712,7 @@ fragment SurchargeFields on Surcharge {
|
|
|
712
712
|
validTo
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
query product(\$productId: Int, \$slug: String, \$sku: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
715
|
+
query product(\$productId: Int, \$slug: String, \$sku: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$userId: Int, \$companyId: Int, \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
716
716
|
product(
|
|
717
717
|
productId: \$productId
|
|
718
718
|
slug: \$slug
|
|
@@ -720,6 +720,8 @@ query product(\$productId: Int, \$slug: String, \$sku: String, \$language: Strin
|
|
|
720
720
|
language: \$language
|
|
721
721
|
applyOrderlists: \$applyOrderlists
|
|
722
722
|
orderlistIds: \$orderlistIds
|
|
723
|
+
userId: \$userId
|
|
724
|
+
companyId: \$companyId
|
|
723
725
|
) {
|
|
724
726
|
...ProductFields
|
|
725
727
|
}
|
|
@@ -839,13 +839,15 @@ fragment ClusterConfigSettingFields on ClusterConfigSetting {
|
|
|
839
839
|
priority
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
query cluster(\$clusterId: Int, \$slug: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
842
|
+
query cluster(\$clusterId: Int, \$slug: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$userId: Int, \$companyId: Int, \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
843
843
|
cluster(
|
|
844
844
|
clusterId: \$clusterId
|
|
845
845
|
slug: \$slug
|
|
846
846
|
language: \$language
|
|
847
847
|
applyOrderlists: \$applyOrderlists
|
|
848
848
|
orderlistIds: \$orderlistIds
|
|
849
|
+
userId: \$userId
|
|
850
|
+
companyId: \$companyId
|
|
849
851
|
) {
|
|
850
852
|
...ClusterFields
|
|
851
853
|
}
|
|
@@ -709,7 +709,7 @@ fragment SurchargeFields on Surcharge {
|
|
|
709
709
|
validTo
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
-
query product(\$productId: Int, \$slug: String, \$sku: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
712
|
+
query product(\$productId: Int, \$slug: String, \$sku: String, \$language: String, \$applyOrderlists: Boolean, \$orderlistIds: [Int!], \$userId: Int, \$companyId: Int, \$priceCalculateProductInput: PriceCalculateProductInput, \$userBulkPriceProductInput: UserBulkPriceProductInput, \$attributeResultSearchInput: AttributeResultSearchInput, \$imageSearchFilters: MediaImageProductSearchInput, \$mediaVideoSearchInput: MediaVideoProductSearchInput, \$mediaDocumentSearchInput: MediaDocumentProductSearchInput, \$imageVariantFilters: TransformationsInput!) {
|
|
713
713
|
product(
|
|
714
714
|
productId: \$productId
|
|
715
715
|
slug: \$slug
|
|
@@ -717,6 +717,8 @@ query product(\$productId: Int, \$slug: String, \$sku: String, \$language: Strin
|
|
|
717
717
|
language: \$language
|
|
718
718
|
applyOrderlists: \$applyOrderlists
|
|
719
719
|
orderlistIds: \$orderlistIds
|
|
720
|
+
userId: \$userId
|
|
721
|
+
companyId: \$companyId
|
|
720
722
|
) {
|
|
721
723
|
...ProductFields
|
|
722
724
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@propeller-commerce/propeller-sdk-v2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "TypeScript GraphQL client for Propeller eCommerce V2 Platform - works with React, Vue, Angular and all JavaScript frameworks",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|