@medialane/sdk 0.112.0 → 0.113.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/dist/index.cjs +42 -10
- 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 +42 -10
- package/dist/index.js.map +1 -1
- package/dist/{services-BBXTfVDt.d.ts → services-BezTZ6gM.d.ts} +43 -12
- package/dist/{services-BcsFAZzQ.d.cts → services-D971bAZ2.d.cts} +43 -12
- package/dist/starknet/index.cjs +42 -10
- 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 +42 -10
- package/dist/starknet/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
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 { 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';
|
|
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
|
@@ -314,6 +314,9 @@ var ApiClient = class {
|
|
|
314
314
|
bearer(siwsToken) {
|
|
315
315
|
return { Authorization: `Bearer ${siwsToken}` };
|
|
316
316
|
}
|
|
317
|
+
asSubject(siwsToken) {
|
|
318
|
+
return siwsToken ? this.bearer(siwsToken) : void 0;
|
|
319
|
+
}
|
|
317
320
|
getOrders(query = {}) {
|
|
318
321
|
const params = new URLSearchParams();
|
|
319
322
|
if (query.status) params.set("status", query.status);
|
|
@@ -508,20 +511,49 @@ var ApiClient = class {
|
|
|
508
511
|
body: formData
|
|
509
512
|
});
|
|
510
513
|
}
|
|
511
|
-
getMe() {
|
|
512
|
-
return this.
|
|
514
|
+
getMe(siwsToken) {
|
|
515
|
+
return this.request("/v1/portal/me", {
|
|
516
|
+
method: "GET",
|
|
517
|
+
headers: this.asSubject(siwsToken)
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
getApiKeys(siwsToken) {
|
|
521
|
+
return this.request("/v1/portal/keys", {
|
|
522
|
+
method: "GET",
|
|
523
|
+
headers: this.asSubject(siwsToken)
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
createApiKey(input, siwsToken) {
|
|
527
|
+
return this.request("/v1/portal/keys", {
|
|
528
|
+
method: "POST",
|
|
529
|
+
body: JSON.stringify(input ?? {}),
|
|
530
|
+
headers: this.asSubject(siwsToken)
|
|
531
|
+
});
|
|
513
532
|
}
|
|
514
|
-
|
|
515
|
-
return this.
|
|
533
|
+
deleteApiKey(id, siwsToken) {
|
|
534
|
+
return this.request(`/v1/portal/keys/${id}`, {
|
|
535
|
+
method: "DELETE",
|
|
536
|
+
headers: this.asSubject(siwsToken)
|
|
537
|
+
});
|
|
516
538
|
}
|
|
517
|
-
|
|
518
|
-
return this.
|
|
539
|
+
getCreditHistory(siwsToken) {
|
|
540
|
+
return this.request("/v1/portal/credits/history", {
|
|
541
|
+
method: "GET",
|
|
542
|
+
headers: this.asSubject(siwsToken)
|
|
543
|
+
});
|
|
519
544
|
}
|
|
520
|
-
|
|
521
|
-
return this.
|
|
545
|
+
getSpend(siwsToken) {
|
|
546
|
+
return this.request("/v1/portal/credits/spend", {
|
|
547
|
+
method: "GET",
|
|
548
|
+
headers: this.asSubject(siwsToken)
|
|
549
|
+
});
|
|
522
550
|
}
|
|
523
|
-
|
|
524
|
-
return this.
|
|
551
|
+
checkDeposit(txHash, siwsToken) {
|
|
552
|
+
return this.request("/v1/portal/credits/check", {
|
|
553
|
+
method: "POST",
|
|
554
|
+
body: JSON.stringify({ txHash }),
|
|
555
|
+
headers: this.asSubject(siwsToken)
|
|
556
|
+
});
|
|
525
557
|
}
|
|
526
558
|
getWebhooks() {
|
|
527
559
|
return this.get("/v1/portal/webhooks");
|