@cmssy/core 19.15.0 → 19.17.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.15.0" ;
155
+ var CMSSY_CORE_VERSION = "19.17.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 {
@@ -1332,11 +1345,13 @@ function cmssyCspHeaders(options) {
1332
1345
  "Content-Security-Policy": frameAncestors(options.editorOrigin)
1333
1346
  };
1334
1347
  }
1335
-
1336
- // src/data/buyer-prices.ts
1337
- var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $items: [PriceQueryItem!]!) {
1348
+ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
1349
+ $workspaceId: ID!
1350
+ $items: [PriceQueryItem!]!
1351
+ $channel: String
1352
+ ) {
1338
1353
  account {
1339
- prices(workspaceId: $workspaceId, items: $items) {
1354
+ prices(workspaceId: $workspaceId, items: $items, channel: $channel) {
1340
1355
  recordId
1341
1356
  variantKey
1342
1357
  currency
@@ -1345,6 +1360,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1345
1360
  listed
1346
1361
  basePrice
1347
1362
  source
1363
+ listSource
1348
1364
  minQuantity
1349
1365
  maxQuantity
1350
1366
  increment
@@ -1354,6 +1370,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1354
1370
  }
1355
1371
  displayMode
1356
1372
  taxRate
1373
+ taxTreatmentKind
1357
1374
  priceAmount {
1358
1375
  net
1359
1376
  tax
@@ -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.15.0" ;
155
+ var CMSSY_CORE_VERSION = "19.17.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.15.0" ;
153
+ var CMSSY_CORE_VERSION = "19.17.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.15.0",
3
+ "version": "19.17.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.68.0",
91
91
  "jose": "^6.2.3"
92
92
  },
93
93
  "scripts": {