@medialane/sdk 0.117.0 → 0.118.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,4 +1,4 @@
1
- import { bd as ResolvedConfig, bl as TxResult, aA as CreatePopCollectionParams, al as ClaimConditions, aw as CreateDropParams, aF as CreateTicketParams, a_ as MintTicketsParams, ay as CreateMembershipParams, aZ as MintMembershipsParams, aD as CreateSponsorshipOfferParams, ba as ProposeSponsorshipParams, l as ApiClient, aX as MedialaneConfig, aY as MedialaneErrorCode, b3 as OrderDetails, R as ResolvedFeeConfig, D as ApiIntentCreated } from '../services-D971bAZ2.cjs';
1
+ import { bg as ResolvedConfig, bo as TxResult, aC as CreatePopCollectionParams, an as ClaimConditions, ay as CreateDropParams, aH as CreateTicketParams, b1 as MintTicketsParams, aA as CreateMembershipParams, b0 as MintMembershipsParams, aF as CreateSponsorshipOfferParams, bd as ProposeSponsorshipParams, l as ApiClient, aZ as MedialaneConfig, a_ as MedialaneErrorCode, b6 as OrderDetails, R as ResolvedFeeConfig, D as ApiIntentCreated } from '../services-B4ygB908.cjs';
2
2
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
3
3
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.cjs';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- import { bd as ResolvedConfig, bl as TxResult, aA as CreatePopCollectionParams, al as ClaimConditions, aw as CreateDropParams, aF as CreateTicketParams, a_ as MintTicketsParams, ay as CreateMembershipParams, aZ as MintMembershipsParams, aD as CreateSponsorshipOfferParams, ba as ProposeSponsorshipParams, l as ApiClient, aX as MedialaneConfig, aY as MedialaneErrorCode, b3 as OrderDetails, R as ResolvedFeeConfig, D as ApiIntentCreated } from '../services-BezTZ6gM.js';
1
+ import { bg as ResolvedConfig, bo as TxResult, aC as CreatePopCollectionParams, an as ClaimConditions, ay as CreateDropParams, aH as CreateTicketParams, b1 as MintTicketsParams, aA as CreateMembershipParams, b0 as MintMembershipsParams, aF as CreateSponsorshipOfferParams, bd as ProposeSponsorshipParams, l as ApiClient, aZ as MedialaneConfig, a_ as MedialaneErrorCode, b6 as OrderDetails, R as ResolvedFeeConfig, D as ApiIntentCreated } from '../services-FKBetXcu.js';
2
2
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
3
3
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.js';
4
4
  import 'zod';
@@ -246,10 +246,11 @@ function deriveErrorCode(status) {
246
246
  return "UNKNOWN";
247
247
  }
248
248
  var MedialaneApiError = class extends Error {
249
- constructor(status, message, retryAfterMs) {
249
+ constructor(status, message, retryAfterMs, details) {
250
250
  super(message);
251
251
  this.status = status;
252
252
  this.retryAfterMs = retryAfterMs;
253
+ this.details = details;
253
254
  this.name = "MedialaneApiError";
254
255
  this.code = deriveErrorCode(status);
255
256
  }
@@ -287,12 +288,19 @@ var ApiClient = class {
287
288
  if (!response.ok && !allowed(response.status)) {
288
289
  const text = await response.text().catch(() => response.statusText);
289
290
  let message = text;
291
+ let details;
290
292
  try {
291
293
  const body = JSON.parse(text);
292
294
  if (body.error) message = body.error;
295
+ details = body;
293
296
  } catch {
294
297
  }
295
- throw new MedialaneApiError(response.status, message, parseRetryAfter(response.headers.get("retry-after")));
298
+ throw new MedialaneApiError(
299
+ response.status,
300
+ message,
301
+ parseRetryAfter(response.headers.get("retry-after")),
302
+ details
303
+ );
296
304
  }
297
305
  return response;
298
306
  }, this.retryOptions);
@@ -443,6 +451,9 @@ var ApiClient = class {
443
451
  createTierIntent(params) {
444
452
  return this.post("/v1/intents/create-tier", params);
445
453
  }
454
+ mintCalls(params) {
455
+ return this.post("/v1/business/issuance/mint-calls", params);
456
+ }
446
457
  createCoinIntent(params) {
447
458
  return this.post("/v1/intents/create-coin", params);
448
459
  }
@@ -580,7 +591,10 @@ var ApiClient = class {
580
591
  });
581
592
  }
582
593
  registerBusinessProvisioning(params) {
583
- return this.post("/v1/business/provisioning", params);
594
+ return this.post(
595
+ "/v1/business/provisioning",
596
+ params
597
+ );
584
598
  }
585
599
  completeBusinessProvisioning(id) {
586
600
  return this.post(`/v1/business/provisioning/${id}/complete`, {});