@01.software/sdk 0.37.0 → 0.38.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/README.md +75 -53
- package/dist/client.cjs +67 -104
- 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 +67 -104
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-zOmnxwdA.d.cts → collection-client-B0J9wMNE.d.cts} +5 -5
- package/dist/{collection-client-DyELGUcL.d.ts → collection-client-BroIWHY1.d.ts} +5 -5
- package/dist/const-6XHz_jej.d.ts +32 -0
- package/dist/const-B5KT72c7.d.cts +32 -0
- package/dist/{index-DRJs7QIh.d.cts → index-BOLQxveo.d.cts} +3 -3
- package/dist/{index-DTqoUZk_.d.ts → index-CSwR2HSg.d.ts} +3 -3
- package/dist/index.cjs +95 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +95 -123
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-CREOjFNT.d.cts → payload-types-m3jjhxk9.d.cts} +418 -106
- package/dist/{payload-types-CREOjFNT.d.ts → payload-types-m3jjhxk9.d.ts} +418 -106
- package/dist/query.cjs +3 -1035
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +13 -13
- package/dist/query.d.ts +13 -13
- package/dist/query.js +3 -1035
- 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 +42 -21
- 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 +42 -21
- package/dist/server.js.map +1 -1
- package/dist/{types-DMvVHdb1.d.ts → types-CIGscmus.d.cts} +1455 -1208
- package/dist/{types-CxzWHspI.d.ts → types-Cmrd1ezc.d.ts} +1 -15
- package/dist/{types-BkZNhuBh.d.cts → types-D0ubzQw0.d.cts} +1 -15
- package/dist/{types-BWMUr3Zw.d.cts → types-D2xYdz4P.d.ts} +1455 -1208
- 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 +3 -3
- package/dist/const-CK_FPaIn.d.cts +0 -32
- package/dist/const-Dqz05oaG.d.ts +0 -32
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 { B as BaseApi,
|
|
4
|
-
export {
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-B0J9wMNE.cjs';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-B0J9wMNE.cjs';
|
|
3
|
+
import { B as BaseApi, z as ServerApiOptions, F as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, G as BanCustomerParams, H as CommunityBan, I as UnbanCustomerParams, c as ClientState, J as ClientServerConfig, E as EventsClient, K as RootServerClientWithEvents } from './types-CIGscmus.cjs';
|
|
4
|
+
export { A as AddItemParams, f as ApplyDiscountParams, g as CheckoutParams, h as ClearCartParams, L as CollectionFieldSchema, M as CollectionSchemaResponse, N as EventGuestCancelParams, O as EventGuestRegistration, Q as EventGuestRegistrationResponse, V as EventRegistrationAnswerInput, X as EventRegistrationAttendeeInput, Y as EventRegistrationPublic, Z as EventRegistrationRegisterParams, _ as EventRegistrationRegisterResponse, $ as EventsCalendarItem, a0 as EventsClientOptions, a1 as EventsDateParam, a2 as EventsExternalSource, a3 as EventsLocation, a4 as EventsOccurrenceLocation, a5 as EventsRangeEvent, a6 as EventsRangeOccurrence, a7 as EventsRangeParams, a8 as EventsRangeResponse, a9 as EventsTaxonomyItem, aa as ModerationApi, m as PublicCart, n as PublicCartItem, o as PublicCartReference, p as PublicMediaAsset, q as PublicMediaSize, r as PublicOrder, s as PublicOrderItem, t as PublicOrderReference, R as RemoveDiscountParams, u as RemoveItemParams, ab as RootServerClient, ac as TenantFeatureProgressEvidenceValue, ad as TenantFeatureProgressFeature, ae as TenantFeatureProgressGroup, af as TenantFeatureProgressInput, ag as TenantFeatureProgressItem, ah as TenantFeatureProgressItemState, ai as TenantFeatureProgressResponse, aj as TenantFeatureProgressSeverity, ak as TenantFeatureProgressStatus, al as TenantIntrospectionApi, am as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-CIGscmus.cjs';
|
|
5
|
+
import './payload-types-m3jjhxk9.cjs';
|
|
6
6
|
import './metadata.cjs';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-B5KT72c7.cjs';
|
|
8
|
+
import './types-D0ubzQw0.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 { B as BaseApi,
|
|
4
|
-
export {
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-BroIWHY1.js';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-BroIWHY1.js';
|
|
3
|
+
import { B as BaseApi, z as ServerApiOptions, F as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, G as BanCustomerParams, H as CommunityBan, I as UnbanCustomerParams, c as ClientState, J as ClientServerConfig, E as EventsClient, K as RootServerClientWithEvents } from './types-D2xYdz4P.js';
|
|
4
|
+
export { A as AddItemParams, f as ApplyDiscountParams, g as CheckoutParams, h as ClearCartParams, L as CollectionFieldSchema, M as CollectionSchemaResponse, N as EventGuestCancelParams, O as EventGuestRegistration, Q as EventGuestRegistrationResponse, V as EventRegistrationAnswerInput, X as EventRegistrationAttendeeInput, Y as EventRegistrationPublic, Z as EventRegistrationRegisterParams, _ as EventRegistrationRegisterResponse, $ as EventsCalendarItem, a0 as EventsClientOptions, a1 as EventsDateParam, a2 as EventsExternalSource, a3 as EventsLocation, a4 as EventsOccurrenceLocation, a5 as EventsRangeEvent, a6 as EventsRangeOccurrence, a7 as EventsRangeParams, a8 as EventsRangeResponse, a9 as EventsTaxonomyItem, aa as ModerationApi, m as PublicCart, n as PublicCartItem, o as PublicCartReference, p as PublicMediaAsset, q as PublicMediaSize, r as PublicOrder, s as PublicOrderItem, t as PublicOrderReference, R as RemoveDiscountParams, u as RemoveItemParams, ab as RootServerClient, ac as TenantFeatureProgressEvidenceValue, ad as TenantFeatureProgressFeature, ae as TenantFeatureProgressGroup, af as TenantFeatureProgressInput, ag as TenantFeatureProgressItem, ah as TenantFeatureProgressItemState, ai as TenantFeatureProgressResponse, aj as TenantFeatureProgressSeverity, ak as TenantFeatureProgressStatus, al as TenantIntrospectionApi, am as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-D2xYdz4P.js';
|
|
5
|
+
import './payload-types-m3jjhxk9.js';
|
|
6
6
|
import './metadata.js';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-6XHz_jej.js';
|
|
8
|
+
import './types-Cmrd1ezc.js';
|
|
9
9
|
|
|
10
10
|
type PreviewDetailParams = {
|
|
11
11
|
collection: string;
|
package/dist/server.js
CHANGED
|
@@ -1221,7 +1221,8 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1221
1221
|
const urlParams = new URLSearchParams();
|
|
1222
1222
|
const sort = params?.sort ?? DEFAULT_POST_LIST_SORT;
|
|
1223
1223
|
urlParams.set("sort", sort);
|
|
1224
|
-
if (params?.limit !== void 0)
|
|
1224
|
+
if (params?.limit !== void 0)
|
|
1225
|
+
urlParams.set("limit", String(params.limit));
|
|
1225
1226
|
if (params?.page !== void 0) urlParams.set("page", String(params.page));
|
|
1226
1227
|
if (params?.categoryId !== void 0) {
|
|
1227
1228
|
urlParams.set("where[categories][in]", params.categoryId);
|
|
@@ -1229,7 +1230,7 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1229
1230
|
if (params?.tagId !== void 0) {
|
|
1230
1231
|
urlParams.set("where[tags][in]", params.tagId);
|
|
1231
1232
|
}
|
|
1232
|
-
return `/api/posts?${urlParams.toString()}`;
|
|
1233
|
+
return `/api/posts/public?${urlParams.toString()}`;
|
|
1233
1234
|
}
|
|
1234
1235
|
buildCommentsListQuery(params) {
|
|
1235
1236
|
const urlParams = new URLSearchParams();
|
|
@@ -1249,7 +1250,7 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1249
1250
|
}
|
|
1250
1251
|
if (params.limit !== void 0) urlParams.set("limit", String(params.limit));
|
|
1251
1252
|
if (params.page !== void 0) urlParams.set("page", String(params.page));
|
|
1252
|
-
return `/api/comments?${urlParams.toString()}`;
|
|
1253
|
+
return `/api/comments/public?${urlParams.toString()}`;
|
|
1253
1254
|
}
|
|
1254
1255
|
async execute(endpoint, method, body) {
|
|
1255
1256
|
return this.request(endpoint, { method, body });
|
|
@@ -1259,7 +1260,11 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1259
1260
|
return unwrapPayloadDoc(response);
|
|
1260
1261
|
}
|
|
1261
1262
|
createPost(params) {
|
|
1262
|
-
return this.executeDoc(
|
|
1263
|
+
return this.executeDoc(
|
|
1264
|
+
"/api/posts",
|
|
1265
|
+
"POST",
|
|
1266
|
+
params
|
|
1267
|
+
);
|
|
1263
1268
|
}
|
|
1264
1269
|
/**
|
|
1265
1270
|
* Public post feed. Server applies the same visibility contract as
|
|
@@ -1316,7 +1321,11 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1316
1321
|
if (parentId !== void 0) {
|
|
1317
1322
|
body.parent = parentId;
|
|
1318
1323
|
}
|
|
1319
|
-
return this.executeDoc(
|
|
1324
|
+
return this.executeDoc(
|
|
1325
|
+
"/api/comments",
|
|
1326
|
+
"POST",
|
|
1327
|
+
body
|
|
1328
|
+
);
|
|
1320
1329
|
}
|
|
1321
1330
|
/**
|
|
1322
1331
|
* List comments for a post.
|
|
@@ -1385,10 +1394,14 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1385
1394
|
400
|
|
1386
1395
|
);
|
|
1387
1396
|
}
|
|
1388
|
-
return this.executeDoc(
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1397
|
+
return this.executeDoc(
|
|
1398
|
+
"/api/reactions",
|
|
1399
|
+
"POST",
|
|
1400
|
+
{
|
|
1401
|
+
post: postId,
|
|
1402
|
+
type: reactionType
|
|
1403
|
+
}
|
|
1404
|
+
);
|
|
1392
1405
|
}
|
|
1393
1406
|
removeReaction(params) {
|
|
1394
1407
|
const { postId, type } = params;
|
|
@@ -1407,10 +1420,14 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1407
1420
|
400
|
|
1408
1421
|
);
|
|
1409
1422
|
}
|
|
1410
|
-
return this.executeDoc(
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1423
|
+
return this.executeDoc(
|
|
1424
|
+
"/api/reactions",
|
|
1425
|
+
"POST",
|
|
1426
|
+
{
|
|
1427
|
+
comment: commentId,
|
|
1428
|
+
type: reactionType
|
|
1429
|
+
}
|
|
1430
|
+
);
|
|
1414
1431
|
}
|
|
1415
1432
|
removeCommentReaction(params) {
|
|
1416
1433
|
const { commentId, type } = params;
|
|
@@ -1439,9 +1456,13 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1439
1456
|
}
|
|
1440
1457
|
// Bookmarks
|
|
1441
1458
|
addBookmark(params) {
|
|
1442
|
-
return this.executeDoc(
|
|
1443
|
-
|
|
1444
|
-
|
|
1459
|
+
return this.executeDoc(
|
|
1460
|
+
"/api/bookmarks",
|
|
1461
|
+
"POST",
|
|
1462
|
+
{
|
|
1463
|
+
post: params.postId
|
|
1464
|
+
}
|
|
1465
|
+
);
|
|
1445
1466
|
}
|
|
1446
1467
|
removeBookmark(params) {
|
|
1447
1468
|
return this.execute(
|
|
@@ -1457,10 +1478,7 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1457
1478
|
}
|
|
1458
1479
|
// Profiles
|
|
1459
1480
|
listProfileLists(params) {
|
|
1460
|
-
return this.execute(
|
|
1461
|
-
`/api/customer-profile-lists${this.buildQuery(params)}`,
|
|
1462
|
-
"GET"
|
|
1463
|
-
);
|
|
1481
|
+
return this.execute(`/api/customer-profile-lists${this.buildQuery(params)}`, "GET");
|
|
1464
1482
|
}
|
|
1465
1483
|
async getProfileList(params) {
|
|
1466
1484
|
const query = "slug" in params ? `?where[slug][equals]=${encodeURIComponent(params.slug)}&limit=1` : `?where[id][equals]=${encodeURIComponent(params.id)}&limit=1`;
|
|
@@ -1542,7 +1560,10 @@ var CartApi = class extends CustomerScopedApi {
|
|
|
1542
1560
|
return this.request(endpoint, { method, body });
|
|
1543
1561
|
}
|
|
1544
1562
|
getCart(cartId) {
|
|
1545
|
-
return this.execute(
|
|
1563
|
+
return this.execute(
|
|
1564
|
+
`/api/carts/${cartId}?depth=0&joins=false`,
|
|
1565
|
+
"GET"
|
|
1566
|
+
);
|
|
1546
1567
|
}
|
|
1547
1568
|
addItem(params) {
|
|
1548
1569
|
return this.execute("/api/carts/add-item", "POST", params);
|