@cmssy/core 19.14.0 → 19.16.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/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.14.0" ;
155
+ var CMSSY_CORE_VERSION = "19.16.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
@@ -591,13 +591,26 @@ function asBucket(value) {
591
591
  // src/data/graphql-request.ts
592
592
  async function graphqlRequest(config, query, variables, options = {}, label = "request") {
593
593
  const url = options.public ? resolvePublicUrl(config) : resolveApiUrl(config.apiUrl);
594
- return postGraphql(url, query, variables, {
595
- fetch: options.fetch,
596
- signal: options.signal,
597
- headers: options.headers,
598
- retry: options.retry,
599
- label
600
- });
594
+ const text = documentText(query);
595
+ return postGraphql(
596
+ url,
597
+ text,
598
+ withConfigChannel(config, text, variables),
599
+ {
600
+ fetch: options.fetch,
601
+ signal: options.signal,
602
+ headers: options.headers,
603
+ retry: options.retry,
604
+ label
605
+ }
606
+ );
607
+ }
608
+ function withConfigChannel(config, document2, variables) {
609
+ const channel = config.channel?.trim();
610
+ if (!channel || !/\$channel\b/.test(document2)) return variables;
611
+ const current = variables ?? {};
612
+ if (current.channel !== void 0) return variables;
613
+ return { ...current, channel };
601
614
  }
602
615
  var SITE_CONFIG_QUERY = typedOperation(`query PublicSiteConfig($workspaceSlug: String!) {
603
616
  public {
@@ -1334,9 +1347,13 @@ function cmssyCspHeaders(options) {
1334
1347
  }
1335
1348
 
1336
1349
  // src/data/buyer-prices.ts
1337
- var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $items: [PriceQueryItem!]!) {
1350
+ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
1351
+ $workspaceId: ID!
1352
+ $items: [PriceQueryItem!]!
1353
+ $channel: String
1354
+ ) {
1338
1355
  account {
1339
- prices(workspaceId: $workspaceId, items: $items) {
1356
+ prices(workspaceId: $workspaceId, items: $items, channel: $channel) {
1340
1357
  recordId
1341
1358
  variantKey
1342
1359
  currency
@@ -1345,6 +1362,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1345
1362
  listed
1346
1363
  basePrice
1347
1364
  source
1365
+ listSource
1348
1366
  minQuantity
1349
1367
  maxQuantity
1350
1368
  increment
@@ -1352,6 +1370,23 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1352
1370
  minQty
1353
1371
  price
1354
1372
  }
1373
+ displayMode
1374
+ taxRate
1375
+ priceAmount {
1376
+ net
1377
+ tax
1378
+ gross
1379
+ }
1380
+ priceMaxAmount {
1381
+ net
1382
+ tax
1383
+ gross
1384
+ }
1385
+ basePriceAmount {
1386
+ net
1387
+ tax
1388
+ gross
1389
+ }
1355
1390
  }
1356
1391
  }
1357
1392
  }`);
@@ -1,5 +1,5 @@
1
- import { CmssyClientConfig, CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
2
- import { F as FetchLike, R as RetryOption } from './content-client-MPHJMucu.cjs';
1
+ import { CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
2
+ import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
3
3
 
4
4
  interface CmssyTypedDocument<Result, Variables> {
5
5
  __apiType?: (variables: Variables) => Result;
@@ -1,5 +1,5 @@
1
- import { CmssyClientConfig, CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
2
- import { F as FetchLike, R as RetryOption } from './content-client-MPHJMucu.js';
1
+ import { CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
2
+ import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
3
3
 
4
4
  interface CmssyTypedDocument<Result, Variables> {
5
5
  __apiType?: (variables: Variables) => Result;
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.14.0" ;
155
+ var CMSSY_CORE_VERSION = "19.16.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/content/content-client.ts
@@ -1,5 +1,5 @@
1
- import { F as FetchLike } from './content-client-MPHJMucu.cjs';
2
- import { CmssyClientConfig } from '@cmssy/types';
1
+ import { F as FetchLike, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
2
+ import '@cmssy/types';
3
3
 
4
4
  interface EditDiagnosticsConfig {
5
5
  apiUrl?: string;
@@ -1,5 +1,5 @@
1
- import { F as FetchLike } from './content-client-MPHJMucu.js';
2
- import { CmssyClientConfig } from '@cmssy/types';
1
+ import { F as FetchLike, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
2
+ import '@cmssy/types';
3
3
 
4
4
  interface EditDiagnosticsConfig {
5
5
  apiUrl?: string;
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.14.0" ;
153
+ var CMSSY_CORE_VERSION = "19.16.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.14.0",
3
+ "version": "19.16.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.66.0",
90
+ "@cmssy/types": "0.67.0",
91
91
  "jose": "^6.2.3"
92
92
  },
93
93
  "scripts": {