@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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './payload-types-
|
|
1
|
+
import { dm as DebugConfig, dt as RetryConfig, df as ApiQueryOptions, dq as PayloadFindResponse, dr as PayloadMutationResponse, dH as ApiDocumentWriteOptions, dI as ApiWriteOptions, dJ as ApiDeleteOptions, dK as PublicReadQueryOptions } from './types-evAvqRBj.cjs';
|
|
2
|
+
import './payload-types-zukuL1s_.cjs';
|
|
3
3
|
import { GenerateMetadataOptions, Metadata } from './metadata.cjs';
|
|
4
|
-
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-
|
|
5
|
-
import { C as CollectionType } from './types-
|
|
4
|
+
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-DWTSgCkn.cjs';
|
|
5
|
+
import { C as CollectionType } from './types-BI7aowdu.cjs';
|
|
6
6
|
|
|
7
7
|
interface FetchOptions extends RequestInit {
|
|
8
8
|
apiUrl?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './payload-types-
|
|
1
|
+
import { dm as DebugConfig, dt as RetryConfig, df as ApiQueryOptions, dq as PayloadFindResponse, dr as PayloadMutationResponse, dH as ApiDocumentWriteOptions, dI as ApiWriteOptions, dJ as ApiDeleteOptions, dK as PublicReadQueryOptions } from './types-BsJokT6P.js';
|
|
2
|
+
import './payload-types-zukuL1s_.js';
|
|
3
3
|
import { GenerateMetadataOptions, Metadata } from './metadata.js';
|
|
4
|
-
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-
|
|
5
|
-
import { C as CollectionType } from './types-
|
|
4
|
+
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-CkY2zB6J.js';
|
|
5
|
+
import { C as CollectionType } from './types-SsS04wGw.js';
|
|
6
6
|
|
|
7
7
|
interface FetchOptions extends RequestInit {
|
|
8
8
|
apiUrl?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Collection } from './const-
|
|
2
|
-
import { C as CollectionType } from './types-
|
|
3
|
-
import './payload-types-
|
|
1
|
+
import { C as Collection } from './const-CkY2zB6J.js';
|
|
2
|
+
import { C as CollectionType } from './types-SsS04wGw.js';
|
|
3
|
+
import './payload-types-zukuL1s_.js';
|
|
4
4
|
|
|
5
5
|
type WebhookOperation = string;
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Collection } from './const-
|
|
2
|
-
import { C as CollectionType } from './types-
|
|
3
|
-
import './payload-types-
|
|
1
|
+
import { C as Collection } from './const-DWTSgCkn.cjs';
|
|
2
|
+
import { C as CollectionType } from './types-BI7aowdu.cjs';
|
|
3
|
+
import './payload-types-zukuL1s_.cjs';
|
|
4
4
|
|
|
5
5
|
type WebhookOperation = string;
|
|
6
6
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -996,7 +996,7 @@ async function httpFetch(url, options) {
|
|
|
996
996
|
);
|
|
997
997
|
const usageError = attachRequestId(
|
|
998
998
|
createUsageLimitError(
|
|
999
|
-
`Monthly API usage limit exceeded (${current.toLocaleString()}/${limit.toLocaleString()})`,
|
|
999
|
+
`Monthly API usage limit exceeded (${current.toLocaleString("en-US")}/${limit.toLocaleString("en-US")})`,
|
|
1000
1000
|
{ limit, current, remaining },
|
|
1001
1001
|
{
|
|
1002
1002
|
url,
|
|
@@ -1486,6 +1486,10 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
|
1486
1486
|
configure: operation("tenants", "patch", "/embedded-admin-app"),
|
|
1487
1487
|
disable: operation("tenants", "delete", "/embedded-admin-app")
|
|
1488
1488
|
};
|
|
1489
|
+
var FIELD_CONFIG_ENDPOINT_OPERATIONS = {
|
|
1490
|
+
list: operation("field-configs", "get", "/list"),
|
|
1491
|
+
save: operation("field-configs", "post", "/save")
|
|
1492
|
+
};
|
|
1489
1493
|
var EVENTS_ENDPOINT_OPERATIONS = {
|
|
1490
1494
|
registrations: {
|
|
1491
1495
|
register: operation("event-registrations", "post", "/register"),
|
|
@@ -5768,8 +5772,13 @@ function getRelationID(value) {
|
|
|
5768
5772
|
}
|
|
5769
5773
|
return void 0;
|
|
5770
5774
|
}
|
|
5775
|
+
function compareOrdinal(left, right) {
|
|
5776
|
+
if (left < right) return -1;
|
|
5777
|
+
if (left > right) return 1;
|
|
5778
|
+
return 0;
|
|
5779
|
+
}
|
|
5771
5780
|
function compareOrder(left, right) {
|
|
5772
|
-
return (left ?? ""
|
|
5781
|
+
return compareOrdinal(left ?? "", right ?? "");
|
|
5773
5782
|
}
|
|
5774
5783
|
function isProductOptionValueDoc(value) {
|
|
5775
5784
|
return typeof value === "object" && value !== null && "id" in value && ("value" in value || "slug" in value);
|
|
@@ -6974,14 +6983,17 @@ function buildProductHref(product, group, options = {}) {
|
|
|
6974
6983
|
return params.size > 0 ? `${path}?${params.toString()}` : path;
|
|
6975
6984
|
}
|
|
6976
6985
|
function compareVariantOrder(a, b) {
|
|
6977
|
-
const aOrder =
|
|
6978
|
-
const bOrder =
|
|
6979
|
-
if (
|
|
6980
|
-
|
|
6986
|
+
const aOrder = a._order || null;
|
|
6987
|
+
const bOrder = b._order || null;
|
|
6988
|
+
if (aOrder !== bOrder) {
|
|
6989
|
+
if (aOrder === null) return 1;
|
|
6990
|
+
if (bOrder === null) return -1;
|
|
6991
|
+
const byOrder = compareOrdinal(aOrder, bOrder);
|
|
6992
|
+
if (byOrder !== 0) return byOrder;
|
|
6981
6993
|
}
|
|
6982
6994
|
const aId = String(getRelationID(a.id) ?? "");
|
|
6983
6995
|
const bId = String(getRelationID(b.id) ?? "");
|
|
6984
|
-
return aId
|
|
6996
|
+
return compareOrdinal(aId, bId);
|
|
6985
6997
|
}
|
|
6986
6998
|
function getVariantAvailableForSale(variant) {
|
|
6987
6999
|
if (variant.isActive === false) return false;
|
|
@@ -7291,11 +7303,7 @@ function buildProductListingPageWhere(params) {
|
|
|
7291
7303
|
const search = params.search?.trim();
|
|
7292
7304
|
if (search) {
|
|
7293
7305
|
clauses.push({
|
|
7294
|
-
or: [
|
|
7295
|
-
{ title: { like: search } },
|
|
7296
|
-
{ slug: { like: search } },
|
|
7297
|
-
{ handle: { like: search } }
|
|
7298
|
-
]
|
|
7306
|
+
or: [{ title: { like: search } }, { slug: { like: search } }]
|
|
7299
7307
|
});
|
|
7300
7308
|
}
|
|
7301
7309
|
const filters = params.filters;
|
|
@@ -7657,6 +7665,8 @@ function buildRangeEndpoint(params) {
|
|
|
7657
7665
|
function buildAdmissionAvailabilityEndpoint(params) {
|
|
7658
7666
|
const urlParams = new URLSearchParams();
|
|
7659
7667
|
urlParams.set("occurrence", params.occurrence);
|
|
7668
|
+
const normalizedMarket2 = params.market?.trim();
|
|
7669
|
+
if (normalizedMarket2) urlParams.set("market", normalizedMarket2);
|
|
7660
7670
|
return resolveOperationPath(
|
|
7661
7671
|
EVENTS_ENDPOINT_OPERATIONS.occurrences.admissionAvailability,
|
|
7662
7672
|
{ query: urlParams }
|