@medialane/sdk 0.21.0 → 0.23.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.map +1 -1
- package/dist/index.d.cts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -496,7 +496,15 @@ interface ApiCollectionsQuery {
|
|
|
496
496
|
/** Filter by service id. */
|
|
497
497
|
service?: string;
|
|
498
498
|
}
|
|
499
|
-
|
|
499
|
+
/**
|
|
500
|
+
* Order lifecycle states. **Four canonical values** per `01-core-model §V`.
|
|
501
|
+
*
|
|
502
|
+
* The legacy `"COUNTER_OFFERED"` value was removed in 0.23.0 (audit P0-1
|
|
503
|
+
* Phase D). Counter-offers are linked orders via `parentOrderHash`, not a
|
|
504
|
+
* third lifecycle state on the parent bid. Use `ApiOrder.hasActiveCounterOffer`
|
|
505
|
+
* (added in 0.22.0) for the "this bid has been countered" affordance.
|
|
506
|
+
*/
|
|
507
|
+
type OrderStatus = "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
|
|
500
508
|
type SortOrder = "price_asc" | "price_desc" | "recent";
|
|
501
509
|
type ActivityType = "mint" | "transfer" | "sale" | "listing" | "offer" | "cancelled";
|
|
502
510
|
type IntentType = "CREATE_LISTING" | "MAKE_OFFER" | "FULFILL_ORDER" | "CANCEL_ORDER" | "MINT" | "CREATE_COLLECTION" | "COUNTER_OFFER";
|
|
@@ -573,10 +581,21 @@ interface ApiOrder {
|
|
|
573
581
|
updatedAt: string;
|
|
574
582
|
/** Embedded token metadata (name/image/description). Null when not yet indexed. */
|
|
575
583
|
token: ApiOrderTokenMeta | null;
|
|
576
|
-
/** Set when this is a counter-offer listing — points to the original buyer bid.
|
|
584
|
+
/** Set when this is a counter-offer listing — points to the original buyer bid.
|
|
585
|
+
* Now always emitted by the backend (was conditional); kept optional in the
|
|
586
|
+
* type for back-compat with older response shapes. */
|
|
577
587
|
parentOrderHash?: string | null;
|
|
578
588
|
/** Optional seller message accompanying a counter-offer. */
|
|
579
589
|
counterOfferMessage?: string | null;
|
|
590
|
+
/** True when this order is a bid (ERC-20 offer) AND at least one ACTIVE counter
|
|
591
|
+
* exists with `parentOrderHash = this.orderHash`. Set by endpoints that compute
|
|
592
|
+
* it (currently `GET /v1/orders/user/:address` and `GET /v1/orders/:orderHash`);
|
|
593
|
+
* undefined on endpoints that don't.
|
|
594
|
+
*
|
|
595
|
+
* Use this instead of `status === "COUNTER_OFFERED"` for "this bid has been
|
|
596
|
+
* countered" affordances. The status pattern is being phased out per
|
|
597
|
+
* 01-core-model §V — counter-offers are linked orders, not a lifecycle state. */
|
|
598
|
+
hasActiveCounterOffer?: boolean;
|
|
580
599
|
}
|
|
581
600
|
/**
|
|
582
601
|
* A single OpenSea-compatible ERC-721 attribute.
|
package/dist/index.d.ts
CHANGED
|
@@ -496,7 +496,15 @@ interface ApiCollectionsQuery {
|
|
|
496
496
|
/** Filter by service id. */
|
|
497
497
|
service?: string;
|
|
498
498
|
}
|
|
499
|
-
|
|
499
|
+
/**
|
|
500
|
+
* Order lifecycle states. **Four canonical values** per `01-core-model §V`.
|
|
501
|
+
*
|
|
502
|
+
* The legacy `"COUNTER_OFFERED"` value was removed in 0.23.0 (audit P0-1
|
|
503
|
+
* Phase D). Counter-offers are linked orders via `parentOrderHash`, not a
|
|
504
|
+
* third lifecycle state on the parent bid. Use `ApiOrder.hasActiveCounterOffer`
|
|
505
|
+
* (added in 0.22.0) for the "this bid has been countered" affordance.
|
|
506
|
+
*/
|
|
507
|
+
type OrderStatus = "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
|
|
500
508
|
type SortOrder = "price_asc" | "price_desc" | "recent";
|
|
501
509
|
type ActivityType = "mint" | "transfer" | "sale" | "listing" | "offer" | "cancelled";
|
|
502
510
|
type IntentType = "CREATE_LISTING" | "MAKE_OFFER" | "FULFILL_ORDER" | "CANCEL_ORDER" | "MINT" | "CREATE_COLLECTION" | "COUNTER_OFFER";
|
|
@@ -573,10 +581,21 @@ interface ApiOrder {
|
|
|
573
581
|
updatedAt: string;
|
|
574
582
|
/** Embedded token metadata (name/image/description). Null when not yet indexed. */
|
|
575
583
|
token: ApiOrderTokenMeta | null;
|
|
576
|
-
/** Set when this is a counter-offer listing — points to the original buyer bid.
|
|
584
|
+
/** Set when this is a counter-offer listing — points to the original buyer bid.
|
|
585
|
+
* Now always emitted by the backend (was conditional); kept optional in the
|
|
586
|
+
* type for back-compat with older response shapes. */
|
|
577
587
|
parentOrderHash?: string | null;
|
|
578
588
|
/** Optional seller message accompanying a counter-offer. */
|
|
579
589
|
counterOfferMessage?: string | null;
|
|
590
|
+
/** True when this order is a bid (ERC-20 offer) AND at least one ACTIVE counter
|
|
591
|
+
* exists with `parentOrderHash = this.orderHash`. Set by endpoints that compute
|
|
592
|
+
* it (currently `GET /v1/orders/user/:address` and `GET /v1/orders/:orderHash`);
|
|
593
|
+
* undefined on endpoints that don't.
|
|
594
|
+
*
|
|
595
|
+
* Use this instead of `status === "COUNTER_OFFERED"` for "this bid has been
|
|
596
|
+
* countered" affordances. The status pattern is being phased out per
|
|
597
|
+
* 01-core-model §V — counter-offers are linked orders, not a lifecycle state. */
|
|
598
|
+
hasActiveCounterOffer?: boolean;
|
|
580
599
|
}
|
|
581
600
|
/**
|
|
582
601
|
* A single OpenSea-compatible ERC-721 attribute.
|