@wix/payments 1.0.8 → 1.0.10
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 +326 -94
- package/type-bundles/index.bundle.d.ts +326 -94
- 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,215 @@ 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
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
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;
|
|
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>;
|
|
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">;
|
|
362
400
|
|
|
363
|
-
declare
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
401
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
402
|
+
|
|
403
|
+
declare const getOnboardingAvailability: BuildRESTFunction<typeof getOnboardingAvailability$1> & typeof getOnboardingAvailability$1;
|
|
404
|
+
declare const updateCbdFlow: BuildRESTFunction<typeof updateCbdFlow$1> & typeof updateCbdFlow$1;
|
|
405
|
+
declare const updateRestrictedGoodsFlow: BuildRESTFunction<typeof updateRestrictedGoodsFlow$1> & typeof updateRestrictedGoodsFlow$1;
|
|
406
|
+
declare const updatePartnerFlow: BuildRESTFunction<typeof updatePartnerFlow$1> & typeof updatePartnerFlow$1;
|
|
407
|
+
|
|
408
|
+
type _publicOnOnboardingAvailabilityCreatedType = typeof onOnboardingAvailabilityCreated$1;
|
|
409
|
+
/** */
|
|
410
|
+
declare const onOnboardingAvailabilityCreated: ReturnType<typeof createEventModule$1<_publicOnOnboardingAvailabilityCreatedType>>;
|
|
411
|
+
|
|
412
|
+
type _publicOnOnboardingAvailabilityUpdatedType = typeof onOnboardingAvailabilityUpdated$1;
|
|
413
|
+
/** */
|
|
414
|
+
declare const onOnboardingAvailabilityUpdated: ReturnType<typeof createEventModule$1<_publicOnOnboardingAvailabilityUpdatedType>>;
|
|
415
|
+
|
|
416
|
+
type index_d$2_AttestationInfo = AttestationInfo;
|
|
417
|
+
type index_d$2_CbdFlow = CbdFlow;
|
|
418
|
+
type index_d$2_GetOnboardingAvailabilityRequest = GetOnboardingAvailabilityRequest;
|
|
419
|
+
type index_d$2_GetOnboardingAvailabilityResponse = GetOnboardingAvailabilityResponse;
|
|
420
|
+
type index_d$2_GetOnboardingAvailabilityResponseNonNullableFields = GetOnboardingAvailabilityResponseNonNullableFields;
|
|
421
|
+
type index_d$2_OnboardingAvailability = OnboardingAvailability;
|
|
422
|
+
type index_d$2_OnboardingAvailabilityCreatedEnvelope = OnboardingAvailabilityCreatedEnvelope;
|
|
423
|
+
type index_d$2_OnboardingAvailabilityUpdatedEnvelope = OnboardingAvailabilityUpdatedEnvelope;
|
|
424
|
+
type index_d$2_PartnerFlow = PartnerFlow;
|
|
425
|
+
type index_d$2_PartnerFlowStatus = PartnerFlowStatus;
|
|
426
|
+
declare const index_d$2_PartnerFlowStatus: typeof PartnerFlowStatus;
|
|
427
|
+
type index_d$2_RestoreInfo = RestoreInfo;
|
|
428
|
+
type index_d$2_RestrictedGoodsCategory = RestrictedGoodsCategory;
|
|
429
|
+
declare const index_d$2_RestrictedGoodsCategory: typeof RestrictedGoodsCategory;
|
|
430
|
+
type index_d$2_RestrictedGoodsFlow = RestrictedGoodsFlow;
|
|
431
|
+
type index_d$2_RestrictedGoodsFlowStatus = RestrictedGoodsFlowStatus;
|
|
432
|
+
declare const index_d$2_RestrictedGoodsFlowStatus: typeof RestrictedGoodsFlowStatus;
|
|
433
|
+
type index_d$2_UpdateCbdFlowOptions = UpdateCbdFlowOptions;
|
|
434
|
+
type index_d$2_UpdateCbdFlowRequest = UpdateCbdFlowRequest;
|
|
435
|
+
type index_d$2_UpdateCbdFlowResponse = UpdateCbdFlowResponse;
|
|
436
|
+
type index_d$2_UpdateCbdFlowResponseNonNullableFields = UpdateCbdFlowResponseNonNullableFields;
|
|
437
|
+
type index_d$2_UpdatePartnerFlowOptions = UpdatePartnerFlowOptions;
|
|
438
|
+
type index_d$2_UpdatePartnerFlowRequest = UpdatePartnerFlowRequest;
|
|
439
|
+
type index_d$2_UpdatePartnerFlowResponse = UpdatePartnerFlowResponse;
|
|
440
|
+
type index_d$2_UpdatePartnerFlowResponseNonNullableFields = UpdatePartnerFlowResponseNonNullableFields;
|
|
441
|
+
type index_d$2_UpdateRestrictedGoodsFlowOptions = UpdateRestrictedGoodsFlowOptions;
|
|
442
|
+
type index_d$2_UpdateRestrictedGoodsFlowRequest = UpdateRestrictedGoodsFlowRequest;
|
|
443
|
+
type index_d$2_UpdateRestrictedGoodsFlowResponse = UpdateRestrictedGoodsFlowResponse;
|
|
444
|
+
type index_d$2_UpdateRestrictedGoodsFlowResponseNonNullableFields = UpdateRestrictedGoodsFlowResponseNonNullableFields;
|
|
445
|
+
type index_d$2__publicOnOnboardingAvailabilityCreatedType = _publicOnOnboardingAvailabilityCreatedType;
|
|
446
|
+
type index_d$2__publicOnOnboardingAvailabilityUpdatedType = _publicOnOnboardingAvailabilityUpdatedType;
|
|
447
|
+
declare const index_d$2_getOnboardingAvailability: typeof getOnboardingAvailability;
|
|
448
|
+
declare const index_d$2_onOnboardingAvailabilityCreated: typeof onOnboardingAvailabilityCreated;
|
|
449
|
+
declare const index_d$2_onOnboardingAvailabilityUpdated: typeof onOnboardingAvailabilityUpdated;
|
|
450
|
+
declare const index_d$2_updateCbdFlow: typeof updateCbdFlow;
|
|
451
|
+
declare const index_d$2_updatePartnerFlow: typeof updatePartnerFlow;
|
|
452
|
+
declare const index_d$2_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
|
|
453
|
+
declare namespace index_d$2 {
|
|
454
|
+
export { type ActionEvent$1 as ActionEvent, type index_d$2_AttestationInfo as AttestationInfo, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$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 index_d$2_GetOnboardingAvailabilityRequest as GetOnboardingAvailabilityRequest, type index_d$2_GetOnboardingAvailabilityResponse as GetOnboardingAvailabilityResponse, type index_d$2_GetOnboardingAvailabilityResponseNonNullableFields as GetOnboardingAvailabilityResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$2_OnboardingAvailability as OnboardingAvailability, type index_d$2_OnboardingAvailabilityCreatedEnvelope as OnboardingAvailabilityCreatedEnvelope, type index_d$2_OnboardingAvailabilityUpdatedEnvelope as OnboardingAvailabilityUpdatedEnvelope, type index_d$2_PartnerFlow as PartnerFlow, index_d$2_PartnerFlowStatus as PartnerFlowStatus, type index_d$2_RestoreInfo as RestoreInfo, index_d$2_RestrictedGoodsCategory as RestrictedGoodsCategory, type index_d$2_RestrictedGoodsFlow as RestrictedGoodsFlow, index_d$2_RestrictedGoodsFlowStatus as RestrictedGoodsFlowStatus, Status$1 as Status, type index_d$2_UpdateCbdFlowOptions as UpdateCbdFlowOptions, type index_d$2_UpdateCbdFlowRequest as UpdateCbdFlowRequest, type index_d$2_UpdateCbdFlowResponse as UpdateCbdFlowResponse, type index_d$2_UpdateCbdFlowResponseNonNullableFields as UpdateCbdFlowResponseNonNullableFields, type index_d$2_UpdatePartnerFlowOptions as UpdatePartnerFlowOptions, type index_d$2_UpdatePartnerFlowRequest as UpdatePartnerFlowRequest, type index_d$2_UpdatePartnerFlowResponse as UpdatePartnerFlowResponse, type index_d$2_UpdatePartnerFlowResponseNonNullableFields as UpdatePartnerFlowResponseNonNullableFields, type index_d$2_UpdateRestrictedGoodsFlowOptions as UpdateRestrictedGoodsFlowOptions, type index_d$2_UpdateRestrictedGoodsFlowRequest as UpdateRestrictedGoodsFlowRequest, type index_d$2_UpdateRestrictedGoodsFlowResponse as UpdateRestrictedGoodsFlowResponse, type index_d$2_UpdateRestrictedGoodsFlowResponseNonNullableFields as UpdateRestrictedGoodsFlowResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, type index_d$2__publicOnOnboardingAvailabilityCreatedType as _publicOnOnboardingAvailabilityCreatedType, type index_d$2__publicOnOnboardingAvailabilityUpdatedType as _publicOnOnboardingAvailabilityUpdatedType, index_d$2_getOnboardingAvailability as getOnboardingAvailability, index_d$2_onOnboardingAvailabilityCreated as onOnboardingAvailabilityCreated, index_d$2_onOnboardingAvailabilityUpdated as onOnboardingAvailabilityUpdated, onOnboardingAvailabilityCreated$1 as publicOnOnboardingAvailabilityCreated, onOnboardingAvailabilityUpdated$1 as publicOnOnboardingAvailabilityUpdated, index_d$2_updateCbdFlow as updateCbdFlow, index_d$2_updatePartnerFlow as updatePartnerFlow, index_d$2_updateRestrictedGoodsFlow as updateRestrictedGoodsFlow };
|
|
368
455
|
}
|
|
369
456
|
|
|
370
|
-
|
|
457
|
+
/** Provider platform event */
|
|
458
|
+
interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
|
|
459
|
+
/** Refund event data. */
|
|
460
|
+
refund?: RefundEvent;
|
|
461
|
+
/** Transaction event data. */
|
|
462
|
+
transaction?: TransactionEvent;
|
|
463
|
+
/**
|
|
464
|
+
* This field is ignored, do not send it.
|
|
465
|
+
* @deprecated
|
|
466
|
+
*/
|
|
467
|
+
pluginId?: string;
|
|
468
|
+
}
|
|
469
|
+
/** @oneof */
|
|
470
|
+
interface ProviderPlatformEventResourceOneOf {
|
|
471
|
+
/** Refund event data. */
|
|
472
|
+
refund?: RefundEvent;
|
|
473
|
+
/** Transaction event data. */
|
|
474
|
+
transaction?: TransactionEvent;
|
|
475
|
+
}
|
|
476
|
+
interface RefundEvent {
|
|
477
|
+
/** Wix transaction ID. */
|
|
478
|
+
wixTransactionId?: string;
|
|
479
|
+
/** PSP refund ID. */
|
|
480
|
+
pluginRefundId?: string;
|
|
481
|
+
/** 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. */
|
|
482
|
+
reasonCode?: number;
|
|
483
|
+
/** Refunded amount. */
|
|
484
|
+
amount?: string;
|
|
485
|
+
/** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */
|
|
486
|
+
wixRefundId?: string | null;
|
|
487
|
+
/** PSP-specific error code. */
|
|
488
|
+
errorCode?: string | null;
|
|
489
|
+
/** PSP-specific error message. */
|
|
490
|
+
errorMessage?: string | null;
|
|
491
|
+
}
|
|
492
|
+
interface TransactionEvent {
|
|
493
|
+
/** Wix transaction ID. */
|
|
494
|
+
wixTransactionId?: string;
|
|
495
|
+
/** PSP transaction ID. */
|
|
496
|
+
pluginTransactionId?: string;
|
|
497
|
+
/** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */
|
|
498
|
+
reasonCode?: number;
|
|
499
|
+
/** PSP-specific error code. */
|
|
500
|
+
errorCode?: string | null;
|
|
501
|
+
/** PSP-specific error message. */
|
|
502
|
+
errorMessage?: string | null;
|
|
503
|
+
/** Token data for stored payment method. */
|
|
504
|
+
credentialsOnFile?: CredentialsOnFile;
|
|
505
|
+
/** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
|
|
506
|
+
cardDetails?: CardDetails;
|
|
507
|
+
}
|
|
508
|
+
interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
|
|
509
|
+
/** Network token data. */
|
|
510
|
+
cardReference?: CardReference;
|
|
511
|
+
/** Provider generated token data. */
|
|
512
|
+
paymentMethodReference?: PaymentMethodReference;
|
|
513
|
+
}
|
|
514
|
+
/** @oneof */
|
|
515
|
+
interface CredentialsOnFileInfoOneOf {
|
|
516
|
+
/** Network token data. */
|
|
517
|
+
cardReference?: CardReference;
|
|
518
|
+
/** Provider generated token data. */
|
|
519
|
+
paymentMethodReference?: PaymentMethodReference;
|
|
520
|
+
}
|
|
521
|
+
interface CardReference {
|
|
522
|
+
/** Network token. */
|
|
523
|
+
networkTransactionId?: string;
|
|
524
|
+
/** Directory Server transaction ID */
|
|
525
|
+
dsTransactionId?: string | null;
|
|
526
|
+
}
|
|
527
|
+
interface PaymentMethodReference {
|
|
528
|
+
/** Payment method token created by the PSP. */
|
|
529
|
+
token?: string;
|
|
530
|
+
}
|
|
531
|
+
interface CardDetails {
|
|
532
|
+
/** Issuer (business) identification number. First 6 or 8 digits of the card's number. */
|
|
533
|
+
bin?: string | null;
|
|
534
|
+
/** Last 4 digits of the card's number. */
|
|
535
|
+
lastFour?: string | null;
|
|
536
|
+
}
|
|
537
|
+
/** Submit event request */
|
|
538
|
+
interface SubmitEventRequest {
|
|
539
|
+
/** Event data. */
|
|
540
|
+
event: ProviderPlatformEvent;
|
|
541
|
+
}
|
|
542
|
+
/** Submit event response */
|
|
543
|
+
interface SubmitEventResponse {
|
|
544
|
+
}
|
|
371
545
|
|
|
372
|
-
declare function
|
|
546
|
+
declare function submitEvent$1(httpClient: HttpClient): SubmitEventSignature;
|
|
547
|
+
interface SubmitEventSignature {
|
|
548
|
+
/**
|
|
549
|
+
* This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
|
|
550
|
+
*
|
|
551
|
+
* 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}`.
|
|
552
|
+
* PSP's create their own version numbers.
|
|
553
|
+
*
|
|
554
|
+
* > You cannot try out this endpoint because an `Authorization` header value has to be obtained
|
|
555
|
+
* > with the OAuth 2.0 client credentials flow for a specific scope.
|
|
556
|
+
* > So please ignore the **Authorization** section below as well as the **Try It Out** button.
|
|
557
|
+
* @param - Event data.
|
|
558
|
+
* @returns Submit event response
|
|
559
|
+
*/
|
|
560
|
+
(event: ProviderPlatformEvent): Promise<void>;
|
|
561
|
+
}
|
|
373
562
|
|
|
374
|
-
declare const
|
|
375
|
-
declare const updateCbdFlow: ReturnType<typeof createRESTModule$1<typeof publicUpdateCbdFlow>>;
|
|
376
|
-
declare const updateRestrictedGoodsFlow: ReturnType<typeof createRESTModule$1<typeof publicUpdateRestrictedGoodsFlow>>;
|
|
377
|
-
declare const updatePartnerFlow: ReturnType<typeof createRESTModule$1<typeof publicUpdatePartnerFlow>>;
|
|
378
|
-
declare const onOnboardingAvailabilityCreated: ReturnType<typeof createEventModule$1<typeof publicOnOnboardingAvailabilityCreated>>;
|
|
379
|
-
declare const onOnboardingAvailabilityUpdated: ReturnType<typeof createEventModule$1<typeof publicOnOnboardingAvailabilityUpdated>>;
|
|
563
|
+
declare const submitEvent: BuildRESTFunction<typeof submitEvent$1> & typeof submitEvent$1;
|
|
380
564
|
|
|
381
|
-
type index_d$
|
|
382
|
-
type index_d$
|
|
383
|
-
type index_d$
|
|
384
|
-
type index_d$
|
|
385
|
-
type index_d$
|
|
386
|
-
type index_d$
|
|
387
|
-
type index_d$
|
|
388
|
-
type index_d$
|
|
389
|
-
type index_d$
|
|
390
|
-
type index_d$
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
type index_d$1_RestrictedGoodsCategory = RestrictedGoodsCategory;
|
|
394
|
-
declare const index_d$1_RestrictedGoodsCategory: typeof RestrictedGoodsCategory;
|
|
395
|
-
type index_d$1_RestrictedGoodsFlow = RestrictedGoodsFlow;
|
|
396
|
-
type index_d$1_RestrictedGoodsFlowStatus = RestrictedGoodsFlowStatus;
|
|
397
|
-
declare const index_d$1_RestrictedGoodsFlowStatus: typeof RestrictedGoodsFlowStatus;
|
|
398
|
-
type index_d$1_UpdateCbdFlowOptions = UpdateCbdFlowOptions;
|
|
399
|
-
type index_d$1_UpdateCbdFlowRequest = UpdateCbdFlowRequest;
|
|
400
|
-
type index_d$1_UpdateCbdFlowResponse = UpdateCbdFlowResponse;
|
|
401
|
-
type index_d$1_UpdateCbdFlowResponseNonNullableFields = UpdateCbdFlowResponseNonNullableFields;
|
|
402
|
-
type index_d$1_UpdatePartnerFlowOptions = UpdatePartnerFlowOptions;
|
|
403
|
-
type index_d$1_UpdatePartnerFlowRequest = UpdatePartnerFlowRequest;
|
|
404
|
-
type index_d$1_UpdatePartnerFlowResponse = UpdatePartnerFlowResponse;
|
|
405
|
-
type index_d$1_UpdatePartnerFlowResponseNonNullableFields = UpdatePartnerFlowResponseNonNullableFields;
|
|
406
|
-
type index_d$1_UpdateRestrictedGoodsFlowOptions = UpdateRestrictedGoodsFlowOptions;
|
|
407
|
-
type index_d$1_UpdateRestrictedGoodsFlowRequest = UpdateRestrictedGoodsFlowRequest;
|
|
408
|
-
type index_d$1_UpdateRestrictedGoodsFlowResponse = UpdateRestrictedGoodsFlowResponse;
|
|
409
|
-
type index_d$1_UpdateRestrictedGoodsFlowResponseNonNullableFields = UpdateRestrictedGoodsFlowResponseNonNullableFields;
|
|
410
|
-
declare const index_d$1_getOnboardingAvailability: typeof getOnboardingAvailability;
|
|
411
|
-
declare const index_d$1_onOnboardingAvailabilityCreated: typeof onOnboardingAvailabilityCreated;
|
|
412
|
-
declare const index_d$1_onOnboardingAvailabilityUpdated: typeof onOnboardingAvailabilityUpdated;
|
|
413
|
-
declare const index_d$1_updateCbdFlow: typeof updateCbdFlow;
|
|
414
|
-
declare const index_d$1_updatePartnerFlow: typeof updatePartnerFlow;
|
|
415
|
-
declare const index_d$1_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
|
|
565
|
+
type index_d$1_CardDetails = CardDetails;
|
|
566
|
+
type index_d$1_CardReference = CardReference;
|
|
567
|
+
type index_d$1_CredentialsOnFile = CredentialsOnFile;
|
|
568
|
+
type index_d$1_CredentialsOnFileInfoOneOf = CredentialsOnFileInfoOneOf;
|
|
569
|
+
type index_d$1_PaymentMethodReference = PaymentMethodReference;
|
|
570
|
+
type index_d$1_ProviderPlatformEvent = ProviderPlatformEvent;
|
|
571
|
+
type index_d$1_ProviderPlatformEventResourceOneOf = ProviderPlatformEventResourceOneOf;
|
|
572
|
+
type index_d$1_RefundEvent = RefundEvent;
|
|
573
|
+
type index_d$1_SubmitEventRequest = SubmitEventRequest;
|
|
574
|
+
type index_d$1_SubmitEventResponse = SubmitEventResponse;
|
|
575
|
+
type index_d$1_TransactionEvent = TransactionEvent;
|
|
576
|
+
declare const index_d$1_submitEvent: typeof submitEvent;
|
|
416
577
|
declare namespace index_d$1 {
|
|
417
|
-
export { type
|
|
578
|
+
export { type index_d$1_CardDetails as CardDetails, type index_d$1_CardReference as CardReference, type index_d$1_CredentialsOnFile as CredentialsOnFile, type index_d$1_CredentialsOnFileInfoOneOf as CredentialsOnFileInfoOneOf, type index_d$1_PaymentMethodReference as PaymentMethodReference, type index_d$1_ProviderPlatformEvent as ProviderPlatformEvent, type index_d$1_ProviderPlatformEventResourceOneOf as ProviderPlatformEventResourceOneOf, type index_d$1_RefundEvent as RefundEvent, type index_d$1_SubmitEventRequest as SubmitEventRequest, type index_d$1_SubmitEventResponse as SubmitEventResponse, type index_d$1_TransactionEvent as TransactionEvent, index_d$1_submitEvent as submitEvent };
|
|
418
579
|
}
|
|
419
580
|
|
|
420
581
|
/**
|
|
@@ -1031,17 +1192,86 @@ interface UpdateExtendedFieldsOptions {
|
|
|
1031
1192
|
namespaceData: Record<string, any> | null;
|
|
1032
1193
|
}
|
|
1033
1194
|
|
|
1034
|
-
declare function
|
|
1195
|
+
declare function createRefund$1(httpClient: HttpClient): CreateRefundSignature;
|
|
1196
|
+
interface CreateRefundSignature {
|
|
1197
|
+
/**
|
|
1198
|
+
* Creates a refund.
|
|
1199
|
+
* Refunding process starts immediately after refund entity is created.
|
|
1200
|
+
*
|
|
1201
|
+
* If amount and currency are not specified,
|
|
1202
|
+
* refund is created for full charge amount.
|
|
1203
|
+
* If amount is specified, you also need to specify currency,
|
|
1204
|
+
* and it should be the same as charge currency.
|
|
1205
|
+
*
|
|
1206
|
+
* The call blocks until refund status transitions from `STARTING`.
|
|
1207
|
+
* Read more about refund statuses in this
|
|
1208
|
+
* [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
|
|
1209
|
+
* @param - Refund to be created.
|
|
1210
|
+
* @returns The created refund.
|
|
1211
|
+
*/
|
|
1212
|
+
(refund: Refund, options?: CreateRefundOptions | undefined): Promise<Refund & RefundNonNullableFields>;
|
|
1213
|
+
}
|
|
1214
|
+
declare function getRefund$1(httpClient: HttpClient): GetRefundSignature;
|
|
1215
|
+
interface GetRefundSignature {
|
|
1216
|
+
/**
|
|
1217
|
+
* Retrieves a refund.
|
|
1218
|
+
* @param - ID of the refund to retrieve.
|
|
1219
|
+
* @returns The requested refund.
|
|
1220
|
+
*/
|
|
1221
|
+
(refundId: string): Promise<Refund & RefundNonNullableFields>;
|
|
1222
|
+
}
|
|
1223
|
+
declare function queryRefunds$1(httpClient: HttpClient): QueryRefundsSignature;
|
|
1224
|
+
interface QueryRefundsSignature {
|
|
1225
|
+
/**
|
|
1226
|
+
* Retrieves a list of refunds, given the provided [paging, filtering, and sorting][1].
|
|
1227
|
+
*
|
|
1228
|
+
* Up to 1,000 Refunds can be returned per request.
|
|
1229
|
+
*
|
|
1230
|
+
* To learn how to query refunds, see [API Query Language][2].
|
|
1231
|
+
*
|
|
1232
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
1233
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
1234
|
+
*/
|
|
1235
|
+
(): RefundsQueryBuilder;
|
|
1236
|
+
}
|
|
1237
|
+
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
1238
|
+
interface UpdateExtendedFieldsSignature {
|
|
1239
|
+
/**
|
|
1240
|
+
* Updates extended fields of a refund without incrementing revision.
|
|
1241
|
+
* @param - ID of the entity to update.
|
|
1242
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
1243
|
+
*/
|
|
1244
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
|
|
1245
|
+
}
|
|
1246
|
+
declare function getRefundability$1(httpClient: HttpClient): GetRefundabilitySignature;
|
|
1247
|
+
interface GetRefundabilitySignature {
|
|
1248
|
+
/**
|
|
1249
|
+
* Calculates refundability for a charge.
|
|
1250
|
+
*
|
|
1251
|
+
* Read more about refundability in this
|
|
1252
|
+
* [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#refundability>).
|
|
1253
|
+
* @param - ID of the charge for which refundability will be calculated.
|
|
1254
|
+
*/
|
|
1255
|
+
(chargeId: string): Promise<GetRefundabilityResponse & GetRefundabilityResponseNonNullableFields>;
|
|
1256
|
+
}
|
|
1257
|
+
declare const onRefundCreated$1: EventDefinition<RefundCreatedEnvelope, "wix.payments.refunds.v1.refund_created">;
|
|
1258
|
+
declare const onRefundUpdated$1: EventDefinition<RefundUpdatedEnvelope, "wix.payments.refunds.v1.refund_updated">;
|
|
1035
1259
|
|
|
1036
1260
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
1037
1261
|
|
|
1038
|
-
declare const createRefund:
|
|
1039
|
-
declare const getRefund:
|
|
1040
|
-
declare const queryRefunds:
|
|
1041
|
-
declare const updateExtendedFields:
|
|
1042
|
-
declare const getRefundability:
|
|
1043
|
-
|
|
1044
|
-
|
|
1262
|
+
declare const createRefund: BuildRESTFunction<typeof createRefund$1> & typeof createRefund$1;
|
|
1263
|
+
declare const getRefund: BuildRESTFunction<typeof getRefund$1> & typeof getRefund$1;
|
|
1264
|
+
declare const queryRefunds: BuildRESTFunction<typeof queryRefunds$1> & typeof queryRefunds$1;
|
|
1265
|
+
declare const updateExtendedFields: BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1;
|
|
1266
|
+
declare const getRefundability: BuildRESTFunction<typeof getRefundability$1> & typeof getRefundability$1;
|
|
1267
|
+
|
|
1268
|
+
type _publicOnRefundCreatedType = typeof onRefundCreated$1;
|
|
1269
|
+
/** */
|
|
1270
|
+
declare const onRefundCreated: ReturnType<typeof createEventModule<_publicOnRefundCreatedType>>;
|
|
1271
|
+
|
|
1272
|
+
type _publicOnRefundUpdatedType = typeof onRefundUpdated$1;
|
|
1273
|
+
/** */
|
|
1274
|
+
declare const onRefundUpdated: ReturnType<typeof createEventModule<_publicOnRefundUpdatedType>>;
|
|
1045
1275
|
|
|
1046
1276
|
type index_d_ActionEvent = ActionEvent;
|
|
1047
1277
|
type index_d_BaseEventMetadata = BaseEventMetadata;
|
|
@@ -1101,6 +1331,8 @@ type index_d_UpdateExtendedFieldsResponse = UpdateExtendedFieldsResponse;
|
|
|
1101
1331
|
type index_d_UpdateExtendedFieldsResponseNonNullableFields = UpdateExtendedFieldsResponseNonNullableFields;
|
|
1102
1332
|
type index_d_WebhookIdentityType = WebhookIdentityType;
|
|
1103
1333
|
declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
|
|
1334
|
+
type index_d__publicOnRefundCreatedType = _publicOnRefundCreatedType;
|
|
1335
|
+
type index_d__publicOnRefundUpdatedType = _publicOnRefundUpdatedType;
|
|
1104
1336
|
declare const index_d_createRefund: typeof createRefund;
|
|
1105
1337
|
declare const index_d_getRefund: typeof getRefund;
|
|
1106
1338
|
declare const index_d_getRefundability: typeof getRefundability;
|
|
@@ -1109,7 +1341,7 @@ declare const index_d_onRefundUpdated: typeof onRefundUpdated;
|
|
|
1109
1341
|
declare const index_d_queryRefunds: typeof queryRefunds;
|
|
1110
1342
|
declare const index_d_updateExtendedFields: typeof updateExtendedFields;
|
|
1111
1343
|
declare namespace index_d {
|
|
1112
|
-
export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_CreateRefundOptions as CreateRefundOptions, type index_d_CreateRefundRequest as CreateRefundRequest, type index_d_CreateRefundResponse as CreateRefundResponse, type index_d_CreateRefundResponseNonNullableFields as CreateRefundResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_ExtendedFields as ExtendedFields, type index_d_GetRefundRequest as GetRefundRequest, type index_d_GetRefundResponse as GetRefundResponse, type index_d_GetRefundResponseNonNullableFields as GetRefundResponseNonNullableFields, type index_d_GetRefundabilityRequest as GetRefundabilityRequest, type index_d_GetRefundabilityResponse as GetRefundabilityResponse, type index_d_GetRefundabilityResponseNonNullableFields as GetRefundabilityResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, index_d_Initiator as Initiator, type index_d_MessageEnvelope as MessageEnvelope, type index_d_QueryRefundsRequest as QueryRefundsRequest, type index_d_QueryRefundsResponse as QueryRefundsResponse, type index_d_QueryRefundsResponseNonNullableFields as QueryRefundsResponseNonNullableFields, type index_d_Refund as Refund, type index_d_RefundCreatedEnvelope as RefundCreatedEnvelope, type index_d_RefundNonNullableFields as RefundNonNullableFields, type index_d_RefundOptions as RefundOptions, type index_d_RefundUpdatedEnvelope as RefundUpdatedEnvelope, type index_d_Refundability as Refundability, type index_d_RefundabilityDetailsOneOf as RefundabilityDetailsOneOf, type index_d_RefundsQueryBuilder as RefundsQueryBuilder, type index_d_RefundsQueryResult as RefundsQueryResult, type index_d_Rejection as Rejection, index_d_RejectionReason as RejectionReason, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_Status as Status, type index_d_StatusInfo as StatusInfo, type index_d_SyncRefundRequest as SyncRefundRequest, type index_d_SyncRefundResponse as SyncRefundResponse, type index_d_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type index_d_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type index_d_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type index_d_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, index_d_WebhookIdentityType as WebhookIdentityType, index_d_createRefund as createRefund, index_d_getRefund as getRefund, index_d_getRefundability as getRefundability, index_d_onRefundCreated as onRefundCreated, index_d_onRefundUpdated as onRefundUpdated, index_d_queryRefunds as queryRefunds, index_d_updateExtendedFields as updateExtendedFields };
|
|
1344
|
+
export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_CreateRefundOptions as CreateRefundOptions, type index_d_CreateRefundRequest as CreateRefundRequest, type index_d_CreateRefundResponse as CreateRefundResponse, type index_d_CreateRefundResponseNonNullableFields as CreateRefundResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_ExtendedFields as ExtendedFields, type index_d_GetRefundRequest as GetRefundRequest, type index_d_GetRefundResponse as GetRefundResponse, type index_d_GetRefundResponseNonNullableFields as GetRefundResponseNonNullableFields, type index_d_GetRefundabilityRequest as GetRefundabilityRequest, type index_d_GetRefundabilityResponse as GetRefundabilityResponse, type index_d_GetRefundabilityResponseNonNullableFields as GetRefundabilityResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, index_d_Initiator as Initiator, type index_d_MessageEnvelope as MessageEnvelope, type index_d_QueryRefundsRequest as QueryRefundsRequest, type index_d_QueryRefundsResponse as QueryRefundsResponse, type index_d_QueryRefundsResponseNonNullableFields as QueryRefundsResponseNonNullableFields, type index_d_Refund as Refund, type index_d_RefundCreatedEnvelope as RefundCreatedEnvelope, type index_d_RefundNonNullableFields as RefundNonNullableFields, type index_d_RefundOptions as RefundOptions, type index_d_RefundUpdatedEnvelope as RefundUpdatedEnvelope, type index_d_Refundability as Refundability, type index_d_RefundabilityDetailsOneOf as RefundabilityDetailsOneOf, type index_d_RefundsQueryBuilder as RefundsQueryBuilder, type index_d_RefundsQueryResult as RefundsQueryResult, type index_d_Rejection as Rejection, index_d_RejectionReason as RejectionReason, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_Status as Status, type index_d_StatusInfo as StatusInfo, type index_d_SyncRefundRequest as SyncRefundRequest, type index_d_SyncRefundResponse as SyncRefundResponse, type index_d_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type index_d_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type index_d_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type index_d_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, index_d_WebhookIdentityType as WebhookIdentityType, type index_d__publicOnRefundCreatedType as _publicOnRefundCreatedType, type index_d__publicOnRefundUpdatedType as _publicOnRefundUpdatedType, index_d_createRefund as createRefund, index_d_getRefund as getRefund, index_d_getRefundability as getRefundability, index_d_onRefundCreated as onRefundCreated, index_d_onRefundUpdated as onRefundUpdated, onRefundCreated$1 as publicOnRefundCreated, onRefundUpdated$1 as publicOnRefundUpdated, index_d_queryRefunds as queryRefunds, index_d_updateExtendedFields as updateExtendedFields };
|
|
1113
1345
|
}
|
|
1114
1346
|
|
|
1115
|
-
export { index_d$1 as onboardingAvailability, index_d as refunds };
|
|
1347
|
+
export { index_d$1 as callbacks, index_d$2 as onboardingAvailability, index_d as refunds };
|