@01.software/sdk 0.73.1 → 0.75.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 +75 -0
- package/README.md +109 -4
- package/dist/client.cjs +59 -14
- 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 +59 -14
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-BH4dIZ6c.d.cts → collection-client-BNC6tUdK.d.cts} +3 -4
- package/dist/{collection-client-lLAl3xCZ.d.ts → collection-client-CNkBMUHj.d.ts} +3 -4
- package/dist/collection-documents-Bl0AF0m0.d.cts +5486 -0
- package/dist/collection-documents-Bl0AF0m0.d.ts +5486 -0
- package/dist/{const-CCvoknRY.d.ts → const-CcOT0taO.d.cts} +1 -3
- package/dist/{const-BS2EaIp4.d.cts → const-CcOT0taO.d.ts} +1 -3
- package/dist/{index-DVqNpmsc.d.ts → index-CQsJvMCN.d.ts} +2 -3
- package/dist/{index-CHdrzJ8-.d.cts → index-CfxkqaY9.d.cts} +2 -3
- package/dist/index.cjs +60 -14
- 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 +60 -14
- package/dist/index.js.map +1 -1
- package/dist/query.cjs +16 -1
- 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 +16 -1
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +1 -2
- package/dist/realtime.d.ts +1 -2
- package/dist/server.cjs +50 -11
- 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 +50 -11
- package/dist/server.js.map +1 -1
- package/dist/{types-lbzbJSZh.d.ts → types-Btxz6NVi.d.ts} +161 -31
- package/dist/types-CQw4HXky.d.ts +151 -0
- package/dist/{types-Chwgg4CQ.d.cts → types-DMwRdJ-4.d.cts} +161 -31
- package/dist/types-Jr4xTiGs.d.cts +151 -0
- package/dist/ui/form.cjs.map +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/video.cjs.map +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/ui/video.js.map +1 -1
- package/dist/webhook.d.cts +7 -5
- package/dist/webhook.d.ts +7 -5
- package/package.json +1 -1
- package/dist/payload-types-PXkmefhZ.d.cts +0 -14027
- package/dist/payload-types-PXkmefhZ.d.ts +0 -14027
- package/dist/types-CQRsG6sA.d.ts +0 -53
- package/dist/types-CyMz0Kzc.d.cts +0 -53
package/dist/realtime.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { R as RealtimeEvent } from './realtime-D7HtUpqt.cjs';
|
|
2
2
|
export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
|
|
3
|
-
import { P as PublicCollection } from './const-
|
|
4
|
-
import './payload-types-PXkmefhZ.cjs';
|
|
3
|
+
import { P as PublicCollection } from './const-CcOT0taO.cjs';
|
|
5
4
|
|
|
6
5
|
interface UseRealtimeQueryOptions {
|
|
7
6
|
/** Filter events to specific collections. Empty/undefined = all collections. */
|
package/dist/realtime.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { R as RealtimeEvent } from './realtime-D7HtUpqt.js';
|
|
2
2
|
export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.js';
|
|
3
|
-
import { P as PublicCollection } from './const-
|
|
4
|
-
import './payload-types-PXkmefhZ.js';
|
|
3
|
+
import { P as PublicCollection } from './const-CcOT0taO.js';
|
|
5
4
|
|
|
6
5
|
interface UseRealtimeQueryOptions {
|
|
7
6
|
/** Filter events to specific collections. Empty/undefined = all collections. */
|
package/dist/server.cjs
CHANGED
|
@@ -1394,16 +1394,28 @@ var CUSTOMER_AUTH_ENDPOINT_OPERATIONS = {
|
|
|
1394
1394
|
resetPassword: operation("customers", "post", "/reset-password"),
|
|
1395
1395
|
changePassword: operation("customers", "post", "/change-password"),
|
|
1396
1396
|
revokeRefresh: operation("customers", "post", "/revoke-refresh"),
|
|
1397
|
-
withdraw: operation("customers", "post", "/withdraw")
|
|
1397
|
+
withdraw: operation("customers", "post", "/withdraw"),
|
|
1398
|
+
requestWithdrawalCode: operation("customers", "post", "/withdraw/email-code")
|
|
1398
1399
|
};
|
|
1399
1400
|
var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
1400
1401
|
show: operation("tenants", "get", "/embedded-admin-app"),
|
|
1401
1402
|
configure: operation("tenants", "patch", "/embedded-admin-app"),
|
|
1402
1403
|
disable: operation("tenants", "delete", "/embedded-admin-app")
|
|
1403
1404
|
};
|
|
1405
|
+
var FIELD_CONFIG_ENDPOINT_OPERATIONS = {
|
|
1406
|
+
list: operation("field-configs", "get", "/list"),
|
|
1407
|
+
save: operation("field-configs", "post", "/save")
|
|
1408
|
+
};
|
|
1404
1409
|
var EVENTS_ENDPOINT_OPERATIONS = {
|
|
1405
1410
|
registrations: {
|
|
1406
1411
|
register: operation("event-registrations", "post", "/register"),
|
|
1412
|
+
requestEmailVerification: operation(
|
|
1413
|
+
"event-registrations",
|
|
1414
|
+
"post",
|
|
1415
|
+
"/request-email-verification"
|
|
1416
|
+
),
|
|
1417
|
+
emailCancelPage: operation("event-registrations", "get", "/email-cancel"),
|
|
1418
|
+
emailCancel: operation("event-registrations", "post", "/email-cancel"),
|
|
1407
1419
|
guestLookup: operation("event-registrations", "post", "/guest/lookup"),
|
|
1408
1420
|
guestLookupByUrl: operation("event-registrations", "get", "/guest/:token"),
|
|
1409
1421
|
guestCancel: operation("event-registrations", "post", "/guest/cancel"),
|
|
@@ -1442,6 +1454,9 @@ var VIDEO_ENDPOINT_OPERATIONS = {
|
|
|
1442
1454
|
function resolveOperationTemplate(descriptor) {
|
|
1443
1455
|
return descriptor.collection ? `/api/${descriptor.collection}${descriptor.path}` : `/api${descriptor.path}`;
|
|
1444
1456
|
}
|
|
1457
|
+
var PAYMENT_DIAGNOSTIC_ENDPOINT_OPERATIONS = {
|
|
1458
|
+
diagnose: operation("tenants", "get", "/payment-diagnostics")
|
|
1459
|
+
};
|
|
1445
1460
|
function resolveOperationPath(descriptor, options) {
|
|
1446
1461
|
const path = resolveOperationTemplate(descriptor).replace(
|
|
1447
1462
|
/:([A-Za-z][A-Za-z0-9_]*)/g,
|
|
@@ -5578,10 +5593,13 @@ function buildProductHref(product, group, options = {}) {
|
|
|
5578
5593
|
return params.size > 0 ? `${path}?${params.toString()}` : path;
|
|
5579
5594
|
}
|
|
5580
5595
|
function compareVariantOrder(a, b) {
|
|
5581
|
-
const aOrder =
|
|
5582
|
-
const bOrder =
|
|
5583
|
-
if (
|
|
5584
|
-
|
|
5596
|
+
const aOrder = a._order || null;
|
|
5597
|
+
const bOrder = b._order || null;
|
|
5598
|
+
if (aOrder !== bOrder) {
|
|
5599
|
+
if (aOrder === null) return 1;
|
|
5600
|
+
if (bOrder === null) return -1;
|
|
5601
|
+
const byOrder = compareOrdinal(aOrder, bOrder);
|
|
5602
|
+
if (byOrder !== 0) return byOrder;
|
|
5585
5603
|
}
|
|
5586
5604
|
const aId = String(getRelationID(a.id) ?? "");
|
|
5587
5605
|
const bId = String(getRelationID(b.id) ?? "");
|
|
@@ -5832,11 +5850,7 @@ function buildProductListingPageWhere(params) {
|
|
|
5832
5850
|
const search = params.search?.trim();
|
|
5833
5851
|
if (search) {
|
|
5834
5852
|
clauses.push({
|
|
5835
|
-
or: [
|
|
5836
|
-
{ title: { like: search } },
|
|
5837
|
-
{ slug: { like: search } },
|
|
5838
|
-
{ handle: { like: search } }
|
|
5839
|
-
]
|
|
5853
|
+
or: [{ title: { like: search } }, { slug: { like: search } }]
|
|
5840
5854
|
});
|
|
5841
5855
|
}
|
|
5842
5856
|
const filters = params.filters;
|
|
@@ -6177,6 +6191,12 @@ var OrderApi = class extends BaseApi {
|
|
|
6177
6191
|
idempotencyRequestOptions(params.idempotencyKey)
|
|
6178
6192
|
);
|
|
6179
6193
|
}
|
|
6194
|
+
/**
|
|
6195
|
+
* Creates a shipment from an in-progress fulfillment order.
|
|
6196
|
+
* Call `prepareFulfillmentOrder` for the same orderNumber first; payment alone
|
|
6197
|
+
* does not prepare the fulfillment order. This method does not prepare it
|
|
6198
|
+
* automatically and returns HTTP 400 `not_fulfillable` when none is in progress.
|
|
6199
|
+
*/
|
|
6180
6200
|
createFulfillment(params) {
|
|
6181
6201
|
const { body, idempotencyKey } = splitIdempotencyKey(params);
|
|
6182
6202
|
return this.requestEndpoint(
|
|
@@ -6185,6 +6205,12 @@ var OrderApi = class extends BaseApi {
|
|
|
6185
6205
|
idempotencyRequestOptions(idempotencyKey)
|
|
6186
6206
|
);
|
|
6187
6207
|
}
|
|
6208
|
+
/**
|
|
6209
|
+
* Moves a paid order's open fulfillment orders to in_progress.
|
|
6210
|
+
* Call this before `createFulfillment` for the same orderNumber: shipment
|
|
6211
|
+
* creation requires an in-progress fulfillment order. Preparation does not
|
|
6212
|
+
* require carrier or tracking information.
|
|
6213
|
+
*/
|
|
6188
6214
|
prepareFulfillmentOrder(params) {
|
|
6189
6215
|
return this.requestEndpoint(
|
|
6190
6216
|
COMMERCE_ENDPOINTS.fulfillmentOrders.prepare,
|
|
@@ -6708,6 +6734,15 @@ var EventsClient = class {
|
|
|
6708
6734
|
{ useCustomerAuth: true }
|
|
6709
6735
|
);
|
|
6710
6736
|
}
|
|
6737
|
+
requestRegistrationEmailVerification(params) {
|
|
6738
|
+
const operation2 = EVENTS_ENDPOINT_OPERATIONS.registrations.requestEmailVerification;
|
|
6739
|
+
return this.execute(
|
|
6740
|
+
resolveOperationPath(operation2),
|
|
6741
|
+
resolveOperationMethod(operation2),
|
|
6742
|
+
buildRegistrationRequestBody(params),
|
|
6743
|
+
{ useCustomerAuth: true, noStore: true }
|
|
6744
|
+
);
|
|
6745
|
+
}
|
|
6711
6746
|
getGuestRegistration(token) {
|
|
6712
6747
|
return this.execute(
|
|
6713
6748
|
resolveOperationPath(
|
|
@@ -6760,7 +6795,10 @@ function buildRegistrationRequestBody(params) {
|
|
|
6760
6795
|
occurrence: params.occurrence,
|
|
6761
6796
|
...params.quantity !== void 0 && { quantity: params.quantity },
|
|
6762
6797
|
...params.attendee !== void 0 && { attendee: params.attendee },
|
|
6763
|
-
...params.answers !== void 0 && { answers: params.answers }
|
|
6798
|
+
...params.answers !== void 0 && { answers: params.answers },
|
|
6799
|
+
...params.emailVerification !== void 0 && {
|
|
6800
|
+
emailVerification: params.emailVerification
|
|
6801
|
+
}
|
|
6764
6802
|
};
|
|
6765
6803
|
}
|
|
6766
6804
|
function buildGuestCancelRequestBody(token, params) {
|
|
@@ -7451,6 +7489,7 @@ var ServerClient = class _ServerClient {
|
|
|
7451
7489
|
getRange: events.getRange.bind(events),
|
|
7452
7490
|
getAdmissionAvailability: events.getAdmissionAvailability.bind(events),
|
|
7453
7491
|
register: events.register.bind(events),
|
|
7492
|
+
requestRegistrationEmailVerification: events.requestRegistrationEmailVerification.bind(events),
|
|
7454
7493
|
getGuestRegistration: events.getGuestRegistration.bind(events),
|
|
7455
7494
|
cancelGuestRegistration: events.cancelGuestRegistration.bind(events)
|
|
7456
7495
|
};
|