@01.software/sdk 0.48.0 → 0.49.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 +27 -0
- package/README.md +64 -7
- package/dist/client.cjs +189 -26
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +7 -6
- package/dist/client.d.ts +7 -6
- package/dist/client.js +189 -26
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-D3ExJU-7.d.ts → collection-client-DnDt6EQz.d.ts} +4 -4
- package/dist/{collection-client-CBup9yOx.d.cts → collection-client-XfGLPuTf.d.cts} +4 -4
- package/dist/{const-BXEi1Kix.d.cts → const-CBba4lDo.d.cts} +1 -1
- package/dist/{const-k9gHylYa.d.ts → const-DCNV5Kq7.d.ts} +1 -1
- package/dist/errors.cjs +63 -15
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +10 -1
- package/dist/errors.d.ts +10 -1
- package/dist/errors.js +63 -15
- package/dist/errors.js.map +1 -1
- package/dist/{index-BCM9CTL7.d.cts → index-CbKyoEzy.d.cts} +3 -3
- package/dist/{index-CHGGkcLj.d.ts → index-DUuIqUS8.d.ts} +3 -3
- package/dist/index.cjs +152 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +152 -48
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-B6AZQcB7.d.cts → payload-types-MKbx5MuJ.d.cts} +133 -3
- package/dist/{payload-types-B6AZQcB7.d.ts → payload-types-MKbx5MuJ.d.ts} +133 -3
- package/dist/query.cjs +21 -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 +21 -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 +189 -26
- 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 +189 -26
- package/dist/server.js.map +1 -1
- package/dist/storefront-cache.cjs +21 -0
- package/dist/storefront-cache.cjs.map +1 -1
- package/dist/storefront-cache.js +21 -0
- package/dist/storefront-cache.js.map +1 -1
- package/dist/{types-DbA5V3mt.d.ts → types-1UeOk1Uy.d.cts} +31 -6
- package/dist/{types-8us-_C-Q.d.cts → types-BKr_2avj.d.cts} +2 -2
- package/dist/{types-CM2je9Kw.d.cts → types-Du4s5anw.d.ts} +31 -6
- package/dist/{types-ByD2zii1.d.ts → types-L_nh-ED7.d.ts} +2 -2
- 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 +5 -4
package/dist/query.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import { i as ApiQueryOptions, P as PayloadFindResponse, bX as PublicReadQueryOptions, L as PayloadMutationResponse, bY as CustomerAuth, bZ as CustomerProfile, b_ as CustomerAuthResponse, b$ as CustomerLoginData, c0 as CustomerRegisterResponse, c1 as CustomerRegisterData, c2 as CustomerRefreshResponse, c3 as UpdateProfileData, c4 as ProductListingPageParams, c5 as ProductListingPageBaseParams, c6 as ProductDetailParams, c7 as ProductDetailCatalogResult, c8 as ProductListingPageCatalogParams, c9 as ProductListingPageResult, ca as ProductListingGroupsCatalogItem, cb as ProductListingPageFullParams, cc as ProductListingGroupsItem, al as RootClient, bD as RootServerClient } from './types-
|
|
4
|
-
import './payload-types-
|
|
5
|
-
import { S as ServerCollection, P as PublicCollection } from './const-
|
|
6
|
-
import { C as CollectionClient } from './collection-client-
|
|
7
|
-
import { C as CollectionType } from './types-
|
|
3
|
+
import { i as ApiQueryOptions, P as PayloadFindResponse, bX as PublicReadQueryOptions, L as PayloadMutationResponse, bY as CustomerAuth, bZ as CustomerProfile, b_ as CustomerAuthResponse, b$ as CustomerLoginData, c0 as CustomerRegisterResponse, c1 as CustomerRegisterData, c2 as CustomerRefreshResponse, c3 as UpdateProfileData, c4 as ProductListingPageParams, c5 as ProductListingPageBaseParams, c6 as ProductDetailParams, c7 as ProductDetailCatalogResult, c8 as ProductListingPageCatalogParams, c9 as ProductListingPageResult, ca as ProductListingGroupsCatalogItem, cb as ProductListingPageFullParams, cc as ProductListingGroupsItem, al as RootClient, bD as RootServerClient } from './types-1UeOk1Uy.cjs';
|
|
4
|
+
import './payload-types-MKbx5MuJ.cjs';
|
|
5
|
+
import { S as ServerCollection, P as PublicCollection } from './const-CBba4lDo.cjs';
|
|
6
|
+
import { C as CollectionClient } from './collection-client-XfGLPuTf.cjs';
|
|
7
|
+
import { C as CollectionType } from './types-BKr_2avj.cjs';
|
|
8
8
|
import { SDKError } from './errors.cjs';
|
|
9
9
|
export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
|
|
10
10
|
import './metadata.cjs';
|
package/dist/query.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import { i as ApiQueryOptions, P as PayloadFindResponse, bX as PublicReadQueryOptions, L as PayloadMutationResponse, bY as CustomerAuth, bZ as CustomerProfile, b_ as CustomerAuthResponse, b$ as CustomerLoginData, c0 as CustomerRegisterResponse, c1 as CustomerRegisterData, c2 as CustomerRefreshResponse, c3 as UpdateProfileData, c4 as ProductListingPageParams, c5 as ProductListingPageBaseParams, c6 as ProductDetailParams, c7 as ProductDetailCatalogResult, c8 as ProductListingPageCatalogParams, c9 as ProductListingPageResult, ca as ProductListingGroupsCatalogItem, cb as ProductListingPageFullParams, cc as ProductListingGroupsItem, al as RootClient, bD as RootServerClient } from './types-
|
|
4
|
-
import './payload-types-
|
|
5
|
-
import { S as ServerCollection, P as PublicCollection } from './const-
|
|
6
|
-
import { C as CollectionClient } from './collection-client-
|
|
7
|
-
import { C as CollectionType } from './types-
|
|
3
|
+
import { i as ApiQueryOptions, P as PayloadFindResponse, bX as PublicReadQueryOptions, L as PayloadMutationResponse, bY as CustomerAuth, bZ as CustomerProfile, b_ as CustomerAuthResponse, b$ as CustomerLoginData, c0 as CustomerRegisterResponse, c1 as CustomerRegisterData, c2 as CustomerRefreshResponse, c3 as UpdateProfileData, c4 as ProductListingPageParams, c5 as ProductListingPageBaseParams, c6 as ProductDetailParams, c7 as ProductDetailCatalogResult, c8 as ProductListingPageCatalogParams, c9 as ProductListingPageResult, ca as ProductListingGroupsCatalogItem, cb as ProductListingPageFullParams, cc as ProductListingGroupsItem, al as RootClient, bD as RootServerClient } from './types-Du4s5anw.js';
|
|
4
|
+
import './payload-types-MKbx5MuJ.js';
|
|
5
|
+
import { S as ServerCollection, P as PublicCollection } from './const-DCNV5Kq7.js';
|
|
6
|
+
import { C as CollectionClient } from './collection-client-DnDt6EQz.js';
|
|
7
|
+
import { C as CollectionType } from './types-L_nh-ED7.js';
|
|
8
8
|
import { SDKError } from './errors.js';
|
|
9
9
|
export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
|
|
10
10
|
import './metadata.js';
|
package/dist/query.js
CHANGED
|
@@ -475,6 +475,24 @@ import {
|
|
|
475
475
|
} from "@tanstack/react-query";
|
|
476
476
|
|
|
477
477
|
// src/core/errors.ts
|
|
478
|
+
var SDK_ERROR_BRAND = /* @__PURE__ */ Symbol.for("@01.software/sdk/SDKError");
|
|
479
|
+
var SDK_ERROR_TYPE_BRAND = /* @__PURE__ */ Symbol.for("@01.software/sdk/SDKError.type");
|
|
480
|
+
function defineSDKErrorBrand(error) {
|
|
481
|
+
Object.defineProperty(error, SDK_ERROR_BRAND, {
|
|
482
|
+
value: true,
|
|
483
|
+
enumerable: false,
|
|
484
|
+
configurable: false,
|
|
485
|
+
writable: false
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
function defineSDKErrorType(error, type) {
|
|
489
|
+
Object.defineProperty(error, SDK_ERROR_TYPE_BRAND, {
|
|
490
|
+
value: type,
|
|
491
|
+
enumerable: false,
|
|
492
|
+
configurable: false,
|
|
493
|
+
writable: false
|
|
494
|
+
});
|
|
495
|
+
}
|
|
478
496
|
var SDKError = class extends Error {
|
|
479
497
|
constructor(code, message, status, details, userMessage, suggestion, requestId) {
|
|
480
498
|
super(message);
|
|
@@ -485,6 +503,7 @@ var SDKError = class extends Error {
|
|
|
485
503
|
this.userMessage = userMessage;
|
|
486
504
|
this.suggestion = suggestion;
|
|
487
505
|
this.requestId = requestId;
|
|
506
|
+
defineSDKErrorBrand(this);
|
|
488
507
|
if (Error.captureStackTrace) {
|
|
489
508
|
Error.captureStackTrace(this, new.target);
|
|
490
509
|
}
|
|
@@ -505,6 +524,7 @@ var SDKError = class extends Error {
|
|
|
505
524
|
...this.kind !== void 0 && { kind: this.kind },
|
|
506
525
|
...this.reason !== void 0 && { reason: this.reason },
|
|
507
526
|
...this.rawReason !== void 0 && { rawReason: this.rawReason },
|
|
527
|
+
...this.apiReason !== void 0 && { apiReason: this.apiReason },
|
|
508
528
|
...this.retryable !== void 0 && { retryable: this.retryable },
|
|
509
529
|
...this.retryAfter !== void 0 && { retryAfter: this.retryAfter }
|
|
510
530
|
};
|
|
@@ -621,6 +641,7 @@ var ConfigError = class extends SDKError {
|
|
|
621
641
|
constructor(message, details, userMessage, suggestion) {
|
|
622
642
|
super("CONFIG_ERROR", message, void 0, details, userMessage, suggestion);
|
|
623
643
|
this.name = "ConfigError";
|
|
644
|
+
defineSDKErrorType(this, "ConfigError");
|
|
624
645
|
}
|
|
625
646
|
};
|
|
626
647
|
var createConfigError = (message, details, userMessage, suggestion) => new ConfigError(message, details, userMessage, suggestion);
|