@cmssy/core 19.19.0 → 19.21.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/dist/index.cjs CHANGED
@@ -225,7 +225,7 @@ function documentText(document2) {
225
225
  }
226
226
 
227
227
  // src/version.ts
228
- var CMSSY_CORE_VERSION = "19.19.0" ;
228
+ var CMSSY_CORE_VERSION = "19.21.0" ;
229
229
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
230
230
 
231
231
  // src/data/http.ts
@@ -673,7 +673,6 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
673
673
  $stockState: String
674
674
  $sku: String
675
675
  $locale: String
676
- $currency: String
677
676
  $priceMin: Int
678
677
  $priceMax: Int
679
678
  $sort: BuyerCatalogSort
@@ -689,7 +688,6 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
689
688
  stockState: $stockState
690
689
  sku: $sku
691
690
  locale: $locale
692
- currency: $currency
693
691
  priceMin: $priceMin
694
692
  priceMax: $priceMax
695
693
  sort: $sort
@@ -699,6 +697,7 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
699
697
  ) {
700
698
  total
701
699
  hasMore
700
+ currency
702
701
  displayMode
703
702
  taxTreatment {
704
703
  kind
@@ -748,11 +747,12 @@ async function getBuyerCatalogPrices(config, query, options) {
748
747
  "cmssy: getBuyerCatalogPrices needs the signed-in member's accessToken - an anonymous visitor reads the catalogue"
749
748
  );
750
749
  }
750
+ const { currency: _currency, ...listing } = query;
751
751
  const data = await graphqlRequest(
752
752
  config,
753
753
  BUYER_CATALOG_PRICES_QUERY,
754
754
  {
755
- ...query,
755
+ ...listing,
756
756
  workspaceId: options.workspaceId,
757
757
  ...channelVariable(options.channel)
758
758
  },
@@ -794,6 +794,7 @@ var PUBLIC_PRICES_QUERY = typedOperation(`query PublicPrices(
794
794
  items: $items
795
795
  locale: $locale
796
796
  ) {
797
+ currency
797
798
  displayMode
798
799
  priceWithheld
799
800
  nextChangeAt
@@ -858,7 +859,6 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
858
859
  $stockState: String
859
860
  $sku: String
860
861
  $locale: String
861
- $currency: String
862
862
  $priceMin: Int
863
863
  $priceMax: Int
864
864
  $sort: BuyerCatalogSort
@@ -875,7 +875,6 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
875
875
  stockState: $stockState
876
876
  sku: $sku
877
877
  locale: $locale
878
- currency: $currency
879
878
  priceMin: $priceMin
880
879
  priceMax: $priceMax
881
880
  sort: $sort
@@ -884,6 +883,7 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
884
883
  ) {
885
884
  total
886
885
  hasMore
886
+ currency
887
887
  displayMode
888
888
  priceWithheld
889
889
  nextChangeAt
@@ -980,10 +980,11 @@ async function getPublicPrices(config, items, options) {
980
980
  }
981
981
  async function getPublicCatalogPrices(config, query, options) {
982
982
  const channel = requireChannel(config, options, "getPublicCatalogPrices");
983
+ const { currency: _currency, ...listing } = query;
983
984
  const data = await graphqlRequest(
984
985
  config,
985
986
  PUBLIC_CATALOG_PRICES_QUERY,
986
- { ...query, workspaceId: options.workspaceId, channel },
987
+ { ...listing, workspaceId: options.workspaceId, channel },
987
988
  {
988
989
  public: true,
989
990
  fetch: options.fetch,
@@ -995,8 +996,6 @@ async function getPublicCatalogPrices(config, query, options) {
995
996
  );
996
997
  return data.public.pricing.catalogPrices;
997
998
  }
998
-
999
- // src/data/checkout-errors.ts
1000
999
  var quantityRuleReasonValues = [
1001
1000
  "QUANTITY_BELOW_MIN",
1002
1001
  "QUANTITY_ABOVE_MAX",
@@ -1004,7 +1003,7 @@ var quantityRuleReasonValues = [
1004
1003
  ];
1005
1004
  var checkoutErrorReasonValues = [
1006
1005
  "CART_REPRICED",
1007
- "CART_CURRENCY_CHANGED",
1006
+ ...types.cartCurrencyReasonValues,
1008
1007
  "BUYER_CHANGED",
1009
1008
  "PRODUCT_NOT_SOLD",
1010
1009
  "TAX_TREATMENT_CHANGED",
package/dist/index.d.cts CHANGED
@@ -102,6 +102,7 @@ interface CmssyBuyerCatalogPage {
102
102
  items: CmssyBuyerCatalogPrice[];
103
103
  total: number;
104
104
  hasMore: boolean;
105
+ currency: string | null;
105
106
  displayMode: CmssyPriceDisplayMode;
106
107
  taxTreatment: CmssyTaxTreatment;
107
108
  }
@@ -112,7 +113,6 @@ interface BuyerCatalogPricesVariables {
112
113
  stockState?: string | null;
113
114
  sku?: string | null;
114
115
  locale?: string | null;
115
- currency?: string | null;
116
116
  priceMin?: number | null;
117
117
  priceMax?: number | null;
118
118
  sort?: CmssyBuyerCatalogSort | null;
@@ -126,7 +126,9 @@ interface BuyerCatalogPricesResult {
126
126
  };
127
127
  }
128
128
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
129
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
129
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel"> & {
130
+ currency?: string | null;
131
+ };
130
132
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
131
133
 
132
134
  declare const CMSSY_PUBLIC_PRICES_MAX_ITEMS = 50;
@@ -149,6 +151,7 @@ interface CmssyPublicPricedRecord {
149
151
  }
150
152
  interface CmssyPublicPriceResult {
151
153
  items: CmssyPublicPricedRecord[];
154
+ currency: string | null;
152
155
  displayMode: CmssyPriceDisplayMode;
153
156
  priceWithheld: CmssyPriceWithheldReason | null;
154
157
  nextChangeAt: string | null;
@@ -179,7 +182,6 @@ interface PublicCatalogPricesVariables {
179
182
  stockState?: string | null;
180
183
  sku?: string | null;
181
184
  locale?: string | null;
182
- currency?: string | null;
183
185
  priceMin?: number | null;
184
186
  priceMax?: number | null;
185
187
  sort?: CmssyBuyerCatalogSort | null;
@@ -203,12 +205,14 @@ interface GetPublicPricesOptions {
203
205
  retry?: RetryOption;
204
206
  }
205
207
  declare function getPublicPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetPublicPricesOptions): Promise<CmssyPublicPriceResult>;
206
- type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel">;
208
+ type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel"> & {
209
+ currency?: string | null;
210
+ };
207
211
  declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPublicCatalogPricesQuery, options: Omit<GetPublicPricesOptions, "locale">): Promise<CmssyPublicCatalogPage>;
208
212
 
209
213
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
210
214
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
211
- declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "TAX_TREATMENT_CHANGED", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
215
+ declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "NO_PRICE_IN_CURRENCY", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "TAX_TREATMENT_CHANGED", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
212
216
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
213
217
  interface CmssyQuantityRuleViolation {
214
218
  reason: CmssyQuantityRuleReason;
package/dist/index.d.ts CHANGED
@@ -102,6 +102,7 @@ interface CmssyBuyerCatalogPage {
102
102
  items: CmssyBuyerCatalogPrice[];
103
103
  total: number;
104
104
  hasMore: boolean;
105
+ currency: string | null;
105
106
  displayMode: CmssyPriceDisplayMode;
106
107
  taxTreatment: CmssyTaxTreatment;
107
108
  }
@@ -112,7 +113,6 @@ interface BuyerCatalogPricesVariables {
112
113
  stockState?: string | null;
113
114
  sku?: string | null;
114
115
  locale?: string | null;
115
- currency?: string | null;
116
116
  priceMin?: number | null;
117
117
  priceMax?: number | null;
118
118
  sort?: CmssyBuyerCatalogSort | null;
@@ -126,7 +126,9 @@ interface BuyerCatalogPricesResult {
126
126
  };
127
127
  }
128
128
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
129
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
129
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel"> & {
130
+ currency?: string | null;
131
+ };
130
132
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
131
133
 
132
134
  declare const CMSSY_PUBLIC_PRICES_MAX_ITEMS = 50;
@@ -149,6 +151,7 @@ interface CmssyPublicPricedRecord {
149
151
  }
150
152
  interface CmssyPublicPriceResult {
151
153
  items: CmssyPublicPricedRecord[];
154
+ currency: string | null;
152
155
  displayMode: CmssyPriceDisplayMode;
153
156
  priceWithheld: CmssyPriceWithheldReason | null;
154
157
  nextChangeAt: string | null;
@@ -179,7 +182,6 @@ interface PublicCatalogPricesVariables {
179
182
  stockState?: string | null;
180
183
  sku?: string | null;
181
184
  locale?: string | null;
182
- currency?: string | null;
183
185
  priceMin?: number | null;
184
186
  priceMax?: number | null;
185
187
  sort?: CmssyBuyerCatalogSort | null;
@@ -203,12 +205,14 @@ interface GetPublicPricesOptions {
203
205
  retry?: RetryOption;
204
206
  }
205
207
  declare function getPublicPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetPublicPricesOptions): Promise<CmssyPublicPriceResult>;
206
- type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel">;
208
+ type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel"> & {
209
+ currency?: string | null;
210
+ };
207
211
  declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPublicCatalogPricesQuery, options: Omit<GetPublicPricesOptions, "locale">): Promise<CmssyPublicCatalogPage>;
208
212
 
209
213
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
210
214
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
211
- declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "TAX_TREATMENT_CHANGED", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
215
+ declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "NO_PRICE_IN_CURRENCY", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "TAX_TREATMENT_CHANGED", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
212
216
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
213
217
  interface CmssyQuantityRuleViolation {
214
218
  reason: CmssyQuantityRuleReason;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { brandingFieldNames, mediaTypeValues, LAYOUT_REGIONS_MAX, LAYOUT_REGION_ID_PATTERN, LAYOUT_REGION_LABEL_MAX, evaluateFieldConditionGroup } from '@cmssy/types';
1
+ import { brandingFieldNames, cartCurrencyReasonValues, mediaTypeValues, LAYOUT_REGIONS_MAX, LAYOUT_REGION_ID_PATTERN, LAYOUT_REGION_LABEL_MAX, evaluateFieldConditionGroup } from '@cmssy/types';
2
2
  export { API_TOKEN_HEADER_NAME, CLIENT_IP_HEADER_NAME, MediaType, evaluateFieldConditionGroup, mediaTypeValues, taxTreatmentKindValues } from '@cmssy/types';
3
3
 
4
4
  // src/config.ts
@@ -224,7 +224,7 @@ function documentText(document2) {
224
224
  }
225
225
 
226
226
  // src/version.ts
227
- var CMSSY_CORE_VERSION = "19.19.0" ;
227
+ var CMSSY_CORE_VERSION = "19.21.0" ;
228
228
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
229
229
 
230
230
  // src/data/http.ts
@@ -672,7 +672,6 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
672
672
  $stockState: String
673
673
  $sku: String
674
674
  $locale: String
675
- $currency: String
676
675
  $priceMin: Int
677
676
  $priceMax: Int
678
677
  $sort: BuyerCatalogSort
@@ -688,7 +687,6 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
688
687
  stockState: $stockState
689
688
  sku: $sku
690
689
  locale: $locale
691
- currency: $currency
692
690
  priceMin: $priceMin
693
691
  priceMax: $priceMax
694
692
  sort: $sort
@@ -698,6 +696,7 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
698
696
  ) {
699
697
  total
700
698
  hasMore
699
+ currency
701
700
  displayMode
702
701
  taxTreatment {
703
702
  kind
@@ -747,11 +746,12 @@ async function getBuyerCatalogPrices(config, query, options) {
747
746
  "cmssy: getBuyerCatalogPrices needs the signed-in member's accessToken - an anonymous visitor reads the catalogue"
748
747
  );
749
748
  }
749
+ const { currency: _currency, ...listing } = query;
750
750
  const data = await graphqlRequest(
751
751
  config,
752
752
  BUYER_CATALOG_PRICES_QUERY,
753
753
  {
754
- ...query,
754
+ ...listing,
755
755
  workspaceId: options.workspaceId,
756
756
  ...channelVariable(options.channel)
757
757
  },
@@ -793,6 +793,7 @@ var PUBLIC_PRICES_QUERY = typedOperation(`query PublicPrices(
793
793
  items: $items
794
794
  locale: $locale
795
795
  ) {
796
+ currency
796
797
  displayMode
797
798
  priceWithheld
798
799
  nextChangeAt
@@ -857,7 +858,6 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
857
858
  $stockState: String
858
859
  $sku: String
859
860
  $locale: String
860
- $currency: String
861
861
  $priceMin: Int
862
862
  $priceMax: Int
863
863
  $sort: BuyerCatalogSort
@@ -874,7 +874,6 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
874
874
  stockState: $stockState
875
875
  sku: $sku
876
876
  locale: $locale
877
- currency: $currency
878
877
  priceMin: $priceMin
879
878
  priceMax: $priceMax
880
879
  sort: $sort
@@ -883,6 +882,7 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
883
882
  ) {
884
883
  total
885
884
  hasMore
885
+ currency
886
886
  displayMode
887
887
  priceWithheld
888
888
  nextChangeAt
@@ -979,10 +979,11 @@ async function getPublicPrices(config, items, options) {
979
979
  }
980
980
  async function getPublicCatalogPrices(config, query, options) {
981
981
  const channel = requireChannel(config, options, "getPublicCatalogPrices");
982
+ const { currency: _currency, ...listing } = query;
982
983
  const data = await graphqlRequest(
983
984
  config,
984
985
  PUBLIC_CATALOG_PRICES_QUERY,
985
- { ...query, workspaceId: options.workspaceId, channel },
986
+ { ...listing, workspaceId: options.workspaceId, channel },
986
987
  {
987
988
  public: true,
988
989
  fetch: options.fetch,
@@ -994,8 +995,6 @@ async function getPublicCatalogPrices(config, query, options) {
994
995
  );
995
996
  return data.public.pricing.catalogPrices;
996
997
  }
997
-
998
- // src/data/checkout-errors.ts
999
998
  var quantityRuleReasonValues = [
1000
999
  "QUANTITY_BELOW_MIN",
1001
1000
  "QUANTITY_ABOVE_MAX",
@@ -1003,7 +1002,7 @@ var quantityRuleReasonValues = [
1003
1002
  ];
1004
1003
  var checkoutErrorReasonValues = [
1005
1004
  "CART_REPRICED",
1006
- "CART_CURRENCY_CHANGED",
1005
+ ...cartCurrencyReasonValues,
1007
1006
  "BUYER_CHANGED",
1008
1007
  "PRODUCT_NOT_SOLD",
1009
1008
  "TAX_TREATMENT_CHANGED",
@@ -154,7 +154,7 @@ function documentText(document) {
154
154
  }
155
155
 
156
156
  // src/version.ts
157
- var CMSSY_CORE_VERSION = "19.19.0" ;
157
+ var CMSSY_CORE_VERSION = "19.21.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.19.0" ;
155
+ var CMSSY_CORE_VERSION = "19.21.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
package/dist/internal.cjs CHANGED
@@ -154,7 +154,7 @@ function documentText(document2) {
154
154
  }
155
155
 
156
156
  // src/version.ts
157
- var CMSSY_CORE_VERSION = "19.19.0" ;
157
+ var CMSSY_CORE_VERSION = "19.21.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
package/dist/internal.js CHANGED
@@ -152,7 +152,7 @@ function documentText(document2) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.19.0" ;
155
+ var CMSSY_CORE_VERSION = "19.21.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.19.0" ;
155
+ var CMSSY_CORE_VERSION = "19.21.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/content/content-client.ts
package/dist/preflight.js CHANGED
@@ -150,7 +150,7 @@ function documentText(document) {
150
150
  }
151
151
 
152
152
  // src/version.ts
153
- var CMSSY_CORE_VERSION = "19.19.0" ;
153
+ var CMSSY_CORE_VERSION = "19.21.0" ;
154
154
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
155
155
 
156
156
  // src/content/content-client.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/core",
3
- "version": "19.19.0",
3
+ "version": "19.21.0",
4
4
  "description": "Framework-agnostic cmssy gateway: GraphQL client, block/field system, editor protocol. No React, no Next.",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -87,7 +87,7 @@
87
87
  "vitest": "^2.1.0"
88
88
  },
89
89
  "dependencies": {
90
- "@cmssy/types": "0.69.0",
90
+ "@cmssy/types": "0.71.0",
91
91
  "jose": "^6.2.3"
92
92
  },
93
93
  "scripts": {