@wix/pricing-plans 1.0.71 → 1.0.72

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.71",
3
+ "version": "1.0.72",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,10 +18,11 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/pricing-plans_orders": "1.0.25",
22
- "@wix/pricing-plans_plans": "1.0.27"
21
+ "@wix/pricing-plans_orders": "1.0.26",
22
+ "@wix/pricing-plans_plans": "1.0.28"
23
23
  },
24
24
  "devDependencies": {
25
+ "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
25
26
  "glob": "^10.4.1",
26
27
  "rollup": "^4.18.0",
27
28
  "rollup-plugin-dts": "^6.1.1",
@@ -43,5 +44,5 @@
43
44
  "fqdn": ""
44
45
  }
45
46
  },
46
- "falconPackageHash": "93abc68f4f9fcaf8b12754a9b5f47c1c75bd3ec65c1ed0ab38660387"
47
+ "falconPackageHash": "666c52dae550fe0ceb9d3e3c094f94f0beaffbd81fc498e795f66846"
47
48
  }
@@ -1382,50 +1382,42 @@ interface ManagementListOrdersOptions {
1382
1382
  fieldSet?: Set;
1383
1383
  }
1384
1384
 
1385
- type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
1386
- interface HttpClient$1 {
1387
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
1388
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1385
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
1386
+ interface HttpClient {
1387
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1389
1388
  }
1390
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
1391
- type HttpResponse$1<T = any> = {
1389
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1390
+ type HttpResponse<T = any> = {
1392
1391
  data: T;
1393
1392
  status: number;
1394
1393
  statusText: string;
1395
1394
  headers: any;
1396
1395
  request?: any;
1397
1396
  };
1398
- type RequestOptions$1<_TResponse = any, Data = any> = {
1397
+ type RequestOptions<_TResponse = any, Data = any> = {
1399
1398
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1400
1399
  url: string;
1401
1400
  data?: Data;
1402
1401
  params?: URLSearchParams;
1403
- } & APIMetadata$1;
1404
- type APIMetadata$1 = {
1402
+ } & APIMetadata;
1403
+ type APIMetadata = {
1405
1404
  methodFqn?: string;
1406
1405
  entityFqdn?: string;
1407
1406
  packageName?: string;
1408
1407
  };
1409
- type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
1410
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
1408
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
1409
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
1411
1410
  __type: 'event-definition';
1412
1411
  type: Type;
1413
1412
  isDomainEvent?: boolean;
1414
- transformations?: (envelope: unknown) => Payload;
1413
+ transformations?: unknown;
1415
1414
  __payload: Payload;
1416
1415
  };
1417
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
1418
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
1419
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
1420
-
1421
- declare global {
1422
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1423
- interface SymbolConstructor {
1424
- readonly observable: symbol;
1425
- }
1426
- }
1416
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
1417
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
1418
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
1427
1419
 
1428
- declare function memberGetOrder$1(httpClient: HttpClient$1): (_id: string, options?: MemberGetOrderOptions) => Promise<Order & {
1420
+ declare function memberGetOrder$1(httpClient: HttpClient): (_id: string, options?: MemberGetOrderOptions) => Promise<Order & {
1429
1421
  _id: string;
1430
1422
  planId: string;
1431
1423
  subscriptionId: string;
@@ -1509,58 +1501,58 @@ declare function memberGetOrder$1(httpClient: HttpClient$1): (_id: string, optio
1509
1501
  planDescription: string;
1510
1502
  planPrice: string;
1511
1503
  }>;
1512
- declare function memberListOrders$1(httpClient: HttpClient$1): (options?: MemberListOrdersOptions) => Promise<MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields>;
1513
- declare function requestCancellation$1(httpClient: HttpClient$1): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
1514
- declare function createOfflineOrder$1(httpClient: HttpClient$1): (planId: string, memberId: string, options?: CreateOfflineOrderOptions) => Promise<CreateOfflineOrderResponse & CreateOfflineOrderResponseNonNullableFields>;
1515
- declare function getOfflineOrderPreview$1(httpClient: HttpClient$1): (planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions) => Promise<GetOfflineOrderPreviewResponse & GetOfflineOrderPreviewResponseNonNullableFields>;
1516
- declare function getPricePreview$1(httpClient: HttpClient$1): (planId: string, options?: GetPricePreviewOptions) => Promise<GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields>;
1517
- declare function managementGetOrder$1(httpClient: HttpClient$1): (_id: string, options?: ManagementGetOrderOptions) => Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
1518
- declare function managementListOrders$1(httpClient: HttpClient$1): (options?: ManagementListOrdersOptions) => Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
1519
- declare function postponeEndDate$1(httpClient: HttpClient$1): (_id: string, endDate: Date) => Promise<void>;
1520
- declare function cancelOrder$1(httpClient: HttpClient$1): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
1521
- declare function markAsPaid$1(httpClient: HttpClient$1): (_id: string) => Promise<void>;
1522
- declare function pauseOrder$1(httpClient: HttpClient$1): (_id: string) => Promise<void>;
1523
- declare function resumeOrder$1(httpClient: HttpClient$1): (_id: string) => Promise<void>;
1524
- declare const onOrderCanceled$1: EventDefinition$1<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
1525
- declare const onOrderCreated$1: EventDefinition$1<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
1526
- declare const onOrderUpdated$1: EventDefinition$1<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
1527
- declare const onOrderStartDateChanged$1: EventDefinition$1<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
1528
- declare const onOrderPurchased$1: EventDefinition$1<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
1529
- declare const onOrderStarted$1: EventDefinition$1<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
1530
- declare const onOrderCycleStarted$1: EventDefinition$1<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
1531
- declare const onOrderAutoRenewCanceled$1: EventDefinition$1<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
1532
- declare const onOrderEnded$1: EventDefinition$1<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
1533
- declare const onOrderEndDatePostponed$1: EventDefinition$1<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
1534
- declare const onOrderMarkedAsPaid$1: EventDefinition$1<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
1535
- declare const onOrderPaused$1: EventDefinition$1<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
1536
- declare const onOrderResumed$1: EventDefinition$1<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
1504
+ declare function memberListOrders$1(httpClient: HttpClient): (options?: MemberListOrdersOptions) => Promise<MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields>;
1505
+ declare function requestCancellation$1(httpClient: HttpClient): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
1506
+ declare function createOfflineOrder$1(httpClient: HttpClient): (planId: string, memberId: string, options?: CreateOfflineOrderOptions) => Promise<CreateOfflineOrderResponse & CreateOfflineOrderResponseNonNullableFields>;
1507
+ declare function getOfflineOrderPreview$1(httpClient: HttpClient): (planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions) => Promise<GetOfflineOrderPreviewResponse & GetOfflineOrderPreviewResponseNonNullableFields>;
1508
+ declare function getPricePreview$1(httpClient: HttpClient): (planId: string, options?: GetPricePreviewOptions) => Promise<GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields>;
1509
+ declare function managementGetOrder$1(httpClient: HttpClient): (_id: string, options?: ManagementGetOrderOptions) => Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
1510
+ declare function managementListOrders$1(httpClient: HttpClient): (options?: ManagementListOrdersOptions) => Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
1511
+ declare function postponeEndDate$1(httpClient: HttpClient): (_id: string, endDate: Date) => Promise<void>;
1512
+ declare function cancelOrder$1(httpClient: HttpClient): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
1513
+ declare function markAsPaid$1(httpClient: HttpClient): (_id: string) => Promise<void>;
1514
+ declare function pauseOrder$1(httpClient: HttpClient): (_id: string) => Promise<void>;
1515
+ declare function resumeOrder$1(httpClient: HttpClient): (_id: string) => Promise<void>;
1516
+ declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
1517
+ declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
1518
+ declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
1519
+ declare const onOrderStartDateChanged$1: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
1520
+ declare const onOrderPurchased$1: EventDefinition<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
1521
+ declare const onOrderStarted$1: EventDefinition<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
1522
+ declare const onOrderCycleStarted$1: EventDefinition<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
1523
+ declare const onOrderAutoRenewCanceled$1: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
1524
+ declare const onOrderEnded$1: EventDefinition<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
1525
+ declare const onOrderEndDatePostponed$1: EventDefinition<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
1526
+ declare const onOrderMarkedAsPaid$1: EventDefinition<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
1527
+ declare const onOrderPaused$1: EventDefinition<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
1528
+ declare const onOrderResumed$1: EventDefinition<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
1537
1529
 
1538
- declare const memberGetOrder: BuildRESTFunction$1<typeof memberGetOrder$1>;
1539
- declare const memberListOrders: BuildRESTFunction$1<typeof memberListOrders$1>;
1540
- declare const requestCancellation: BuildRESTFunction$1<typeof requestCancellation$1>;
1541
- declare const createOfflineOrder: BuildRESTFunction$1<typeof createOfflineOrder$1>;
1542
- declare const getOfflineOrderPreview: BuildRESTFunction$1<typeof getOfflineOrderPreview$1>;
1543
- declare const getPricePreview: BuildRESTFunction$1<typeof getPricePreview$1>;
1544
- declare const managementGetOrder: BuildRESTFunction$1<typeof managementGetOrder$1>;
1545
- declare const managementListOrders: BuildRESTFunction$1<typeof managementListOrders$1>;
1546
- declare const postponeEndDate: BuildRESTFunction$1<typeof postponeEndDate$1>;
1547
- declare const cancelOrder: BuildRESTFunction$1<typeof cancelOrder$1>;
1548
- declare const markAsPaid: BuildRESTFunction$1<typeof markAsPaid$1>;
1549
- declare const pauseOrder: BuildRESTFunction$1<typeof pauseOrder$1>;
1550
- declare const resumeOrder: BuildRESTFunction$1<typeof resumeOrder$1>;
1551
- declare const onOrderCanceled: BuildEventDefinition$1<typeof onOrderCanceled$1>;
1552
- declare const onOrderCreated: BuildEventDefinition$1<typeof onOrderCreated$1>;
1553
- declare const onOrderUpdated: BuildEventDefinition$1<typeof onOrderUpdated$1>;
1554
- declare const onOrderStartDateChanged: BuildEventDefinition$1<typeof onOrderStartDateChanged$1>;
1555
- declare const onOrderPurchased: BuildEventDefinition$1<typeof onOrderPurchased$1>;
1556
- declare const onOrderStarted: BuildEventDefinition$1<typeof onOrderStarted$1>;
1557
- declare const onOrderCycleStarted: BuildEventDefinition$1<typeof onOrderCycleStarted$1>;
1558
- declare const onOrderAutoRenewCanceled: BuildEventDefinition$1<typeof onOrderAutoRenewCanceled$1>;
1559
- declare const onOrderEnded: BuildEventDefinition$1<typeof onOrderEnded$1>;
1560
- declare const onOrderEndDatePostponed: BuildEventDefinition$1<typeof onOrderEndDatePostponed$1>;
1561
- declare const onOrderMarkedAsPaid: BuildEventDefinition$1<typeof onOrderMarkedAsPaid$1>;
1562
- declare const onOrderPaused: BuildEventDefinition$1<typeof onOrderPaused$1>;
1563
- declare const onOrderResumed: BuildEventDefinition$1<typeof onOrderResumed$1>;
1530
+ declare const memberGetOrder: BuildRESTFunction<typeof memberGetOrder$1>;
1531
+ declare const memberListOrders: BuildRESTFunction<typeof memberListOrders$1>;
1532
+ declare const requestCancellation: BuildRESTFunction<typeof requestCancellation$1>;
1533
+ declare const createOfflineOrder: BuildRESTFunction<typeof createOfflineOrder$1>;
1534
+ declare const getOfflineOrderPreview: BuildRESTFunction<typeof getOfflineOrderPreview$1>;
1535
+ declare const getPricePreview: BuildRESTFunction<typeof getPricePreview$1>;
1536
+ declare const managementGetOrder: BuildRESTFunction<typeof managementGetOrder$1>;
1537
+ declare const managementListOrders: BuildRESTFunction<typeof managementListOrders$1>;
1538
+ declare const postponeEndDate: BuildRESTFunction<typeof postponeEndDate$1>;
1539
+ declare const cancelOrder: BuildRESTFunction<typeof cancelOrder$1>;
1540
+ declare const markAsPaid: BuildRESTFunction<typeof markAsPaid$1>;
1541
+ declare const pauseOrder: BuildRESTFunction<typeof pauseOrder$1>;
1542
+ declare const resumeOrder: BuildRESTFunction<typeof resumeOrder$1>;
1543
+ declare const onOrderCanceled: BuildEventDefinition<typeof onOrderCanceled$1>;
1544
+ declare const onOrderCreated: BuildEventDefinition<typeof onOrderCreated$1>;
1545
+ declare const onOrderUpdated: BuildEventDefinition<typeof onOrderUpdated$1>;
1546
+ declare const onOrderStartDateChanged: BuildEventDefinition<typeof onOrderStartDateChanged$1>;
1547
+ declare const onOrderPurchased: BuildEventDefinition<typeof onOrderPurchased$1>;
1548
+ declare const onOrderStarted: BuildEventDefinition<typeof onOrderStarted$1>;
1549
+ declare const onOrderCycleStarted: BuildEventDefinition<typeof onOrderCycleStarted$1>;
1550
+ declare const onOrderAutoRenewCanceled: BuildEventDefinition<typeof onOrderAutoRenewCanceled$1>;
1551
+ declare const onOrderEnded: BuildEventDefinition<typeof onOrderEnded$1>;
1552
+ declare const onOrderEndDatePostponed: BuildEventDefinition<typeof onOrderEndDatePostponed$1>;
1553
+ declare const onOrderMarkedAsPaid: BuildEventDefinition<typeof onOrderMarkedAsPaid$1>;
1554
+ declare const onOrderPaused: BuildEventDefinition<typeof onOrderPaused$1>;
1555
+ declare const onOrderResumed: BuildEventDefinition<typeof onOrderResumed$1>;
1564
1556
 
1565
1557
  declare const context$1_cancelOrder: typeof cancelOrder;
1566
1558
  declare const context$1_createOfflineOrder: typeof createOfflineOrder;
@@ -2235,49 +2227,6 @@ interface UpdatePlan {
2235
2227
  formId?: string | null;
2236
2228
  }
2237
2229
 
2238
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2239
- interface HttpClient {
2240
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
2241
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2242
- }
2243
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
2244
- type HttpResponse<T = any> = {
2245
- data: T;
2246
- status: number;
2247
- statusText: string;
2248
- headers: any;
2249
- request?: any;
2250
- };
2251
- type RequestOptions<_TResponse = any, Data = any> = {
2252
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2253
- url: string;
2254
- data?: Data;
2255
- params?: URLSearchParams;
2256
- } & APIMetadata;
2257
- type APIMetadata = {
2258
- methodFqn?: string;
2259
- entityFqdn?: string;
2260
- packageName?: string;
2261
- };
2262
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
2263
- type EventDefinition<Payload = unknown, Type extends string = string> = {
2264
- __type: 'event-definition';
2265
- type: Type;
2266
- isDomainEvent?: boolean;
2267
- transformations?: (envelope: unknown) => Payload;
2268
- __payload: Payload;
2269
- };
2270
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
2271
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
2272
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
2273
-
2274
- declare global {
2275
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2276
- interface SymbolConstructor {
2277
- readonly observable: symbol;
2278
- }
2279
- }
2280
-
2281
2230
  declare function listPublicPlans$1(httpClient: HttpClient): (options?: ListPublicPlansOptions) => Promise<ListPublicPlansResponse & ListPublicPlansResponseNonNullableFields>;
2282
2231
  declare function queryPublicPlans$1(httpClient: HttpClient): () => PlansQueryBuilder;
2283
2232
  declare function getPlan$1(httpClient: HttpClient): (_id: string) => Promise<Plan & {
@@ -2043,49 +2043,41 @@ interface ManagementListOrdersOptions {
2043
2043
  fieldSet?: Set;
2044
2044
  }
2045
2045
 
2046
- interface HttpClient$1 {
2047
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
2048
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2046
+ interface HttpClient {
2047
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
2049
2048
  }
2050
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
2051
- type HttpResponse$1<T = any> = {
2049
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
2050
+ type HttpResponse<T = any> = {
2052
2051
  data: T;
2053
2052
  status: number;
2054
2053
  statusText: string;
2055
2054
  headers: any;
2056
2055
  request?: any;
2057
2056
  };
2058
- type RequestOptions$1<_TResponse = any, Data = any> = {
2057
+ type RequestOptions<_TResponse = any, Data = any> = {
2059
2058
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2060
2059
  url: string;
2061
2060
  data?: Data;
2062
2061
  params?: URLSearchParams;
2063
- } & APIMetadata$1;
2064
- type APIMetadata$1 = {
2062
+ } & APIMetadata;
2063
+ type APIMetadata = {
2065
2064
  methodFqn?: string;
2066
2065
  entityFqdn?: string;
2067
2066
  packageName?: string;
2068
2067
  };
2069
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
2068
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
2070
2069
  __type: 'event-definition';
2071
2070
  type: Type;
2072
2071
  isDomainEvent?: boolean;
2073
- transformations?: (envelope: unknown) => Payload;
2072
+ transformations?: unknown;
2074
2073
  __payload: Payload;
2075
2074
  };
2076
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
2077
-
2078
- declare global {
2079
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2080
- interface SymbolConstructor {
2081
- readonly observable: symbol;
2082
- }
2083
- }
2075
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
2084
2076
 
2085
2077
  declare const __metadata$1: {
2086
2078
  PACKAGE_NAME: string;
2087
2079
  };
2088
- declare function memberGetOrder(httpClient: HttpClient$1): (_id: string, options?: MemberGetOrderOptions) => Promise<Order & {
2080
+ declare function memberGetOrder(httpClient: HttpClient): (_id: string, options?: MemberGetOrderOptions) => Promise<Order & {
2089
2081
  _id: string;
2090
2082
  planId: string;
2091
2083
  subscriptionId: string;
@@ -2169,31 +2161,31 @@ declare function memberGetOrder(httpClient: HttpClient$1): (_id: string, options
2169
2161
  planDescription: string;
2170
2162
  planPrice: string;
2171
2163
  }>;
2172
- declare function memberListOrders(httpClient: HttpClient$1): (options?: MemberListOrdersOptions) => Promise<MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields>;
2173
- declare function requestCancellation(httpClient: HttpClient$1): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
2174
- declare function createOfflineOrder(httpClient: HttpClient$1): (planId: string, memberId: string, options?: CreateOfflineOrderOptions) => Promise<CreateOfflineOrderResponse & CreateOfflineOrderResponseNonNullableFields>;
2175
- declare function getOfflineOrderPreview(httpClient: HttpClient$1): (planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions) => Promise<GetOfflineOrderPreviewResponse & GetOfflineOrderPreviewResponseNonNullableFields>;
2176
- declare function getPricePreview(httpClient: HttpClient$1): (planId: string, options?: GetPricePreviewOptions) => Promise<GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields>;
2177
- declare function managementGetOrder(httpClient: HttpClient$1): (_id: string, options?: ManagementGetOrderOptions) => Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
2178
- declare function managementListOrders(httpClient: HttpClient$1): (options?: ManagementListOrdersOptions) => Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
2179
- declare function postponeEndDate(httpClient: HttpClient$1): (_id: string, endDate: Date) => Promise<void>;
2180
- declare function cancelOrder(httpClient: HttpClient$1): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
2181
- declare function markAsPaid(httpClient: HttpClient$1): (_id: string) => Promise<void>;
2182
- declare function pauseOrder(httpClient: HttpClient$1): (_id: string) => Promise<void>;
2183
- declare function resumeOrder(httpClient: HttpClient$1): (_id: string) => Promise<void>;
2184
- declare const onOrderCanceled: EventDefinition$1<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
2185
- declare const onOrderCreated: EventDefinition$1<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
2186
- declare const onOrderUpdated: EventDefinition$1<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
2187
- declare const onOrderStartDateChanged: EventDefinition$1<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
2188
- declare const onOrderPurchased: EventDefinition$1<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
2189
- declare const onOrderStarted: EventDefinition$1<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
2190
- declare const onOrderCycleStarted: EventDefinition$1<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
2191
- declare const onOrderAutoRenewCanceled: EventDefinition$1<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
2192
- declare const onOrderEnded: EventDefinition$1<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
2193
- declare const onOrderEndDatePostponed: EventDefinition$1<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
2194
- declare const onOrderMarkedAsPaid: EventDefinition$1<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
2195
- declare const onOrderPaused: EventDefinition$1<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
2196
- declare const onOrderResumed: EventDefinition$1<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
2164
+ declare function memberListOrders(httpClient: HttpClient): (options?: MemberListOrdersOptions) => Promise<MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields>;
2165
+ declare function requestCancellation(httpClient: HttpClient): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
2166
+ declare function createOfflineOrder(httpClient: HttpClient): (planId: string, memberId: string, options?: CreateOfflineOrderOptions) => Promise<CreateOfflineOrderResponse & CreateOfflineOrderResponseNonNullableFields>;
2167
+ declare function getOfflineOrderPreview(httpClient: HttpClient): (planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions) => Promise<GetOfflineOrderPreviewResponse & GetOfflineOrderPreviewResponseNonNullableFields>;
2168
+ declare function getPricePreview(httpClient: HttpClient): (planId: string, options?: GetPricePreviewOptions) => Promise<GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields>;
2169
+ declare function managementGetOrder(httpClient: HttpClient): (_id: string, options?: ManagementGetOrderOptions) => Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
2170
+ declare function managementListOrders(httpClient: HttpClient): (options?: ManagementListOrdersOptions) => Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
2171
+ declare function postponeEndDate(httpClient: HttpClient): (_id: string, endDate: Date) => Promise<void>;
2172
+ declare function cancelOrder(httpClient: HttpClient): (_id: string, effectiveAt: CancellationEffectiveAt) => Promise<void>;
2173
+ declare function markAsPaid(httpClient: HttpClient): (_id: string) => Promise<void>;
2174
+ declare function pauseOrder(httpClient: HttpClient): (_id: string) => Promise<void>;
2175
+ declare function resumeOrder(httpClient: HttpClient): (_id: string) => Promise<void>;
2176
+ declare const onOrderCanceled: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
2177
+ declare const onOrderCreated: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
2178
+ declare const onOrderUpdated: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
2179
+ declare const onOrderStartDateChanged: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
2180
+ declare const onOrderPurchased: EventDefinition<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
2181
+ declare const onOrderStarted: EventDefinition<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
2182
+ declare const onOrderCycleStarted: EventDefinition<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
2183
+ declare const onOrderAutoRenewCanceled: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
2184
+ declare const onOrderEnded: EventDefinition<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
2185
+ declare const onOrderEndDatePostponed: EventDefinition<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
2186
+ declare const onOrderMarkedAsPaid: EventDefinition<OrderMarkedAsPaidEnvelope, "wix.pricing_plans.v2.order_marked_as_paid">;
2187
+ declare const onOrderPaused: EventDefinition<OrderPausedEnvelope, "wix.pricing_plans.v2.order_paused">;
2188
+ declare const onOrderResumed: EventDefinition<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
2197
2189
 
2198
2190
  type index_d$1_ApplyCouponRequest = ApplyCouponRequest;
2199
2191
  type index_d$1_ApplyCouponResponse = ApplyCouponResponse;
@@ -3360,45 +3352,6 @@ interface UpdatePlan {
3360
3352
  formId?: string | null;
3361
3353
  }
3362
3354
 
3363
- interface HttpClient {
3364
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
3365
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
3366
- }
3367
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
3368
- type HttpResponse<T = any> = {
3369
- data: T;
3370
- status: number;
3371
- statusText: string;
3372
- headers: any;
3373
- request?: any;
3374
- };
3375
- type RequestOptions<_TResponse = any, Data = any> = {
3376
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3377
- url: string;
3378
- data?: Data;
3379
- params?: URLSearchParams;
3380
- } & APIMetadata;
3381
- type APIMetadata = {
3382
- methodFqn?: string;
3383
- entityFqdn?: string;
3384
- packageName?: string;
3385
- };
3386
- type EventDefinition<Payload = unknown, Type extends string = string> = {
3387
- __type: 'event-definition';
3388
- type: Type;
3389
- isDomainEvent?: boolean;
3390
- transformations?: (envelope: unknown) => Payload;
3391
- __payload: Payload;
3392
- };
3393
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
3394
-
3395
- declare global {
3396
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3397
- interface SymbolConstructor {
3398
- readonly observable: symbol;
3399
- }
3400
- }
3401
-
3402
3355
  declare const __metadata: {
3403
3356
  PACKAGE_NAME: string;
3404
3357
  };