@medialane/sdk 0.5.3 → 0.5.5
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 +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -542,6 +542,12 @@ interface ApiCounterOffersQuery {
|
|
|
542
542
|
declare const OPEN_LICENSES: readonly ["CC0", "CC BY", "CC BY-SA", "CC BY-NC"];
|
|
543
543
|
type OpenLicense = (typeof OPEN_LICENSES)[number];
|
|
544
544
|
type RemixOfferStatus = "PENDING" | "AUTO_PENDING" | "APPROVED" | "COMPLETED" | "REJECTED" | "EXPIRED" | "SELF_MINTED";
|
|
545
|
+
interface ApiRemixOfferPrice {
|
|
546
|
+
raw: string;
|
|
547
|
+
formatted: string;
|
|
548
|
+
currency: string;
|
|
549
|
+
decimals: number;
|
|
550
|
+
}
|
|
545
551
|
interface ApiRemixOffer {
|
|
546
552
|
id: string;
|
|
547
553
|
status: RemixOfferStatus;
|
|
@@ -550,10 +556,8 @@ interface ApiRemixOffer {
|
|
|
550
556
|
creatorAddress: string;
|
|
551
557
|
requesterAddress: string | null;
|
|
552
558
|
message?: string | null;
|
|
553
|
-
/** Visible only to creator and requester */
|
|
554
|
-
|
|
555
|
-
/** Visible only to creator and requester */
|
|
556
|
-
proposedCurrency?: string;
|
|
559
|
+
/** Visible only to creator and requester — includes formatted price */
|
|
560
|
+
price?: ApiRemixOfferPrice;
|
|
557
561
|
licenseType: string;
|
|
558
562
|
commercial: boolean;
|
|
559
563
|
derivatives: boolean;
|
|
@@ -763,6 +767,7 @@ declare class ApiClient {
|
|
|
763
767
|
createCancelIntent(params: CancelOrderIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
764
768
|
getIntent(id: string): Promise<ApiResponse<ApiIntent>>;
|
|
765
769
|
submitIntentSignature(id: string, signature: string[]): Promise<ApiResponse<ApiIntent>>;
|
|
770
|
+
confirmIntent(id: string, txHash: string): Promise<ApiResponse<ApiIntent>>;
|
|
766
771
|
createMintIntent(params: CreateMintIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
767
772
|
createCollectionIntent(params: CreateCollectionIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
768
773
|
/**
|
|
@@ -881,6 +886,11 @@ declare class ApiClient {
|
|
|
881
886
|
* Creator rejects a remix offer. Requires Clerk JWT.
|
|
882
887
|
*/
|
|
883
888
|
rejectRemixOffer(id: string, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
|
|
889
|
+
/**
|
|
890
|
+
* Requester extends the expiry of a pending remix offer by 1–30 days.
|
|
891
|
+
* Requires Clerk JWT.
|
|
892
|
+
*/
|
|
893
|
+
extendRemixOffer(id: string, days: number, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
|
|
884
894
|
}
|
|
885
895
|
|
|
886
896
|
declare class MedialaneClient {
|
|
@@ -1328,4 +1338,4 @@ declare function buildFulfillmentTypedData(message: Record<string, unknown>, cha
|
|
|
1328
1338
|
*/
|
|
1329
1339
|
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1330
1340
|
|
|
1331
|
-
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
1341
|
+
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
package/dist/index.d.ts
CHANGED
|
@@ -542,6 +542,12 @@ interface ApiCounterOffersQuery {
|
|
|
542
542
|
declare const OPEN_LICENSES: readonly ["CC0", "CC BY", "CC BY-SA", "CC BY-NC"];
|
|
543
543
|
type OpenLicense = (typeof OPEN_LICENSES)[number];
|
|
544
544
|
type RemixOfferStatus = "PENDING" | "AUTO_PENDING" | "APPROVED" | "COMPLETED" | "REJECTED" | "EXPIRED" | "SELF_MINTED";
|
|
545
|
+
interface ApiRemixOfferPrice {
|
|
546
|
+
raw: string;
|
|
547
|
+
formatted: string;
|
|
548
|
+
currency: string;
|
|
549
|
+
decimals: number;
|
|
550
|
+
}
|
|
545
551
|
interface ApiRemixOffer {
|
|
546
552
|
id: string;
|
|
547
553
|
status: RemixOfferStatus;
|
|
@@ -550,10 +556,8 @@ interface ApiRemixOffer {
|
|
|
550
556
|
creatorAddress: string;
|
|
551
557
|
requesterAddress: string | null;
|
|
552
558
|
message?: string | null;
|
|
553
|
-
/** Visible only to creator and requester */
|
|
554
|
-
|
|
555
|
-
/** Visible only to creator and requester */
|
|
556
|
-
proposedCurrency?: string;
|
|
559
|
+
/** Visible only to creator and requester — includes formatted price */
|
|
560
|
+
price?: ApiRemixOfferPrice;
|
|
557
561
|
licenseType: string;
|
|
558
562
|
commercial: boolean;
|
|
559
563
|
derivatives: boolean;
|
|
@@ -763,6 +767,7 @@ declare class ApiClient {
|
|
|
763
767
|
createCancelIntent(params: CancelOrderIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
764
768
|
getIntent(id: string): Promise<ApiResponse<ApiIntent>>;
|
|
765
769
|
submitIntentSignature(id: string, signature: string[]): Promise<ApiResponse<ApiIntent>>;
|
|
770
|
+
confirmIntent(id: string, txHash: string): Promise<ApiResponse<ApiIntent>>;
|
|
766
771
|
createMintIntent(params: CreateMintIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
767
772
|
createCollectionIntent(params: CreateCollectionIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
768
773
|
/**
|
|
@@ -881,6 +886,11 @@ declare class ApiClient {
|
|
|
881
886
|
* Creator rejects a remix offer. Requires Clerk JWT.
|
|
882
887
|
*/
|
|
883
888
|
rejectRemixOffer(id: string, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
|
|
889
|
+
/**
|
|
890
|
+
* Requester extends the expiry of a pending remix offer by 1–30 days.
|
|
891
|
+
* Requires Clerk JWT.
|
|
892
|
+
*/
|
|
893
|
+
extendRemixOffer(id: string, days: number, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
|
|
884
894
|
}
|
|
885
895
|
|
|
886
896
|
declare class MedialaneClient {
|
|
@@ -1328,4 +1338,4 @@ declare function buildFulfillmentTypedData(message: Record<string, unknown>, cha
|
|
|
1328
1338
|
*/
|
|
1329
1339
|
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1330
1340
|
|
|
1331
|
-
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
1341
|
+
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
package/dist/index.js
CHANGED
|
@@ -1139,6 +1139,9 @@ var ApiClient = class {
|
|
|
1139
1139
|
submitIntentSignature(id, signature) {
|
|
1140
1140
|
return this.patch(`/v1/intents/${id}/signature`, { signature });
|
|
1141
1141
|
}
|
|
1142
|
+
confirmIntent(id, txHash) {
|
|
1143
|
+
return this.patch(`/v1/intents/${id}/confirm`, { txHash });
|
|
1144
|
+
}
|
|
1142
1145
|
createMintIntent(params) {
|
|
1143
1146
|
return this.post("/v1/intents/mint", params);
|
|
1144
1147
|
}
|
|
@@ -1424,6 +1427,17 @@ var ApiClient = class {
|
|
|
1424
1427
|
headers: { "Authorization": `Bearer ${clerkToken}` }
|
|
1425
1428
|
});
|
|
1426
1429
|
}
|
|
1430
|
+
/**
|
|
1431
|
+
* Requester extends the expiry of a pending remix offer by 1–30 days.
|
|
1432
|
+
* Requires Clerk JWT.
|
|
1433
|
+
*/
|
|
1434
|
+
extendRemixOffer(id, days, clerkToken) {
|
|
1435
|
+
return this.request(`/v1/remix-offers/${id}/extend`, {
|
|
1436
|
+
method: "POST",
|
|
1437
|
+
body: JSON.stringify({ days }),
|
|
1438
|
+
headers: { "Authorization": `Bearer ${clerkToken}` }
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1427
1441
|
};
|
|
1428
1442
|
|
|
1429
1443
|
// src/client.ts
|