@medialane/sdk 0.128.0 → 0.129.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.
@@ -1,5 +1,5 @@
1
- import { bi as ResolvedConfig, bq as TxResult, aD as CreatePopCollectionParams, ao as ClaimConditions, az as CreateDropParams, aI as CreateTicketParams, b2 as MintTicketsParams, aB as CreateMembershipParams, b1 as MintMembershipsParams, aG as CreateSponsorshipOfferParams, bf as ProposeSponsorshipParams, l as ApiClient, a$ as MedialaneConfig, b0 as MedialaneErrorCode, b7 as OrderDetails, R as ResolvedFeeConfig, F as ApiIntentCreated, by as SealedOwner, bz as ReceiptProviderLike, bA as WalletExecutor, bB as ExecutedTransaction, bC as PasskeyOwner } from '../errors-CO99guAf.cjs';
2
- export { bD as CreatedOwner, bE as OwnerSigner, ba as PasskeyCancelledError, bF as PasskeyConfig, bs as UserFacingError, bG as createPasskeyOwner } from '../errors-CO99guAf.cjs';
1
+ import { bi as ResolvedConfig, bq as TxResult, aD as CreatePopCollectionParams, ao as ClaimConditions, az as CreateDropParams, aI as CreateTicketParams, b2 as MintTicketsParams, aB as CreateMembershipParams, b1 as MintMembershipsParams, aG as CreateSponsorshipOfferParams, bf as ProposeSponsorshipParams, l as ApiClient, a$ as MedialaneConfig, b0 as MedialaneErrorCode, b7 as OrderDetails, R as ResolvedFeeConfig, F as ApiIntentCreated, by as SealedOwner, bz as ReceiptProviderLike, bA as WalletExecutor, bB as ExecutedTransaction, bC as PasskeyOwner } from '../errors-Fgqpww_8.cjs';
2
+ export { bD as CreatedOwner, bE as OwnerSigner, ba as PasskeyCancelledError, bF as PasskeyConfig, bs as UserFacingError, bG as createPasskeyOwner } from '../errors-Fgqpww_8.cjs';
3
3
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
4
4
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.cjs';
5
5
  import 'zod';
@@ -1,5 +1,5 @@
1
- import { bi as ResolvedConfig, bq as TxResult, aD as CreatePopCollectionParams, ao as ClaimConditions, az as CreateDropParams, aI as CreateTicketParams, b2 as MintTicketsParams, aB as CreateMembershipParams, b1 as MintMembershipsParams, aG as CreateSponsorshipOfferParams, bf as ProposeSponsorshipParams, l as ApiClient, a$ as MedialaneConfig, b0 as MedialaneErrorCode, b7 as OrderDetails, R as ResolvedFeeConfig, F as ApiIntentCreated, by as SealedOwner, bz as ReceiptProviderLike, bA as WalletExecutor, bB as ExecutedTransaction, bC as PasskeyOwner } from '../errors-De9avg1S.js';
2
- export { bD as CreatedOwner, bE as OwnerSigner, ba as PasskeyCancelledError, bF as PasskeyConfig, bs as UserFacingError, bG as createPasskeyOwner } from '../errors-De9avg1S.js';
1
+ import { bi as ResolvedConfig, bq as TxResult, aD as CreatePopCollectionParams, ao as ClaimConditions, az as CreateDropParams, aI as CreateTicketParams, b2 as MintTicketsParams, aB as CreateMembershipParams, b1 as MintMembershipsParams, aG as CreateSponsorshipOfferParams, bf as ProposeSponsorshipParams, l as ApiClient, a$ as MedialaneConfig, b0 as MedialaneErrorCode, b7 as OrderDetails, R as ResolvedFeeConfig, F as ApiIntentCreated, by as SealedOwner, bz as ReceiptProviderLike, bA as WalletExecutor, bB as ExecutedTransaction, bC as PasskeyOwner } from '../errors-DQJIxfVu.js';
2
+ export { bD as CreatedOwner, bE as OwnerSigner, ba as PasskeyCancelledError, bF as PasskeyConfig, bs as UserFacingError, bG as createPasskeyOwner } from '../errors-DQJIxfVu.js';
3
3
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
4
4
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.js';
5
5
  import 'zod';
@@ -246,12 +246,11 @@ function deriveErrorCode(status) {
246
246
  return "UNKNOWN";
247
247
  }
248
248
  var MedialaneApiError = class extends Error {
249
- constructor(status, message, retryAfterMs, details, isAuthored = false) {
249
+ constructor(status, message, retryAfterMs, details) {
250
250
  super(message);
251
251
  this.status = status;
252
252
  this.retryAfterMs = retryAfterMs;
253
253
  this.details = details;
254
- this.isAuthored = isAuthored;
255
254
  this.name = "MedialaneApiError";
256
255
  this.code = deriveErrorCode(status);
257
256
  }
@@ -288,14 +287,12 @@ var ApiClient = class {
288
287
  });
289
288
  if (!response.ok && !allowed(response.status)) {
290
289
  const text = await response.text().catch(() => response.statusText);
291
- let message = text;
292
- let details;
293
- let isAuthored = false;
290
+ let message = `Request failed with status ${response.status}`;
291
+ let details = text;
294
292
  try {
295
293
  const body = JSON.parse(text);
296
294
  if (typeof body.error === "string" && body.error.trim() !== "") {
297
295
  message = body.error;
298
- isAuthored = true;
299
296
  }
300
297
  details = body;
301
298
  } catch {
@@ -304,8 +301,7 @@ var ApiClient = class {
304
301
  response.status,
305
302
  message,
306
303
  parseRetryAfter(response.headers.get("retry-after")),
307
- details,
308
- isAuthored
304
+ details
309
305
  );
310
306
  }
311
307
  return response;