@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.
- package/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/{services-D971bAZ2.d.cts → services-B4ygB908.d.cts} +40 -9
- package/dist/{services-BezTZ6gM.d.ts → services-FKBetXcu.d.ts} +40 -9
- package/dist/starknet/index.cjs +17 -3
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +1 -1
- package/dist/starknet/index.d.ts +1 -1
- package/dist/starknet/index.js +17 -3
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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';
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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';
|
package/dist/starknet/index.js
CHANGED
|
@@ -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(
|
|
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(
|
|
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`, {});
|