@01.software/sdk 0.72.1 → 0.74.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 +73 -0
- package/README.md +70 -3
- package/dist/client.cjs +21 -11
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +21 -11
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-B3CnqMDQ.d.cts → collection-client-Bb1Wa6T6.d.cts} +4 -4
- package/dist/{collection-client-uOgS_1bC.d.ts → collection-client-DBrLM9RR.d.ts} +4 -4
- package/dist/{const-BJBK7jBl.d.ts → const-CkY2zB6J.d.ts} +1 -1
- package/dist/{const-_ZfJjRQG.d.cts → const-DWTSgCkn.d.cts} +1 -1
- package/dist/{index-CBaP4q8r.d.ts → index-Daoh-98A.d.ts} +3 -3
- package/dist/{index-CI_LFWiG.d.cts → index-Di5AybQN.d.cts} +3 -3
- package/dist/index.cjs +22 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +22 -12
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BRg8Yary.d.cts → payload-types-zukuL1s_.d.cts} +408 -1761
- package/dist/{payload-types-BRg8Yary.d.ts → payload-types-zukuL1s_.d.ts} +408 -1761
- package/dist/query.cjs +4 -0
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +4 -0
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +51 -19
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +8 -7
- package/dist/server.d.ts +8 -7
- package/dist/server.js +51 -19
- package/dist/server.js.map +1 -1
- package/dist/{types-FyklqLAk.d.cts → types-BI7aowdu.d.cts} +4 -4
- package/dist/{types-Cmnxxvuv.d.ts → types-BsJokT6P.d.ts} +76 -16
- package/dist/{types-DLjSqL0P.d.ts → types-SsS04wGw.d.ts} +4 -4
- package/dist/{types-CnkJQUez.d.cts → types-evAvqRBj.d.cts} +76 -16
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +5 -5
- package/dist/webhook.d.ts +5 -5
- package/package.json +1 -1
package/dist/client.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AddItemParams,
|
|
3
|
-
import { R as ReadOnlyCollectionClient } from './collection-client-
|
|
1
|
+
import { d9 as CustomerScopedApi, bo as ListMyBenefitVouchersRequest, bp as ListMyBenefitVouchersResponse, da as CustomerCreditsApi, db as CommerceClient, n as CommunityClient, dc as ContentClient, aP as EventsClient, dd as CustomerNamespace, M as MarketDiscovery, aw as CustomerMembershipView, C as CancelMembershipParams, e as CancelMembershipResponse, q as ClientState, de as ClientConfig } from './types-evAvqRBj.cjs';
|
|
2
|
+
export { A as AddItemParams, df as ApiQueryOptions, dg as CancelBrowserPaymentSessionParams, dh as CartMergeParams, F as CartMergeResult, G as CartMineResult, H as CartMutationResult, J as CheckoutAbandonedReason, K as CheckoutAmounts, P as CheckoutOrderReference, Q as CheckoutPaymentSessionRef, Y as CheckoutShippingAddress, $ as ClearCartParams, di as ClientMetadata, dj as ContentClientOptions, a9 as CreateCartParams, aa as CreateCartResult, dk as CreateCheckoutParams, dl as CreateCheckoutResult, ad as CreatePaymentSessionParams, ae as CreatePortOnePaymentSessionParams, ax as CustomerSnapshot, dm as DebugConfig, dn as DeepPartial, dp as ExtractArrayType, bq as MembershipStatus, bs as Money, bz as OpenCheckoutPaymentState, dq as PayloadFindResponse, dr as PayloadMutationResponse, bA as PaymentFailureReason, bB as PaymentNextAction, bC as PaymentProviderStatus, bD as PaymentReconciliationReason, bG as PaymentSessionRole, bH as PortOneHostedPaymentMethod, bJ as PortOnePaymentNextAction, bM as PortOnePublicPaymentSession, bQ as ProductUpsertInput, bR as ProductUpsertParams, bS as ProductUpsertResponse, bT as ProductUpsertVariantInput, bU as PublicAttribute, bV as PublicCaptureEvidence, bW as PublicCart, bX as PublicCartItem, bY as PublicCartItemAdmission, bZ as PublicCartMarket, b_ as PublicCartReference, b$ as PublicCheckout, c0 as PublicCheckoutItem, c1 as PublicMediaAsset, c2 as PublicMediaSize, c3 as PublicOrder, c4 as PublicOrderAmounts, c5 as PublicOrderItem, c6 as PublicOrderReference, c7 as PublicPaymentSession, ca as ReconciliationRequired, cd as RemoveItemParams, ds as RetrieveBrowserPaymentSessionParams, cg as RetrieveCartParams, ch as RetrieveCheckoutParams, dt as RetryConfig, du as RootClient, du as RootClientType, dv as RootCollectionClient, dw as RootReadOnlyQueryBuilder, cv as ShippingLine, dx as Sort, cw as SpentCheckoutPaymentState, dy as StorefrontContentListOptions, dz as StorefrontContentReference, dA as StorefrontGalleryItem, dB as StorefrontGalleryItemsListOptions, dC as StorefrontGalleryItemsSort, dD as StorefrontLink, dE as StorefrontLinksListOptions, dF as StorefrontLinksSort, cU as UpdateCartAttributesParams, cV as UpdateDiscountCodesParams, cW as UpdateItemParams, cX as VariantInput, dG as Where } from './types-evAvqRBj.cjs';
|
|
3
|
+
import { R as ReadOnlyCollectionClient } from './collection-client-Bb1Wa6T6.cjs';
|
|
4
4
|
export { isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.cjs';
|
|
5
|
-
export { C as Collection, P as PublicCollection } from './const-
|
|
6
|
-
import './types-
|
|
7
|
-
import './payload-types-
|
|
5
|
+
export { C as Collection, P as PublicCollection } from './const-DWTSgCkn.cjs';
|
|
6
|
+
import './types-BI7aowdu.cjs';
|
|
7
|
+
import './payload-types-zukuL1s_.cjs';
|
|
8
8
|
import './metadata.cjs';
|
|
9
9
|
|
|
10
10
|
declare class CustomerBenefitVouchersApi extends CustomerScopedApi {
|
package/dist/client.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AddItemParams,
|
|
3
|
-
import { R as ReadOnlyCollectionClient } from './collection-client-
|
|
1
|
+
import { d9 as CustomerScopedApi, bo as ListMyBenefitVouchersRequest, bp as ListMyBenefitVouchersResponse, da as CustomerCreditsApi, db as CommerceClient, n as CommunityClient, dc as ContentClient, aP as EventsClient, dd as CustomerNamespace, M as MarketDiscovery, aw as CustomerMembershipView, C as CancelMembershipParams, e as CancelMembershipResponse, q as ClientState, de as ClientConfig } from './types-BsJokT6P.js';
|
|
2
|
+
export { A as AddItemParams, df as ApiQueryOptions, dg as CancelBrowserPaymentSessionParams, dh as CartMergeParams, F as CartMergeResult, G as CartMineResult, H as CartMutationResult, J as CheckoutAbandonedReason, K as CheckoutAmounts, P as CheckoutOrderReference, Q as CheckoutPaymentSessionRef, Y as CheckoutShippingAddress, $ as ClearCartParams, di as ClientMetadata, dj as ContentClientOptions, a9 as CreateCartParams, aa as CreateCartResult, dk as CreateCheckoutParams, dl as CreateCheckoutResult, ad as CreatePaymentSessionParams, ae as CreatePortOnePaymentSessionParams, ax as CustomerSnapshot, dm as DebugConfig, dn as DeepPartial, dp as ExtractArrayType, bq as MembershipStatus, bs as Money, bz as OpenCheckoutPaymentState, dq as PayloadFindResponse, dr as PayloadMutationResponse, bA as PaymentFailureReason, bB as PaymentNextAction, bC as PaymentProviderStatus, bD as PaymentReconciliationReason, bG as PaymentSessionRole, bH as PortOneHostedPaymentMethod, bJ as PortOnePaymentNextAction, bM as PortOnePublicPaymentSession, bQ as ProductUpsertInput, bR as ProductUpsertParams, bS as ProductUpsertResponse, bT as ProductUpsertVariantInput, bU as PublicAttribute, bV as PublicCaptureEvidence, bW as PublicCart, bX as PublicCartItem, bY as PublicCartItemAdmission, bZ as PublicCartMarket, b_ as PublicCartReference, b$ as PublicCheckout, c0 as PublicCheckoutItem, c1 as PublicMediaAsset, c2 as PublicMediaSize, c3 as PublicOrder, c4 as PublicOrderAmounts, c5 as PublicOrderItem, c6 as PublicOrderReference, c7 as PublicPaymentSession, ca as ReconciliationRequired, cd as RemoveItemParams, ds as RetrieveBrowserPaymentSessionParams, cg as RetrieveCartParams, ch as RetrieveCheckoutParams, dt as RetryConfig, du as RootClient, du as RootClientType, dv as RootCollectionClient, dw as RootReadOnlyQueryBuilder, cv as ShippingLine, dx as Sort, cw as SpentCheckoutPaymentState, dy as StorefrontContentListOptions, dz as StorefrontContentReference, dA as StorefrontGalleryItem, dB as StorefrontGalleryItemsListOptions, dC as StorefrontGalleryItemsSort, dD as StorefrontLink, dE as StorefrontLinksListOptions, dF as StorefrontLinksSort, cU as UpdateCartAttributesParams, cV as UpdateDiscountCodesParams, cW as UpdateItemParams, cX as VariantInput, dG as Where } from './types-BsJokT6P.js';
|
|
3
|
+
import { R as ReadOnlyCollectionClient } from './collection-client-DBrLM9RR.js';
|
|
4
4
|
export { isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.js';
|
|
5
|
-
export { C as Collection, P as PublicCollection } from './const-
|
|
6
|
-
import './types-
|
|
7
|
-
import './payload-types-
|
|
5
|
+
export { C as Collection, P as PublicCollection } from './const-CkY2zB6J.js';
|
|
6
|
+
import './types-SsS04wGw.js';
|
|
7
|
+
import './payload-types-zukuL1s_.js';
|
|
8
8
|
import './metadata.js';
|
|
9
9
|
|
|
10
10
|
declare class CustomerBenefitVouchersApi extends CustomerScopedApi {
|
package/dist/client.js
CHANGED
|
@@ -853,7 +853,7 @@ async function httpFetch(url, options) {
|
|
|
853
853
|
);
|
|
854
854
|
const usageError = attachRequestId(
|
|
855
855
|
createUsageLimitError(
|
|
856
|
-
`Monthly API usage limit exceeded (${current.toLocaleString()}/${limit.toLocaleString()})`,
|
|
856
|
+
`Monthly API usage limit exceeded (${current.toLocaleString("en-US")}/${limit.toLocaleString("en-US")})`,
|
|
857
857
|
{ limit, current, remaining },
|
|
858
858
|
{
|
|
859
859
|
url,
|
|
@@ -1343,6 +1343,10 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
|
1343
1343
|
configure: operation("tenants", "patch", "/embedded-admin-app"),
|
|
1344
1344
|
disable: operation("tenants", "delete", "/embedded-admin-app")
|
|
1345
1345
|
};
|
|
1346
|
+
var FIELD_CONFIG_ENDPOINT_OPERATIONS = {
|
|
1347
|
+
list: operation("field-configs", "get", "/list"),
|
|
1348
|
+
save: operation("field-configs", "post", "/save")
|
|
1349
|
+
};
|
|
1346
1350
|
var EVENTS_ENDPOINT_OPERATIONS = {
|
|
1347
1351
|
registrations: {
|
|
1348
1352
|
register: operation("event-registrations", "post", "/register"),
|
|
@@ -5570,6 +5574,11 @@ function getRelationID(value) {
|
|
|
5570
5574
|
}
|
|
5571
5575
|
return void 0;
|
|
5572
5576
|
}
|
|
5577
|
+
function compareOrdinal(left, right) {
|
|
5578
|
+
if (left < right) return -1;
|
|
5579
|
+
if (left > right) return 1;
|
|
5580
|
+
return 0;
|
|
5581
|
+
}
|
|
5573
5582
|
function extractEntityId(value) {
|
|
5574
5583
|
if (typeof value === "string") return value;
|
|
5575
5584
|
if (typeof value === "number") return String(value);
|
|
@@ -6175,14 +6184,17 @@ function buildProductHref(product, group, options = {}) {
|
|
|
6175
6184
|
return params.size > 0 ? `${path}?${params.toString()}` : path;
|
|
6176
6185
|
}
|
|
6177
6186
|
function compareVariantOrder(a, b) {
|
|
6178
|
-
const aOrder =
|
|
6179
|
-
const bOrder =
|
|
6180
|
-
if (
|
|
6181
|
-
|
|
6187
|
+
const aOrder = a._order || null;
|
|
6188
|
+
const bOrder = b._order || null;
|
|
6189
|
+
if (aOrder !== bOrder) {
|
|
6190
|
+
if (aOrder === null) return 1;
|
|
6191
|
+
if (bOrder === null) return -1;
|
|
6192
|
+
const byOrder = compareOrdinal(aOrder, bOrder);
|
|
6193
|
+
if (byOrder !== 0) return byOrder;
|
|
6182
6194
|
}
|
|
6183
6195
|
const aId = String(getRelationID(a.id) ?? "");
|
|
6184
6196
|
const bId = String(getRelationID(b.id) ?? "");
|
|
6185
|
-
return aId
|
|
6197
|
+
return compareOrdinal(aId, bId);
|
|
6186
6198
|
}
|
|
6187
6199
|
function getVariantAvailableForSale(variant) {
|
|
6188
6200
|
if (variant.isActive === false) return false;
|
|
@@ -6429,11 +6441,7 @@ function buildProductListingPageWhere(params) {
|
|
|
6429
6441
|
const search = params.search?.trim();
|
|
6430
6442
|
if (search) {
|
|
6431
6443
|
clauses.push({
|
|
6432
|
-
or: [
|
|
6433
|
-
{ title: { like: search } },
|
|
6434
|
-
{ slug: { like: search } },
|
|
6435
|
-
{ handle: { like: search } }
|
|
6436
|
-
]
|
|
6444
|
+
or: [{ title: { like: search } }, { slug: { like: search } }]
|
|
6437
6445
|
});
|
|
6438
6446
|
}
|
|
6439
6447
|
const filters = params.filters;
|
|
@@ -6787,6 +6795,8 @@ function buildRangeEndpoint(params) {
|
|
|
6787
6795
|
function buildAdmissionAvailabilityEndpoint(params) {
|
|
6788
6796
|
const urlParams = new URLSearchParams();
|
|
6789
6797
|
urlParams.set("occurrence", params.occurrence);
|
|
6798
|
+
const normalizedMarket2 = params.market?.trim();
|
|
6799
|
+
if (normalizedMarket2) urlParams.set("market", normalizedMarket2);
|
|
6790
6800
|
return resolveOperationPath(
|
|
6791
6801
|
EVENTS_ENDPOINT_OPERATIONS.occurrences.admissionAvailability,
|
|
6792
6802
|
{ query: urlParams }
|