@wix/ecom 1.0.781 → 1.0.783
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/build/cjs/service-plugins-context.d.ts +1 -0
- package/build/cjs/service-plugins-context.js +2 -1
- package/build/cjs/service-plugins-context.js.map +1 -1
- package/build/cjs/service-plugins.d.ts +1 -0
- package/build/cjs/service-plugins.js +2 -1
- package/build/cjs/service-plugins.js.map +1 -1
- package/build/es/service-plugins-context.d.ts +1 -0
- package/build/es/service-plugins-context.js +1 -0
- package/build/es/service-plugins-context.js.map +1 -1
- package/build/es/service-plugins.d.ts +1 -0
- package/build/es/service-plugins.js +1 -0
- package/build/es/service-plugins.js.map +1 -1
- package/package.json +11 -10
- package/type-bundles/context.bundle.d.ts +22 -22
- package/type-bundles/index.bundle.d.ts +22 -22
- package/type-bundles/meta.bundle.d.ts +30 -30
- package/type-bundles/service-plugins-context.bundle.d.ts +620 -53
- package/type-bundles/service-plugins.bundle.d.ts +631 -64
|
@@ -86,26 +86,26 @@ interface GiftCardProviderConfig {
|
|
|
86
86
|
* }
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
interface Context$
|
|
89
|
+
interface Context$8 {
|
|
90
90
|
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
91
91
|
requestId?: string | null;
|
|
92
92
|
/** [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code. */
|
|
93
93
|
currency?: string | null;
|
|
94
94
|
/** An object that describes the identity that triggered this request. */
|
|
95
|
-
identity?: IdentificationData$
|
|
95
|
+
identity?: IdentificationData$8;
|
|
96
96
|
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
97
97
|
languages?: string[];
|
|
98
98
|
/** The service provider app's instance ID. */
|
|
99
99
|
instanceId?: string | null;
|
|
100
100
|
}
|
|
101
|
-
declare enum IdentityType$
|
|
101
|
+
declare enum IdentityType$8 {
|
|
102
102
|
UNKNOWN = "UNKNOWN",
|
|
103
103
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
104
104
|
MEMBER = "MEMBER",
|
|
105
105
|
WIX_USER = "WIX_USER",
|
|
106
106
|
APP = "APP"
|
|
107
107
|
}
|
|
108
|
-
interface IdentificationData$
|
|
108
|
+
interface IdentificationData$8 extends IdentificationDataIdOneOf$8 {
|
|
109
109
|
/** ID of a site visitor that has not logged in to the site. */
|
|
110
110
|
anonymousVisitorId?: string;
|
|
111
111
|
/** ID of a site visitor that has logged in to the site. */
|
|
@@ -115,10 +115,10 @@ interface IdentificationData$7 extends IdentificationDataIdOneOf$7 {
|
|
|
115
115
|
/** ID of an app. */
|
|
116
116
|
appId?: string;
|
|
117
117
|
/** @readonly */
|
|
118
|
-
identityType?: IdentityType$
|
|
118
|
+
identityType?: IdentityType$8;
|
|
119
119
|
}
|
|
120
120
|
/** @oneof */
|
|
121
|
-
interface IdentificationDataIdOneOf$
|
|
121
|
+
interface IdentificationDataIdOneOf$8 {
|
|
122
122
|
/** ID of a site visitor that has not logged in to the site. */
|
|
123
123
|
anonymousVisitorId?: string;
|
|
124
124
|
/** ID of a site visitor that has logged in to the site. */
|
|
@@ -129,26 +129,26 @@ interface IdentificationDataIdOneOf$7 {
|
|
|
129
129
|
appId?: string;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
type ServicePluginMethodInput$
|
|
132
|
+
type ServicePluginMethodInput$9 = {
|
|
133
133
|
request: any;
|
|
134
134
|
metadata: any;
|
|
135
135
|
};
|
|
136
|
-
type ServicePluginContract$
|
|
137
|
-
type ServicePluginMethodMetadata$
|
|
136
|
+
type ServicePluginContract$9 = Record<string, (payload: ServicePluginMethodInput$9) => unknown | Promise<unknown>>;
|
|
137
|
+
type ServicePluginMethodMetadata$9 = {
|
|
138
138
|
name: string;
|
|
139
139
|
primaryHttpMappingPath: string;
|
|
140
140
|
transformations: {
|
|
141
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$
|
|
141
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$9;
|
|
142
142
|
toREST: (...args: unknown[]) => unknown;
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
|
-
type ServicePluginDefinition$
|
|
145
|
+
type ServicePluginDefinition$9<Contract extends ServicePluginContract$9> = {
|
|
146
146
|
__type: 'service-plugin-definition';
|
|
147
147
|
componentType: string;
|
|
148
|
-
methods: ServicePluginMethodMetadata$
|
|
148
|
+
methods: ServicePluginMethodMetadata$9[];
|
|
149
149
|
__contract: Contract;
|
|
150
150
|
};
|
|
151
|
-
declare function ServicePluginDefinition$
|
|
151
|
+
declare function ServicePluginDefinition$9<Contract extends ServicePluginContract$9>(componentType: string, methods: ServicePluginMethodMetadata$9[]): ServicePluginDefinition$9<Contract>;
|
|
152
152
|
|
|
153
153
|
declare global {
|
|
154
154
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -164,17 +164,17 @@ declare global {
|
|
|
164
164
|
|
|
165
165
|
interface GetBalanceEnvelope {
|
|
166
166
|
request: GetBalanceRequest;
|
|
167
|
-
metadata: Context$
|
|
167
|
+
metadata: Context$8;
|
|
168
168
|
}
|
|
169
169
|
interface RedeemEnvelope {
|
|
170
170
|
request: RedeemRequest;
|
|
171
|
-
metadata: Context$
|
|
171
|
+
metadata: Context$8;
|
|
172
172
|
}
|
|
173
173
|
interface _voidEnvelope {
|
|
174
174
|
request: VoidRequest;
|
|
175
|
-
metadata: Context$
|
|
175
|
+
metadata: Context$8;
|
|
176
176
|
}
|
|
177
|
-
declare const provideHandlers$
|
|
177
|
+
declare const provideHandlers$h: ServicePluginDefinition$9<{
|
|
178
178
|
/**
|
|
179
179
|
*
|
|
180
180
|
* This method retrieves gift card data from your app.
|
|
@@ -192,27 +192,27 @@ declare const provideHandlers$f: ServicePluginDefinition$8<{
|
|
|
192
192
|
_void(payload: _voidEnvelope): VoidResponse | Promise<VoidResponse>;
|
|
193
193
|
}>;
|
|
194
194
|
|
|
195
|
-
type ServicePluginMethodInput$
|
|
195
|
+
type ServicePluginMethodInput$8 = {
|
|
196
196
|
request: any;
|
|
197
197
|
metadata: any;
|
|
198
198
|
};
|
|
199
|
-
type ServicePluginContract$
|
|
200
|
-
type ServicePluginMethodMetadata$
|
|
199
|
+
type ServicePluginContract$8 = Record<string, (payload: ServicePluginMethodInput$8) => unknown | Promise<unknown>>;
|
|
200
|
+
type ServicePluginMethodMetadata$8 = {
|
|
201
201
|
name: string;
|
|
202
202
|
primaryHttpMappingPath: string;
|
|
203
203
|
transformations: {
|
|
204
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$
|
|
204
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$8;
|
|
205
205
|
toREST: (...args: unknown[]) => unknown;
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
type ServicePluginDefinition$
|
|
208
|
+
type ServicePluginDefinition$8<Contract extends ServicePluginContract$8> = {
|
|
209
209
|
__type: 'service-plugin-definition';
|
|
210
210
|
componentType: string;
|
|
211
|
-
methods: ServicePluginMethodMetadata$
|
|
211
|
+
methods: ServicePluginMethodMetadata$8[];
|
|
212
212
|
__contract: Contract;
|
|
213
213
|
};
|
|
214
|
-
declare function ServicePluginDefinition$
|
|
215
|
-
type BuildServicePluginDefinition$
|
|
214
|
+
declare function ServicePluginDefinition$8<Contract extends ServicePluginContract$8>(componentType: string, methods: ServicePluginMethodMetadata$8[]): ServicePluginDefinition$8<Contract>;
|
|
215
|
+
type BuildServicePluginDefinition$8<T extends ServicePluginDefinition$8<any>> = (implementation: T['__contract']) => void;
|
|
216
216
|
|
|
217
217
|
declare global {
|
|
218
218
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -221,10 +221,10 @@ declare global {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
declare function createServicePluginModule$
|
|
224
|
+
declare function createServicePluginModule$8<T extends ServicePluginDefinition$8<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$8<T> & T;
|
|
225
225
|
|
|
226
|
-
type _publicProvideHandlersType$
|
|
227
|
-
declare const provideHandlers$
|
|
226
|
+
type _publicProvideHandlersType$8 = typeof provideHandlers$h;
|
|
227
|
+
declare const provideHandlers$g: ReturnType<typeof createServicePluginModule$8<_publicProvideHandlersType>>;
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Gift card not found
|
|
@@ -325,7 +325,7 @@ declare class CurrencyNotSupportedWixError extends Error {
|
|
|
325
325
|
/**
|
|
326
326
|
* Transaction not found.
|
|
327
327
|
*/
|
|
328
|
-
declare class TransactionNotFoundWixError extends Error {
|
|
328
|
+
declare class TransactionNotFoundWixError$1 extends Error {
|
|
329
329
|
/** @hidden */
|
|
330
330
|
httpCode: number;
|
|
331
331
|
/** @hidden */
|
|
@@ -355,32 +355,599 @@ declare class AlreadyVoidedWixError extends Error {
|
|
|
355
355
|
static readonly __type = "wix_spi_error";
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
type index_d$
|
|
359
|
-
declare const index_d$
|
|
360
|
-
type index_d$
|
|
361
|
-
declare const index_d$
|
|
362
|
-
type index_d$
|
|
363
|
-
declare const index_d$
|
|
364
|
-
type index_d$
|
|
365
|
-
type index_d$
|
|
366
|
-
type index_d$
|
|
367
|
-
declare const index_d$
|
|
368
|
-
type index_d$
|
|
369
|
-
declare const index_d$
|
|
370
|
-
type index_d$
|
|
371
|
-
declare const index_d$
|
|
372
|
-
type index_d$
|
|
373
|
-
type index_d$
|
|
374
|
-
type index_d$
|
|
375
|
-
declare const index_d$
|
|
376
|
-
type index_d$
|
|
377
|
-
type index_d$
|
|
358
|
+
type index_d$8_AlreadyRedeemedWixError = AlreadyRedeemedWixError;
|
|
359
|
+
declare const index_d$8_AlreadyRedeemedWixError: typeof AlreadyRedeemedWixError;
|
|
360
|
+
type index_d$8_AlreadyVoidedWixError = AlreadyVoidedWixError;
|
|
361
|
+
declare const index_d$8_AlreadyVoidedWixError: typeof AlreadyVoidedWixError;
|
|
362
|
+
type index_d$8_CurrencyNotSupportedWixError = CurrencyNotSupportedWixError;
|
|
363
|
+
declare const index_d$8_CurrencyNotSupportedWixError: typeof CurrencyNotSupportedWixError;
|
|
364
|
+
type index_d$8_GetBalanceRequest = GetBalanceRequest;
|
|
365
|
+
type index_d$8_GetBalanceResponse = GetBalanceResponse;
|
|
366
|
+
type index_d$8_GiftCardDisabledWixError = GiftCardDisabledWixError;
|
|
367
|
+
declare const index_d$8_GiftCardDisabledWixError: typeof GiftCardDisabledWixError;
|
|
368
|
+
type index_d$8_GiftCardExpiredWixError = GiftCardExpiredWixError;
|
|
369
|
+
declare const index_d$8_GiftCardExpiredWixError: typeof GiftCardExpiredWixError;
|
|
370
|
+
type index_d$8_GiftCardNotFoundWixError = GiftCardNotFoundWixError;
|
|
371
|
+
declare const index_d$8_GiftCardNotFoundWixError: typeof GiftCardNotFoundWixError;
|
|
372
|
+
type index_d$8_GiftCardProviderConfig = GiftCardProviderConfig;
|
|
373
|
+
type index_d$8_GiftCardProviderEntity = GiftCardProviderEntity;
|
|
374
|
+
type index_d$8_InsufficientFundsWixError = InsufficientFundsWixError;
|
|
375
|
+
declare const index_d$8_InsufficientFundsWixError: typeof InsufficientFundsWixError;
|
|
376
|
+
type index_d$8_RedeemRequest = RedeemRequest;
|
|
377
|
+
type index_d$8_RedeemResponse = RedeemResponse;
|
|
378
|
+
type index_d$8_VoidRequest = VoidRequest;
|
|
379
|
+
type index_d$8_VoidResponse = VoidResponse;
|
|
380
|
+
declare namespace index_d$8 {
|
|
381
|
+
export { index_d$8_AlreadyRedeemedWixError as AlreadyRedeemedWixError, index_d$8_AlreadyVoidedWixError as AlreadyVoidedWixError, type Context$8 as Context, index_d$8_CurrencyNotSupportedWixError as CurrencyNotSupportedWixError, type index_d$8_GetBalanceRequest as GetBalanceRequest, type index_d$8_GetBalanceResponse as GetBalanceResponse, index_d$8_GiftCardDisabledWixError as GiftCardDisabledWixError, index_d$8_GiftCardExpiredWixError as GiftCardExpiredWixError, index_d$8_GiftCardNotFoundWixError as GiftCardNotFoundWixError, type index_d$8_GiftCardProviderConfig as GiftCardProviderConfig, type index_d$8_GiftCardProviderEntity as GiftCardProviderEntity, type IdentificationData$8 as IdentificationData, type IdentificationDataIdOneOf$8 as IdentificationDataIdOneOf, IdentityType$8 as IdentityType, index_d$8_InsufficientFundsWixError as InsufficientFundsWixError, type index_d$8_RedeemRequest as RedeemRequest, type index_d$8_RedeemResponse as RedeemResponse, TransactionNotFoundWixError$1 as TransactionNotFoundWixError, type index_d$8_VoidRequest as VoidRequest, type index_d$8_VoidResponse as VoidResponse, type _publicProvideHandlersType$8 as _publicProvideHandlersType, provideHandlers$g as provideHandlers, provideHandlers$h as publicProvideHandlers };
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
interface ListEligibleMembershipsRequest {
|
|
385
|
+
/** The line items for which to list eligible memberships. */
|
|
386
|
+
lineItems: LineItem$5[];
|
|
387
|
+
/**
|
|
388
|
+
* Member ID.
|
|
389
|
+
*
|
|
390
|
+
* Do not retrieve this from the request context. In some cases the caller is not a member, but a user who is using the membership on behalf of a member.
|
|
391
|
+
*/
|
|
392
|
+
memberId: string;
|
|
393
|
+
/**
|
|
394
|
+
* The selected payment memberships and which line items they apply to.
|
|
395
|
+
*
|
|
396
|
+
* When not provided, your implementation is expected to return the default selection.
|
|
397
|
+
* When provided, your implementation is expected to validate and return it.
|
|
398
|
+
*/
|
|
399
|
+
selectedMemberships?: SelectedMemberships$1;
|
|
400
|
+
}
|
|
401
|
+
interface LineItem$5 {
|
|
402
|
+
/** Line item ID. */
|
|
403
|
+
_id?: string;
|
|
404
|
+
/** Catalog and item reference info. */
|
|
405
|
+
catalogReference?: CatalogReference$7;
|
|
406
|
+
/** Properties of the service. When relevant, contains information such as date and number of participants. */
|
|
407
|
+
serviceProperties?: ServiceProperties$1;
|
|
408
|
+
/**
|
|
409
|
+
* Root catalog item ID.
|
|
410
|
+
*
|
|
411
|
+
* The value will usually be the same as `catalogReference.catalogItemId`.
|
|
412
|
+
* In cases when these are not the same, this field will return the actual ID of the item in the catalog.
|
|
413
|
+
* For example, for Wix bookings, the value of `catalogReference.catalogItemId` is the booking ID, but `rootCatalogItemId` is set to the service ID.
|
|
414
|
+
*/
|
|
415
|
+
rootCatalogItemId?: string | null;
|
|
416
|
+
}
|
|
417
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
418
|
+
interface CatalogReference$7 {
|
|
419
|
+
/** ID of the item within the catalog it belongs to. */
|
|
420
|
+
catalogItemId?: string;
|
|
421
|
+
/**
|
|
422
|
+
* ID of the app providing the catalog.
|
|
423
|
+
*
|
|
424
|
+
* You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
|
|
425
|
+
*
|
|
426
|
+
* For items from Wix catalogs, the following values always apply:
|
|
427
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
428
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
429
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
430
|
+
*/
|
|
431
|
+
appId?: string;
|
|
432
|
+
/**
|
|
433
|
+
* Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
|
|
434
|
+
*
|
|
435
|
+
* For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).
|
|
436
|
+
*/
|
|
437
|
+
options?: Record<string, any> | null;
|
|
438
|
+
}
|
|
439
|
+
interface ServiceProperties$1 {
|
|
440
|
+
/**
|
|
441
|
+
* Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
442
|
+
* For example, the start time of a class.
|
|
443
|
+
*/
|
|
444
|
+
scheduledDate?: Date;
|
|
445
|
+
/** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */
|
|
446
|
+
numberOfParticipants?: number | null;
|
|
447
|
+
}
|
|
448
|
+
interface SelectedMemberships$1 {
|
|
449
|
+
/** Selected memberships. */
|
|
450
|
+
memberships?: SelectedMembership$1[];
|
|
451
|
+
}
|
|
452
|
+
interface SelectedMembership$1 {
|
|
453
|
+
/** Membership ID. */
|
|
454
|
+
_id?: string;
|
|
455
|
+
/** IDs of the line items this membership applies to. */
|
|
456
|
+
lineItemIds?: string[];
|
|
457
|
+
}
|
|
458
|
+
interface ListEligibleMembershipsResponse {
|
|
459
|
+
/** List of memberships that are eligible for the given member and line items. */
|
|
460
|
+
eligibleMemberships?: Membership$1[];
|
|
461
|
+
/** List of memberships owned by the member, but cannot be used due to the reason provided. */
|
|
462
|
+
invalidMemberships?: InvalidMembership$1[];
|
|
463
|
+
/** List of selected memberships and which line items they apply to. */
|
|
464
|
+
selectedMemberships?: SelectedMembership$1[];
|
|
465
|
+
}
|
|
466
|
+
interface Membership$1 {
|
|
467
|
+
/** Membership ID. */
|
|
468
|
+
_id?: string;
|
|
469
|
+
/** Membership name. */
|
|
470
|
+
name?: MembershipName$1;
|
|
471
|
+
/** Line item IDs this membership applies to. */
|
|
472
|
+
lineItemIds?: string[];
|
|
473
|
+
/** Total and remaining membership credits. */
|
|
474
|
+
credits?: MembershipPaymentCredits$1;
|
|
475
|
+
/** Membership expiration date. */
|
|
476
|
+
expirationDate?: Date;
|
|
477
|
+
/** Additional data about this membership. */
|
|
478
|
+
additionalData?: Record<string, any> | null;
|
|
479
|
+
}
|
|
480
|
+
interface MembershipName$1 {
|
|
481
|
+
/** Membership name. */
|
|
482
|
+
original?: string;
|
|
483
|
+
/** Translated membership name. Defaults to `original` when not provided. */
|
|
484
|
+
translated?: string | null;
|
|
485
|
+
}
|
|
486
|
+
interface MembershipPaymentCredits$1 {
|
|
487
|
+
/** Membership's total amount of credits. */
|
|
488
|
+
total?: number;
|
|
489
|
+
/** Membership's remaining amount of credits. */
|
|
490
|
+
remaining?: number;
|
|
491
|
+
}
|
|
492
|
+
interface InvalidMembership$1 {
|
|
493
|
+
/** The membership that is invalid and cannot be used. */
|
|
494
|
+
membership?: Membership$1;
|
|
495
|
+
/** Reason why this membership is invalid. */
|
|
496
|
+
reason?: string;
|
|
497
|
+
}
|
|
498
|
+
interface MembershipInvalidSelectionErrors {
|
|
499
|
+
/** Error details for invalid memberships. */
|
|
500
|
+
membershipInvalidSelectionErrors?: MembershipInvalidSelectionError[];
|
|
501
|
+
}
|
|
502
|
+
interface MembershipInvalidSelectionError extends MembershipInvalidSelectionErrorErrorDataOneOf {
|
|
503
|
+
/** Line item IDs that were missing. */
|
|
504
|
+
lineItemNotFoundInfo?: LineItemNotFoundInfo;
|
|
505
|
+
/** Error details for line items that cannot be used with this membership. */
|
|
506
|
+
membershipCannotBeUsedForLineItemsInfo?: MembershipCannotBeUsedForLineItemsInfo;
|
|
507
|
+
/** Reason why this membership selection is invalid. */
|
|
508
|
+
membershipSelectionInvalidReason?: string | null;
|
|
509
|
+
/** Membership ID. */
|
|
510
|
+
membershipId?: string;
|
|
511
|
+
/**
|
|
512
|
+
* Error type.
|
|
513
|
+
*
|
|
514
|
+
* + MEMBERSHIP_NOT_FOUND: Membership not found.
|
|
515
|
+
* + LINE_ITEM_NOT_FOUND: The selection points to a line item ID that wasn't provided.
|
|
516
|
+
* + MEMBERSHIP_CANNOT_BE_USED_FOR_LINE_ITEMS: The membership cannot be used for the specific line items provided.
|
|
517
|
+
* + MEMBERSHIP_SELECTION_INVALID: The membership can be used for each individual line item, but combining all of them is invalid.
|
|
518
|
+
*/
|
|
519
|
+
errorType?: MembershipErrorType;
|
|
520
|
+
}
|
|
521
|
+
/** @oneof */
|
|
522
|
+
interface MembershipInvalidSelectionErrorErrorDataOneOf {
|
|
523
|
+
/** Line item IDs that were missing. */
|
|
524
|
+
lineItemNotFoundInfo?: LineItemNotFoundInfo;
|
|
525
|
+
/** Error details for line items that cannot be used with this membership. */
|
|
526
|
+
membershipCannotBeUsedForLineItemsInfo?: MembershipCannotBeUsedForLineItemsInfo;
|
|
527
|
+
/** Reason why this membership selection is invalid. */
|
|
528
|
+
membershipSelectionInvalidReason?: string | null;
|
|
529
|
+
}
|
|
530
|
+
declare enum MembershipErrorType {
|
|
531
|
+
UNKNOWN = "UNKNOWN",
|
|
532
|
+
MEMBERSHIP_NOT_FOUND = "MEMBERSHIP_NOT_FOUND",
|
|
533
|
+
/** which line item ids */
|
|
534
|
+
LINE_ITEM_NOT_FOUND = "LINE_ITEM_NOT_FOUND",
|
|
535
|
+
/** which ids and why */
|
|
536
|
+
MEMBERSHIP_CANNOT_BE_USED_FOR_LINE_ITEMS = "MEMBERSHIP_CANNOT_BE_USED_FOR_LINE_ITEMS",
|
|
537
|
+
/** reason */
|
|
538
|
+
MEMBERSHIP_SELECTION_INVALID = "MEMBERSHIP_SELECTION_INVALID"
|
|
539
|
+
}
|
|
540
|
+
interface LineItemNotFoundInfo {
|
|
541
|
+
/** Line item IDs that were missing. */
|
|
542
|
+
lineItemIds?: string[];
|
|
543
|
+
}
|
|
544
|
+
interface MembershipCannotBeUsedForLineItemsInfo {
|
|
545
|
+
/** Line items that cannot be used with this membership, and the reason why. */
|
|
546
|
+
lineItems?: MembershipCannotBeUsedForLineItemInfo[];
|
|
547
|
+
}
|
|
548
|
+
interface MembershipCannotBeUsedForLineItemInfo {
|
|
549
|
+
/** Line item ID. */
|
|
550
|
+
lineItemId?: string;
|
|
551
|
+
/** Reason why this line item cannot be used with this membership. */
|
|
552
|
+
reason?: string;
|
|
553
|
+
}
|
|
554
|
+
interface ChargeMembershipRequest {
|
|
555
|
+
/**
|
|
556
|
+
* Member ID.
|
|
557
|
+
*
|
|
558
|
+
* Do not retrieve this from the request context. In some cases the caller is not a member, but a user who is using the membership on behalf of a member.
|
|
559
|
+
*/
|
|
560
|
+
memberId: string;
|
|
561
|
+
/** Membership ID, as returned from the List Eligible Memberships call. */
|
|
562
|
+
membershipId: string;
|
|
563
|
+
/**
|
|
564
|
+
* Idempotency key to avoid duplicate charge.
|
|
565
|
+
* The value will usually would be the same as `membershipId` + `orderId` + `rootCatalogItemId`.
|
|
566
|
+
*/
|
|
567
|
+
idempotencyKey: string;
|
|
568
|
+
/**
|
|
569
|
+
* Service properties.
|
|
570
|
+
*
|
|
571
|
+
* When relevant, this contains information such as date and number of participants.
|
|
572
|
+
*/
|
|
573
|
+
serviceProperties?: ServiceProperties$1;
|
|
574
|
+
/** Catalog and item reference info. */
|
|
575
|
+
catalogReference: CatalogReference$7;
|
|
576
|
+
/**
|
|
577
|
+
* Root catalog item ID.
|
|
578
|
+
*
|
|
579
|
+
* The value will usually be the same as `catalogReference.catalogItemId`.
|
|
580
|
+
* In cases when these are not the same, this field will return the actual ID of the item in the catalog.
|
|
581
|
+
* For example, for Wix bookings, the value of `catalogReference.catalogItemId` is the booking ID, but `rootCatalogItemId` is set to the service ID.
|
|
582
|
+
*/
|
|
583
|
+
rootCatalogItemId?: string | null;
|
|
584
|
+
/** Additional data about this charge. */
|
|
585
|
+
additionalData?: Record<string, any> | null;
|
|
586
|
+
}
|
|
587
|
+
interface ChargeMembershipResponse {
|
|
588
|
+
/**
|
|
589
|
+
* The transaction ID for this charge.
|
|
590
|
+
*
|
|
591
|
+
* Use this ID to void the charge.
|
|
592
|
+
*/
|
|
593
|
+
transactionId?: string;
|
|
594
|
+
}
|
|
595
|
+
interface MembershipCannotBeChargedError extends MembershipCannotBeChargedErrorErrorDataOneOf {
|
|
596
|
+
/** Membership is out of credits. For example, 5 are required, but only 4 remain. */
|
|
597
|
+
outOfCredits?: OutOfCredits;
|
|
598
|
+
/** Membership has not become active yet. */
|
|
599
|
+
notStartedYet?: NotStartedYet;
|
|
600
|
+
/** Membership has expired or ended. */
|
|
601
|
+
ended?: Ended;
|
|
602
|
+
/** Error type. */
|
|
603
|
+
errorType?: MembershipCannotBeChargedType;
|
|
604
|
+
}
|
|
605
|
+
/** @oneof */
|
|
606
|
+
interface MembershipCannotBeChargedErrorErrorDataOneOf {
|
|
607
|
+
/** Membership is out of credits. For example, 5 are required, but only 4 remain. */
|
|
608
|
+
outOfCredits?: OutOfCredits;
|
|
609
|
+
/** Membership has not become active yet. */
|
|
610
|
+
notStartedYet?: NotStartedYet;
|
|
611
|
+
/** Membership has expired or ended. */
|
|
612
|
+
ended?: Ended;
|
|
613
|
+
}
|
|
614
|
+
declare enum MembershipCannotBeChargedType {
|
|
615
|
+
OUT_OF_CREDITS = "OUT_OF_CREDITS",
|
|
616
|
+
NOT_STARTED_YET = "NOT_STARTED_YET",
|
|
617
|
+
ENDED = "ENDED",
|
|
618
|
+
NOT_APPLICABLE_FOR_MULTIPLE_PARTICIPANTS = "NOT_APPLICABLE_FOR_MULTIPLE_PARTICIPANTS"
|
|
619
|
+
}
|
|
620
|
+
interface OutOfCredits {
|
|
621
|
+
/** Required amount of credits. */
|
|
622
|
+
required?: number;
|
|
623
|
+
/** Remaining amount of credits. */
|
|
624
|
+
remaining?: number;
|
|
625
|
+
}
|
|
626
|
+
interface NotStartedYet {
|
|
627
|
+
/** Start date of the membership. */
|
|
628
|
+
membershipStartDate?: Date;
|
|
629
|
+
}
|
|
630
|
+
interface Ended {
|
|
631
|
+
/** End date of the membership. */
|
|
632
|
+
endDate?: Date;
|
|
633
|
+
}
|
|
634
|
+
interface MembershipAlreadyChargedError {
|
|
635
|
+
/** ID of the transaction that was already used for membership charge. */
|
|
636
|
+
transactionId?: string;
|
|
637
|
+
}
|
|
638
|
+
interface GetMembershipVoidabilityRequest {
|
|
639
|
+
/** Transaction ID to check if it can be voided. */
|
|
640
|
+
transactionId: string;
|
|
641
|
+
}
|
|
642
|
+
interface GetMembershipVoidabilityResponse {
|
|
643
|
+
/** Whether the membership charge can be voided. */
|
|
644
|
+
voidable?: boolean;
|
|
645
|
+
/** Reason why the membership charge cannot be voided. */
|
|
646
|
+
reason?: string | null;
|
|
647
|
+
}
|
|
648
|
+
interface VoidMembershipChargeRequest {
|
|
649
|
+
/** Transaction ID to void. */
|
|
650
|
+
transactionId: string;
|
|
651
|
+
}
|
|
652
|
+
interface VoidMembershipChargeResponse {
|
|
653
|
+
}
|
|
654
|
+
interface MembershipsSPIConfig {
|
|
655
|
+
/**
|
|
656
|
+
* The base URI where the endpoints are called. Wix eCommerce appends the endpoint path to the base URI.
|
|
657
|
+
* For example, to call the Charge Membership endpoint at https://my-memberships.com/v1/charge-membership, the base URI you provide here is https://my-memberships.com/.
|
|
658
|
+
*/
|
|
659
|
+
deploymentUri?: string;
|
|
660
|
+
/** The app IDs of the catalogs your app supports. */
|
|
661
|
+
catalogAppDefIds?: string[];
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* this message is not directly used by any service,
|
|
665
|
+
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
666
|
+
* e.g. SPIs, event-handlers, etc..
|
|
667
|
+
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
668
|
+
*
|
|
669
|
+
* Example:
|
|
670
|
+
* ```typescript
|
|
671
|
+
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
672
|
+
* ...
|
|
673
|
+
* }
|
|
674
|
+
* ```
|
|
675
|
+
*/
|
|
676
|
+
interface Context$7 {
|
|
677
|
+
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
678
|
+
requestId?: string | null;
|
|
679
|
+
/** [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code. */
|
|
680
|
+
currency?: string | null;
|
|
681
|
+
/** An object that describes the identity that triggered this request. */
|
|
682
|
+
identity?: IdentificationData$7;
|
|
683
|
+
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
684
|
+
languages?: string[];
|
|
685
|
+
/** The service provider app's instance ID. */
|
|
686
|
+
instanceId?: string | null;
|
|
687
|
+
}
|
|
688
|
+
declare enum IdentityType$7 {
|
|
689
|
+
UNKNOWN = "UNKNOWN",
|
|
690
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
691
|
+
MEMBER = "MEMBER",
|
|
692
|
+
WIX_USER = "WIX_USER",
|
|
693
|
+
APP = "APP"
|
|
694
|
+
}
|
|
695
|
+
interface IdentificationData$7 extends IdentificationDataIdOneOf$7 {
|
|
696
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
697
|
+
anonymousVisitorId?: string;
|
|
698
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
699
|
+
memberId?: string;
|
|
700
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
701
|
+
wixUserId?: string;
|
|
702
|
+
/** ID of an app. */
|
|
703
|
+
appId?: string;
|
|
704
|
+
/** @readonly */
|
|
705
|
+
identityType?: IdentityType$7;
|
|
706
|
+
}
|
|
707
|
+
/** @oneof */
|
|
708
|
+
interface IdentificationDataIdOneOf$7 {
|
|
709
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
710
|
+
anonymousVisitorId?: string;
|
|
711
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
712
|
+
memberId?: string;
|
|
713
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
714
|
+
wixUserId?: string;
|
|
715
|
+
/** ID of an app. */
|
|
716
|
+
appId?: string;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
interface ListEligibleMembershipsEnvelope {
|
|
720
|
+
request: ListEligibleMembershipsRequest;
|
|
721
|
+
metadata: Context$7;
|
|
722
|
+
}
|
|
723
|
+
interface ChargeMembershipEnvelope {
|
|
724
|
+
request: ChargeMembershipRequest;
|
|
725
|
+
metadata: Context$7;
|
|
726
|
+
}
|
|
727
|
+
interface GetMembershipVoidabilityEnvelope {
|
|
728
|
+
request: GetMembershipVoidabilityRequest;
|
|
729
|
+
metadata: Context$7;
|
|
730
|
+
}
|
|
731
|
+
interface VoidMembershipChargeEnvelope {
|
|
732
|
+
request: VoidMembershipChargeRequest;
|
|
733
|
+
metadata: Context$7;
|
|
734
|
+
}
|
|
735
|
+
declare const provideHandlers$f: ServicePluginDefinition$9<{
|
|
736
|
+
/**
|
|
737
|
+
*
|
|
738
|
+
* This method retrieves eligible memberships from your app. */
|
|
739
|
+
listEligibleMemberships(payload: ListEligibleMembershipsEnvelope): ListEligibleMembershipsResponse | Promise<ListEligibleMembershipsResponse>;
|
|
740
|
+
/**
|
|
741
|
+
*
|
|
742
|
+
* This method requests that a membership be charged by your app. */
|
|
743
|
+
chargeMembership(payload: ChargeMembershipEnvelope): ChargeMembershipResponse | Promise<ChargeMembershipResponse>;
|
|
744
|
+
/**
|
|
745
|
+
*
|
|
746
|
+
* This method retrieves from your app whether a membership can be voided. */
|
|
747
|
+
getMembershipVoidability(payload: GetMembershipVoidabilityEnvelope): GetMembershipVoidabilityResponse | Promise<GetMembershipVoidabilityResponse>;
|
|
748
|
+
/**
|
|
749
|
+
*
|
|
750
|
+
* This method requests that a membership charge be voided by your app. */
|
|
751
|
+
voidMembershipCharge(payload: VoidMembershipChargeEnvelope): VoidMembershipChargeResponse | Promise<VoidMembershipChargeResponse>;
|
|
752
|
+
}>;
|
|
753
|
+
|
|
754
|
+
type ServicePluginMethodInput$7 = {
|
|
755
|
+
request: any;
|
|
756
|
+
metadata: any;
|
|
757
|
+
};
|
|
758
|
+
type ServicePluginContract$7 = Record<string, (payload: ServicePluginMethodInput$7) => unknown | Promise<unknown>>;
|
|
759
|
+
type ServicePluginMethodMetadata$7 = {
|
|
760
|
+
name: string;
|
|
761
|
+
primaryHttpMappingPath: string;
|
|
762
|
+
transformations: {
|
|
763
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$7;
|
|
764
|
+
toREST: (...args: unknown[]) => unknown;
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
type ServicePluginDefinition$7<Contract extends ServicePluginContract$7> = {
|
|
768
|
+
__type: 'service-plugin-definition';
|
|
769
|
+
componentType: string;
|
|
770
|
+
methods: ServicePluginMethodMetadata$7[];
|
|
771
|
+
__contract: Contract;
|
|
772
|
+
};
|
|
773
|
+
declare function ServicePluginDefinition$7<Contract extends ServicePluginContract$7>(componentType: string, methods: ServicePluginMethodMetadata$7[]): ServicePluginDefinition$7<Contract>;
|
|
774
|
+
type BuildServicePluginDefinition$7<T extends ServicePluginDefinition$7<any>> = (implementation: T['__contract']) => void;
|
|
775
|
+
|
|
776
|
+
declare global {
|
|
777
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
778
|
+
interface SymbolConstructor {
|
|
779
|
+
readonly observable: symbol;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
declare function createServicePluginModule$7<T extends ServicePluginDefinition$7<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$7<T> & T;
|
|
784
|
+
|
|
785
|
+
type _publicProvideHandlersType$7 = typeof provideHandlers$f;
|
|
786
|
+
declare const provideHandlers$e: ReturnType<typeof createServicePluginModule$7<_publicProvideHandlersType>>;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* The provided membership selection is invalid
|
|
790
|
+
*/
|
|
791
|
+
declare class InvalidSelectionWixError extends Error {
|
|
792
|
+
/** @hidden */
|
|
793
|
+
httpCode: number;
|
|
794
|
+
/** @hidden */
|
|
795
|
+
statusCode: string;
|
|
796
|
+
/** @hidden */
|
|
797
|
+
applicationCode: string;
|
|
798
|
+
/** @hidden */
|
|
799
|
+
name: string;
|
|
800
|
+
/** @hidden */
|
|
801
|
+
errorSchemaName: string;
|
|
802
|
+
data: MembershipInvalidSelectionErrors;
|
|
803
|
+
constructor(data: MembershipInvalidSelectionErrors);
|
|
804
|
+
/** @hidden */
|
|
805
|
+
static readonly __type = "wix_spi_error";
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* The membership was found, but does not apply for the provided item
|
|
809
|
+
*/
|
|
810
|
+
declare class MembershipDoesNotApplyToItemWixError extends Error {
|
|
811
|
+
/** @hidden */
|
|
812
|
+
httpCode: number;
|
|
813
|
+
/** @hidden */
|
|
814
|
+
statusCode: string;
|
|
815
|
+
/** @hidden */
|
|
816
|
+
applicationCode: string;
|
|
817
|
+
/** @hidden */
|
|
818
|
+
name: string;
|
|
819
|
+
constructor();
|
|
820
|
+
/** @hidden */
|
|
821
|
+
static readonly __type = "wix_spi_error";
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* The membership was found, applied to the provided item but cannot be charged. For example because a limited membership doesn't have enough credits
|
|
825
|
+
*/
|
|
826
|
+
declare class MembershipCannotBeUsedWixError extends Error {
|
|
827
|
+
/** @hidden */
|
|
828
|
+
httpCode: number;
|
|
829
|
+
/** @hidden */
|
|
830
|
+
statusCode: string;
|
|
831
|
+
/** @hidden */
|
|
832
|
+
applicationCode: string;
|
|
833
|
+
/** @hidden */
|
|
834
|
+
name: string;
|
|
835
|
+
/** @hidden */
|
|
836
|
+
errorSchemaName: string;
|
|
837
|
+
data: MembershipCannotBeChargedError;
|
|
838
|
+
constructor(data: MembershipCannotBeChargedError);
|
|
839
|
+
/** @hidden */
|
|
840
|
+
static readonly __type = "wix_spi_error";
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* This charge was already done, per the idempotency key of membershipId + orderId + rootCatalogItemId
|
|
844
|
+
*/
|
|
845
|
+
declare class MembershipAlreadyChargedWixError extends Error {
|
|
846
|
+
/** @hidden */
|
|
847
|
+
httpCode: number;
|
|
848
|
+
/** @hidden */
|
|
849
|
+
statusCode: string;
|
|
850
|
+
/** @hidden */
|
|
851
|
+
applicationCode: string;
|
|
852
|
+
/** @hidden */
|
|
853
|
+
name: string;
|
|
854
|
+
/** @hidden */
|
|
855
|
+
errorSchemaName: string;
|
|
856
|
+
data: MembershipAlreadyChargedError;
|
|
857
|
+
constructor(data: MembershipAlreadyChargedError);
|
|
858
|
+
/** @hidden */
|
|
859
|
+
static readonly __type = "wix_spi_error";
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Transaction not found
|
|
863
|
+
*/
|
|
864
|
+
declare class TransactionNotFoundWixError extends Error {
|
|
865
|
+
/** @hidden */
|
|
866
|
+
httpCode: number;
|
|
867
|
+
/** @hidden */
|
|
868
|
+
statusCode: string;
|
|
869
|
+
/** @hidden */
|
|
870
|
+
applicationCode: string;
|
|
871
|
+
/** @hidden */
|
|
872
|
+
name: string;
|
|
873
|
+
constructor();
|
|
874
|
+
/** @hidden */
|
|
875
|
+
static readonly __type = "wix_spi_error";
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Transaction exists but cannot be voided
|
|
879
|
+
*/
|
|
880
|
+
declare class TransactionCannotBeVoidedWixError extends Error {
|
|
881
|
+
/** @hidden */
|
|
882
|
+
httpCode: number;
|
|
883
|
+
/** @hidden */
|
|
884
|
+
statusCode: string;
|
|
885
|
+
/** @hidden */
|
|
886
|
+
applicationCode: string;
|
|
887
|
+
/** @hidden */
|
|
888
|
+
name: string;
|
|
889
|
+
constructor();
|
|
890
|
+
/** @hidden */
|
|
891
|
+
static readonly __type = "wix_spi_error";
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Transaction was already voided
|
|
895
|
+
*/
|
|
896
|
+
declare class TransactionAlreadyVoidedWixError extends Error {
|
|
897
|
+
/** @hidden */
|
|
898
|
+
httpCode: number;
|
|
899
|
+
/** @hidden */
|
|
900
|
+
statusCode: string;
|
|
901
|
+
/** @hidden */
|
|
902
|
+
applicationCode: string;
|
|
903
|
+
/** @hidden */
|
|
904
|
+
name: string;
|
|
905
|
+
constructor();
|
|
906
|
+
/** @hidden */
|
|
907
|
+
static readonly __type = "wix_spi_error";
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
type index_d$7_ChargeMembershipRequest = ChargeMembershipRequest;
|
|
911
|
+
type index_d$7_ChargeMembershipResponse = ChargeMembershipResponse;
|
|
912
|
+
type index_d$7_Ended = Ended;
|
|
913
|
+
type index_d$7_GetMembershipVoidabilityRequest = GetMembershipVoidabilityRequest;
|
|
914
|
+
type index_d$7_GetMembershipVoidabilityResponse = GetMembershipVoidabilityResponse;
|
|
915
|
+
type index_d$7_InvalidSelectionWixError = InvalidSelectionWixError;
|
|
916
|
+
declare const index_d$7_InvalidSelectionWixError: typeof InvalidSelectionWixError;
|
|
917
|
+
type index_d$7_LineItemNotFoundInfo = LineItemNotFoundInfo;
|
|
918
|
+
type index_d$7_ListEligibleMembershipsRequest = ListEligibleMembershipsRequest;
|
|
919
|
+
type index_d$7_ListEligibleMembershipsResponse = ListEligibleMembershipsResponse;
|
|
920
|
+
type index_d$7_MembershipAlreadyChargedError = MembershipAlreadyChargedError;
|
|
921
|
+
type index_d$7_MembershipAlreadyChargedWixError = MembershipAlreadyChargedWixError;
|
|
922
|
+
declare const index_d$7_MembershipAlreadyChargedWixError: typeof MembershipAlreadyChargedWixError;
|
|
923
|
+
type index_d$7_MembershipCannotBeChargedError = MembershipCannotBeChargedError;
|
|
924
|
+
type index_d$7_MembershipCannotBeChargedErrorErrorDataOneOf = MembershipCannotBeChargedErrorErrorDataOneOf;
|
|
925
|
+
type index_d$7_MembershipCannotBeChargedType = MembershipCannotBeChargedType;
|
|
926
|
+
declare const index_d$7_MembershipCannotBeChargedType: typeof MembershipCannotBeChargedType;
|
|
927
|
+
type index_d$7_MembershipCannotBeUsedForLineItemInfo = MembershipCannotBeUsedForLineItemInfo;
|
|
928
|
+
type index_d$7_MembershipCannotBeUsedForLineItemsInfo = MembershipCannotBeUsedForLineItemsInfo;
|
|
929
|
+
type index_d$7_MembershipCannotBeUsedWixError = MembershipCannotBeUsedWixError;
|
|
930
|
+
declare const index_d$7_MembershipCannotBeUsedWixError: typeof MembershipCannotBeUsedWixError;
|
|
931
|
+
type index_d$7_MembershipDoesNotApplyToItemWixError = MembershipDoesNotApplyToItemWixError;
|
|
932
|
+
declare const index_d$7_MembershipDoesNotApplyToItemWixError: typeof MembershipDoesNotApplyToItemWixError;
|
|
933
|
+
type index_d$7_MembershipErrorType = MembershipErrorType;
|
|
934
|
+
declare const index_d$7_MembershipErrorType: typeof MembershipErrorType;
|
|
935
|
+
type index_d$7_MembershipInvalidSelectionError = MembershipInvalidSelectionError;
|
|
936
|
+
type index_d$7_MembershipInvalidSelectionErrorErrorDataOneOf = MembershipInvalidSelectionErrorErrorDataOneOf;
|
|
937
|
+
type index_d$7_MembershipInvalidSelectionErrors = MembershipInvalidSelectionErrors;
|
|
938
|
+
type index_d$7_MembershipsSPIConfig = MembershipsSPIConfig;
|
|
939
|
+
type index_d$7_NotStartedYet = NotStartedYet;
|
|
940
|
+
type index_d$7_OutOfCredits = OutOfCredits;
|
|
941
|
+
type index_d$7_TransactionAlreadyVoidedWixError = TransactionAlreadyVoidedWixError;
|
|
942
|
+
declare const index_d$7_TransactionAlreadyVoidedWixError: typeof TransactionAlreadyVoidedWixError;
|
|
943
|
+
type index_d$7_TransactionCannotBeVoidedWixError = TransactionCannotBeVoidedWixError;
|
|
944
|
+
declare const index_d$7_TransactionCannotBeVoidedWixError: typeof TransactionCannotBeVoidedWixError;
|
|
378
945
|
type index_d$7_TransactionNotFoundWixError = TransactionNotFoundWixError;
|
|
379
946
|
declare const index_d$7_TransactionNotFoundWixError: typeof TransactionNotFoundWixError;
|
|
380
|
-
type index_d$
|
|
381
|
-
type index_d$
|
|
947
|
+
type index_d$7_VoidMembershipChargeRequest = VoidMembershipChargeRequest;
|
|
948
|
+
type index_d$7_VoidMembershipChargeResponse = VoidMembershipChargeResponse;
|
|
382
949
|
declare namespace index_d$7 {
|
|
383
|
-
export { index_d$
|
|
950
|
+
export { type CatalogReference$7 as CatalogReference, type index_d$7_ChargeMembershipRequest as ChargeMembershipRequest, type index_d$7_ChargeMembershipResponse as ChargeMembershipResponse, type Context$7 as Context, type index_d$7_Ended as Ended, type index_d$7_GetMembershipVoidabilityRequest as GetMembershipVoidabilityRequest, type index_d$7_GetMembershipVoidabilityResponse as GetMembershipVoidabilityResponse, type IdentificationData$7 as IdentificationData, type IdentificationDataIdOneOf$7 as IdentificationDataIdOneOf, IdentityType$7 as IdentityType, type InvalidMembership$1 as InvalidMembership, index_d$7_InvalidSelectionWixError as InvalidSelectionWixError, type LineItem$5 as LineItem, type index_d$7_LineItemNotFoundInfo as LineItemNotFoundInfo, type index_d$7_ListEligibleMembershipsRequest as ListEligibleMembershipsRequest, type index_d$7_ListEligibleMembershipsResponse as ListEligibleMembershipsResponse, type Membership$1 as Membership, type index_d$7_MembershipAlreadyChargedError as MembershipAlreadyChargedError, index_d$7_MembershipAlreadyChargedWixError as MembershipAlreadyChargedWixError, type index_d$7_MembershipCannotBeChargedError as MembershipCannotBeChargedError, type index_d$7_MembershipCannotBeChargedErrorErrorDataOneOf as MembershipCannotBeChargedErrorErrorDataOneOf, index_d$7_MembershipCannotBeChargedType as MembershipCannotBeChargedType, type index_d$7_MembershipCannotBeUsedForLineItemInfo as MembershipCannotBeUsedForLineItemInfo, type index_d$7_MembershipCannotBeUsedForLineItemsInfo as MembershipCannotBeUsedForLineItemsInfo, index_d$7_MembershipCannotBeUsedWixError as MembershipCannotBeUsedWixError, index_d$7_MembershipDoesNotApplyToItemWixError as MembershipDoesNotApplyToItemWixError, index_d$7_MembershipErrorType as MembershipErrorType, type index_d$7_MembershipInvalidSelectionError as MembershipInvalidSelectionError, type index_d$7_MembershipInvalidSelectionErrorErrorDataOneOf as MembershipInvalidSelectionErrorErrorDataOneOf, type index_d$7_MembershipInvalidSelectionErrors as MembershipInvalidSelectionErrors, type MembershipName$1 as MembershipName, type MembershipPaymentCredits$1 as MembershipPaymentCredits, type index_d$7_MembershipsSPIConfig as MembershipsSPIConfig, type index_d$7_NotStartedYet as NotStartedYet, type index_d$7_OutOfCredits as OutOfCredits, type SelectedMembership$1 as SelectedMembership, type SelectedMemberships$1 as SelectedMemberships, type ServiceProperties$1 as ServiceProperties, index_d$7_TransactionAlreadyVoidedWixError as TransactionAlreadyVoidedWixError, index_d$7_TransactionCannotBeVoidedWixError as TransactionCannotBeVoidedWixError, index_d$7_TransactionNotFoundWixError as TransactionNotFoundWixError, type index_d$7_VoidMembershipChargeRequest as VoidMembershipChargeRequest, type index_d$7_VoidMembershipChargeResponse as VoidMembershipChargeResponse, type _publicProvideHandlersType$7 as _publicProvideHandlersType, provideHandlers$e as provideHandlers, provideHandlers$f as publicProvideHandlers };
|
|
384
951
|
}
|
|
385
952
|
|
|
386
953
|
/** additional information can be passed via aspects, for example GEO */
|
|
@@ -523,7 +1090,7 @@ interface GetRecommendationsEnvelope {
|
|
|
523
1090
|
request: GetRecommendationsRequest;
|
|
524
1091
|
metadata: Context$6;
|
|
525
1092
|
}
|
|
526
|
-
declare const provideHandlers$d: ServicePluginDefinition$
|
|
1093
|
+
declare const provideHandlers$d: ServicePluginDefinition$9<{
|
|
527
1094
|
/**
|
|
528
1095
|
*
|
|
529
1096
|
* Returns lists of items recommended by each requested algorithm.
|
|
@@ -1063,7 +1630,7 @@ interface GetShippingRatesEnvelope {
|
|
|
1063
1630
|
request: GetShippingRatesRequest;
|
|
1064
1631
|
metadata: Context$5;
|
|
1065
1632
|
}
|
|
1066
|
-
declare const provideHandlers$b: ServicePluginDefinition$
|
|
1633
|
+
declare const provideHandlers$b: ServicePluginDefinition$9<{
|
|
1067
1634
|
/**
|
|
1068
1635
|
*
|
|
1069
1636
|
* This method retrieves applicable shipping rates for a delivery from your app.
|
|
@@ -1623,7 +2190,7 @@ interface CalculateAdditionalFeesEnvelope {
|
|
|
1623
2190
|
request: CalculateAdditionalFeesRequest;
|
|
1624
2191
|
metadata: Context$4;
|
|
1625
2192
|
}
|
|
1626
|
-
declare const provideHandlers$9: ServicePluginDefinition$
|
|
2193
|
+
declare const provideHandlers$9: ServicePluginDefinition$9<{
|
|
1627
2194
|
/**
|
|
1628
2195
|
*
|
|
1629
2196
|
* This method retrieves additional fees calculated by your app.
|
|
@@ -1825,7 +2392,7 @@ interface GetEligibleTriggersEnvelope {
|
|
|
1825
2392
|
request: GetEligibleTriggersRequest;
|
|
1826
2393
|
metadata: Context$3;
|
|
1827
2394
|
}
|
|
1828
|
-
declare const provideHandlers$7: ServicePluginDefinition$
|
|
2395
|
+
declare const provideHandlers$7: ServicePluginDefinition$9<{
|
|
1829
2396
|
/**
|
|
1830
2397
|
*
|
|
1831
2398
|
* Lists all custom triggers provided by your service plugin integration.
|
|
@@ -2094,7 +2661,7 @@ interface GetEligibleDiscountsEnvelope {
|
|
|
2094
2661
|
request: GetEligibleDiscountsRequest;
|
|
2095
2662
|
metadata: Context$2;
|
|
2096
2663
|
}
|
|
2097
|
-
declare const provideHandlers$5: ServicePluginDefinition$
|
|
2664
|
+
declare const provideHandlers$5: ServicePluginDefinition$9<{
|
|
2098
2665
|
/**
|
|
2099
2666
|
*
|
|
2100
2667
|
* Wix calls this method when certain actions are performed on the cart or checkout.
|
|
@@ -4755,15 +5322,15 @@ interface Membership {
|
|
|
4755
5322
|
additionalData?: Record<string, any> | null;
|
|
4756
5323
|
}
|
|
4757
5324
|
interface MembershipName {
|
|
4758
|
-
/**
|
|
5325
|
+
/** Membership name. */
|
|
4759
5326
|
original?: string;
|
|
4760
|
-
/**
|
|
5327
|
+
/** Translated membership name. Defaults to `original` when not provided. */
|
|
4761
5328
|
translated?: string | null;
|
|
4762
5329
|
}
|
|
4763
5330
|
interface MembershipPaymentCredits {
|
|
4764
|
-
/**
|
|
5331
|
+
/** Membership's total amount of credits. */
|
|
4765
5332
|
total?: number;
|
|
4766
|
-
/**
|
|
5333
|
+
/** Membership's remaining amount of credits. */
|
|
4767
5334
|
remaining?: number;
|
|
4768
5335
|
}
|
|
4769
5336
|
interface InvalidMembership {
|
|
@@ -5013,7 +5580,7 @@ interface GetPaymentSettingsForCheckoutEnvelope {
|
|
|
5013
5580
|
request: GetPaymentSettingsForCheckoutRequest;
|
|
5014
5581
|
metadata: Context$1;
|
|
5015
5582
|
}
|
|
5016
|
-
declare const provideHandlers$3: ServicePluginDefinition$
|
|
5583
|
+
declare const provideHandlers$3: ServicePluginDefinition$9<{
|
|
5017
5584
|
/**
|
|
5018
5585
|
*
|
|
5019
5586
|
* This method retrieves payment settings from your app.
|
|
@@ -5902,7 +6469,7 @@ interface GetValidationViolationsEnvelope {
|
|
|
5902
6469
|
request: GetValidationViolationsRequest;
|
|
5903
6470
|
metadata: Context;
|
|
5904
6471
|
}
|
|
5905
|
-
declare const provideHandlers$1: ServicePluginDefinition$
|
|
6472
|
+
declare const provideHandlers$1: ServicePluginDefinition$9<{
|
|
5906
6473
|
/**
|
|
5907
6474
|
*
|
|
5908
6475
|
* This method retrieves validation violations from your app.
|
|
@@ -6031,4 +6598,4 @@ declare namespace index_d {
|
|
|
6031
6598
|
export { type index_d_Address as Address, type index_d_AddressLocation as AddressLocation, type index_d_AddressWithContact as AddressWithContact, type index_d_AppliedDiscount as AppliedDiscount, type index_d_AppliedDiscountDiscountSourceOneOf as AppliedDiscountDiscountSourceOneOf, type index_d_BuyerDetails as BuyerDetails, type index_d_CatalogReference as CatalogReference, index_d_CheckoutStage as CheckoutStage, type index_d_Context as Context, type index_d_Coupon as Coupon, type index_d_CustomField as CustomField, type index_d_CustomFields as CustomFields, type index_d_Description as Description, type index_d_DiscountRule as DiscountRule, type index_d_DiscountRuleName as DiscountRuleName, index_d_DiscountType as DiscountType, type index_d_ExtendedFields as ExtendedFields, type index_d_ExternalReference as ExternalReference, type index_d_FullAddressContactDetails as FullAddressContactDetails, type index_d_GetValidationViolationsRequest as GetValidationViolationsRequest, type index_d_GetValidationViolationsResponse as GetValidationViolationsResponse, type index_d_GiftCard as GiftCard, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, index_d_IdentityType as IdentityType, type index_d_ItemTaxFullDetails as ItemTaxFullDetails, type index_d_ItemType as ItemType, index_d_ItemTypeItemType as ItemTypeItemType, type index_d_ItemTypeItemTypeDataOneOf as ItemTypeItemTypeDataOneOf, index_d_JurisdictionType as JurisdictionType, type index_d_LineItem as LineItem, type index_d_LineItemPricesData as LineItemPricesData, type index_d_MerchantDiscount as MerchantDiscount, type index_d_MultiCurrencyPrice as MultiCurrencyPrice, index_d_NameInLineItem as NameInLineItem, index_d_NameInOther as NameInOther, type index_d_Other as Other, type index_d_PhysicalProperties as PhysicalProperties, type index_d_PriceSummary as PriceSummary, type index_d_ProductName as ProductName, type index_d_SelectedCarrierServiceOption as SelectedCarrierServiceOption, type index_d_SelectedCarrierServiceOptionPrices as SelectedCarrierServiceOptionPrices, index_d_Severity as Severity, type index_d_ShippingInfo as ShippingInfo, index_d_Source as Source, type index_d_SourceInfo as SourceInfo, type index_d_Stage as Stage, type index_d_StageStagesOneOf as StageStagesOneOf, type index_d_StreetAddress as StreetAddress, index_d_SubscriptionFrequency as SubscriptionFrequency, type index_d_SubscriptionOptionInfo as SubscriptionOptionInfo, type index_d_SubscriptionSettings as SubscriptionSettings, type index_d_Target as Target, type index_d_TargetLineItem as TargetLineItem, type index_d_TargetTargetTypeOneOf as TargetTargetTypeOneOf, type index_d_TaxBreakdown as TaxBreakdown, type index_d_Title as Title, type index_d_ValidationInfo as ValidationInfo, type index_d_ValidationsSPIConfig as ValidationsSPIConfig, type index_d_VatId as VatId, index_d_VatType as VatType, type index_d_Violation as Violation, index_d_WeightUnit as WeightUnit, type index_d__publicProvideHandlersType as _publicProvideHandlersType, index_d_provideHandlers as provideHandlers, provideHandlers$1 as publicProvideHandlers };
|
|
6032
6599
|
}
|
|
6033
6600
|
|
|
6034
|
-
export { index_d$4 as additionalFees, index_d$3 as customTriggers, index_d$2 as discounts, index_d$
|
|
6601
|
+
export { index_d$4 as additionalFees, index_d$3 as customTriggers, index_d$2 as discounts, index_d$8 as giftVouchersProvider, index_d$7 as memberships, index_d$1 as paymentSettings, index_d$6 as recommendationsProvider, index_d$5 as shippingRates, index_d as validations };
|