@wix/payments 1.0.7 → 1.0.9
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/context.d.ts +1 -0
- package/build/cjs/context.js +2 -1
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +4 -2
- package/build/cjs/index.js +7 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +1 -0
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +4 -2
- package/build/es/index.js +4 -2
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/package.json +7 -5
- package/type-bundles/context.bundle.d.ts +351 -93
- package/type-bundles/index.bundle.d.ts +351 -93
- package/type-bundles/meta.bundle.d.ts +205 -10
|
@@ -1,3 +1,47 @@
|
|
|
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>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: any;
|
|
13
|
+
request?: any;
|
|
14
|
+
};
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
|
+
url: string;
|
|
18
|
+
data?: Data;
|
|
19
|
+
params?: URLSearchParams;
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
|
+
methodFqn?: string;
|
|
23
|
+
entityFqdn?: string;
|
|
24
|
+
packageName?: string;
|
|
25
|
+
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
28
|
+
__type: 'event-definition';
|
|
29
|
+
type: Type;
|
|
30
|
+
isDomainEvent?: boolean;
|
|
31
|
+
transformations?: (envelope: unknown) => Payload;
|
|
32
|
+
__payload: Payload;
|
|
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;
|
|
37
|
+
|
|
38
|
+
declare global {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
40
|
+
interface SymbolConstructor {
|
|
41
|
+
readonly observable: symbol;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
1
45
|
interface OnboardingAvailability {
|
|
2
46
|
/**
|
|
3
47
|
* ID of this entity
|
|
@@ -323,98 +367,229 @@ interface UpdatePartnerFlowOptions {
|
|
|
323
367
|
partnerFlow?: PartnerFlow;
|
|
324
368
|
}
|
|
325
369
|
|
|
326
|
-
|
|
327
|
-
interface
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
370
|
+
declare function getOnboardingAvailability$1(httpClient: HttpClient): GetOnboardingAvailabilitySignature;
|
|
371
|
+
interface GetOnboardingAvailabilitySignature {
|
|
372
|
+
/**
|
|
373
|
+
* Fetch current state of onboarding availability for meta site.
|
|
374
|
+
*/
|
|
375
|
+
(): Promise<GetOnboardingAvailabilityResponse & GetOnboardingAvailabilityResponseNonNullableFields>;
|
|
331
376
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
request?: any;
|
|
339
|
-
};
|
|
340
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
341
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
342
|
-
url: string;
|
|
343
|
-
data?: Data;
|
|
344
|
-
params?: URLSearchParams;
|
|
345
|
-
} & APIMetadata;
|
|
346
|
-
type APIMetadata = {
|
|
347
|
-
methodFqn?: string;
|
|
348
|
-
entityFqdn?: string;
|
|
349
|
-
packageName?: string;
|
|
350
|
-
};
|
|
351
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
352
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
353
|
-
__type: 'event-definition';
|
|
354
|
-
type: Type;
|
|
355
|
-
isDomainEvent?: boolean;
|
|
356
|
-
transformations?: (envelope: unknown) => Payload;
|
|
357
|
-
__payload: Payload;
|
|
358
|
-
};
|
|
359
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
360
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
361
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
362
|
-
|
|
363
|
-
declare global {
|
|
364
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
365
|
-
interface SymbolConstructor {
|
|
366
|
-
readonly observable: symbol;
|
|
367
|
-
}
|
|
377
|
+
declare function updateCbdFlow$1(httpClient: HttpClient): UpdateCbdFlowSignature;
|
|
378
|
+
interface UpdateCbdFlowSignature {
|
|
379
|
+
/**
|
|
380
|
+
* Update current state of CBD flow for meta site.
|
|
381
|
+
*/
|
|
382
|
+
(options?: UpdateCbdFlowOptions | undefined): Promise<UpdateCbdFlowResponse & UpdateCbdFlowResponseNonNullableFields>;
|
|
368
383
|
}
|
|
384
|
+
declare function updateRestrictedGoodsFlow$1(httpClient: HttpClient): UpdateRestrictedGoodsFlowSignature;
|
|
385
|
+
interface UpdateRestrictedGoodsFlowSignature {
|
|
386
|
+
/**
|
|
387
|
+
* Update current state of Restricted Goods flow for meta site.
|
|
388
|
+
*/
|
|
389
|
+
(options?: UpdateRestrictedGoodsFlowOptions | undefined): Promise<UpdateRestrictedGoodsFlowResponse & UpdateRestrictedGoodsFlowResponseNonNullableFields>;
|
|
390
|
+
}
|
|
391
|
+
declare function updatePartnerFlow$1(httpClient: HttpClient): UpdatePartnerFlowSignature;
|
|
392
|
+
interface UpdatePartnerFlowSignature {
|
|
393
|
+
/**
|
|
394
|
+
* Update current state of partner flow for meta site.
|
|
395
|
+
*/
|
|
396
|
+
(options?: UpdatePartnerFlowOptions | undefined): Promise<UpdatePartnerFlowResponse & UpdatePartnerFlowResponseNonNullableFields>;
|
|
397
|
+
}
|
|
398
|
+
declare const onOnboardingAvailabilityCreated$1: EventDefinition<OnboardingAvailabilityCreatedEnvelope, "wix.cashier.onboarding_availability.v1.onboarding_availability_created">;
|
|
399
|
+
declare const onOnboardingAvailabilityUpdated$1: EventDefinition<OnboardingAvailabilityUpdatedEnvelope, "wix.cashier.onboarding_availability.v1.onboarding_availability_updated">;
|
|
369
400
|
|
|
370
|
-
declare function createRESTModule$
|
|
401
|
+
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
371
402
|
|
|
372
403
|
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
373
404
|
|
|
374
|
-
|
|
375
|
-
declare const
|
|
376
|
-
|
|
377
|
-
declare const
|
|
378
|
-
|
|
379
|
-
declare const
|
|
405
|
+
type _publicGetOnboardingAvailabilityType = typeof getOnboardingAvailability$1;
|
|
406
|
+
declare const getOnboardingAvailability: ReturnType<typeof createRESTModule$2<_publicGetOnboardingAvailabilityType>>;
|
|
407
|
+
type _publicUpdateCbdFlowType = typeof updateCbdFlow$1;
|
|
408
|
+
declare const updateCbdFlow: ReturnType<typeof createRESTModule$2<_publicUpdateCbdFlowType>>;
|
|
409
|
+
type _publicUpdateRestrictedGoodsFlowType = typeof updateRestrictedGoodsFlow$1;
|
|
410
|
+
declare const updateRestrictedGoodsFlow: ReturnType<typeof createRESTModule$2<_publicUpdateRestrictedGoodsFlowType>>;
|
|
411
|
+
type _publicUpdatePartnerFlowType = typeof updatePartnerFlow$1;
|
|
412
|
+
declare const updatePartnerFlow: ReturnType<typeof createRESTModule$2<_publicUpdatePartnerFlowType>>;
|
|
413
|
+
|
|
414
|
+
type _publicOnOnboardingAvailabilityCreatedType = typeof onOnboardingAvailabilityCreated$1;
|
|
415
|
+
/** */
|
|
416
|
+
declare const onOnboardingAvailabilityCreated: ReturnType<typeof createEventModule$1<_publicOnOnboardingAvailabilityCreatedType>>;
|
|
417
|
+
|
|
418
|
+
type _publicOnOnboardingAvailabilityUpdatedType = typeof onOnboardingAvailabilityUpdated$1;
|
|
419
|
+
/** */
|
|
420
|
+
declare const onOnboardingAvailabilityUpdated: ReturnType<typeof createEventModule$1<_publicOnOnboardingAvailabilityUpdatedType>>;
|
|
421
|
+
|
|
422
|
+
type context$2_AttestationInfo = AttestationInfo;
|
|
423
|
+
type context$2_CbdFlow = CbdFlow;
|
|
424
|
+
type context$2_GetOnboardingAvailabilityRequest = GetOnboardingAvailabilityRequest;
|
|
425
|
+
type context$2_GetOnboardingAvailabilityResponse = GetOnboardingAvailabilityResponse;
|
|
426
|
+
type context$2_GetOnboardingAvailabilityResponseNonNullableFields = GetOnboardingAvailabilityResponseNonNullableFields;
|
|
427
|
+
type context$2_OnboardingAvailability = OnboardingAvailability;
|
|
428
|
+
type context$2_OnboardingAvailabilityCreatedEnvelope = OnboardingAvailabilityCreatedEnvelope;
|
|
429
|
+
type context$2_OnboardingAvailabilityUpdatedEnvelope = OnboardingAvailabilityUpdatedEnvelope;
|
|
430
|
+
type context$2_PartnerFlow = PartnerFlow;
|
|
431
|
+
type context$2_PartnerFlowStatus = PartnerFlowStatus;
|
|
432
|
+
declare const context$2_PartnerFlowStatus: typeof PartnerFlowStatus;
|
|
433
|
+
type context$2_RestoreInfo = RestoreInfo;
|
|
434
|
+
type context$2_RestrictedGoodsCategory = RestrictedGoodsCategory;
|
|
435
|
+
declare const context$2_RestrictedGoodsCategory: typeof RestrictedGoodsCategory;
|
|
436
|
+
type context$2_RestrictedGoodsFlow = RestrictedGoodsFlow;
|
|
437
|
+
type context$2_RestrictedGoodsFlowStatus = RestrictedGoodsFlowStatus;
|
|
438
|
+
declare const context$2_RestrictedGoodsFlowStatus: typeof RestrictedGoodsFlowStatus;
|
|
439
|
+
type context$2_UpdateCbdFlowOptions = UpdateCbdFlowOptions;
|
|
440
|
+
type context$2_UpdateCbdFlowRequest = UpdateCbdFlowRequest;
|
|
441
|
+
type context$2_UpdateCbdFlowResponse = UpdateCbdFlowResponse;
|
|
442
|
+
type context$2_UpdateCbdFlowResponseNonNullableFields = UpdateCbdFlowResponseNonNullableFields;
|
|
443
|
+
type context$2_UpdatePartnerFlowOptions = UpdatePartnerFlowOptions;
|
|
444
|
+
type context$2_UpdatePartnerFlowRequest = UpdatePartnerFlowRequest;
|
|
445
|
+
type context$2_UpdatePartnerFlowResponse = UpdatePartnerFlowResponse;
|
|
446
|
+
type context$2_UpdatePartnerFlowResponseNonNullableFields = UpdatePartnerFlowResponseNonNullableFields;
|
|
447
|
+
type context$2_UpdateRestrictedGoodsFlowOptions = UpdateRestrictedGoodsFlowOptions;
|
|
448
|
+
type context$2_UpdateRestrictedGoodsFlowRequest = UpdateRestrictedGoodsFlowRequest;
|
|
449
|
+
type context$2_UpdateRestrictedGoodsFlowResponse = UpdateRestrictedGoodsFlowResponse;
|
|
450
|
+
type context$2_UpdateRestrictedGoodsFlowResponseNonNullableFields = UpdateRestrictedGoodsFlowResponseNonNullableFields;
|
|
451
|
+
type context$2__publicGetOnboardingAvailabilityType = _publicGetOnboardingAvailabilityType;
|
|
452
|
+
type context$2__publicOnOnboardingAvailabilityCreatedType = _publicOnOnboardingAvailabilityCreatedType;
|
|
453
|
+
type context$2__publicOnOnboardingAvailabilityUpdatedType = _publicOnOnboardingAvailabilityUpdatedType;
|
|
454
|
+
type context$2__publicUpdateCbdFlowType = _publicUpdateCbdFlowType;
|
|
455
|
+
type context$2__publicUpdatePartnerFlowType = _publicUpdatePartnerFlowType;
|
|
456
|
+
type context$2__publicUpdateRestrictedGoodsFlowType = _publicUpdateRestrictedGoodsFlowType;
|
|
457
|
+
declare const context$2_getOnboardingAvailability: typeof getOnboardingAvailability;
|
|
458
|
+
declare const context$2_onOnboardingAvailabilityCreated: typeof onOnboardingAvailabilityCreated;
|
|
459
|
+
declare const context$2_onOnboardingAvailabilityUpdated: typeof onOnboardingAvailabilityUpdated;
|
|
460
|
+
declare const context$2_updateCbdFlow: typeof updateCbdFlow;
|
|
461
|
+
declare const context$2_updatePartnerFlow: typeof updatePartnerFlow;
|
|
462
|
+
declare const context$2_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
|
|
463
|
+
declare namespace context$2 {
|
|
464
|
+
export { type ActionEvent$1 as ActionEvent, type context$2_AttestationInfo as AttestationInfo, type BaseEventMetadata$1 as BaseEventMetadata, type context$2_CbdFlow as CbdFlow, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type context$2_GetOnboardingAvailabilityRequest as GetOnboardingAvailabilityRequest, type context$2_GetOnboardingAvailabilityResponse as GetOnboardingAvailabilityResponse, type context$2_GetOnboardingAvailabilityResponseNonNullableFields as GetOnboardingAvailabilityResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$2_OnboardingAvailability as OnboardingAvailability, type context$2_OnboardingAvailabilityCreatedEnvelope as OnboardingAvailabilityCreatedEnvelope, type context$2_OnboardingAvailabilityUpdatedEnvelope as OnboardingAvailabilityUpdatedEnvelope, type context$2_PartnerFlow as PartnerFlow, context$2_PartnerFlowStatus as PartnerFlowStatus, type context$2_RestoreInfo as RestoreInfo, context$2_RestrictedGoodsCategory as RestrictedGoodsCategory, type context$2_RestrictedGoodsFlow as RestrictedGoodsFlow, context$2_RestrictedGoodsFlowStatus as RestrictedGoodsFlowStatus, Status$1 as Status, type context$2_UpdateCbdFlowOptions as UpdateCbdFlowOptions, type context$2_UpdateCbdFlowRequest as UpdateCbdFlowRequest, type context$2_UpdateCbdFlowResponse as UpdateCbdFlowResponse, type context$2_UpdateCbdFlowResponseNonNullableFields as UpdateCbdFlowResponseNonNullableFields, type context$2_UpdatePartnerFlowOptions as UpdatePartnerFlowOptions, type context$2_UpdatePartnerFlowRequest as UpdatePartnerFlowRequest, type context$2_UpdatePartnerFlowResponse as UpdatePartnerFlowResponse, type context$2_UpdatePartnerFlowResponseNonNullableFields as UpdatePartnerFlowResponseNonNullableFields, type context$2_UpdateRestrictedGoodsFlowOptions as UpdateRestrictedGoodsFlowOptions, type context$2_UpdateRestrictedGoodsFlowRequest as UpdateRestrictedGoodsFlowRequest, type context$2_UpdateRestrictedGoodsFlowResponse as UpdateRestrictedGoodsFlowResponse, type context$2_UpdateRestrictedGoodsFlowResponseNonNullableFields as UpdateRestrictedGoodsFlowResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, type context$2__publicGetOnboardingAvailabilityType as _publicGetOnboardingAvailabilityType, type context$2__publicOnOnboardingAvailabilityCreatedType as _publicOnOnboardingAvailabilityCreatedType, type context$2__publicOnOnboardingAvailabilityUpdatedType as _publicOnOnboardingAvailabilityUpdatedType, type context$2__publicUpdateCbdFlowType as _publicUpdateCbdFlowType, type context$2__publicUpdatePartnerFlowType as _publicUpdatePartnerFlowType, type context$2__publicUpdateRestrictedGoodsFlowType as _publicUpdateRestrictedGoodsFlowType, context$2_getOnboardingAvailability as getOnboardingAvailability, context$2_onOnboardingAvailabilityCreated as onOnboardingAvailabilityCreated, context$2_onOnboardingAvailabilityUpdated as onOnboardingAvailabilityUpdated, onOnboardingAvailabilityCreated$1 as publicOnOnboardingAvailabilityCreated, onOnboardingAvailabilityUpdated$1 as publicOnOnboardingAvailabilityUpdated, context$2_updateCbdFlow as updateCbdFlow, context$2_updatePartnerFlow as updatePartnerFlow, context$2_updateRestrictedGoodsFlow as updateRestrictedGoodsFlow };
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/** Provider platform event */
|
|
468
|
+
interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
|
|
469
|
+
/** Refund event data. */
|
|
470
|
+
refund?: RefundEvent;
|
|
471
|
+
/** Transaction event data. */
|
|
472
|
+
transaction?: TransactionEvent;
|
|
473
|
+
/**
|
|
474
|
+
* This field is ignored, do not send it.
|
|
475
|
+
* @deprecated
|
|
476
|
+
*/
|
|
477
|
+
pluginId?: string;
|
|
478
|
+
}
|
|
479
|
+
/** @oneof */
|
|
480
|
+
interface ProviderPlatformEventResourceOneOf {
|
|
481
|
+
/** Refund event data. */
|
|
482
|
+
refund?: RefundEvent;
|
|
483
|
+
/** Transaction event data. */
|
|
484
|
+
transaction?: TransactionEvent;
|
|
485
|
+
}
|
|
486
|
+
interface RefundEvent {
|
|
487
|
+
/** Wix transaction ID. */
|
|
488
|
+
wixTransactionId?: string;
|
|
489
|
+
/** PSP refund ID. */
|
|
490
|
+
pluginRefundId?: string;
|
|
491
|
+
/** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */
|
|
492
|
+
reasonCode?: number;
|
|
493
|
+
/** Refunded amount. */
|
|
494
|
+
amount?: string;
|
|
495
|
+
/** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */
|
|
496
|
+
wixRefundId?: string | null;
|
|
497
|
+
/** PSP-specific error code. */
|
|
498
|
+
errorCode?: string | null;
|
|
499
|
+
/** PSP-specific error message. */
|
|
500
|
+
errorMessage?: string | null;
|
|
501
|
+
}
|
|
502
|
+
interface TransactionEvent {
|
|
503
|
+
/** Wix transaction ID. */
|
|
504
|
+
wixTransactionId?: string;
|
|
505
|
+
/** PSP transaction ID. */
|
|
506
|
+
pluginTransactionId?: string;
|
|
507
|
+
/** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */
|
|
508
|
+
reasonCode?: number;
|
|
509
|
+
/** PSP-specific error code. */
|
|
510
|
+
errorCode?: string | null;
|
|
511
|
+
/** PSP-specific error message. */
|
|
512
|
+
errorMessage?: string | null;
|
|
513
|
+
/** Token data for stored payment method. */
|
|
514
|
+
credentialsOnFile?: CredentialsOnFile;
|
|
515
|
+
/** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
|
|
516
|
+
cardDetails?: CardDetails;
|
|
517
|
+
}
|
|
518
|
+
interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
|
|
519
|
+
/** Network token data. */
|
|
520
|
+
cardReference?: CardReference;
|
|
521
|
+
/** Provider generated token data. */
|
|
522
|
+
paymentMethodReference?: PaymentMethodReference;
|
|
523
|
+
}
|
|
524
|
+
/** @oneof */
|
|
525
|
+
interface CredentialsOnFileInfoOneOf {
|
|
526
|
+
/** Network token data. */
|
|
527
|
+
cardReference?: CardReference;
|
|
528
|
+
/** Provider generated token data. */
|
|
529
|
+
paymentMethodReference?: PaymentMethodReference;
|
|
530
|
+
}
|
|
531
|
+
interface CardReference {
|
|
532
|
+
/** Network token. */
|
|
533
|
+
networkTransactionId?: string;
|
|
534
|
+
/** Directory Server transaction ID */
|
|
535
|
+
dsTransactionId?: string | null;
|
|
536
|
+
}
|
|
537
|
+
interface PaymentMethodReference {
|
|
538
|
+
/** Payment method token created by the PSP. */
|
|
539
|
+
token?: string;
|
|
540
|
+
}
|
|
541
|
+
interface CardDetails {
|
|
542
|
+
/** Issuer (business) identification number. First 6 or 8 digits of the card's number. */
|
|
543
|
+
bin?: string | null;
|
|
544
|
+
/** Last 4 digits of the card's number. */
|
|
545
|
+
lastFour?: string | null;
|
|
546
|
+
}
|
|
547
|
+
/** Submit event request */
|
|
548
|
+
interface SubmitEventRequest {
|
|
549
|
+
/** Event data. */
|
|
550
|
+
event: ProviderPlatformEvent;
|
|
551
|
+
}
|
|
552
|
+
/** Submit event response */
|
|
553
|
+
interface SubmitEventResponse {
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
declare function submitEvent$1(httpClient: HttpClient): SubmitEventSignature;
|
|
557
|
+
interface SubmitEventSignature {
|
|
558
|
+
/**
|
|
559
|
+
* This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
|
|
560
|
+
*
|
|
561
|
+
* Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.
|
|
562
|
+
* PSP's create their own version numbers.
|
|
563
|
+
*
|
|
564
|
+
* > You cannot try out this endpoint because an `Authorization` header value has to be obtained
|
|
565
|
+
* > with the OAuth 2.0 client credentials flow for a specific scope.
|
|
566
|
+
* > So please ignore the **Authorization** section below as well as the **Try It Out** button.
|
|
567
|
+
* @param - Event data.
|
|
568
|
+
* @returns Submit event response
|
|
569
|
+
*/
|
|
570
|
+
(event: ProviderPlatformEvent): Promise<void>;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
574
|
+
|
|
575
|
+
type _publicSubmitEventType = typeof submitEvent$1;
|
|
576
|
+
declare const submitEvent: ReturnType<typeof createRESTModule$1<_publicSubmitEventType>>;
|
|
380
577
|
|
|
381
|
-
type context$
|
|
382
|
-
type context$
|
|
383
|
-
type context$
|
|
384
|
-
type context$
|
|
385
|
-
type context$
|
|
386
|
-
type context$
|
|
387
|
-
type context$
|
|
388
|
-
type context$
|
|
389
|
-
type context$
|
|
390
|
-
type context$
|
|
391
|
-
|
|
392
|
-
type context$
|
|
393
|
-
|
|
394
|
-
declare const context$1_RestrictedGoodsCategory: typeof RestrictedGoodsCategory;
|
|
395
|
-
type context$1_RestrictedGoodsFlow = RestrictedGoodsFlow;
|
|
396
|
-
type context$1_RestrictedGoodsFlowStatus = RestrictedGoodsFlowStatus;
|
|
397
|
-
declare const context$1_RestrictedGoodsFlowStatus: typeof RestrictedGoodsFlowStatus;
|
|
398
|
-
type context$1_UpdateCbdFlowOptions = UpdateCbdFlowOptions;
|
|
399
|
-
type context$1_UpdateCbdFlowRequest = UpdateCbdFlowRequest;
|
|
400
|
-
type context$1_UpdateCbdFlowResponse = UpdateCbdFlowResponse;
|
|
401
|
-
type context$1_UpdateCbdFlowResponseNonNullableFields = UpdateCbdFlowResponseNonNullableFields;
|
|
402
|
-
type context$1_UpdatePartnerFlowOptions = UpdatePartnerFlowOptions;
|
|
403
|
-
type context$1_UpdatePartnerFlowRequest = UpdatePartnerFlowRequest;
|
|
404
|
-
type context$1_UpdatePartnerFlowResponse = UpdatePartnerFlowResponse;
|
|
405
|
-
type context$1_UpdatePartnerFlowResponseNonNullableFields = UpdatePartnerFlowResponseNonNullableFields;
|
|
406
|
-
type context$1_UpdateRestrictedGoodsFlowOptions = UpdateRestrictedGoodsFlowOptions;
|
|
407
|
-
type context$1_UpdateRestrictedGoodsFlowRequest = UpdateRestrictedGoodsFlowRequest;
|
|
408
|
-
type context$1_UpdateRestrictedGoodsFlowResponse = UpdateRestrictedGoodsFlowResponse;
|
|
409
|
-
type context$1_UpdateRestrictedGoodsFlowResponseNonNullableFields = UpdateRestrictedGoodsFlowResponseNonNullableFields;
|
|
410
|
-
declare const context$1_getOnboardingAvailability: typeof getOnboardingAvailability;
|
|
411
|
-
declare const context$1_onOnboardingAvailabilityCreated: typeof onOnboardingAvailabilityCreated;
|
|
412
|
-
declare const context$1_onOnboardingAvailabilityUpdated: typeof onOnboardingAvailabilityUpdated;
|
|
413
|
-
declare const context$1_updateCbdFlow: typeof updateCbdFlow;
|
|
414
|
-
declare const context$1_updatePartnerFlow: typeof updatePartnerFlow;
|
|
415
|
-
declare const context$1_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
|
|
578
|
+
type context$1_CardDetails = CardDetails;
|
|
579
|
+
type context$1_CardReference = CardReference;
|
|
580
|
+
type context$1_CredentialsOnFile = CredentialsOnFile;
|
|
581
|
+
type context$1_CredentialsOnFileInfoOneOf = CredentialsOnFileInfoOneOf;
|
|
582
|
+
type context$1_PaymentMethodReference = PaymentMethodReference;
|
|
583
|
+
type context$1_ProviderPlatformEvent = ProviderPlatformEvent;
|
|
584
|
+
type context$1_ProviderPlatformEventResourceOneOf = ProviderPlatformEventResourceOneOf;
|
|
585
|
+
type context$1_RefundEvent = RefundEvent;
|
|
586
|
+
type context$1_SubmitEventRequest = SubmitEventRequest;
|
|
587
|
+
type context$1_SubmitEventResponse = SubmitEventResponse;
|
|
588
|
+
type context$1_TransactionEvent = TransactionEvent;
|
|
589
|
+
type context$1__publicSubmitEventType = _publicSubmitEventType;
|
|
590
|
+
declare const context$1_submitEvent: typeof submitEvent;
|
|
416
591
|
declare namespace context$1 {
|
|
417
|
-
export { type
|
|
592
|
+
export { type context$1_CardDetails as CardDetails, type context$1_CardReference as CardReference, type context$1_CredentialsOnFile as CredentialsOnFile, type context$1_CredentialsOnFileInfoOneOf as CredentialsOnFileInfoOneOf, type context$1_PaymentMethodReference as PaymentMethodReference, type context$1_ProviderPlatformEvent as ProviderPlatformEvent, type context$1_ProviderPlatformEventResourceOneOf as ProviderPlatformEventResourceOneOf, type context$1_RefundEvent as RefundEvent, type context$1_SubmitEventRequest as SubmitEventRequest, type context$1_SubmitEventResponse as SubmitEventResponse, type context$1_TransactionEvent as TransactionEvent, type context$1__publicSubmitEventType as _publicSubmitEventType, context$1_submitEvent as submitEvent };
|
|
418
593
|
}
|
|
419
594
|
|
|
420
595
|
/**
|
|
@@ -1031,17 +1206,93 @@ interface UpdateExtendedFieldsOptions {
|
|
|
1031
1206
|
namespaceData: Record<string, any> | null;
|
|
1032
1207
|
}
|
|
1033
1208
|
|
|
1209
|
+
declare function createRefund$1(httpClient: HttpClient): CreateRefundSignature;
|
|
1210
|
+
interface CreateRefundSignature {
|
|
1211
|
+
/**
|
|
1212
|
+
* Creates a refund.
|
|
1213
|
+
* Refunding process starts immediately after refund entity is created.
|
|
1214
|
+
*
|
|
1215
|
+
* If amount and currency are not specified,
|
|
1216
|
+
* refund is created for full charge amount.
|
|
1217
|
+
* If amount is specified, you also need to specify currency,
|
|
1218
|
+
* and it should be the same as charge currency.
|
|
1219
|
+
*
|
|
1220
|
+
* The call blocks until refund status transitions from `STARTING`.
|
|
1221
|
+
* Read more about refund statuses in this
|
|
1222
|
+
* [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
|
|
1223
|
+
* @param - Refund to be created.
|
|
1224
|
+
* @returns The created refund.
|
|
1225
|
+
*/
|
|
1226
|
+
(refund: Refund, options?: CreateRefundOptions | undefined): Promise<Refund & RefundNonNullableFields>;
|
|
1227
|
+
}
|
|
1228
|
+
declare function getRefund$1(httpClient: HttpClient): GetRefundSignature;
|
|
1229
|
+
interface GetRefundSignature {
|
|
1230
|
+
/**
|
|
1231
|
+
* Retrieves a refund.
|
|
1232
|
+
* @param - ID of the refund to retrieve.
|
|
1233
|
+
* @returns The requested refund.
|
|
1234
|
+
*/
|
|
1235
|
+
(refundId: string): Promise<Refund & RefundNonNullableFields>;
|
|
1236
|
+
}
|
|
1237
|
+
declare function queryRefunds$1(httpClient: HttpClient): QueryRefundsSignature;
|
|
1238
|
+
interface QueryRefundsSignature {
|
|
1239
|
+
/**
|
|
1240
|
+
* Retrieves a list of refunds, given the provided [paging, filtering, and sorting][1].
|
|
1241
|
+
*
|
|
1242
|
+
* Up to 1,000 Refunds can be returned per request.
|
|
1243
|
+
*
|
|
1244
|
+
* To learn how to query refunds, see [API Query Language][2].
|
|
1245
|
+
*
|
|
1246
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
1247
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
1248
|
+
*/
|
|
1249
|
+
(): RefundsQueryBuilder;
|
|
1250
|
+
}
|
|
1251
|
+
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
1252
|
+
interface UpdateExtendedFieldsSignature {
|
|
1253
|
+
/**
|
|
1254
|
+
* Updates extended fields of a refund without incrementing revision.
|
|
1255
|
+
* @param - ID of the entity to update.
|
|
1256
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
1257
|
+
*/
|
|
1258
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
|
|
1259
|
+
}
|
|
1260
|
+
declare function getRefundability$1(httpClient: HttpClient): GetRefundabilitySignature;
|
|
1261
|
+
interface GetRefundabilitySignature {
|
|
1262
|
+
/**
|
|
1263
|
+
* Calculates refundability for a charge.
|
|
1264
|
+
*
|
|
1265
|
+
* Read more about refundability in this
|
|
1266
|
+
* [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#refundability>).
|
|
1267
|
+
* @param - ID of the charge for which refundability will be calculated.
|
|
1268
|
+
*/
|
|
1269
|
+
(chargeId: string): Promise<GetRefundabilityResponse & GetRefundabilityResponseNonNullableFields>;
|
|
1270
|
+
}
|
|
1271
|
+
declare const onRefundCreated$1: EventDefinition<RefundCreatedEnvelope, "wix.payments.refunds.v1.refund_created">;
|
|
1272
|
+
declare const onRefundUpdated$1: EventDefinition<RefundUpdatedEnvelope, "wix.payments.refunds.v1.refund_updated">;
|
|
1273
|
+
|
|
1034
1274
|
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
1035
1275
|
|
|
1036
1276
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
1037
1277
|
|
|
1038
|
-
|
|
1039
|
-
declare const
|
|
1040
|
-
|
|
1041
|
-
declare const
|
|
1042
|
-
|
|
1043
|
-
declare const
|
|
1044
|
-
|
|
1278
|
+
type _publicCreateRefundType = typeof createRefund$1;
|
|
1279
|
+
declare const createRefund: ReturnType<typeof createRESTModule<_publicCreateRefundType>>;
|
|
1280
|
+
type _publicGetRefundType = typeof getRefund$1;
|
|
1281
|
+
declare const getRefund: ReturnType<typeof createRESTModule<_publicGetRefundType>>;
|
|
1282
|
+
type _publicQueryRefundsType = typeof queryRefunds$1;
|
|
1283
|
+
declare const queryRefunds: ReturnType<typeof createRESTModule<_publicQueryRefundsType>>;
|
|
1284
|
+
type _publicUpdateExtendedFieldsType = typeof updateExtendedFields$1;
|
|
1285
|
+
declare const updateExtendedFields: ReturnType<typeof createRESTModule<_publicUpdateExtendedFieldsType>>;
|
|
1286
|
+
type _publicGetRefundabilityType = typeof getRefundability$1;
|
|
1287
|
+
declare const getRefundability: ReturnType<typeof createRESTModule<_publicGetRefundabilityType>>;
|
|
1288
|
+
|
|
1289
|
+
type _publicOnRefundCreatedType = typeof onRefundCreated$1;
|
|
1290
|
+
/** */
|
|
1291
|
+
declare const onRefundCreated: ReturnType<typeof createEventModule<_publicOnRefundCreatedType>>;
|
|
1292
|
+
|
|
1293
|
+
type _publicOnRefundUpdatedType = typeof onRefundUpdated$1;
|
|
1294
|
+
/** */
|
|
1295
|
+
declare const onRefundUpdated: ReturnType<typeof createEventModule<_publicOnRefundUpdatedType>>;
|
|
1045
1296
|
|
|
1046
1297
|
type context_ActionEvent = ActionEvent;
|
|
1047
1298
|
type context_BaseEventMetadata = BaseEventMetadata;
|
|
@@ -1101,6 +1352,13 @@ type context_UpdateExtendedFieldsResponse = UpdateExtendedFieldsResponse;
|
|
|
1101
1352
|
type context_UpdateExtendedFieldsResponseNonNullableFields = UpdateExtendedFieldsResponseNonNullableFields;
|
|
1102
1353
|
type context_WebhookIdentityType = WebhookIdentityType;
|
|
1103
1354
|
declare const context_WebhookIdentityType: typeof WebhookIdentityType;
|
|
1355
|
+
type context__publicCreateRefundType = _publicCreateRefundType;
|
|
1356
|
+
type context__publicGetRefundType = _publicGetRefundType;
|
|
1357
|
+
type context__publicGetRefundabilityType = _publicGetRefundabilityType;
|
|
1358
|
+
type context__publicOnRefundCreatedType = _publicOnRefundCreatedType;
|
|
1359
|
+
type context__publicOnRefundUpdatedType = _publicOnRefundUpdatedType;
|
|
1360
|
+
type context__publicQueryRefundsType = _publicQueryRefundsType;
|
|
1361
|
+
type context__publicUpdateExtendedFieldsType = _publicUpdateExtendedFieldsType;
|
|
1104
1362
|
declare const context_createRefund: typeof createRefund;
|
|
1105
1363
|
declare const context_getRefund: typeof getRefund;
|
|
1106
1364
|
declare const context_getRefundability: typeof getRefundability;
|
|
@@ -1109,7 +1367,7 @@ declare const context_onRefundUpdated: typeof onRefundUpdated;
|
|
|
1109
1367
|
declare const context_queryRefunds: typeof queryRefunds;
|
|
1110
1368
|
declare const context_updateExtendedFields: typeof updateExtendedFields;
|
|
1111
1369
|
declare namespace context {
|
|
1112
|
-
export { type context_ActionEvent as ActionEvent, type context_BaseEventMetadata as BaseEventMetadata, type context_CreateRefundOptions as CreateRefundOptions, type context_CreateRefundRequest as CreateRefundRequest, type context_CreateRefundResponse as CreateRefundResponse, type context_CreateRefundResponseNonNullableFields as CreateRefundResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_ExtendedFields as ExtendedFields, type context_GetRefundRequest as GetRefundRequest, type context_GetRefundResponse as GetRefundResponse, type context_GetRefundResponseNonNullableFields as GetRefundResponseNonNullableFields, type context_GetRefundabilityRequest as GetRefundabilityRequest, type context_GetRefundabilityResponse as GetRefundabilityResponse, type context_GetRefundabilityResponseNonNullableFields as GetRefundabilityResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_Initiator as Initiator, type context_MessageEnvelope as MessageEnvelope, type context_QueryRefundsRequest as QueryRefundsRequest, type context_QueryRefundsResponse as QueryRefundsResponse, type context_QueryRefundsResponseNonNullableFields as QueryRefundsResponseNonNullableFields, type context_Refund as Refund, type context_RefundCreatedEnvelope as RefundCreatedEnvelope, type context_RefundNonNullableFields as RefundNonNullableFields, type context_RefundOptions as RefundOptions, type context_RefundUpdatedEnvelope as RefundUpdatedEnvelope, type context_Refundability as Refundability, type context_RefundabilityDetailsOneOf as RefundabilityDetailsOneOf, type context_RefundsQueryBuilder as RefundsQueryBuilder, type context_RefundsQueryResult as RefundsQueryResult, type context_Rejection as Rejection, context_RejectionReason as RejectionReason, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_Status as Status, type context_StatusInfo as StatusInfo, type context_SyncRefundRequest as SyncRefundRequest, type context_SyncRefundResponse as SyncRefundResponse, type context_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type context_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type context_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type context_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, context_WebhookIdentityType as WebhookIdentityType, context_createRefund as createRefund, context_getRefund as getRefund, context_getRefundability as getRefundability, context_onRefundCreated as onRefundCreated, context_onRefundUpdated as onRefundUpdated, context_queryRefunds as queryRefunds, context_updateExtendedFields as updateExtendedFields };
|
|
1370
|
+
export { type context_ActionEvent as ActionEvent, type context_BaseEventMetadata as BaseEventMetadata, type context_CreateRefundOptions as CreateRefundOptions, type context_CreateRefundRequest as CreateRefundRequest, type context_CreateRefundResponse as CreateRefundResponse, type context_CreateRefundResponseNonNullableFields as CreateRefundResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_ExtendedFields as ExtendedFields, type context_GetRefundRequest as GetRefundRequest, type context_GetRefundResponse as GetRefundResponse, type context_GetRefundResponseNonNullableFields as GetRefundResponseNonNullableFields, type context_GetRefundabilityRequest as GetRefundabilityRequest, type context_GetRefundabilityResponse as GetRefundabilityResponse, type context_GetRefundabilityResponseNonNullableFields as GetRefundabilityResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_Initiator as Initiator, type context_MessageEnvelope as MessageEnvelope, type context_QueryRefundsRequest as QueryRefundsRequest, type context_QueryRefundsResponse as QueryRefundsResponse, type context_QueryRefundsResponseNonNullableFields as QueryRefundsResponseNonNullableFields, type context_Refund as Refund, type context_RefundCreatedEnvelope as RefundCreatedEnvelope, type context_RefundNonNullableFields as RefundNonNullableFields, type context_RefundOptions as RefundOptions, type context_RefundUpdatedEnvelope as RefundUpdatedEnvelope, type context_Refundability as Refundability, type context_RefundabilityDetailsOneOf as RefundabilityDetailsOneOf, type context_RefundsQueryBuilder as RefundsQueryBuilder, type context_RefundsQueryResult as RefundsQueryResult, type context_Rejection as Rejection, context_RejectionReason as RejectionReason, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_Status as Status, type context_StatusInfo as StatusInfo, type context_SyncRefundRequest as SyncRefundRequest, type context_SyncRefundResponse as SyncRefundResponse, type context_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type context_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type context_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type context_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, context_WebhookIdentityType as WebhookIdentityType, type context__publicCreateRefundType as _publicCreateRefundType, type context__publicGetRefundType as _publicGetRefundType, type context__publicGetRefundabilityType as _publicGetRefundabilityType, type context__publicOnRefundCreatedType as _publicOnRefundCreatedType, type context__publicOnRefundUpdatedType as _publicOnRefundUpdatedType, type context__publicQueryRefundsType as _publicQueryRefundsType, type context__publicUpdateExtendedFieldsType as _publicUpdateExtendedFieldsType, context_createRefund as createRefund, context_getRefund as getRefund, context_getRefundability as getRefundability, context_onRefundCreated as onRefundCreated, context_onRefundUpdated as onRefundUpdated, onRefundCreated$1 as publicOnRefundCreated, onRefundUpdated$1 as publicOnRefundUpdated, context_queryRefunds as queryRefunds, context_updateExtendedFields as updateExtendedFields };
|
|
1113
1371
|
}
|
|
1114
1372
|
|
|
1115
|
-
export { context$1 as onboardingAvailability, context as refunds };
|
|
1373
|
+
export { context$1 as callbacks, context$2 as onboardingAvailability, context as refunds };
|