@medialane/sdk 0.127.0 → 0.129.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.
@@ -1057,9 +1057,8 @@ declare class MedialaneApiError extends Error {
1057
1057
  readonly status: number;
1058
1058
  readonly retryAfterMs?: number | undefined;
1059
1059
  readonly details?: unknown | undefined;
1060
- readonly isAuthored: boolean;
1061
1060
  readonly code: MedialaneErrorCode;
1062
- constructor(status: number, message: string, retryAfterMs?: number | undefined, details?: unknown | undefined, isAuthored?: boolean);
1061
+ constructor(status: number, message: string, retryAfterMs?: number | undefined, details?: unknown | undefined);
1063
1062
  }
1064
1063
  declare class ApiClient {
1065
1064
  private readonly baseUrl;
@@ -1436,4 +1435,8 @@ interface ProposeSponsorshipParams {
1436
1435
  royaltyBps: bigint | string;
1437
1436
  }
1438
1437
 
1439
- export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiIntent as E, type ApiIntentCreated as F, type ApiKeyStatus as G, type ApiMeta as H, type ApiMetadataSignedUrl as I, type ApiMetadataUpload as J, type ApiOrder as K, type ApiOrderConsideration as L, type ApiOrderOffer as M, type ApiOrderPrice as N, type ApiOrderTokenMeta as O, type ApiOrderTxHash as P, type ApiOrdersQuery as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPointEvent as T, type ApiPortalKey as U, type ApiPortalKeyCreated as V, type ApiPortalMe as W, type ApiPortalSpend as X, type ApiPublicRemix as Y, type ApiRemixOffer as Z, type ApiRemixOfferPrice as _, type ServiceCapability as a, type MedialaneConfig as a$, type ApiResponse as a0, type ApiRewardsBadge as a1, type ApiRewardsBatchEntry as a2, type ApiRewardsConfig as a3, type ApiRewardsLeaderboardEntry as a4, type ApiRewardsLevel as a5, type ApiSearchCollectionResult as a6, type ApiSearchCreatorResult as a7, type ApiSearchResult as a8, type ApiSearchTokenResult as a9, type CreateListingIntentParams as aA, type CreateMembershipParams as aB, type CreateMintIntentParams as aC, type CreatePopCollectionParams as aD, type CreateRemixOfferParams as aE, type CreateSponsorshipOfferIntentParams as aF, type CreateSponsorshipOfferParams as aG, type CreateSponsorshipProposalIntentParams as aH, type CreateTicketParams as aI, type CreateTierIntentParams as aJ, type CreateWebhookParams as aK, type DropMintStatus as aL, type EmissionParams as aM, type EnforcementDeclaration as aN, type FactoryFamilyServiceId as aO, type FeeConfig as aP, FeeConfigSchema as aQ, type FulfillOrderIntentParams as aR, type IPType as aS, type IntentCall as aT, type IntentStatus as aU, type IntentType as aV, type IpAttribute as aW, type IpNftMetadata as aX, type LaunchCoinIntentParams as aY, type MakeOfferIntentParams as aZ, MedialaneApiError as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiTxSyncResult as ae, type ApiUserRewards as af, type ApiUserWallet as ag, type ApiWalletActivity as ah, type ApiWebhookCreated as ai, type ApiWebhookEndpoint as aj, type AutoRemixOfferParams as ak, type CancelOrderIntentParams as al, type ChainFilter as am, type CheckoutIntentItem as an, type ClaimConditions as ao, type CollectionServiceId as ap, type CollectionSort as aq, type CollectionTokensSort as ar, type ConfirmRemixOfferParams as as, type ConfirmSelfRemixParams as at, type ConsiderationItem as au, type CreateCheckoutIntentParams as av, type CreateCoinIntentParams as aw, type CreateCollectionIntentParams as ax, type CreateCounterOfferIntentParams as ay, type CreateDropParams as az, type AcceptSponsorshipProposalIntentParams as b, type MedialaneErrorCode as b0, type MintMembershipsParams as b1, type MintTicketsParams as b2, OPEN_LICENSES as b3, type OfferItem as b4, type OpenLicense as b5, type Order as b6, type OrderDetails as b7, type OrderParameters as b8, type OrderStatus as b9, type ExecutedTransaction as bA, type PasskeyOwner as bB, type CreatedOwner as bC, type OwnerSigner as bD, type PasskeyConfig as bE, createPasskeyOwner as bF, PasskeyCancelledError as ba, type PlaceSponsorshipBidIntentParams as bb, type PopBatchEligibilityItem as bc, type PopClaimStatus as bd, type PopEventType as be, type ProposeSponsorshipParams as bf, type RejectSponsorshipProposalIntentParams as bg, type RemixOfferStatus as bh, type ResolvedConfig as bi, type RetractSponsorshipBidIntentParams as bj, type RetryOptions as bk, type ServiceEventDeclaration as bl, type SetSponsorshipOfferOpenIntentParams as bm, type SortOrder as bn, type TenantPlan as bo, type TierServiceId as bp, type TxResult as bq, type UpdateCollectionProfileInput as br, type WebhookEventType as bs, type WebhookStatus as bt, type WithdrawSponsorshipProposalIntentParams as bu, resolveConfig as bv, resolveFeeConfig as bw, type SealedOwner as bx, type ReceiptProviderLike as by, type WalletExecutor as bz, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
1438
+ declare class UserFacingError extends Error {
1439
+ constructor(message: string);
1440
+ }
1441
+
1442
+ export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiIntent as E, type ApiIntentCreated as F, type ApiKeyStatus as G, type ApiMeta as H, type ApiMetadataSignedUrl as I, type ApiMetadataUpload as J, type ApiOrder as K, type ApiOrderConsideration as L, type ApiOrderOffer as M, type ApiOrderPrice as N, type ApiOrderTokenMeta as O, type ApiOrderTxHash as P, type ApiOrdersQuery as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPointEvent as T, type ApiPortalKey as U, type ApiPortalKeyCreated as V, type ApiPortalMe as W, type ApiPortalSpend as X, type ApiPublicRemix as Y, type ApiRemixOffer as Z, type ApiRemixOfferPrice as _, type ServiceCapability as a, type MedialaneConfig as a$, type ApiResponse as a0, type ApiRewardsBadge as a1, type ApiRewardsBatchEntry as a2, type ApiRewardsConfig as a3, type ApiRewardsLeaderboardEntry as a4, type ApiRewardsLevel as a5, type ApiSearchCollectionResult as a6, type ApiSearchCreatorResult as a7, type ApiSearchResult as a8, type ApiSearchTokenResult as a9, type CreateListingIntentParams as aA, type CreateMembershipParams as aB, type CreateMintIntentParams as aC, type CreatePopCollectionParams as aD, type CreateRemixOfferParams as aE, type CreateSponsorshipOfferIntentParams as aF, type CreateSponsorshipOfferParams as aG, type CreateSponsorshipProposalIntentParams as aH, type CreateTicketParams as aI, type CreateTierIntentParams as aJ, type CreateWebhookParams as aK, type DropMintStatus as aL, type EmissionParams as aM, type EnforcementDeclaration as aN, type FactoryFamilyServiceId as aO, type FeeConfig as aP, FeeConfigSchema as aQ, type FulfillOrderIntentParams as aR, type IPType as aS, type IntentCall as aT, type IntentStatus as aU, type IntentType as aV, type IpAttribute as aW, type IpNftMetadata as aX, type LaunchCoinIntentParams as aY, type MakeOfferIntentParams as aZ, MedialaneApiError as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiTxSyncResult as ae, type ApiUserRewards as af, type ApiUserWallet as ag, type ApiWalletActivity as ah, type ApiWebhookCreated as ai, type ApiWebhookEndpoint as aj, type AutoRemixOfferParams as ak, type CancelOrderIntentParams as al, type ChainFilter as am, type CheckoutIntentItem as an, type ClaimConditions as ao, type CollectionServiceId as ap, type CollectionSort as aq, type CollectionTokensSort as ar, type ConfirmRemixOfferParams as as, type ConfirmSelfRemixParams as at, type ConsiderationItem as au, type CreateCheckoutIntentParams as av, type CreateCoinIntentParams as aw, type CreateCollectionIntentParams as ax, type CreateCounterOfferIntentParams as ay, type CreateDropParams as az, type AcceptSponsorshipProposalIntentParams as b, type MedialaneErrorCode as b0, type MintMembershipsParams as b1, type MintTicketsParams as b2, OPEN_LICENSES as b3, type OfferItem as b4, type OpenLicense as b5, type Order as b6, type OrderDetails as b7, type OrderParameters as b8, type OrderStatus as b9, type WalletExecutor as bA, type ExecutedTransaction as bB, type PasskeyOwner as bC, type CreatedOwner as bD, type OwnerSigner as bE, type PasskeyConfig as bF, createPasskeyOwner as bG, PasskeyCancelledError as ba, type PlaceSponsorshipBidIntentParams as bb, type PopBatchEligibilityItem as bc, type PopClaimStatus as bd, type PopEventType as be, type ProposeSponsorshipParams as bf, type RejectSponsorshipProposalIntentParams as bg, type RemixOfferStatus as bh, type ResolvedConfig as bi, type RetractSponsorshipBidIntentParams as bj, type RetryOptions as bk, type ServiceEventDeclaration as bl, type SetSponsorshipOfferOpenIntentParams as bm, type SortOrder as bn, type TenantPlan as bo, type TierServiceId as bp, type TxResult as bq, type UpdateCollectionProfileInput as br, UserFacingError as bs, type WebhookEventType as bt, type WebhookStatus as bu, type WithdrawSponsorshipProposalIntentParams as bv, resolveConfig as bw, resolveFeeConfig as bx, type SealedOwner as by, type ReceiptProviderLike as bz, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
@@ -1057,9 +1057,8 @@ declare class MedialaneApiError extends Error {
1057
1057
  readonly status: number;
1058
1058
  readonly retryAfterMs?: number | undefined;
1059
1059
  readonly details?: unknown | undefined;
1060
- readonly isAuthored: boolean;
1061
1060
  readonly code: MedialaneErrorCode;
1062
- constructor(status: number, message: string, retryAfterMs?: number | undefined, details?: unknown | undefined, isAuthored?: boolean);
1061
+ constructor(status: number, message: string, retryAfterMs?: number | undefined, details?: unknown | undefined);
1063
1062
  }
1064
1063
  declare class ApiClient {
1065
1064
  private readonly baseUrl;
@@ -1436,4 +1435,8 @@ interface ProposeSponsorshipParams {
1436
1435
  royaltyBps: bigint | string;
1437
1436
  }
1438
1437
 
1439
- export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiIntent as E, type ApiIntentCreated as F, type ApiKeyStatus as G, type ApiMeta as H, type ApiMetadataSignedUrl as I, type ApiMetadataUpload as J, type ApiOrder as K, type ApiOrderConsideration as L, type ApiOrderOffer as M, type ApiOrderPrice as N, type ApiOrderTokenMeta as O, type ApiOrderTxHash as P, type ApiOrdersQuery as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPointEvent as T, type ApiPortalKey as U, type ApiPortalKeyCreated as V, type ApiPortalMe as W, type ApiPortalSpend as X, type ApiPublicRemix as Y, type ApiRemixOffer as Z, type ApiRemixOfferPrice as _, type ServiceCapability as a, type MedialaneConfig as a$, type ApiResponse as a0, type ApiRewardsBadge as a1, type ApiRewardsBatchEntry as a2, type ApiRewardsConfig as a3, type ApiRewardsLeaderboardEntry as a4, type ApiRewardsLevel as a5, type ApiSearchCollectionResult as a6, type ApiSearchCreatorResult as a7, type ApiSearchResult as a8, type ApiSearchTokenResult as a9, type CreateListingIntentParams as aA, type CreateMembershipParams as aB, type CreateMintIntentParams as aC, type CreatePopCollectionParams as aD, type CreateRemixOfferParams as aE, type CreateSponsorshipOfferIntentParams as aF, type CreateSponsorshipOfferParams as aG, type CreateSponsorshipProposalIntentParams as aH, type CreateTicketParams as aI, type CreateTierIntentParams as aJ, type CreateWebhookParams as aK, type DropMintStatus as aL, type EmissionParams as aM, type EnforcementDeclaration as aN, type FactoryFamilyServiceId as aO, type FeeConfig as aP, FeeConfigSchema as aQ, type FulfillOrderIntentParams as aR, type IPType as aS, type IntentCall as aT, type IntentStatus as aU, type IntentType as aV, type IpAttribute as aW, type IpNftMetadata as aX, type LaunchCoinIntentParams as aY, type MakeOfferIntentParams as aZ, MedialaneApiError as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiTxSyncResult as ae, type ApiUserRewards as af, type ApiUserWallet as ag, type ApiWalletActivity as ah, type ApiWebhookCreated as ai, type ApiWebhookEndpoint as aj, type AutoRemixOfferParams as ak, type CancelOrderIntentParams as al, type ChainFilter as am, type CheckoutIntentItem as an, type ClaimConditions as ao, type CollectionServiceId as ap, type CollectionSort as aq, type CollectionTokensSort as ar, type ConfirmRemixOfferParams as as, type ConfirmSelfRemixParams as at, type ConsiderationItem as au, type CreateCheckoutIntentParams as av, type CreateCoinIntentParams as aw, type CreateCollectionIntentParams as ax, type CreateCounterOfferIntentParams as ay, type CreateDropParams as az, type AcceptSponsorshipProposalIntentParams as b, type MedialaneErrorCode as b0, type MintMembershipsParams as b1, type MintTicketsParams as b2, OPEN_LICENSES as b3, type OfferItem as b4, type OpenLicense as b5, type Order as b6, type OrderDetails as b7, type OrderParameters as b8, type OrderStatus as b9, type ExecutedTransaction as bA, type PasskeyOwner as bB, type CreatedOwner as bC, type OwnerSigner as bD, type PasskeyConfig as bE, createPasskeyOwner as bF, PasskeyCancelledError as ba, type PlaceSponsorshipBidIntentParams as bb, type PopBatchEligibilityItem as bc, type PopClaimStatus as bd, type PopEventType as be, type ProposeSponsorshipParams as bf, type RejectSponsorshipProposalIntentParams as bg, type RemixOfferStatus as bh, type ResolvedConfig as bi, type RetractSponsorshipBidIntentParams as bj, type RetryOptions as bk, type ServiceEventDeclaration as bl, type SetSponsorshipOfferOpenIntentParams as bm, type SortOrder as bn, type TenantPlan as bo, type TierServiceId as bp, type TxResult as bq, type UpdateCollectionProfileInput as br, type WebhookEventType as bs, type WebhookStatus as bt, type WithdrawSponsorshipProposalIntentParams as bu, resolveConfig as bv, resolveFeeConfig as bw, type SealedOwner as bx, type ReceiptProviderLike as by, type WalletExecutor as bz, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
1438
+ declare class UserFacingError extends Error {
1439
+ constructor(message: string);
1440
+ }
1441
+
1442
+ export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiIntent as E, type ApiIntentCreated as F, type ApiKeyStatus as G, type ApiMeta as H, type ApiMetadataSignedUrl as I, type ApiMetadataUpload as J, type ApiOrder as K, type ApiOrderConsideration as L, type ApiOrderOffer as M, type ApiOrderPrice as N, type ApiOrderTokenMeta as O, type ApiOrderTxHash as P, type ApiOrdersQuery as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPointEvent as T, type ApiPortalKey as U, type ApiPortalKeyCreated as V, type ApiPortalMe as W, type ApiPortalSpend as X, type ApiPublicRemix as Y, type ApiRemixOffer as Z, type ApiRemixOfferPrice as _, type ServiceCapability as a, type MedialaneConfig as a$, type ApiResponse as a0, type ApiRewardsBadge as a1, type ApiRewardsBatchEntry as a2, type ApiRewardsConfig as a3, type ApiRewardsLeaderboardEntry as a4, type ApiRewardsLevel as a5, type ApiSearchCollectionResult as a6, type ApiSearchCreatorResult as a7, type ApiSearchResult as a8, type ApiSearchTokenResult as a9, type CreateListingIntentParams as aA, type CreateMembershipParams as aB, type CreateMintIntentParams as aC, type CreatePopCollectionParams as aD, type CreateRemixOfferParams as aE, type CreateSponsorshipOfferIntentParams as aF, type CreateSponsorshipOfferParams as aG, type CreateSponsorshipProposalIntentParams as aH, type CreateTicketParams as aI, type CreateTierIntentParams as aJ, type CreateWebhookParams as aK, type DropMintStatus as aL, type EmissionParams as aM, type EnforcementDeclaration as aN, type FactoryFamilyServiceId as aO, type FeeConfig as aP, FeeConfigSchema as aQ, type FulfillOrderIntentParams as aR, type IPType as aS, type IntentCall as aT, type IntentStatus as aU, type IntentType as aV, type IpAttribute as aW, type IpNftMetadata as aX, type LaunchCoinIntentParams as aY, type MakeOfferIntentParams as aZ, MedialaneApiError as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiTxSyncResult as ae, type ApiUserRewards as af, type ApiUserWallet as ag, type ApiWalletActivity as ah, type ApiWebhookCreated as ai, type ApiWebhookEndpoint as aj, type AutoRemixOfferParams as ak, type CancelOrderIntentParams as al, type ChainFilter as am, type CheckoutIntentItem as an, type ClaimConditions as ao, type CollectionServiceId as ap, type CollectionSort as aq, type CollectionTokensSort as ar, type ConfirmRemixOfferParams as as, type ConfirmSelfRemixParams as at, type ConsiderationItem as au, type CreateCheckoutIntentParams as av, type CreateCoinIntentParams as aw, type CreateCollectionIntentParams as ax, type CreateCounterOfferIntentParams as ay, type CreateDropParams as az, type AcceptSponsorshipProposalIntentParams as b, type MedialaneErrorCode as b0, type MintMembershipsParams as b1, type MintTicketsParams as b2, OPEN_LICENSES as b3, type OfferItem as b4, type OpenLicense as b5, type Order as b6, type OrderDetails as b7, type OrderParameters as b8, type OrderStatus as b9, type WalletExecutor as bA, type ExecutedTransaction as bB, type PasskeyOwner as bC, type CreatedOwner as bD, type OwnerSigner as bE, type PasskeyConfig as bF, createPasskeyOwner as bG, PasskeyCancelledError as ba, type PlaceSponsorshipBidIntentParams as bb, type PopBatchEligibilityItem as bc, type PopClaimStatus as bd, type PopEventType as be, type ProposeSponsorshipParams as bf, type RejectSponsorshipProposalIntentParams as bg, type RemixOfferStatus as bh, type ResolvedConfig as bi, type RetractSponsorshipBidIntentParams as bj, type RetryOptions as bk, type ServiceEventDeclaration as bl, type SetSponsorshipOfferOpenIntentParams as bm, type SortOrder as bn, type TenantPlan as bo, type TierServiceId as bp, type TxResult as bq, type UpdateCollectionProfileInput as br, UserFacingError as bs, type WebhookEventType as bt, type WebhookStatus as bu, type WithdrawSponsorshipProposalIntentParams as bv, resolveConfig as bw, resolveFeeConfig as bx, type SealedOwner as by, type ReceiptProviderLike as bz, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
package/dist/index.cjs CHANGED
@@ -275,12 +275,11 @@ function deriveErrorCode(status) {
275
275
  return "UNKNOWN";
276
276
  }
277
277
  var MedialaneApiError = class extends Error {
278
- constructor(status, message, retryAfterMs, details, isAuthored = false) {
278
+ constructor(status, message, retryAfterMs, details) {
279
279
  super(message);
280
280
  this.status = status;
281
281
  this.retryAfterMs = retryAfterMs;
282
282
  this.details = details;
283
- this.isAuthored = isAuthored;
284
283
  this.name = "MedialaneApiError";
285
284
  this.code = deriveErrorCode(status);
286
285
  }
@@ -317,14 +316,12 @@ var ApiClient = class {
317
316
  });
318
317
  if (!response.ok && !allowed(response.status)) {
319
318
  const text = await response.text().catch(() => response.statusText);
320
- let message = text;
321
- let details;
322
- let isAuthored = false;
319
+ let message = `Request failed with status ${response.status}`;
320
+ let details = text;
323
321
  try {
324
322
  const body = JSON.parse(text);
325
323
  if (typeof body.error === "string" && body.error.trim() !== "") {
326
324
  message = body.error;
327
- isAuthored = true;
328
325
  }
329
326
  details = body;
330
327
  } catch {
@@ -333,8 +330,7 @@ var ApiClient = class {
333
330
  response.status,
334
331
  message,
335
332
  parseRetryAfter(response.headers.get("retry-after")),
336
- details,
337
- isAuthored
333
+ details
338
334
  );
339
335
  }
340
336
  return response;
@@ -2032,6 +2028,14 @@ function resolveSafeImageContentType(contentType) {
2032
2028
  }
2033
2029
  var MAX_IPFS_GATEWAY_RESPONSE_BYTES = 25 * 1024 * 1024;
2034
2030
 
2031
+ // src/errors.ts
2032
+ var UserFacingError = class extends Error {
2033
+ constructor(message) {
2034
+ super(message);
2035
+ this.name = "UserFacingError";
2036
+ }
2037
+ };
2038
+
2035
2039
  exports.ACCOUNT_SESSION_TTL_SECONDS = ACCOUNT_SESSION_TTL_SECONDS;
2036
2040
  exports.ALLOWED_IMAGE_CONTENT_TYPES = ALLOWED_IMAGE_CONTENT_TYPES;
2037
2041
  exports.ApiClient = ApiClient;
@@ -2087,6 +2091,7 @@ exports.STARKNET_POP_FACTORY_CONTRACT = STARKNET_POP_FACTORY_CONTRACT;
2087
2091
  exports.SUPPORTED_TOKENS = SUPPORTED_TOKENS;
2088
2092
  exports.SUPPORTED_URL_CHAINS = SUPPORTED_URL_CHAINS;
2089
2093
  exports.TRUSTED_APP_IP_HEADER = TRUSTED_APP_IP_HEADER;
2094
+ exports.UserFacingError = UserFacingError;
2090
2095
  exports.assetHref = assetHref;
2091
2096
  exports.buildAssetMetadata = buildAssetMetadata;
2092
2097
  exports.chainFromSlug = chainFromSlug;