@wix/pricing-plans 1.0.92 → 1.0.93

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/pricing-plans",
3
- "version": "1.0.92",
3
+ "version": "1.0.93",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -44,5 +44,5 @@
44
44
  "fqdn": ""
45
45
  }
46
46
  },
47
- "falconPackageHash": "bc9b02cecb3d03e79d4abfaff35283d0b96c19ec8b14c35bb0c35598"
47
+ "falconPackageHash": "a456e2fbb4a9451894e007516f173e79331119a1702878ef4734d0c0"
48
48
  }
@@ -1,39 +1,39 @@
1
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
- interface HttpClient {
3
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
2
+ interface HttpClient$1 {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
4
4
  fetchWithAuth: typeof fetch;
5
5
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
6
  }
7
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
- type HttpResponse<T = any> = {
7
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
8
+ type HttpResponse$1<T = any> = {
9
9
  data: T;
10
10
  status: number;
11
11
  statusText: string;
12
12
  headers: any;
13
13
  request?: any;
14
14
  };
15
- type RequestOptions<_TResponse = any, Data = any> = {
15
+ type RequestOptions$1<_TResponse = any, Data = any> = {
16
16
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
17
  url: string;
18
18
  data?: Data;
19
19
  params?: URLSearchParams;
20
- } & APIMetadata;
21
- type APIMetadata = {
20
+ } & APIMetadata$1;
21
+ type APIMetadata$1 = {
22
22
  methodFqn?: string;
23
23
  entityFqdn?: string;
24
24
  packageName?: string;
25
25
  };
26
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
- type EventDefinition<Payload = unknown, Type extends string = string> = {
26
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
27
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
28
28
  __type: 'event-definition';
29
29
  type: Type;
30
30
  isDomainEvent?: boolean;
31
31
  transformations?: (envelope: unknown) => Payload;
32
32
  __payload: Payload;
33
33
  };
34
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
34
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
35
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
37
37
 
38
38
  declare global {
39
39
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -1708,7 +1708,7 @@ interface ManagementListOrdersOptions {
1708
1708
  fieldSet?: Set;
1709
1709
  }
1710
1710
 
1711
- declare function memberGetOrder$1(httpClient: HttpClient): MemberGetOrderSignature;
1711
+ declare function memberGetOrder$1(httpClient: HttpClient$1): MemberGetOrderSignature;
1712
1712
  interface MemberGetOrderSignature {
1713
1713
  /**
1714
1714
  * Gets an order by ID for the currently logged-in member.
@@ -1720,7 +1720,7 @@ interface MemberGetOrderSignature {
1720
1720
  */
1721
1721
  (_id: string, options?: MemberGetOrderOptions | undefined): Promise<Order & OrderNonNullableFields>;
1722
1722
  }
1723
- declare function memberListOrders$1(httpClient: HttpClient): MemberListOrdersSignature;
1723
+ declare function memberListOrders$1(httpClient: HttpClient$1): MemberListOrdersSignature;
1724
1724
  interface MemberListOrdersSignature {
1725
1725
  /**
1726
1726
  * Lists orders for the currently logged-in member.
@@ -1730,7 +1730,7 @@ interface MemberListOrdersSignature {
1730
1730
  */
1731
1731
  (options?: MemberListOrdersOptions | undefined): Promise<MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields>;
1732
1732
  }
1733
- declare function requestCancellation$1(httpClient: HttpClient): RequestCancellationSignature;
1733
+ declare function requestCancellation$1(httpClient: HttpClient$1): RequestCancellationSignature;
1734
1734
  interface RequestCancellationSignature {
1735
1735
  /**
1736
1736
  * Starts the process of canceling an order.
@@ -1758,7 +1758,7 @@ interface RequestCancellationSignature {
1758
1758
  */
1759
1759
  (_id: string, effectiveAt: CancellationEffectiveAt): Promise<void>;
1760
1760
  }
1761
- declare function createOfflineOrder$1(httpClient: HttpClient): CreateOfflineOrderSignature;
1761
+ declare function createOfflineOrder$1(httpClient: HttpClient$1): CreateOfflineOrderSignature;
1762
1762
  interface CreateOfflineOrderSignature {
1763
1763
  /**
1764
1764
  * Creates an order for a buyer who purchased the plan with an offline transaction.
@@ -1783,7 +1783,7 @@ interface CreateOfflineOrderSignature {
1783
1783
  */
1784
1784
  (planId: string, memberId: string, options?: CreateOfflineOrderOptions | undefined): Promise<CreateOfflineOrderResponse & CreateOfflineOrderResponseNonNullableFields>;
1785
1785
  }
1786
- declare function getOfflineOrderPreview$1(httpClient: HttpClient): GetOfflineOrderPreviewSignature;
1786
+ declare function getOfflineOrderPreview$1(httpClient: HttpClient$1): GetOfflineOrderPreviewSignature;
1787
1787
  interface GetOfflineOrderPreviewSignature {
1788
1788
  /**
1789
1789
  * Provides a preview of an offline order as if it was purchased.
@@ -1802,7 +1802,7 @@ interface GetOfflineOrderPreviewSignature {
1802
1802
  */
1803
1803
  (planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions | undefined): Promise<GetOfflineOrderPreviewResponse & GetOfflineOrderPreviewResponseNonNullableFields>;
1804
1804
  }
1805
- declare function getPricePreview$1(httpClient: HttpClient): GetPricePreviewSignature;
1805
+ declare function getPricePreview$1(httpClient: HttpClient$1): GetPricePreviewSignature;
1806
1806
  interface GetPricePreviewSignature {
1807
1807
  /**
1808
1808
  * Retrieves a preview of an order's pricing as if it was purchased.
@@ -1818,7 +1818,7 @@ interface GetPricePreviewSignature {
1818
1818
  */
1819
1819
  (planId: string, options?: GetPricePreviewOptions | undefined): Promise<GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields>;
1820
1820
  }
1821
- declare function managementGetOrder$1(httpClient: HttpClient): ManagementGetOrderSignature;
1821
+ declare function managementGetOrder$1(httpClient: HttpClient$1): ManagementGetOrderSignature;
1822
1822
  interface ManagementGetOrderSignature {
1823
1823
  /**
1824
1824
  * Retrieves an order by ID.
@@ -1829,7 +1829,7 @@ interface ManagementGetOrderSignature {
1829
1829
  */
1830
1830
  (_id: string, options?: ManagementGetOrderOptions | undefined): Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
1831
1831
  }
1832
- declare function managementListOrders$1(httpClient: HttpClient): ManagementListOrdersSignature;
1832
+ declare function managementListOrders$1(httpClient: HttpClient$1): ManagementListOrdersSignature;
1833
1833
  interface ManagementListOrdersSignature {
1834
1834
  /**
1835
1835
  * Lists pricing plan orders.
@@ -1841,7 +1841,7 @@ interface ManagementListOrdersSignature {
1841
1841
  */
1842
1842
  (options?: ManagementListOrdersOptions | undefined): Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
1843
1843
  }
1844
- declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature;
1844
+ declare function postponeEndDate$1(httpClient: HttpClient$1): PostponeEndDateSignature;
1845
1845
  interface PostponeEndDateSignature {
1846
1846
  /**
1847
1847
  * Extends the duration of a pricing plan order by postponing the order's `endDate`.
@@ -1863,7 +1863,7 @@ interface PostponeEndDateSignature {
1863
1863
  */
1864
1864
  (_id: string, endDate: Date): Promise<void>;
1865
1865
  }
1866
- declare function cancelOrder$1(httpClient: HttpClient): CancelOrderSignature;
1866
+ declare function cancelOrder$1(httpClient: HttpClient$1): CancelOrderSignature;
1867
1867
  interface CancelOrderSignature {
1868
1868
  /**
1869
1869
  * Cancels an existing order.
@@ -1894,7 +1894,7 @@ interface CancelOrderSignature {
1894
1894
  */
1895
1895
  (_id: string, effectiveAt: CancellationEffectiveAt): Promise<void>;
1896
1896
  }
1897
- declare function markAsPaid$1(httpClient: HttpClient): MarkAsPaidSignature;
1897
+ declare function markAsPaid$1(httpClient: HttpClient$1): MarkAsPaidSignature;
1898
1898
  interface MarkAsPaidSignature {
1899
1899
  /**
1900
1900
  * Marks an offline order as paid.
@@ -1917,7 +1917,7 @@ interface MarkAsPaidSignature {
1917
1917
  */
1918
1918
  (_id: string): Promise<void>;
1919
1919
  }
1920
- declare function pauseOrder$1(httpClient: HttpClient): PauseOrderSignature;
1920
+ declare function pauseOrder$1(httpClient: HttpClient$1): PauseOrderSignature;
1921
1921
  interface PauseOrderSignature {
1922
1922
  /**
1923
1923
  * Pauses a pricing plan order.
@@ -1938,7 +1938,7 @@ interface PauseOrderSignature {
1938
1938
  */
1939
1939
  (_id: string): Promise<void>;
1940
1940
  }
1941
- declare function resumeOrder$1(httpClient: HttpClient): ResumeOrderSignature;
1941
+ declare function resumeOrder$1(httpClient: HttpClient$1): ResumeOrderSignature;
1942
1942
  interface ResumeOrderSignature {
1943
1943
  /**
1944
1944
  * Resumes a paused pricing plan order.
@@ -1957,35 +1957,35 @@ interface ResumeOrderSignature {
1957
1957
  */
1958
1958
  (_id: string): Promise<void>;
1959
1959
  }
1960
- declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
1961
- declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
1962
- declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
1963
- declare const onOrderStartDateChanged$1: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
1964
- declare const onOrderPurchased$1: EventDefinition<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
1965
- declare const onOrderStarted$1: EventDefinition<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
1966
- declare const onOrderCycleStarted$1: EventDefinition<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
1967
- declare const onOrderAutoRenewCanceled$1: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
1968
- declare const onOrderEnded$1: EventDefinition<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
1969
- declare const onOrderEndDatePostponed$1: EventDefinition<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
1970
- declare const onOrderMarkedAsPaid$1: EventDefinition<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
1971
- declare const onOrderPaused$1: EventDefinition<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
1972
- declare const onOrderResumed$1: EventDefinition<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
1960
+ declare const onOrderCanceled$1: EventDefinition$1<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
1961
+ declare const onOrderCreated$1: EventDefinition$1<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
1962
+ declare const onOrderUpdated$1: EventDefinition$1<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
1963
+ declare const onOrderStartDateChanged$1: EventDefinition$1<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
1964
+ declare const onOrderPurchased$1: EventDefinition$1<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
1965
+ declare const onOrderStarted$1: EventDefinition$1<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
1966
+ declare const onOrderCycleStarted$1: EventDefinition$1<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
1967
+ declare const onOrderAutoRenewCanceled$1: EventDefinition$1<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
1968
+ declare const onOrderEnded$1: EventDefinition$1<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
1969
+ declare const onOrderEndDatePostponed$1: EventDefinition$1<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
1970
+ declare const onOrderMarkedAsPaid$1: EventDefinition$1<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
1971
+ declare const onOrderPaused$1: EventDefinition$1<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
1972
+ declare const onOrderResumed$1: EventDefinition$1<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
1973
1973
 
1974
- declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1974
+ declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
1975
1975
 
1976
- declare const memberGetOrder: BuildRESTFunction<typeof memberGetOrder$1> & typeof memberGetOrder$1;
1977
- declare const memberListOrders: BuildRESTFunction<typeof memberListOrders$1> & typeof memberListOrders$1;
1978
- declare const requestCancellation: BuildRESTFunction<typeof requestCancellation$1> & typeof requestCancellation$1;
1979
- declare const createOfflineOrder: BuildRESTFunction<typeof createOfflineOrder$1> & typeof createOfflineOrder$1;
1980
- declare const getOfflineOrderPreview: BuildRESTFunction<typeof getOfflineOrderPreview$1> & typeof getOfflineOrderPreview$1;
1981
- declare const getPricePreview: BuildRESTFunction<typeof getPricePreview$1> & typeof getPricePreview$1;
1982
- declare const managementGetOrder: BuildRESTFunction<typeof managementGetOrder$1> & typeof managementGetOrder$1;
1983
- declare const managementListOrders: BuildRESTFunction<typeof managementListOrders$1> & typeof managementListOrders$1;
1984
- declare const postponeEndDate: BuildRESTFunction<typeof postponeEndDate$1> & typeof postponeEndDate$1;
1985
- declare const cancelOrder: BuildRESTFunction<typeof cancelOrder$1> & typeof cancelOrder$1;
1986
- declare const markAsPaid: BuildRESTFunction<typeof markAsPaid$1> & typeof markAsPaid$1;
1987
- declare const pauseOrder: BuildRESTFunction<typeof pauseOrder$1> & typeof pauseOrder$1;
1988
- declare const resumeOrder: BuildRESTFunction<typeof resumeOrder$1> & typeof resumeOrder$1;
1976
+ declare const memberGetOrder: BuildRESTFunction$1<typeof memberGetOrder$1> & typeof memberGetOrder$1;
1977
+ declare const memberListOrders: BuildRESTFunction$1<typeof memberListOrders$1> & typeof memberListOrders$1;
1978
+ declare const requestCancellation: BuildRESTFunction$1<typeof requestCancellation$1> & typeof requestCancellation$1;
1979
+ declare const createOfflineOrder: BuildRESTFunction$1<typeof createOfflineOrder$1> & typeof createOfflineOrder$1;
1980
+ declare const getOfflineOrderPreview: BuildRESTFunction$1<typeof getOfflineOrderPreview$1> & typeof getOfflineOrderPreview$1;
1981
+ declare const getPricePreview: BuildRESTFunction$1<typeof getPricePreview$1> & typeof getPricePreview$1;
1982
+ declare const managementGetOrder: BuildRESTFunction$1<typeof managementGetOrder$1> & typeof managementGetOrder$1;
1983
+ declare const managementListOrders: BuildRESTFunction$1<typeof managementListOrders$1> & typeof managementListOrders$1;
1984
+ declare const postponeEndDate: BuildRESTFunction$1<typeof postponeEndDate$1> & typeof postponeEndDate$1;
1985
+ declare const cancelOrder: BuildRESTFunction$1<typeof cancelOrder$1> & typeof cancelOrder$1;
1986
+ declare const markAsPaid: BuildRESTFunction$1<typeof markAsPaid$1> & typeof markAsPaid$1;
1987
+ declare const pauseOrder: BuildRESTFunction$1<typeof pauseOrder$1> & typeof pauseOrder$1;
1988
+ declare const resumeOrder: BuildRESTFunction$1<typeof resumeOrder$1> & typeof resumeOrder$1;
1989
1989
 
1990
1990
  type _publicOnOrderCanceledType = typeof onOrderCanceled$1;
1991
1991
  /**
@@ -2274,6 +2274,50 @@ declare namespace context$1 {
2274
2274
  export { type ActionEvent$1 as ActionEvent, type ApplicationError$1 as ApplicationError, type context$1_ApplyCouponRequest as ApplyCouponRequest, type context$1_ApplyCouponResponse as ApplyCouponResponse, type BaseEventMetadata$1 as BaseEventMetadata, type BulkActionMetadata$1 as BulkActionMetadata, type context$1_BulkOrderResult as BulkOrderResult, type context$1_BulkPauseOrderRequest as BulkPauseOrderRequest, type context$1_BulkPauseOrderResponse as BulkPauseOrderResponse, type context$1_BulkResumeOrderRequest as BulkResumeOrderRequest, type context$1_BulkResumeOrderResponse as BulkResumeOrderResponse, type context$1_Buyer as Buyer, type context$1_CancelOrderRequest as CancelOrderRequest, type context$1_CancelOrderResponse as CancelOrderResponse, type context$1_Cancellation as Cancellation, context$1_CancellationCause as CancellationCause, context$1_CancellationEffectiveAt as CancellationEffectiveAt, type context$1_Captcha as Captcha, type context$1_ChangeStartDateRequest as ChangeStartDateRequest, type context$1_ChangeStartDateResponse as ChangeStartDateResponse, type context$1_Coupon as Coupon, type context$1_CouponsError as CouponsError, type context$1_CreateExternalOrderRequest as CreateExternalOrderRequest, type context$1_CreateExternalOrderResponse as CreateExternalOrderResponse, type context$1_CreateGuestOnlineOrderRequest as CreateGuestOnlineOrderRequest, type context$1_CreateGuestOnlineOrderResponse as CreateGuestOnlineOrderResponse, type context$1_CreateOfflineOrderOptions as CreateOfflineOrderOptions, type context$1_CreateOfflineOrderRequest as CreateOfflineOrderRequest, type context$1_CreateOfflineOrderResponse as CreateOfflineOrderResponse, type context$1_CreateOfflineOrderResponseNonNullableFields as CreateOfflineOrderResponseNonNullableFields, type context$1_CreateOnlineOrderRequest as CreateOnlineOrderRequest, type context$1_CreateOnlineOrderResponse as CreateOnlineOrderResponse, type context$1_CurrentCycle as CurrentCycle, type context$1_CursorPaging as CursorPaging, type Cursors$1 as Cursors, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type Duration$1 as Duration, type context$1_Empty as Empty, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type Fee$1 as Fee, type context$1_FormData as FormData, type context$1_GetAvailableOrderActionsRequest as GetAvailableOrderActionsRequest, type context$1_GetAvailableOrderActionsResponse as GetAvailableOrderActionsResponse, type context$1_GetGuestOnlineOrderPreviewRequest as GetGuestOnlineOrderPreviewRequest, type context$1_GetGuestOnlineOrderPreviewResponse as GetGuestOnlineOrderPreviewResponse, type context$1_GetOfflineOrderPreviewOptions as GetOfflineOrderPreviewOptions, type context$1_GetOfflineOrderPreviewRequest as GetOfflineOrderPreviewRequest, type context$1_GetOfflineOrderPreviewResponse as GetOfflineOrderPreviewResponse, type context$1_GetOfflineOrderPreviewResponseNonNullableFields as GetOfflineOrderPreviewResponseNonNullableFields, type context$1_GetOnlineOrderPreviewRequest as GetOnlineOrderPreviewRequest, type context$1_GetOnlineOrderPreviewResponse as GetOnlineOrderPreviewResponse, type context$1_GetOrderRequest as GetOrderRequest, type context$1_GetOrderResponse as GetOrderResponse, type context$1_GetOrderResponseNonNullableFields as GetOrderResponseNonNullableFields, type context$1_GetOrdersStatsRequest as GetOrdersStatsRequest, type context$1_GetOrdersStatsResponse as GetOrdersStatsResponse, type context$1_GetPricePreviewOptions as GetPricePreviewOptions, type context$1_GetPricePreviewRequest as GetPricePreviewRequest, type context$1_GetPricePreviewResponse as GetPricePreviewResponse, type context$1_GetPricePreviewResponseNonNullableFields as GetPricePreviewResponseNonNullableFields, type context$1_Guest as Guest, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type ItemMetadata$1 as ItemMetadata, type context$1_ListOrdersRequest as ListOrdersRequest, type context$1_ListOrdersResponse as ListOrdersResponse, type context$1_ListOrdersResponseNonNullableFields as ListOrdersResponseNonNullableFields, type context$1_ManagementGetOrderOptions as ManagementGetOrderOptions, type context$1_ManagementListOrdersOptions as ManagementListOrdersOptions, type context$1_MarkAsPaidRequest as MarkAsPaidRequest, type context$1_MarkAsPaidResponse as MarkAsPaidResponse, type context$1_MemberGetOrderOptions as MemberGetOrderOptions, type context$1_MemberGetOrderRequest as MemberGetOrderRequest, type context$1_MemberGetOrderResponse as MemberGetOrderResponse, type context$1_MemberGetOrderResponseNonNullableFields as MemberGetOrderResponseNonNullableFields, type context$1_MemberListOrdersOptions as MemberListOrdersOptions, type context$1_MemberListOrdersRequest as MemberListOrdersRequest, type context$1_MemberListOrdersResponse as MemberListOrdersResponse, type context$1_MemberListOrdersResponseNonNullableFields as MemberListOrdersResponseNonNullableFields, type MessageEnvelope$1 as MessageEnvelope, type context$1_OnBehalf as OnBehalf, type context$1_Order as Order, type context$1_OrderAutoRenewCanceled as OrderAutoRenewCanceled, type context$1_OrderAutoRenewCanceledEnvelope as OrderAutoRenewCanceledEnvelope, type context$1_OrderCanceled as OrderCanceled, type context$1_OrderCanceledEnvelope as OrderCanceledEnvelope, type context$1_OrderCreatedEnvelope as OrderCreatedEnvelope, type context$1_OrderCycle as OrderCycle, type context$1_OrderCycleStarted as OrderCycleStarted, type context$1_OrderCycleStartedEnvelope as OrderCycleStartedEnvelope, type context$1_OrderEndDatePostponed as OrderEndDatePostponed, type context$1_OrderEndDatePostponedEnvelope as OrderEndDatePostponedEnvelope, type context$1_OrderEnded as OrderEnded, type context$1_OrderEndedEnvelope as OrderEndedEnvelope, type context$1_OrderMarkedAsPaid as OrderMarkedAsPaid, type context$1_OrderMarkedAsPaidEnvelope as OrderMarkedAsPaidEnvelope, context$1_OrderMethod as OrderMethod, type context$1_OrderNonNullableFields as OrderNonNullableFields, type context$1_OrderPaused as OrderPaused, type context$1_OrderPausedEnvelope as OrderPausedEnvelope, type context$1_OrderPurchased as OrderPurchased, type context$1_OrderPurchasedEnvelope as OrderPurchasedEnvelope, type context$1_OrderResumed as OrderResumed, type context$1_OrderResumedEnvelope as OrderResumedEnvelope, type context$1_OrderStartDateChanged as OrderStartDateChanged, type context$1_OrderStartDateChangedEnvelope as OrderStartDateChangedEnvelope, type context$1_OrderStarted as OrderStarted, type context$1_OrderStartedEnvelope as OrderStartedEnvelope, context$1_OrderStatus as OrderStatus, context$1_OrderType as OrderType, type context$1_OrderUpdatedEnvelope as OrderUpdatedEnvelope, type context$1_OrdersQueryOrdersRequest as OrdersQueryOrdersRequest, type context$1_OrdersQueryOrdersResponse as OrdersQueryOrdersResponse, type Paging$1 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, type context$1_PauseOrderRequest as PauseOrderRequest, type context$1_PauseOrderResponse as PauseOrderResponse, type context$1_PausePeriod as PausePeriod, context$1_PaymentStatus as PaymentStatus, PeriodUnit$1 as PeriodUnit, type context$1_PostponeEndDateRequest as PostponeEndDateRequest, type context$1_PostponeEndDateResponse as PostponeEndDateResponse, type context$1_Price as Price, type context$1_PriceDetails as PriceDetails, type context$1_PriceDetailsPricingModelOneOf as PriceDetailsPricingModelOneOf, type context$1_PriceDuration as PriceDuration, type context$1_PricingDetails as PricingDetails, type context$1_PricingDetailsPricingModelOneOf as PricingDetailsPricingModelOneOf, type context$1_QueryOrdersRequest as QueryOrdersRequest, type context$1_QueryOrdersResponse as QueryOrdersResponse, type QueryV2$1 as QueryV2, type context$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, context$1_ReasonNotSuspendable as ReasonNotSuspendable, type Recurrence$1 as Recurrence, type context$1_RequestCancellationRequest as RequestCancellationRequest, type context$1_RequestCancellationResponse as RequestCancellationResponse, type RestoreInfo$1 as RestoreInfo, type context$1_ResumeOrderRequest as ResumeOrderRequest, type context$1_ResumeOrderResponse as ResumeOrderResponse, context$1_Set as Set, type context$1_SetSubmissionRequest as SetSubmissionRequest, type context$1_SetSubmissionResponse as SetSubmissionResponse, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, type context$1_SpannedPrice as SpannedPrice, context$1_Status as Status, type context$1_Tax as Tax, WebhookIdentityType$1 as WebhookIdentityType, type context$1__publicOnOrderAutoRenewCanceledType as _publicOnOrderAutoRenewCanceledType, type context$1__publicOnOrderCanceledType as _publicOnOrderCanceledType, type context$1__publicOnOrderCreatedType as _publicOnOrderCreatedType, type context$1__publicOnOrderCycleStartedType as _publicOnOrderCycleStartedType, type context$1__publicOnOrderEndDatePostponedType as _publicOnOrderEndDatePostponedType, type context$1__publicOnOrderEndedType as _publicOnOrderEndedType, type context$1__publicOnOrderMarkedAsPaidType as _publicOnOrderMarkedAsPaidType, type context$1__publicOnOrderPausedType as _publicOnOrderPausedType, type context$1__publicOnOrderPurchasedType as _publicOnOrderPurchasedType, type context$1__publicOnOrderResumedType as _publicOnOrderResumedType, type context$1__publicOnOrderStartDateChangedType as _publicOnOrderStartDateChangedType, type context$1__publicOnOrderStartedType as _publicOnOrderStartedType, type context$1__publicOnOrderUpdatedType as _publicOnOrderUpdatedType, context$1_cancelOrder as cancelOrder, context$1_createOfflineOrder as createOfflineOrder, context$1_getOfflineOrderPreview as getOfflineOrderPreview, context$1_getPricePreview as getPricePreview, context$1_managementGetOrder as managementGetOrder, context$1_managementListOrders as managementListOrders, context$1_markAsPaid as markAsPaid, context$1_memberGetOrder as memberGetOrder, context$1_memberListOrders as memberListOrders, context$1_onOrderAutoRenewCanceled as onOrderAutoRenewCanceled, context$1_onOrderCanceled as onOrderCanceled, context$1_onOrderCreated as onOrderCreated, context$1_onOrderCycleStarted as onOrderCycleStarted, context$1_onOrderEndDatePostponed as onOrderEndDatePostponed, context$1_onOrderEnded as onOrderEnded, context$1_onOrderMarkedAsPaid as onOrderMarkedAsPaid, context$1_onOrderPaused as onOrderPaused, context$1_onOrderPurchased as onOrderPurchased, context$1_onOrderResumed as onOrderResumed, context$1_onOrderStartDateChanged as onOrderStartDateChanged, context$1_onOrderStarted as onOrderStarted, context$1_onOrderUpdated as onOrderUpdated, context$1_pauseOrder as pauseOrder, context$1_postponeEndDate as postponeEndDate, onOrderAutoRenewCanceled$1 as publicOnOrderAutoRenewCanceled, onOrderCanceled$1 as publicOnOrderCanceled, onOrderCreated$1 as publicOnOrderCreated, onOrderCycleStarted$1 as publicOnOrderCycleStarted, onOrderEndDatePostponed$1 as publicOnOrderEndDatePostponed, onOrderEnded$1 as publicOnOrderEnded, onOrderMarkedAsPaid$1 as publicOnOrderMarkedAsPaid, onOrderPaused$1 as publicOnOrderPaused, onOrderPurchased$1 as publicOnOrderPurchased, onOrderResumed$1 as publicOnOrderResumed, onOrderStartDateChanged$1 as publicOnOrderStartDateChanged, onOrderStarted$1 as publicOnOrderStarted, onOrderUpdated$1 as publicOnOrderUpdated, context$1_requestCancellation as requestCancellation, context$1_resumeOrder as resumeOrder };
2275
2275
  }
2276
2276
 
2277
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2278
+ interface HttpClient {
2279
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
2280
+ fetchWithAuth: typeof fetch;
2281
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
2282
+ }
2283
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
2284
+ type HttpResponse<T = any> = {
2285
+ data: T;
2286
+ status: number;
2287
+ statusText: string;
2288
+ headers: any;
2289
+ request?: any;
2290
+ };
2291
+ type RequestOptions<_TResponse = any, Data = any> = {
2292
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2293
+ url: string;
2294
+ data?: Data;
2295
+ params?: URLSearchParams;
2296
+ } & APIMetadata;
2297
+ type APIMetadata = {
2298
+ methodFqn?: string;
2299
+ entityFqdn?: string;
2300
+ packageName?: string;
2301
+ };
2302
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
2303
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
2304
+ __type: 'event-definition';
2305
+ type: Type;
2306
+ isDomainEvent?: boolean;
2307
+ transformations?: (envelope: unknown) => Payload;
2308
+ __payload: Payload;
2309
+ };
2310
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
2311
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
2312
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
2313
+
2314
+ declare global {
2315
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2316
+ interface SymbolConstructor {
2317
+ readonly observable: symbol;
2318
+ }
2319
+ }
2320
+
2277
2321
  /** Information about the pricing plan. */
2278
2322
  interface Plan {
2279
2323
  /**
@@ -1,39 +1,39 @@
1
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
- interface HttpClient {
3
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
2
+ interface HttpClient$1 {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
4
4
  fetchWithAuth: typeof fetch;
5
5
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
6
  }
7
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
- type HttpResponse<T = any> = {
7
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
8
+ type HttpResponse$1<T = any> = {
9
9
  data: T;
10
10
  status: number;
11
11
  statusText: string;
12
12
  headers: any;
13
13
  request?: any;
14
14
  };
15
- type RequestOptions<_TResponse = any, Data = any> = {
15
+ type RequestOptions$1<_TResponse = any, Data = any> = {
16
16
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
17
  url: string;
18
18
  data?: Data;
19
19
  params?: URLSearchParams;
20
- } & APIMetadata;
21
- type APIMetadata = {
20
+ } & APIMetadata$1;
21
+ type APIMetadata$1 = {
22
22
  methodFqn?: string;
23
23
  entityFqdn?: string;
24
24
  packageName?: string;
25
25
  };
26
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
- type EventDefinition<Payload = unknown, Type extends string = string> = {
26
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
27
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
28
28
  __type: 'event-definition';
29
29
  type: Type;
30
30
  isDomainEvent?: boolean;
31
31
  transformations?: (envelope: unknown) => Payload;
32
32
  __payload: Payload;
33
33
  };
34
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
34
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
35
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
37
37
 
38
38
  declare global {
39
39
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -1708,7 +1708,7 @@ interface ManagementListOrdersOptions {
1708
1708
  fieldSet?: Set;
1709
1709
  }
1710
1710
 
1711
- declare function memberGetOrder$1(httpClient: HttpClient): MemberGetOrderSignature;
1711
+ declare function memberGetOrder$1(httpClient: HttpClient$1): MemberGetOrderSignature;
1712
1712
  interface MemberGetOrderSignature {
1713
1713
  /**
1714
1714
  * Gets an order by ID for the currently logged-in member.
@@ -1720,7 +1720,7 @@ interface MemberGetOrderSignature {
1720
1720
  */
1721
1721
  (_id: string, options?: MemberGetOrderOptions | undefined): Promise<Order & OrderNonNullableFields>;
1722
1722
  }
1723
- declare function memberListOrders$1(httpClient: HttpClient): MemberListOrdersSignature;
1723
+ declare function memberListOrders$1(httpClient: HttpClient$1): MemberListOrdersSignature;
1724
1724
  interface MemberListOrdersSignature {
1725
1725
  /**
1726
1726
  * Lists orders for the currently logged-in member.
@@ -1730,7 +1730,7 @@ interface MemberListOrdersSignature {
1730
1730
  */
1731
1731
  (options?: MemberListOrdersOptions | undefined): Promise<MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields>;
1732
1732
  }
1733
- declare function requestCancellation$1(httpClient: HttpClient): RequestCancellationSignature;
1733
+ declare function requestCancellation$1(httpClient: HttpClient$1): RequestCancellationSignature;
1734
1734
  interface RequestCancellationSignature {
1735
1735
  /**
1736
1736
  * Starts the process of canceling an order.
@@ -1758,7 +1758,7 @@ interface RequestCancellationSignature {
1758
1758
  */
1759
1759
  (_id: string, effectiveAt: CancellationEffectiveAt): Promise<void>;
1760
1760
  }
1761
- declare function createOfflineOrder$1(httpClient: HttpClient): CreateOfflineOrderSignature;
1761
+ declare function createOfflineOrder$1(httpClient: HttpClient$1): CreateOfflineOrderSignature;
1762
1762
  interface CreateOfflineOrderSignature {
1763
1763
  /**
1764
1764
  * Creates an order for a buyer who purchased the plan with an offline transaction.
@@ -1783,7 +1783,7 @@ interface CreateOfflineOrderSignature {
1783
1783
  */
1784
1784
  (planId: string, memberId: string, options?: CreateOfflineOrderOptions | undefined): Promise<CreateOfflineOrderResponse & CreateOfflineOrderResponseNonNullableFields>;
1785
1785
  }
1786
- declare function getOfflineOrderPreview$1(httpClient: HttpClient): GetOfflineOrderPreviewSignature;
1786
+ declare function getOfflineOrderPreview$1(httpClient: HttpClient$1): GetOfflineOrderPreviewSignature;
1787
1787
  interface GetOfflineOrderPreviewSignature {
1788
1788
  /**
1789
1789
  * Provides a preview of an offline order as if it was purchased.
@@ -1802,7 +1802,7 @@ interface GetOfflineOrderPreviewSignature {
1802
1802
  */
1803
1803
  (planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions | undefined): Promise<GetOfflineOrderPreviewResponse & GetOfflineOrderPreviewResponseNonNullableFields>;
1804
1804
  }
1805
- declare function getPricePreview$1(httpClient: HttpClient): GetPricePreviewSignature;
1805
+ declare function getPricePreview$1(httpClient: HttpClient$1): GetPricePreviewSignature;
1806
1806
  interface GetPricePreviewSignature {
1807
1807
  /**
1808
1808
  * Retrieves a preview of an order's pricing as if it was purchased.
@@ -1818,7 +1818,7 @@ interface GetPricePreviewSignature {
1818
1818
  */
1819
1819
  (planId: string, options?: GetPricePreviewOptions | undefined): Promise<GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields>;
1820
1820
  }
1821
- declare function managementGetOrder$1(httpClient: HttpClient): ManagementGetOrderSignature;
1821
+ declare function managementGetOrder$1(httpClient: HttpClient$1): ManagementGetOrderSignature;
1822
1822
  interface ManagementGetOrderSignature {
1823
1823
  /**
1824
1824
  * Retrieves an order by ID.
@@ -1829,7 +1829,7 @@ interface ManagementGetOrderSignature {
1829
1829
  */
1830
1830
  (_id: string, options?: ManagementGetOrderOptions | undefined): Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
1831
1831
  }
1832
- declare function managementListOrders$1(httpClient: HttpClient): ManagementListOrdersSignature;
1832
+ declare function managementListOrders$1(httpClient: HttpClient$1): ManagementListOrdersSignature;
1833
1833
  interface ManagementListOrdersSignature {
1834
1834
  /**
1835
1835
  * Lists pricing plan orders.
@@ -1841,7 +1841,7 @@ interface ManagementListOrdersSignature {
1841
1841
  */
1842
1842
  (options?: ManagementListOrdersOptions | undefined): Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
1843
1843
  }
1844
- declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature;
1844
+ declare function postponeEndDate$1(httpClient: HttpClient$1): PostponeEndDateSignature;
1845
1845
  interface PostponeEndDateSignature {
1846
1846
  /**
1847
1847
  * Extends the duration of a pricing plan order by postponing the order's `endDate`.
@@ -1863,7 +1863,7 @@ interface PostponeEndDateSignature {
1863
1863
  */
1864
1864
  (_id: string, endDate: Date): Promise<void>;
1865
1865
  }
1866
- declare function cancelOrder$1(httpClient: HttpClient): CancelOrderSignature;
1866
+ declare function cancelOrder$1(httpClient: HttpClient$1): CancelOrderSignature;
1867
1867
  interface CancelOrderSignature {
1868
1868
  /**
1869
1869
  * Cancels an existing order.
@@ -1894,7 +1894,7 @@ interface CancelOrderSignature {
1894
1894
  */
1895
1895
  (_id: string, effectiveAt: CancellationEffectiveAt): Promise<void>;
1896
1896
  }
1897
- declare function markAsPaid$1(httpClient: HttpClient): MarkAsPaidSignature;
1897
+ declare function markAsPaid$1(httpClient: HttpClient$1): MarkAsPaidSignature;
1898
1898
  interface MarkAsPaidSignature {
1899
1899
  /**
1900
1900
  * Marks an offline order as paid.
@@ -1917,7 +1917,7 @@ interface MarkAsPaidSignature {
1917
1917
  */
1918
1918
  (_id: string): Promise<void>;
1919
1919
  }
1920
- declare function pauseOrder$1(httpClient: HttpClient): PauseOrderSignature;
1920
+ declare function pauseOrder$1(httpClient: HttpClient$1): PauseOrderSignature;
1921
1921
  interface PauseOrderSignature {
1922
1922
  /**
1923
1923
  * Pauses a pricing plan order.
@@ -1938,7 +1938,7 @@ interface PauseOrderSignature {
1938
1938
  */
1939
1939
  (_id: string): Promise<void>;
1940
1940
  }
1941
- declare function resumeOrder$1(httpClient: HttpClient): ResumeOrderSignature;
1941
+ declare function resumeOrder$1(httpClient: HttpClient$1): ResumeOrderSignature;
1942
1942
  interface ResumeOrderSignature {
1943
1943
  /**
1944
1944
  * Resumes a paused pricing plan order.
@@ -1957,35 +1957,35 @@ interface ResumeOrderSignature {
1957
1957
  */
1958
1958
  (_id: string): Promise<void>;
1959
1959
  }
1960
- declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
1961
- declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
1962
- declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
1963
- declare const onOrderStartDateChanged$1: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
1964
- declare const onOrderPurchased$1: EventDefinition<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
1965
- declare const onOrderStarted$1: EventDefinition<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
1966
- declare const onOrderCycleStarted$1: EventDefinition<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
1967
- declare const onOrderAutoRenewCanceled$1: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
1968
- declare const onOrderEnded$1: EventDefinition<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
1969
- declare const onOrderEndDatePostponed$1: EventDefinition<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
1970
- declare const onOrderMarkedAsPaid$1: EventDefinition<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
1971
- declare const onOrderPaused$1: EventDefinition<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
1972
- declare const onOrderResumed$1: EventDefinition<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
1960
+ declare const onOrderCanceled$1: EventDefinition$1<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
1961
+ declare const onOrderCreated$1: EventDefinition$1<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
1962
+ declare const onOrderUpdated$1: EventDefinition$1<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
1963
+ declare const onOrderStartDateChanged$1: EventDefinition$1<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
1964
+ declare const onOrderPurchased$1: EventDefinition$1<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
1965
+ declare const onOrderStarted$1: EventDefinition$1<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
1966
+ declare const onOrderCycleStarted$1: EventDefinition$1<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
1967
+ declare const onOrderAutoRenewCanceled$1: EventDefinition$1<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
1968
+ declare const onOrderEnded$1: EventDefinition$1<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
1969
+ declare const onOrderEndDatePostponed$1: EventDefinition$1<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
1970
+ declare const onOrderMarkedAsPaid$1: EventDefinition$1<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
1971
+ declare const onOrderPaused$1: EventDefinition$1<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
1972
+ declare const onOrderResumed$1: EventDefinition$1<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
1973
1973
 
1974
- declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1974
+ declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
1975
1975
 
1976
- declare const memberGetOrder: BuildRESTFunction<typeof memberGetOrder$1> & typeof memberGetOrder$1;
1977
- declare const memberListOrders: BuildRESTFunction<typeof memberListOrders$1> & typeof memberListOrders$1;
1978
- declare const requestCancellation: BuildRESTFunction<typeof requestCancellation$1> & typeof requestCancellation$1;
1979
- declare const createOfflineOrder: BuildRESTFunction<typeof createOfflineOrder$1> & typeof createOfflineOrder$1;
1980
- declare const getOfflineOrderPreview: BuildRESTFunction<typeof getOfflineOrderPreview$1> & typeof getOfflineOrderPreview$1;
1981
- declare const getPricePreview: BuildRESTFunction<typeof getPricePreview$1> & typeof getPricePreview$1;
1982
- declare const managementGetOrder: BuildRESTFunction<typeof managementGetOrder$1> & typeof managementGetOrder$1;
1983
- declare const managementListOrders: BuildRESTFunction<typeof managementListOrders$1> & typeof managementListOrders$1;
1984
- declare const postponeEndDate: BuildRESTFunction<typeof postponeEndDate$1> & typeof postponeEndDate$1;
1985
- declare const cancelOrder: BuildRESTFunction<typeof cancelOrder$1> & typeof cancelOrder$1;
1986
- declare const markAsPaid: BuildRESTFunction<typeof markAsPaid$1> & typeof markAsPaid$1;
1987
- declare const pauseOrder: BuildRESTFunction<typeof pauseOrder$1> & typeof pauseOrder$1;
1988
- declare const resumeOrder: BuildRESTFunction<typeof resumeOrder$1> & typeof resumeOrder$1;
1976
+ declare const memberGetOrder: BuildRESTFunction$1<typeof memberGetOrder$1> & typeof memberGetOrder$1;
1977
+ declare const memberListOrders: BuildRESTFunction$1<typeof memberListOrders$1> & typeof memberListOrders$1;
1978
+ declare const requestCancellation: BuildRESTFunction$1<typeof requestCancellation$1> & typeof requestCancellation$1;
1979
+ declare const createOfflineOrder: BuildRESTFunction$1<typeof createOfflineOrder$1> & typeof createOfflineOrder$1;
1980
+ declare const getOfflineOrderPreview: BuildRESTFunction$1<typeof getOfflineOrderPreview$1> & typeof getOfflineOrderPreview$1;
1981
+ declare const getPricePreview: BuildRESTFunction$1<typeof getPricePreview$1> & typeof getPricePreview$1;
1982
+ declare const managementGetOrder: BuildRESTFunction$1<typeof managementGetOrder$1> & typeof managementGetOrder$1;
1983
+ declare const managementListOrders: BuildRESTFunction$1<typeof managementListOrders$1> & typeof managementListOrders$1;
1984
+ declare const postponeEndDate: BuildRESTFunction$1<typeof postponeEndDate$1> & typeof postponeEndDate$1;
1985
+ declare const cancelOrder: BuildRESTFunction$1<typeof cancelOrder$1> & typeof cancelOrder$1;
1986
+ declare const markAsPaid: BuildRESTFunction$1<typeof markAsPaid$1> & typeof markAsPaid$1;
1987
+ declare const pauseOrder: BuildRESTFunction$1<typeof pauseOrder$1> & typeof pauseOrder$1;
1988
+ declare const resumeOrder: BuildRESTFunction$1<typeof resumeOrder$1> & typeof resumeOrder$1;
1989
1989
 
1990
1990
  type _publicOnOrderCanceledType = typeof onOrderCanceled$1;
1991
1991
  /**
@@ -2274,6 +2274,50 @@ declare namespace index_d$1 {
2274
2274
  export { type ActionEvent$1 as ActionEvent, type ApplicationError$1 as ApplicationError, type index_d$1_ApplyCouponRequest as ApplyCouponRequest, type index_d$1_ApplyCouponResponse as ApplyCouponResponse, type BaseEventMetadata$1 as BaseEventMetadata, type BulkActionMetadata$1 as BulkActionMetadata, type index_d$1_BulkOrderResult as BulkOrderResult, type index_d$1_BulkPauseOrderRequest as BulkPauseOrderRequest, type index_d$1_BulkPauseOrderResponse as BulkPauseOrderResponse, type index_d$1_BulkResumeOrderRequest as BulkResumeOrderRequest, type index_d$1_BulkResumeOrderResponse as BulkResumeOrderResponse, type index_d$1_Buyer as Buyer, type index_d$1_CancelOrderRequest as CancelOrderRequest, type index_d$1_CancelOrderResponse as CancelOrderResponse, type index_d$1_Cancellation as Cancellation, index_d$1_CancellationCause as CancellationCause, index_d$1_CancellationEffectiveAt as CancellationEffectiveAt, type index_d$1_Captcha as Captcha, type index_d$1_ChangeStartDateRequest as ChangeStartDateRequest, type index_d$1_ChangeStartDateResponse as ChangeStartDateResponse, type index_d$1_Coupon as Coupon, type index_d$1_CouponsError as CouponsError, type index_d$1_CreateExternalOrderRequest as CreateExternalOrderRequest, type index_d$1_CreateExternalOrderResponse as CreateExternalOrderResponse, type index_d$1_CreateGuestOnlineOrderRequest as CreateGuestOnlineOrderRequest, type index_d$1_CreateGuestOnlineOrderResponse as CreateGuestOnlineOrderResponse, type index_d$1_CreateOfflineOrderOptions as CreateOfflineOrderOptions, type index_d$1_CreateOfflineOrderRequest as CreateOfflineOrderRequest, type index_d$1_CreateOfflineOrderResponse as CreateOfflineOrderResponse, type index_d$1_CreateOfflineOrderResponseNonNullableFields as CreateOfflineOrderResponseNonNullableFields, type index_d$1_CreateOnlineOrderRequest as CreateOnlineOrderRequest, type index_d$1_CreateOnlineOrderResponse as CreateOnlineOrderResponse, type index_d$1_CurrentCycle as CurrentCycle, type index_d$1_CursorPaging as CursorPaging, type Cursors$1 as Cursors, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type Duration$1 as Duration, type index_d$1_Empty as Empty, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type Fee$1 as Fee, type index_d$1_FormData as FormData, type index_d$1_GetAvailableOrderActionsRequest as GetAvailableOrderActionsRequest, type index_d$1_GetAvailableOrderActionsResponse as GetAvailableOrderActionsResponse, type index_d$1_GetGuestOnlineOrderPreviewRequest as GetGuestOnlineOrderPreviewRequest, type index_d$1_GetGuestOnlineOrderPreviewResponse as GetGuestOnlineOrderPreviewResponse, type index_d$1_GetOfflineOrderPreviewOptions as GetOfflineOrderPreviewOptions, type index_d$1_GetOfflineOrderPreviewRequest as GetOfflineOrderPreviewRequest, type index_d$1_GetOfflineOrderPreviewResponse as GetOfflineOrderPreviewResponse, type index_d$1_GetOfflineOrderPreviewResponseNonNullableFields as GetOfflineOrderPreviewResponseNonNullableFields, type index_d$1_GetOnlineOrderPreviewRequest as GetOnlineOrderPreviewRequest, type index_d$1_GetOnlineOrderPreviewResponse as GetOnlineOrderPreviewResponse, type index_d$1_GetOrderRequest as GetOrderRequest, type index_d$1_GetOrderResponse as GetOrderResponse, type index_d$1_GetOrderResponseNonNullableFields as GetOrderResponseNonNullableFields, type index_d$1_GetOrdersStatsRequest as GetOrdersStatsRequest, type index_d$1_GetOrdersStatsResponse as GetOrdersStatsResponse, type index_d$1_GetPricePreviewOptions as GetPricePreviewOptions, type index_d$1_GetPricePreviewRequest as GetPricePreviewRequest, type index_d$1_GetPricePreviewResponse as GetPricePreviewResponse, type index_d$1_GetPricePreviewResponseNonNullableFields as GetPricePreviewResponseNonNullableFields, type index_d$1_Guest as Guest, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type ItemMetadata$1 as ItemMetadata, type index_d$1_ListOrdersRequest as ListOrdersRequest, type index_d$1_ListOrdersResponse as ListOrdersResponse, type index_d$1_ListOrdersResponseNonNullableFields as ListOrdersResponseNonNullableFields, type index_d$1_ManagementGetOrderOptions as ManagementGetOrderOptions, type index_d$1_ManagementListOrdersOptions as ManagementListOrdersOptions, type index_d$1_MarkAsPaidRequest as MarkAsPaidRequest, type index_d$1_MarkAsPaidResponse as MarkAsPaidResponse, type index_d$1_MemberGetOrderOptions as MemberGetOrderOptions, type index_d$1_MemberGetOrderRequest as MemberGetOrderRequest, type index_d$1_MemberGetOrderResponse as MemberGetOrderResponse, type index_d$1_MemberGetOrderResponseNonNullableFields as MemberGetOrderResponseNonNullableFields, type index_d$1_MemberListOrdersOptions as MemberListOrdersOptions, type index_d$1_MemberListOrdersRequest as MemberListOrdersRequest, type index_d$1_MemberListOrdersResponse as MemberListOrdersResponse, type index_d$1_MemberListOrdersResponseNonNullableFields as MemberListOrdersResponseNonNullableFields, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_OnBehalf as OnBehalf, type index_d$1_Order as Order, type index_d$1_OrderAutoRenewCanceled as OrderAutoRenewCanceled, type index_d$1_OrderAutoRenewCanceledEnvelope as OrderAutoRenewCanceledEnvelope, type index_d$1_OrderCanceled as OrderCanceled, type index_d$1_OrderCanceledEnvelope as OrderCanceledEnvelope, type index_d$1_OrderCreatedEnvelope as OrderCreatedEnvelope, type index_d$1_OrderCycle as OrderCycle, type index_d$1_OrderCycleStarted as OrderCycleStarted, type index_d$1_OrderCycleStartedEnvelope as OrderCycleStartedEnvelope, type index_d$1_OrderEndDatePostponed as OrderEndDatePostponed, type index_d$1_OrderEndDatePostponedEnvelope as OrderEndDatePostponedEnvelope, type index_d$1_OrderEnded as OrderEnded, type index_d$1_OrderEndedEnvelope as OrderEndedEnvelope, type index_d$1_OrderMarkedAsPaid as OrderMarkedAsPaid, type index_d$1_OrderMarkedAsPaidEnvelope as OrderMarkedAsPaidEnvelope, index_d$1_OrderMethod as OrderMethod, type index_d$1_OrderNonNullableFields as OrderNonNullableFields, type index_d$1_OrderPaused as OrderPaused, type index_d$1_OrderPausedEnvelope as OrderPausedEnvelope, type index_d$1_OrderPurchased as OrderPurchased, type index_d$1_OrderPurchasedEnvelope as OrderPurchasedEnvelope, type index_d$1_OrderResumed as OrderResumed, type index_d$1_OrderResumedEnvelope as OrderResumedEnvelope, type index_d$1_OrderStartDateChanged as OrderStartDateChanged, type index_d$1_OrderStartDateChangedEnvelope as OrderStartDateChangedEnvelope, type index_d$1_OrderStarted as OrderStarted, type index_d$1_OrderStartedEnvelope as OrderStartedEnvelope, index_d$1_OrderStatus as OrderStatus, index_d$1_OrderType as OrderType, type index_d$1_OrderUpdatedEnvelope as OrderUpdatedEnvelope, type index_d$1_OrdersQueryOrdersRequest as OrdersQueryOrdersRequest, type index_d$1_OrdersQueryOrdersResponse as OrdersQueryOrdersResponse, type Paging$1 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, type index_d$1_PauseOrderRequest as PauseOrderRequest, type index_d$1_PauseOrderResponse as PauseOrderResponse, type index_d$1_PausePeriod as PausePeriod, index_d$1_PaymentStatus as PaymentStatus, PeriodUnit$1 as PeriodUnit, type index_d$1_PostponeEndDateRequest as PostponeEndDateRequest, type index_d$1_PostponeEndDateResponse as PostponeEndDateResponse, type index_d$1_Price as Price, type index_d$1_PriceDetails as PriceDetails, type index_d$1_PriceDetailsPricingModelOneOf as PriceDetailsPricingModelOneOf, type index_d$1_PriceDuration as PriceDuration, type index_d$1_PricingDetails as PricingDetails, type index_d$1_PricingDetailsPricingModelOneOf as PricingDetailsPricingModelOneOf, type index_d$1_QueryOrdersRequest as QueryOrdersRequest, type index_d$1_QueryOrdersResponse as QueryOrdersResponse, type QueryV2$1 as QueryV2, type index_d$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, index_d$1_ReasonNotSuspendable as ReasonNotSuspendable, type Recurrence$1 as Recurrence, type index_d$1_RequestCancellationRequest as RequestCancellationRequest, type index_d$1_RequestCancellationResponse as RequestCancellationResponse, type RestoreInfo$1 as RestoreInfo, type index_d$1_ResumeOrderRequest as ResumeOrderRequest, type index_d$1_ResumeOrderResponse as ResumeOrderResponse, index_d$1_Set as Set, type index_d$1_SetSubmissionRequest as SetSubmissionRequest, type index_d$1_SetSubmissionResponse as SetSubmissionResponse, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, type index_d$1_SpannedPrice as SpannedPrice, index_d$1_Status as Status, type index_d$1_Tax as Tax, WebhookIdentityType$1 as WebhookIdentityType, type index_d$1__publicOnOrderAutoRenewCanceledType as _publicOnOrderAutoRenewCanceledType, type index_d$1__publicOnOrderCanceledType as _publicOnOrderCanceledType, type index_d$1__publicOnOrderCreatedType as _publicOnOrderCreatedType, type index_d$1__publicOnOrderCycleStartedType as _publicOnOrderCycleStartedType, type index_d$1__publicOnOrderEndDatePostponedType as _publicOnOrderEndDatePostponedType, type index_d$1__publicOnOrderEndedType as _publicOnOrderEndedType, type index_d$1__publicOnOrderMarkedAsPaidType as _publicOnOrderMarkedAsPaidType, type index_d$1__publicOnOrderPausedType as _publicOnOrderPausedType, type index_d$1__publicOnOrderPurchasedType as _publicOnOrderPurchasedType, type index_d$1__publicOnOrderResumedType as _publicOnOrderResumedType, type index_d$1__publicOnOrderStartDateChangedType as _publicOnOrderStartDateChangedType, type index_d$1__publicOnOrderStartedType as _publicOnOrderStartedType, type index_d$1__publicOnOrderUpdatedType as _publicOnOrderUpdatedType, index_d$1_cancelOrder as cancelOrder, index_d$1_createOfflineOrder as createOfflineOrder, index_d$1_getOfflineOrderPreview as getOfflineOrderPreview, index_d$1_getPricePreview as getPricePreview, index_d$1_managementGetOrder as managementGetOrder, index_d$1_managementListOrders as managementListOrders, index_d$1_markAsPaid as markAsPaid, index_d$1_memberGetOrder as memberGetOrder, index_d$1_memberListOrders as memberListOrders, index_d$1_onOrderAutoRenewCanceled as onOrderAutoRenewCanceled, index_d$1_onOrderCanceled as onOrderCanceled, index_d$1_onOrderCreated as onOrderCreated, index_d$1_onOrderCycleStarted as onOrderCycleStarted, index_d$1_onOrderEndDatePostponed as onOrderEndDatePostponed, index_d$1_onOrderEnded as onOrderEnded, index_d$1_onOrderMarkedAsPaid as onOrderMarkedAsPaid, index_d$1_onOrderPaused as onOrderPaused, index_d$1_onOrderPurchased as onOrderPurchased, index_d$1_onOrderResumed as onOrderResumed, index_d$1_onOrderStartDateChanged as onOrderStartDateChanged, index_d$1_onOrderStarted as onOrderStarted, index_d$1_onOrderUpdated as onOrderUpdated, index_d$1_pauseOrder as pauseOrder, index_d$1_postponeEndDate as postponeEndDate, onOrderAutoRenewCanceled$1 as publicOnOrderAutoRenewCanceled, onOrderCanceled$1 as publicOnOrderCanceled, onOrderCreated$1 as publicOnOrderCreated, onOrderCycleStarted$1 as publicOnOrderCycleStarted, onOrderEndDatePostponed$1 as publicOnOrderEndDatePostponed, onOrderEnded$1 as publicOnOrderEnded, onOrderMarkedAsPaid$1 as publicOnOrderMarkedAsPaid, onOrderPaused$1 as publicOnOrderPaused, onOrderPurchased$1 as publicOnOrderPurchased, onOrderResumed$1 as publicOnOrderResumed, onOrderStartDateChanged$1 as publicOnOrderStartDateChanged, onOrderStarted$1 as publicOnOrderStarted, onOrderUpdated$1 as publicOnOrderUpdated, index_d$1_requestCancellation as requestCancellation, index_d$1_resumeOrder as resumeOrder };
2275
2275
  }
2276
2276
 
2277
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2278
+ interface HttpClient {
2279
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
2280
+ fetchWithAuth: typeof fetch;
2281
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
2282
+ }
2283
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
2284
+ type HttpResponse<T = any> = {
2285
+ data: T;
2286
+ status: number;
2287
+ statusText: string;
2288
+ headers: any;
2289
+ request?: any;
2290
+ };
2291
+ type RequestOptions<_TResponse = any, Data = any> = {
2292
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2293
+ url: string;
2294
+ data?: Data;
2295
+ params?: URLSearchParams;
2296
+ } & APIMetadata;
2297
+ type APIMetadata = {
2298
+ methodFqn?: string;
2299
+ entityFqdn?: string;
2300
+ packageName?: string;
2301
+ };
2302
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
2303
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
2304
+ __type: 'event-definition';
2305
+ type: Type;
2306
+ isDomainEvent?: boolean;
2307
+ transformations?: (envelope: unknown) => Payload;
2308
+ __payload: Payload;
2309
+ };
2310
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
2311
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
2312
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
2313
+
2314
+ declare global {
2315
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2316
+ interface SymbolConstructor {
2317
+ readonly observable: symbol;
2318
+ }
2319
+ }
2320
+
2277
2321
  /** Information about the pricing plan. */
2278
2322
  interface Plan {
2279
2323
  /**