@01.software/sdk 0.40.0 → 0.41.1
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 +506 -0
- package/MIGRATION.md +183 -0
- package/README.md +12 -1
- package/dist/analytics/react.cjs.map +1 -1
- package/dist/analytics/react.js.map +1 -1
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.js.map +1 -1
- package/dist/client.cjs +4 -1
- 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 +4 -1
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-CKFa99C6.d.ts → collection-client-BdcxkW7l.d.ts} +5 -5
- package/dist/{collection-client-VYwYi6u6.d.cts → collection-client-Bk--pNzW.d.cts} +5 -5
- package/dist/{const-ymprfiPf.d.ts → const-HwdntWtG.d.ts} +1 -1
- package/dist/{const-4BUtUdGU.d.cts → const-qGGI7Uii.d.cts} +1 -1
- package/dist/{index-w36lpSkU.d.ts → index-B1oW50RY.d.ts} +3 -3
- package/dist/{index-Dquv4xTL.d.cts → index-DiXtjVab.d.cts} +3 -3
- package/dist/index.cjs +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-DC0xzR9i.d.cts → payload-types-CqJOgON7.d.cts} +0 -3
- package/dist/{payload-types-DC0xzR9i.d.ts → payload-types-CqJOgON7.d.ts} +0 -3
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/realtime.js.map +1 -1
- package/dist/server.cjs +10 -5
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +10 -5
- package/dist/server.js.map +1 -1
- package/dist/{types-Umd-YTjM.d.ts → types-BKa9z9s2.d.cts} +36 -5
- package/dist/{types-Bh2p-EMc.d.ts → types-BMI3M0nb.d.ts} +1 -1
- package/dist/{types-BvpjooU-.d.cts → types-ByLSG-O3.d.cts} +1 -1
- package/dist/{types-D5uHrPLr.d.cts → types-DgfXb7iV.d.ts} +36 -5
- 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 +4 -4
- package/dist/webhook.d.ts +4 -4
- package/package.json +4 -2
package/dist/server.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-
|
|
4
|
-
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-Bk--pNzW.cjs';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-Bk--pNzW.cjs';
|
|
3
|
+
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-BKa9z9s2.cjs';
|
|
4
|
+
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-BKa9z9s2.cjs';
|
|
5
|
+
import './payload-types-CqJOgON7.cjs';
|
|
6
6
|
import './metadata.cjs';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-qGGI7Uii.cjs';
|
|
8
|
+
import './types-ByLSG-O3.cjs';
|
|
9
9
|
|
|
10
10
|
type PreviewDetailParams = {
|
|
11
11
|
collection: string;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-
|
|
4
|
-
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-BdcxkW7l.js';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-BdcxkW7l.js';
|
|
3
|
+
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-DgfXb7iV.js';
|
|
4
|
+
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-DgfXb7iV.js';
|
|
5
|
+
import './payload-types-CqJOgON7.js';
|
|
6
6
|
import './metadata.js';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-HwdntWtG.js';
|
|
8
|
+
import './types-BMI3M0nb.js';
|
|
9
9
|
|
|
10
10
|
type PreviewDetailParams = {
|
|
11
11
|
collection: string;
|
package/dist/server.js
CHANGED
|
@@ -951,9 +951,10 @@ var CollectionQueryBuilder = class {
|
|
|
951
951
|
* DELETE /api/{collection}/{id}
|
|
952
952
|
* @returns Deleted document object directly (no wrapper)
|
|
953
953
|
*/
|
|
954
|
-
async remove(id) {
|
|
954
|
+
async remove(id, options) {
|
|
955
955
|
return this.api.requestDelete(
|
|
956
|
-
`/api/${String(this.collection)}/${String(id)}
|
|
956
|
+
`/api/${String(this.collection)}/${String(id)}`,
|
|
957
|
+
options
|
|
957
958
|
);
|
|
958
959
|
}
|
|
959
960
|
/**
|
|
@@ -1085,8 +1086,9 @@ var CollectionClient = class extends HttpClient {
|
|
|
1085
1086
|
* Delete document
|
|
1086
1087
|
* DELETE /api/{collection}/{id}
|
|
1087
1088
|
*/
|
|
1088
|
-
async requestDelete(endpoint) {
|
|
1089
|
-
const
|
|
1089
|
+
async requestDelete(endpoint, options) {
|
|
1090
|
+
const url = this.buildUrl(endpoint, options);
|
|
1091
|
+
const response = await this.fetchWithTracking(url, {
|
|
1090
1092
|
...this.defaultOptions,
|
|
1091
1093
|
method: "DELETE"
|
|
1092
1094
|
});
|
|
@@ -2420,11 +2422,14 @@ function compareVariantOrder(a, b) {
|
|
|
2420
2422
|
const bId = String(getRelationID(b.id) ?? "");
|
|
2421
2423
|
return aId.localeCompare(bId);
|
|
2422
2424
|
}
|
|
2423
|
-
function
|
|
2425
|
+
function getVariantAvailableForSale(variant) {
|
|
2424
2426
|
if (variant.isActive === false) return false;
|
|
2425
2427
|
if (variant.isUnlimited) return true;
|
|
2426
2428
|
return (variant.stock ?? 0) - (variant.reservedStock ?? 0) > 0;
|
|
2427
2429
|
}
|
|
2430
|
+
function isVariantAvailableForSale(variant) {
|
|
2431
|
+
return getVariantAvailableForSale(variant);
|
|
2432
|
+
}
|
|
2428
2433
|
function sortVariantsForMediaSelection(variants) {
|
|
2429
2434
|
const orderedVariants = [...variants].sort(compareVariantOrder);
|
|
2430
2435
|
const activeVariants = orderedVariants.filter(
|