@01.software/sdk 0.69.0 → 0.70.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 +39 -0
- package/README.md +26 -7
- package/dist/client.cjs +35 -7
- 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 +35 -7
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-C2VGBnCC.d.ts → collection-client-B1FSJ24_.d.ts} +5 -5
- package/dist/{collection-client-DvWkDxSM.d.cts → collection-client-BHLStm1K.d.cts} +5 -5
- package/dist/{const-AtPEgg__.d.cts → const-BfQfV-rr.d.cts} +1 -1
- package/dist/{const-DR96Chal.d.ts → const-ty8u0TDI.d.ts} +1 -1
- package/dist/embedded-admin/server.cjs +5 -0
- package/dist/embedded-admin/server.cjs.map +1 -1
- package/dist/embedded-admin/server.js +5 -0
- package/dist/embedded-admin/server.js.map +1 -1
- package/dist/embedded-admin.cjs +5 -0
- package/dist/embedded-admin.cjs.map +1 -1
- package/dist/embedded-admin.js +5 -0
- package/dist/embedded-admin.js.map +1 -1
- package/dist/errors.cjs +5 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +3 -3
- package/dist/errors.d.ts +3 -3
- package/dist/errors.js +5 -0
- package/dist/errors.js.map +1 -1
- package/dist/{index-Ce11c_Oh.d.cts → index-CX6si6YC.d.cts} +3 -3
- package/dist/{index-D8fmTrZk.d.ts → index-DnKgjPGM.d.ts} +3 -3
- package/dist/index.cjs +35 -7
- 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 +35 -7
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-rhnw3rR8.d.cts → payload-types-DTAaWKrp.d.cts} +18 -4
- package/dist/{payload-types-rhnw3rR8.d.ts → payload-types-DTAaWKrp.d.ts} +18 -4
- package/dist/query.cjs +14 -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 +14 -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 +35 -7
- 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 +35 -7
- package/dist/server.js.map +1 -1
- package/dist/storefront-cache.cjs +5 -0
- package/dist/storefront-cache.cjs.map +1 -1
- package/dist/storefront-cache.js +5 -0
- package/dist/storefront-cache.js.map +1 -1
- package/dist/{types-B99utaKU.d.cts → types-Bzgf4mTo.d.cts} +3 -3
- package/dist/{types-CHK8VIPa.d.ts → types-CpSiyJud.d.cts} +8 -2
- package/dist/{types-BR0D4AaW.d.cts → types-DX8Z44yQ.d.ts} +8 -2
- package/dist/{types-L0xmn_iT.d.ts → types-DdlhpNVv.d.ts} +3 -3
- 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/realtime.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
3
|
+
import { P as PublicCollection } from './const-BfQfV-rr.cjs';
|
|
4
|
+
import './payload-types-DTAaWKrp.cjs';
|
|
5
5
|
|
|
6
6
|
interface UseRealtimeQueryOptions {
|
|
7
7
|
/** Filter events to specific collections. Empty/undefined = all collections. */
|
package/dist/realtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
3
|
+
import { P as PublicCollection } from './const-ty8u0TDI.js';
|
|
4
|
+
import './payload-types-DTAaWKrp.js';
|
|
5
5
|
|
|
6
6
|
interface UseRealtimeQueryOptions {
|
|
7
7
|
/** Filter events to specific collections. Empty/undefined = all collections. */
|
package/dist/server.cjs
CHANGED
|
@@ -167,6 +167,11 @@ var COMMERCE_ERROR_CODES = [
|
|
|
167
167
|
"checkout_reservation_release_requires_transaction",
|
|
168
168
|
"admission_metadata_invalid",
|
|
169
169
|
"admission_metadata_required",
|
|
170
|
+
"admission_not_eligible",
|
|
171
|
+
"admission_eligibility_unavailable",
|
|
172
|
+
"admission_authority_unavailable",
|
|
173
|
+
"admission_customer_binding_required",
|
|
174
|
+
"admission_eligibility_unproven",
|
|
170
175
|
"capacity_exceeded",
|
|
171
176
|
"admission_required",
|
|
172
177
|
"occurrence_lock_unavailable",
|
|
@@ -836,6 +841,7 @@ async function httpFetch(url, options) {
|
|
|
836
841
|
let lastError;
|
|
837
842
|
let hasRetried401 = false;
|
|
838
843
|
for (let attempt = 0; attempt <= retryConfig.maxRetries; attempt++) {
|
|
844
|
+
let terminalResponseError;
|
|
839
845
|
try {
|
|
840
846
|
const headers = new Headers(requestInit.headers);
|
|
841
847
|
if (publishableKey) {
|
|
@@ -904,8 +910,9 @@ async function httpFetch(url, options) {
|
|
|
904
910
|
hasRetried401 = true;
|
|
905
911
|
try {
|
|
906
912
|
const newToken = await onUnauthorized();
|
|
907
|
-
if (newToken) {
|
|
913
|
+
if (newToken && SAFE_METHODS.includes((requestInit.method || "GET").toUpperCase())) {
|
|
908
914
|
authToken = newToken;
|
|
915
|
+
attempt--;
|
|
909
916
|
continue;
|
|
910
917
|
}
|
|
911
918
|
} catch {
|
|
@@ -938,11 +945,15 @@ async function httpFetch(url, options) {
|
|
|
938
945
|
await delay(retryDelay);
|
|
939
946
|
continue;
|
|
940
947
|
}
|
|
948
|
+
terminalResponseError = error;
|
|
941
949
|
throw error;
|
|
942
950
|
}
|
|
943
951
|
return response;
|
|
944
952
|
} catch (error) {
|
|
945
953
|
debugLog(debug, "error", url, error);
|
|
954
|
+
if (terminalResponseError && error === terminalResponseError) {
|
|
955
|
+
throw error;
|
|
956
|
+
}
|
|
946
957
|
const method2 = (requestInit.method || "GET").toUpperCase();
|
|
947
958
|
const isSafe = SAFE_METHODS.includes(method2);
|
|
948
959
|
if (error instanceof Error && error.name === "AbortError") {
|
|
@@ -1354,6 +1365,15 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
|
1354
1365
|
};
|
|
1355
1366
|
var EVENTS_ENDPOINT_OPERATIONS = {
|
|
1356
1367
|
registrations: {
|
|
1368
|
+
register: operation("event-registrations", "post", "/register"),
|
|
1369
|
+
guestLookup: operation("event-registrations", "post", "/guest/lookup"),
|
|
1370
|
+
guestLookupByUrl: operation("event-registrations", "get", "/guest/:token"),
|
|
1371
|
+
guestCancel: operation("event-registrations", "post", "/guest/cancel"),
|
|
1372
|
+
guestCancelByUrl: operation(
|
|
1373
|
+
"event-registrations",
|
|
1374
|
+
"post",
|
|
1375
|
+
"/guest/:token/cancel"
|
|
1376
|
+
),
|
|
1357
1377
|
listMine: operation("event-registrations", "get", "/my")
|
|
1358
1378
|
},
|
|
1359
1379
|
events: {
|
|
@@ -6290,24 +6310,32 @@ var EventsClient = class {
|
|
|
6290
6310
|
}
|
|
6291
6311
|
register(params) {
|
|
6292
6312
|
return this.execute(
|
|
6293
|
-
|
|
6294
|
-
|
|
6313
|
+
resolveOperationPath(EVENTS_ENDPOINT_OPERATIONS.registrations.register),
|
|
6314
|
+
resolveOperationMethod(EVENTS_ENDPOINT_OPERATIONS.registrations.register),
|
|
6295
6315
|
buildRegistrationRequestBody(params),
|
|
6296
6316
|
{ useCustomerAuth: true }
|
|
6297
6317
|
);
|
|
6298
6318
|
}
|
|
6299
6319
|
getGuestRegistration(token) {
|
|
6300
6320
|
return this.execute(
|
|
6301
|
-
|
|
6302
|
-
|
|
6321
|
+
resolveOperationPath(
|
|
6322
|
+
EVENTS_ENDPOINT_OPERATIONS.registrations.guestLookup
|
|
6323
|
+
),
|
|
6324
|
+
resolveOperationMethod(
|
|
6325
|
+
EVENTS_ENDPOINT_OPERATIONS.registrations.guestLookup
|
|
6326
|
+
),
|
|
6303
6327
|
{ token },
|
|
6304
6328
|
{ useCustomerAuth: false }
|
|
6305
6329
|
);
|
|
6306
6330
|
}
|
|
6307
6331
|
cancelGuestRegistration(token, params = {}) {
|
|
6308
6332
|
return this.execute(
|
|
6309
|
-
|
|
6310
|
-
|
|
6333
|
+
resolveOperationPath(
|
|
6334
|
+
EVENTS_ENDPOINT_OPERATIONS.registrations.guestCancel
|
|
6335
|
+
),
|
|
6336
|
+
resolveOperationMethod(
|
|
6337
|
+
EVENTS_ENDPOINT_OPERATIONS.registrations.guestCancel
|
|
6338
|
+
),
|
|
6311
6339
|
buildGuestCancelRequestBody(token, params),
|
|
6312
6340
|
{ useCustomerAuth: false }
|
|
6313
6341
|
);
|