@cmssy/core 19.16.0 → 19.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/dist/index.cjs +18 -3
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +15 -4
- package/dist/internal/locale.cjs +1 -1
- package/dist/internal/locale.js +1 -1
- package/dist/internal.cjs +2 -3
- package/dist/internal.js +2 -3
- package/dist/preflight.cjs +1 -1
- package/dist/preflight.js +1 -1
- package/package.json +2 -2
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.
|
|
228
|
+
var CMSSY_CORE_VERSION = "19.18.0" ;
|
|
229
229
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
230
230
|
|
|
231
231
|
// src/data/http.ts
|
|
@@ -583,8 +583,6 @@ function createCmssyClient(input) {
|
|
|
583
583
|
};
|
|
584
584
|
return client;
|
|
585
585
|
}
|
|
586
|
-
|
|
587
|
-
// src/data/buyer-prices.ts
|
|
588
586
|
var CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
|
|
589
587
|
var priceDisplayModeValues = ["gross", "net"];
|
|
590
588
|
var priceListSourceValues = ["MEMBER", "COMPANY", "CHANNEL"];
|
|
@@ -613,6 +611,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
|
|
|
613
611
|
}
|
|
614
612
|
displayMode
|
|
615
613
|
taxRate
|
|
614
|
+
taxTreatmentKind
|
|
616
615
|
priceAmount {
|
|
617
616
|
net
|
|
618
617
|
tax
|
|
@@ -701,6 +700,14 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
|
|
|
701
700
|
total
|
|
702
701
|
hasMore
|
|
703
702
|
displayMode
|
|
703
|
+
taxTreatment {
|
|
704
|
+
kind
|
|
705
|
+
legalNote
|
|
706
|
+
buyerVatId
|
|
707
|
+
buyerVatCountry
|
|
708
|
+
sellerCountry
|
|
709
|
+
shipToCountry
|
|
710
|
+
}
|
|
704
711
|
items {
|
|
705
712
|
recordId
|
|
706
713
|
currency
|
|
@@ -715,6 +722,7 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
|
|
|
715
722
|
increment
|
|
716
723
|
displayMode
|
|
717
724
|
taxRate
|
|
725
|
+
taxTreatmentKind
|
|
718
726
|
priceAmount {
|
|
719
727
|
net
|
|
720
728
|
tax
|
|
@@ -820,6 +828,7 @@ var PUBLIC_PRICES_QUERY = typedOperation(`query PublicPrices(
|
|
|
820
828
|
}
|
|
821
829
|
displayMode
|
|
822
830
|
taxRate
|
|
831
|
+
taxTreatmentKind
|
|
823
832
|
priceAmount {
|
|
824
833
|
net
|
|
825
834
|
tax
|
|
@@ -909,6 +918,7 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
|
|
|
909
918
|
}
|
|
910
919
|
displayMode
|
|
911
920
|
taxRate
|
|
921
|
+
taxTreatmentKind
|
|
912
922
|
priceAmount {
|
|
913
923
|
net
|
|
914
924
|
tax
|
|
@@ -997,6 +1007,7 @@ var checkoutErrorReasonValues = [
|
|
|
997
1007
|
"CART_CURRENCY_CHANGED",
|
|
998
1008
|
"BUYER_CHANGED",
|
|
999
1009
|
"PRODUCT_NOT_SOLD",
|
|
1010
|
+
"TAX_TREATMENT_CHANGED",
|
|
1000
1011
|
...quantityRuleReasonValues
|
|
1001
1012
|
];
|
|
1002
1013
|
var REASONS = new Set(checkoutErrorReasonValues);
|
|
@@ -1693,6 +1704,10 @@ Object.defineProperty(exports, "mediaTypeValues", {
|
|
|
1693
1704
|
enumerable: true,
|
|
1694
1705
|
get: function () { return types.mediaTypeValues; }
|
|
1695
1706
|
});
|
|
1707
|
+
Object.defineProperty(exports, "taxTreatmentKindValues", {
|
|
1708
|
+
enumerable: true,
|
|
1709
|
+
get: function () { return types.taxTreatmentKindValues; }
|
|
1710
|
+
});
|
|
1696
1711
|
exports.BUYER_CATALOG_PRICES_QUERY = BUYER_CATALOG_PRICES_QUERY;
|
|
1697
1712
|
exports.BUYER_PRICES_QUERY = BUYER_PRICES_QUERY;
|
|
1698
1713
|
exports.CMSSY_BUYER_PRICES_MAX_ITEMS = CMSSY_BUYER_PRICES_MAX_ITEMS;
|
package/dist/index.d.cts
CHANGED
|
@@ -4,8 +4,8 @@ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocu
|
|
|
4
4
|
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
|
|
5
5
|
export { e as CMSSY_RATE_LIMIT_WINDOW_MS, g as CMSSY_RETRY_MODES, h as CmssyGraphqlError, i as CmssyGraphqlErrorEntry, j as CmssyRequestError, k as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, l as FetchLikeResponse, m as FetchPageOptions, n as RetryPolicy, o as createRetryingFetch, p as isTransientRequestError } from './content-client-EAeHiBv2.cjs';
|
|
6
6
|
import * as _cmssy_types from '@cmssy/types';
|
|
7
|
-
import { CmssyPriceSource, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
8
|
-
export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
|
|
7
|
+
import { CmssyPriceSource, CmssyTaxTreatmentKind, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
8
|
+
export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyTaxTreatmentKind, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, CmssyWebhookTaxTreatment, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues, taxTreatmentKindValues } from '@cmssy/types';
|
|
9
9
|
|
|
10
10
|
declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
|
|
11
11
|
interface CmssyPriceQueryItem {
|
|
@@ -20,6 +20,15 @@ declare const priceDisplayModeValues: readonly ["gross", "net"];
|
|
|
20
20
|
type CmssyPriceDisplayMode = (typeof priceDisplayModeValues)[number];
|
|
21
21
|
declare const priceListSourceValues: readonly ["MEMBER", "COMPANY", "CHANNEL"];
|
|
22
22
|
type CmssyPriceListSource = (typeof priceListSourceValues)[number];
|
|
23
|
+
|
|
24
|
+
interface CmssyTaxTreatment {
|
|
25
|
+
kind: CmssyTaxTreatmentKind;
|
|
26
|
+
legalNote: string | null;
|
|
27
|
+
buyerVatId: string | null;
|
|
28
|
+
buyerVatCountry: string | null;
|
|
29
|
+
sellerCountry: string | null;
|
|
30
|
+
shipToCountry: string | null;
|
|
31
|
+
}
|
|
23
32
|
interface CmssyTaxedAmount {
|
|
24
33
|
net: number;
|
|
25
34
|
tax: number;
|
|
@@ -41,6 +50,7 @@ interface CmssyBuyerPrice {
|
|
|
41
50
|
tiers: CmssyPriceTier[];
|
|
42
51
|
displayMode: CmssyPriceDisplayMode;
|
|
43
52
|
taxRate: number;
|
|
53
|
+
taxTreatmentKind: CmssyTaxTreatmentKind;
|
|
44
54
|
priceAmount: CmssyTaxedAmount;
|
|
45
55
|
priceMaxAmount: CmssyTaxedAmount | null;
|
|
46
56
|
basePriceAmount: CmssyTaxedAmount;
|
|
@@ -83,6 +93,7 @@ interface CmssyBuyerCatalogPrice {
|
|
|
83
93
|
increment: number;
|
|
84
94
|
displayMode: CmssyPriceDisplayMode;
|
|
85
95
|
taxRate: number;
|
|
96
|
+
taxTreatmentKind: CmssyTaxTreatmentKind;
|
|
86
97
|
priceAmount: CmssyTaxedAmount;
|
|
87
98
|
priceMaxAmount: CmssyTaxedAmount | null;
|
|
88
99
|
basePriceAmount: CmssyTaxedAmount;
|
|
@@ -92,6 +103,7 @@ interface CmssyBuyerCatalogPage {
|
|
|
92
103
|
total: number;
|
|
93
104
|
hasMore: boolean;
|
|
94
105
|
displayMode: CmssyPriceDisplayMode;
|
|
106
|
+
taxTreatment: CmssyTaxTreatment;
|
|
95
107
|
}
|
|
96
108
|
interface BuyerCatalogPricesVariables {
|
|
97
109
|
workspaceId: string;
|
|
@@ -196,7 +208,7 @@ declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPub
|
|
|
196
208
|
|
|
197
209
|
declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
|
|
198
210
|
type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
|
|
199
|
-
declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
|
|
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"];
|
|
200
212
|
type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
|
|
201
213
|
interface CmssyQuantityRuleViolation {
|
|
202
214
|
reason: CmssyQuantityRuleReason;
|
|
@@ -384,4 +396,4 @@ declare class CmssyWebhookError extends Error {
|
|
|
384
396
|
}
|
|
385
397
|
declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
|
|
386
398
|
|
|
387
|
-
export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerCatalogPricesResult, type BuyerCatalogPricesVariables, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_PUBLIC_PRICES_MAX_ITEMS, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyChannelRefusal, type CmssyChannelRefusalReason, type CmssyCheckoutErrorReason, CmssyClientConfig, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceDisplayMode, type CmssyPriceListSource, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyPriceWithheldReason, type CmssyPublicCatalogPage, type CmssyPublicPriceResult, type CmssyPublicPricedRecord, type CmssyPublicPricedRecordData, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxedAmount, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type GetPublicCatalogPricesQuery, type GetPublicPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, type PublicCatalogPricesResult, type PublicCatalogPricesVariables, type PublicPricesResult, type PublicPricesVariables, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
|
|
399
|
+
export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerCatalogPricesResult, type BuyerCatalogPricesVariables, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_PUBLIC_PRICES_MAX_ITEMS, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyChannelRefusal, type CmssyChannelRefusalReason, type CmssyCheckoutErrorReason, CmssyClientConfig, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceDisplayMode, type CmssyPriceListSource, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyPriceWithheldReason, type CmssyPublicCatalogPage, type CmssyPublicPriceResult, type CmssyPublicPricedRecord, type CmssyPublicPricedRecordData, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxTreatment, type CmssyTaxedAmount, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type GetPublicCatalogPricesQuery, type GetPublicPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, type PublicCatalogPricesResult, type PublicCatalogPricesVariables, type PublicPricesResult, type PublicPricesVariables, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocu
|
|
|
4
4
|
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
|
|
5
5
|
export { e as CMSSY_RATE_LIMIT_WINDOW_MS, g as CMSSY_RETRY_MODES, h as CmssyGraphqlError, i as CmssyGraphqlErrorEntry, j as CmssyRequestError, k as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, l as FetchLikeResponse, m as FetchPageOptions, n as RetryPolicy, o as createRetryingFetch, p as isTransientRequestError } from './content-client-EAeHiBv2.js';
|
|
6
6
|
import * as _cmssy_types from '@cmssy/types';
|
|
7
|
-
import { CmssyPriceSource, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
8
|
-
export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
|
|
7
|
+
import { CmssyPriceSource, CmssyTaxTreatmentKind, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
8
|
+
export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyTaxTreatmentKind, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, CmssyWebhookTaxTreatment, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues, taxTreatmentKindValues } from '@cmssy/types';
|
|
9
9
|
|
|
10
10
|
declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
|
|
11
11
|
interface CmssyPriceQueryItem {
|
|
@@ -20,6 +20,15 @@ declare const priceDisplayModeValues: readonly ["gross", "net"];
|
|
|
20
20
|
type CmssyPriceDisplayMode = (typeof priceDisplayModeValues)[number];
|
|
21
21
|
declare const priceListSourceValues: readonly ["MEMBER", "COMPANY", "CHANNEL"];
|
|
22
22
|
type CmssyPriceListSource = (typeof priceListSourceValues)[number];
|
|
23
|
+
|
|
24
|
+
interface CmssyTaxTreatment {
|
|
25
|
+
kind: CmssyTaxTreatmentKind;
|
|
26
|
+
legalNote: string | null;
|
|
27
|
+
buyerVatId: string | null;
|
|
28
|
+
buyerVatCountry: string | null;
|
|
29
|
+
sellerCountry: string | null;
|
|
30
|
+
shipToCountry: string | null;
|
|
31
|
+
}
|
|
23
32
|
interface CmssyTaxedAmount {
|
|
24
33
|
net: number;
|
|
25
34
|
tax: number;
|
|
@@ -41,6 +50,7 @@ interface CmssyBuyerPrice {
|
|
|
41
50
|
tiers: CmssyPriceTier[];
|
|
42
51
|
displayMode: CmssyPriceDisplayMode;
|
|
43
52
|
taxRate: number;
|
|
53
|
+
taxTreatmentKind: CmssyTaxTreatmentKind;
|
|
44
54
|
priceAmount: CmssyTaxedAmount;
|
|
45
55
|
priceMaxAmount: CmssyTaxedAmount | null;
|
|
46
56
|
basePriceAmount: CmssyTaxedAmount;
|
|
@@ -83,6 +93,7 @@ interface CmssyBuyerCatalogPrice {
|
|
|
83
93
|
increment: number;
|
|
84
94
|
displayMode: CmssyPriceDisplayMode;
|
|
85
95
|
taxRate: number;
|
|
96
|
+
taxTreatmentKind: CmssyTaxTreatmentKind;
|
|
86
97
|
priceAmount: CmssyTaxedAmount;
|
|
87
98
|
priceMaxAmount: CmssyTaxedAmount | null;
|
|
88
99
|
basePriceAmount: CmssyTaxedAmount;
|
|
@@ -92,6 +103,7 @@ interface CmssyBuyerCatalogPage {
|
|
|
92
103
|
total: number;
|
|
93
104
|
hasMore: boolean;
|
|
94
105
|
displayMode: CmssyPriceDisplayMode;
|
|
106
|
+
taxTreatment: CmssyTaxTreatment;
|
|
95
107
|
}
|
|
96
108
|
interface BuyerCatalogPricesVariables {
|
|
97
109
|
workspaceId: string;
|
|
@@ -196,7 +208,7 @@ declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPub
|
|
|
196
208
|
|
|
197
209
|
declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
|
|
198
210
|
type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
|
|
199
|
-
declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
|
|
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"];
|
|
200
212
|
type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
|
|
201
213
|
interface CmssyQuantityRuleViolation {
|
|
202
214
|
reason: CmssyQuantityRuleReason;
|
|
@@ -384,4 +396,4 @@ declare class CmssyWebhookError extends Error {
|
|
|
384
396
|
}
|
|
385
397
|
declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
|
|
386
398
|
|
|
387
|
-
export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerCatalogPricesResult, type BuyerCatalogPricesVariables, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_PUBLIC_PRICES_MAX_ITEMS, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyChannelRefusal, type CmssyChannelRefusalReason, type CmssyCheckoutErrorReason, CmssyClientConfig, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceDisplayMode, type CmssyPriceListSource, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyPriceWithheldReason, type CmssyPublicCatalogPage, type CmssyPublicPriceResult, type CmssyPublicPricedRecord, type CmssyPublicPricedRecordData, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxedAmount, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type GetPublicCatalogPricesQuery, type GetPublicPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, type PublicCatalogPricesResult, type PublicCatalogPricesVariables, type PublicPricesResult, type PublicPricesVariables, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
|
|
399
|
+
export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerCatalogPricesResult, type BuyerCatalogPricesVariables, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_PUBLIC_PRICES_MAX_ITEMS, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyChannelRefusal, type CmssyChannelRefusalReason, type CmssyCheckoutErrorReason, CmssyClientConfig, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceDisplayMode, type CmssyPriceListSource, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyPriceWithheldReason, type CmssyPublicCatalogPage, type CmssyPublicPriceResult, type CmssyPublicPricedRecord, type CmssyPublicPricedRecordData, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxTreatment, type CmssyTaxedAmount, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type GetPublicCatalogPricesQuery, type GetPublicPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, type PublicCatalogPricesResult, type PublicCatalogPricesVariables, type PublicPricesResult, type PublicPricesVariables, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { brandingFieldNames, mediaTypeValues, LAYOUT_REGIONS_MAX, LAYOUT_REGION_ID_PATTERN, LAYOUT_REGION_LABEL_MAX, evaluateFieldConditionGroup } from '@cmssy/types';
|
|
2
|
-
export { API_TOKEN_HEADER_NAME, CLIENT_IP_HEADER_NAME, MediaType, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
|
|
2
|
+
export { API_TOKEN_HEADER_NAME, CLIENT_IP_HEADER_NAME, MediaType, evaluateFieldConditionGroup, mediaTypeValues, taxTreatmentKindValues } from '@cmssy/types';
|
|
3
3
|
|
|
4
4
|
// src/config.ts
|
|
5
5
|
var DEFAULT_CMSSY_EDITOR_ORIGINS = [
|
|
@@ -224,7 +224,7 @@ function documentText(document2) {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// src/version.ts
|
|
227
|
-
var CMSSY_CORE_VERSION = "19.
|
|
227
|
+
var CMSSY_CORE_VERSION = "19.18.0" ;
|
|
228
228
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
229
229
|
|
|
230
230
|
// src/data/http.ts
|
|
@@ -582,8 +582,6 @@ function createCmssyClient(input) {
|
|
|
582
582
|
};
|
|
583
583
|
return client;
|
|
584
584
|
}
|
|
585
|
-
|
|
586
|
-
// src/data/buyer-prices.ts
|
|
587
585
|
var CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
|
|
588
586
|
var priceDisplayModeValues = ["gross", "net"];
|
|
589
587
|
var priceListSourceValues = ["MEMBER", "COMPANY", "CHANNEL"];
|
|
@@ -612,6 +610,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
|
|
|
612
610
|
}
|
|
613
611
|
displayMode
|
|
614
612
|
taxRate
|
|
613
|
+
taxTreatmentKind
|
|
615
614
|
priceAmount {
|
|
616
615
|
net
|
|
617
616
|
tax
|
|
@@ -700,6 +699,14 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
|
|
|
700
699
|
total
|
|
701
700
|
hasMore
|
|
702
701
|
displayMode
|
|
702
|
+
taxTreatment {
|
|
703
|
+
kind
|
|
704
|
+
legalNote
|
|
705
|
+
buyerVatId
|
|
706
|
+
buyerVatCountry
|
|
707
|
+
sellerCountry
|
|
708
|
+
shipToCountry
|
|
709
|
+
}
|
|
703
710
|
items {
|
|
704
711
|
recordId
|
|
705
712
|
currency
|
|
@@ -714,6 +721,7 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
|
|
|
714
721
|
increment
|
|
715
722
|
displayMode
|
|
716
723
|
taxRate
|
|
724
|
+
taxTreatmentKind
|
|
717
725
|
priceAmount {
|
|
718
726
|
net
|
|
719
727
|
tax
|
|
@@ -819,6 +827,7 @@ var PUBLIC_PRICES_QUERY = typedOperation(`query PublicPrices(
|
|
|
819
827
|
}
|
|
820
828
|
displayMode
|
|
821
829
|
taxRate
|
|
830
|
+
taxTreatmentKind
|
|
822
831
|
priceAmount {
|
|
823
832
|
net
|
|
824
833
|
tax
|
|
@@ -908,6 +917,7 @@ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
|
|
|
908
917
|
}
|
|
909
918
|
displayMode
|
|
910
919
|
taxRate
|
|
920
|
+
taxTreatmentKind
|
|
911
921
|
priceAmount {
|
|
912
922
|
net
|
|
913
923
|
tax
|
|
@@ -996,6 +1006,7 @@ var checkoutErrorReasonValues = [
|
|
|
996
1006
|
"CART_CURRENCY_CHANGED",
|
|
997
1007
|
"BUYER_CHANGED",
|
|
998
1008
|
"PRODUCT_NOT_SOLD",
|
|
1009
|
+
"TAX_TREATMENT_CHANGED",
|
|
999
1010
|
...quantityRuleReasonValues
|
|
1000
1011
|
];
|
|
1001
1012
|
var REASONS = new Set(checkoutErrorReasonValues);
|
package/dist/internal/locale.cjs
CHANGED
package/dist/internal/locale.js
CHANGED
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.
|
|
157
|
+
var CMSSY_CORE_VERSION = "19.18.0" ;
|
|
158
158
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
159
159
|
|
|
160
160
|
// src/data/http.ts
|
|
@@ -1347,8 +1347,6 @@ function cmssyCspHeaders(options) {
|
|
|
1347
1347
|
"Content-Security-Policy": frameAncestors(options.editorOrigin)
|
|
1348
1348
|
};
|
|
1349
1349
|
}
|
|
1350
|
-
|
|
1351
|
-
// src/data/buyer-prices.ts
|
|
1352
1350
|
var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
|
|
1353
1351
|
$workspaceId: ID!
|
|
1354
1352
|
$items: [PriceQueryItem!]!
|
|
@@ -1374,6 +1372,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
|
|
|
1374
1372
|
}
|
|
1375
1373
|
displayMode
|
|
1376
1374
|
taxRate
|
|
1375
|
+
taxTreatmentKind
|
|
1377
1376
|
priceAmount {
|
|
1378
1377
|
net
|
|
1379
1378
|
tax
|
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.
|
|
155
|
+
var CMSSY_CORE_VERSION = "19.18.0" ;
|
|
156
156
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
157
157
|
|
|
158
158
|
// src/data/http.ts
|
|
@@ -1345,8 +1345,6 @@ function cmssyCspHeaders(options) {
|
|
|
1345
1345
|
"Content-Security-Policy": frameAncestors(options.editorOrigin)
|
|
1346
1346
|
};
|
|
1347
1347
|
}
|
|
1348
|
-
|
|
1349
|
-
// src/data/buyer-prices.ts
|
|
1350
1348
|
var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
|
|
1351
1349
|
$workspaceId: ID!
|
|
1352
1350
|
$items: [PriceQueryItem!]!
|
|
@@ -1372,6 +1370,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
|
|
|
1372
1370
|
}
|
|
1373
1371
|
displayMode
|
|
1374
1372
|
taxRate
|
|
1373
|
+
taxTreatmentKind
|
|
1375
1374
|
priceAmount {
|
|
1376
1375
|
net
|
|
1377
1376
|
tax
|
package/dist/preflight.cjs
CHANGED
|
@@ -152,7 +152,7 @@ function documentText(document) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/version.ts
|
|
155
|
-
var CMSSY_CORE_VERSION = "19.
|
|
155
|
+
var CMSSY_CORE_VERSION = "19.18.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.
|
|
153
|
+
var CMSSY_CORE_VERSION = "19.18.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.
|
|
3
|
+
"version": "19.18.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.
|
|
90
|
+
"@cmssy/types": "0.69.0",
|
|
91
91
|
"jose": "^6.2.3"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|