@imtbl/sdk 0.22.0 → 0.22.2

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.d.ts CHANGED
@@ -13522,11 +13522,6 @@ type CreateListingRequestBody = {
13522
13522
  start_at: string;
13523
13523
  };
13524
13524
 
13525
- type FulfillmentDataRequest = {
13526
- order_id: string;
13527
- fees: Array<Fee$1>;
13528
- };
13529
-
13530
13525
  /**
13531
13526
  * The chain details
13532
13527
  */
@@ -13591,11 +13586,16 @@ type Order$1 = {
13591
13586
  updated_at: string;
13592
13587
  };
13593
13588
 
13594
- type FulfillmentDataResult = {
13589
+ type FulfillableOrder = {
13595
13590
  extra_data: string;
13596
13591
  order: Order$1;
13597
13592
  };
13598
13593
 
13594
+ type FulfillmentDataRequest = {
13595
+ order_id: string;
13596
+ fees: Array<Fee$1>;
13597
+ };
13598
+
13599
13599
  type ListingResult$1 = {
13600
13600
  result: Order$1;
13601
13601
  };
@@ -13681,6 +13681,17 @@ type TradeResult$1 = {
13681
13681
  result: Trade$1;
13682
13682
  };
13683
13683
 
13684
+ type UnfulfillableOrder = {
13685
+ /**
13686
+ * OrderID for the requested but unfulfillable order
13687
+ */
13688
+ order_id: string;
13689
+ /**
13690
+ * Nullable string containing error reason if the signing is unsuccessful for the order
13691
+ */
13692
+ reason: string;
13693
+ };
13694
+
13684
13695
  declare class OrdersService {
13685
13696
  readonly httpRequest: BaseHttpRequest;
13686
13697
  constructor(httpRequest: BaseHttpRequest);
@@ -13758,7 +13769,10 @@ declare class OrdersService {
13758
13769
  chainName: ChainName$1;
13759
13770
  requestBody: Array<FulfillmentDataRequest>;
13760
13771
  }): CancelablePromise<{
13761
- result: Array<FulfillmentDataResult>;
13772
+ result: {
13773
+ fulfillable_orders: Array<FulfillableOrder>;
13774
+ unfulfillable_orders: Array<UnfulfillableOrder>;
13775
+ };
13762
13776
  }>;
13763
13777
  /**
13764
13778
  * List all trades
@@ -30135,6 +30149,31 @@ type WalletNetworkSwitchEvent = {
30135
30149
  * Represents an event that is triggered when a wallet is disconnected.
30136
30150
  */
30137
30151
  type WalletDisconnectWalletEvent = {};
30152
+ /**
30153
+ * Enum representing possible Primary Revenue Widget event types.
30154
+ */
30155
+ declare enum PrimaryRevenueEventType {
30156
+ CLOSE_WIDGET = "close-widget",
30157
+ SUCCESS = "success",
30158
+ FAILURE = "failure",
30159
+ REJECTED = "rejected"
30160
+ }
30161
+ /**
30162
+ * Represents a successful primary revenue transaction.
30163
+ * @property {string} transactionHash - The hash of the successful transaction.
30164
+ */
30165
+ type PrimaryRevenueSuccess = {
30166
+ [key: string]: string;
30167
+ };
30168
+ /**
30169
+ * Type representing a PrimaryRevenue Widget with type FAILURE.
30170
+ * @property {string} reason - The reason why the swap failed.
30171
+ * @property {number} timestamp - The timestamp of the failed swap.
30172
+ */
30173
+ type PrimaryRevenueFailed = {
30174
+ reason: string;
30175
+ timestamp: number;
30176
+ };
30138
30177
  /**
30139
30178
  * Enum representing the events emitted by the widgets.
30140
30179
  */
@@ -30143,16 +30182,17 @@ declare enum IMTBLWidgetEvents {
30143
30182
  IMTBL_WALLET_WIDGET_EVENT = "imtbl-wallet-widget",
30144
30183
  IMTBL_SWAP_WIDGET_EVENT = "imtbl-swap-widget",
30145
30184
  IMTBL_BRIDGE_WIDGET_EVENT = "imtbl-bridge-widget",
30146
- IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget"
30185
+ IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget",
30186
+ IMTBL_PRIMARY_REVENUE_WIDGET_EVENT = "imtbl-primary-revenue-widget"
30147
30187
  }
30148
30188
  /**
30149
30189
  * Represents an event emitted by a widget.
30150
30190
  * @template T - The type of data associated with the event.
30151
- * @property {OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType} type - The type of the event.
30191
+ * @property {OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType | PrimaryRevenueEventType} type - The type of the event.
30152
30192
  * @property {T} data - The data associated with the event.
30153
30193
  */
30154
30194
  type WidgetEvent<T> = {
30155
- type: OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType;
30195
+ type: OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType | PrimaryRevenueEventType;
30156
30196
  data: T;
30157
30197
  };
30158
30198
  /**
@@ -30181,6 +30221,7 @@ declare global {
30181
30221
  'imtbl-swap': ImtblSwapProps;
30182
30222
  'imtbl-bridge': ImtblBridgeProps;
30183
30223
  'imtbl-onramp': ImtblOnRampProps;
30224
+ 'imtbl-primary-revenue': ImtblPrimaryRevenueProps;
30184
30225
  }
30185
30226
  }
30186
30227
  interface ImmutableWebComponent {
@@ -30261,6 +30302,26 @@ interface ImtblOnRampProps extends React.DetailedHTMLProps<React.HTMLAttributes<
30261
30302
  amount?: string;
30262
30303
  contractAddress?: string;
30263
30304
  }
30305
+ /**
30306
+ * Interface for the properties of the primary revenue web component.
30307
+ * Extends the React.DetailedHTMLProps interface to inherit HTML attributes for an HTMLElement.
30308
+ * @interface ImtblPrimaryRevenueProps
30309
+ * @extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
30310
+ * @property {string | undefined} widgetConfig - Optional string representing the widget configuration.
30311
+ * @property {string | undefined} amount - The amount to be paid.
30312
+ * @property {string | undefined} products - A base64 encoded string of the array of items to be purchased.
30313
+ * @property {string | undefined} fromContractAddress - The contract address of the token to pay with.
30314
+ * @property {string | undefined} env - The environment to use: SANDBOX, DEV, PRODUCTION, ...
30315
+ * @property {string | undefined} environmentId - The environment id from Immutable Hub.
30316
+ */
30317
+ interface ImtblPrimaryRevenueProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
30318
+ widgetConfig?: string;
30319
+ amount: string;
30320
+ products: string;
30321
+ fromContractAddress: string;
30322
+ env: string;
30323
+ environmentId: string;
30324
+ }
30264
30325
  /**
30265
30326
  * Interface representing the props for the Bridge Widget component.
30266
30327
  * @interface BridgeReactProps
@@ -30382,6 +30443,7 @@ declare const checkout_widgets_d_IMTBLWidgetEvents: typeof IMTBLWidgetEvents;
30382
30443
  type checkout_widgets_d_ImtblBridgeProps = ImtblBridgeProps;
30383
30444
  type checkout_widgets_d_ImtblConnectProps = ImtblConnectProps;
30384
30445
  type checkout_widgets_d_ImtblOnRampProps = ImtblOnRampProps;
30446
+ type checkout_widgets_d_ImtblPrimaryRevenueProps = ImtblPrimaryRevenueProps;
30385
30447
  type checkout_widgets_d_ImtblSwapProps = ImtblSwapProps;
30386
30448
  type checkout_widgets_d_ImtblWalletProps = ImtblWalletProps;
30387
30449
  type checkout_widgets_d_OnRampEventType = OnRampEventType;
@@ -30392,6 +30454,10 @@ type checkout_widgets_d_OnRampReactProps = OnRampReactProps;
30392
30454
  type checkout_widgets_d_OnRampSuccess = OnRampSuccess;
30393
30455
  type checkout_widgets_d_OrchestrationEventType = OrchestrationEventType;
30394
30456
  declare const checkout_widgets_d_OrchestrationEventType: typeof OrchestrationEventType;
30457
+ type checkout_widgets_d_PrimaryRevenueEventType = PrimaryRevenueEventType;
30458
+ declare const checkout_widgets_d_PrimaryRevenueEventType: typeof PrimaryRevenueEventType;
30459
+ type checkout_widgets_d_PrimaryRevenueFailed = PrimaryRevenueFailed;
30460
+ type checkout_widgets_d_PrimaryRevenueSuccess = PrimaryRevenueSuccess;
30395
30461
  type checkout_widgets_d_RequestBridgeEvent = RequestBridgeEvent;
30396
30462
  type checkout_widgets_d_RequestConnectEvent = RequestConnectEvent;
30397
30463
  type checkout_widgets_d_RequestOnrampEvent = RequestOnrampEvent;
@@ -30434,6 +30500,7 @@ declare namespace checkout_widgets_d {
30434
30500
  checkout_widgets_d_ImtblBridgeProps as ImtblBridgeProps,
30435
30501
  checkout_widgets_d_ImtblConnectProps as ImtblConnectProps,
30436
30502
  checkout_widgets_d_ImtblOnRampProps as ImtblOnRampProps,
30503
+ checkout_widgets_d_ImtblPrimaryRevenueProps as ImtblPrimaryRevenueProps,
30437
30504
  checkout_widgets_d_ImtblSwapProps as ImtblSwapProps,
30438
30505
  checkout_widgets_d_ImtblWalletProps as ImtblWalletProps,
30439
30506
  checkout_widgets_d_OnRampEventType as OnRampEventType,
@@ -30442,6 +30509,9 @@ declare namespace checkout_widgets_d {
30442
30509
  checkout_widgets_d_OnRampReactProps as OnRampReactProps,
30443
30510
  checkout_widgets_d_OnRampSuccess as OnRampSuccess,
30444
30511
  checkout_widgets_d_OrchestrationEventType as OrchestrationEventType,
30512
+ checkout_widgets_d_PrimaryRevenueEventType as PrimaryRevenueEventType,
30513
+ checkout_widgets_d_PrimaryRevenueFailed as PrimaryRevenueFailed,
30514
+ checkout_widgets_d_PrimaryRevenueSuccess as PrimaryRevenueSuccess,
30445
30515
  checkout_widgets_d_RequestBridgeEvent as RequestBridgeEvent,
30446
30516
  checkout_widgets_d_RequestConnectEvent as RequestConnectEvent,
30447
30517
  checkout_widgets_d_RequestOnrampEvent as RequestOnrampEvent,