@wix/auto_sdk_ecom_order-payment-requests 1.0.25 → 1.0.27
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/index.d.ts +20 -9
- package/build/cjs/index.js +2 -0
- package/build/cjs/index.js.map +1 -1
- package/build/{internal/cjs/ecom-v1-order-payment-request-order-payment-requests.universal-BQi9Xfc-.d.ts → cjs/index.typings.d.ts} +158 -27
- package/build/cjs/index.typings.js +628 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +20 -9
- package/build/es/index.mjs +2 -0
- package/build/es/index.mjs.map +1 -1
- package/build/{internal/es/ecom-v1-order-payment-request-order-payment-requests.universal-BQi9Xfc-.d.mts → es/index.typings.d.mts} +158 -27
- package/build/es/index.typings.mjs +593 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +23 -10
- package/build/internal/cjs/index.js +2 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/{cjs/ecom-v1-order-payment-request-order-payment-requests.universal-Bfgzg5Ab.d.ts → internal/cjs/index.typings.d.ts} +202 -2
- package/build/internal/cjs/index.typings.js +628 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +23 -10
- package/build/internal/es/index.mjs +2 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/{es/ecom-v1-order-payment-request-order-payment-requests.universal-Bfgzg5Ab.d.mts → internal/es/index.typings.d.mts} +202 -2
- package/build/internal/es/index.typings.mjs +593 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
interface OrderPaymentRequest {
|
|
2
4
|
/**
|
|
3
5
|
* Order payment request ID.
|
|
@@ -76,19 +78,6 @@ interface OrderPaymentRequest {
|
|
|
76
78
|
_updatedDate?: Date | null;
|
|
77
79
|
/** Image to display to the customer on the payment page. */
|
|
78
80
|
image?: string;
|
|
79
|
-
/**
|
|
80
|
-
* List of payment methods that can't be used for this order payment request.
|
|
81
|
-
* @internal
|
|
82
|
-
* @maxSize 1
|
|
83
|
-
*/
|
|
84
|
-
blockedPaymentMethods?: PaymentMethodWithLiterals[];
|
|
85
|
-
/**
|
|
86
|
-
* A collection of action links (e.g., navigation or error resolution URLs) intended for client-side use.
|
|
87
|
-
*
|
|
88
|
-
* These actions are optional and may be conditionally rendered based on the client context.
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
actionLinks?: ActionLinks;
|
|
92
81
|
}
|
|
93
82
|
interface Source {
|
|
94
83
|
/**
|
|
@@ -488,10 +477,101 @@ declare enum WebhookIdentityType {
|
|
|
488
477
|
}
|
|
489
478
|
/** @enumType */
|
|
490
479
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
480
|
+
type GetOrderPaymentRequestApplicationErrors = {
|
|
481
|
+
code?: 'ORDER_PAYMENT_REQUEST_NOT_FOUND';
|
|
482
|
+
description?: string;
|
|
483
|
+
data?: Record<string, any>;
|
|
484
|
+
};
|
|
485
|
+
type UpdateOrderPaymentRequestApplicationErrors = {
|
|
486
|
+
code?: 'CANNOT_UPDATE_PAID_ORDER_PAYMENT_REQUEST';
|
|
487
|
+
description?: string;
|
|
488
|
+
data?: Record<string, any>;
|
|
489
|
+
} | {
|
|
490
|
+
code?: 'CANNOT_UPDATE_EXPIRED_ORDER_PAYMENT_REQUEST';
|
|
491
|
+
description?: string;
|
|
492
|
+
data?: Record<string, any>;
|
|
493
|
+
} | {
|
|
494
|
+
code?: 'CANNOT_UPDATE_VOIDED_ORDER_PAYMENT_REQUEST';
|
|
495
|
+
description?: string;
|
|
496
|
+
data?: Record<string, any>;
|
|
497
|
+
};
|
|
498
|
+
type DeleteOrderPaymentRequestApplicationErrors = {
|
|
499
|
+
code?: 'CANNOT_DELETE_PAID_ORDER_PAYMENT_REQUEST';
|
|
500
|
+
description?: string;
|
|
501
|
+
data?: Record<string, any>;
|
|
502
|
+
};
|
|
503
|
+
type GetOrderPaymentRequestUrlApplicationErrors = {
|
|
504
|
+
code?: 'ORDER_PAYMENT_REQUEST_NOT_FOUND';
|
|
505
|
+
description?: string;
|
|
506
|
+
data?: Record<string, any>;
|
|
507
|
+
} | {
|
|
508
|
+
code?: 'ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND';
|
|
509
|
+
description?: string;
|
|
510
|
+
data?: Record<string, any>;
|
|
511
|
+
};
|
|
512
|
+
type VoidOrderPaymentRequestApplicationErrors = {
|
|
513
|
+
code?: 'ORDER_PAYMENT_REQUEST_NOT_FOUND';
|
|
514
|
+
description?: string;
|
|
515
|
+
data?: Record<string, any>;
|
|
516
|
+
} | {
|
|
517
|
+
code?: 'CANNOT_VOID_PAID_ORDER_PAYMENT_REQUEST';
|
|
518
|
+
description?: string;
|
|
519
|
+
data?: Record<string, any>;
|
|
520
|
+
} | {
|
|
521
|
+
code?: 'CANNOT_VOID_EXPIRED_ORDER_PAYMENT_REQUEST';
|
|
522
|
+
description?: string;
|
|
523
|
+
data?: Record<string, any>;
|
|
524
|
+
};
|
|
525
|
+
type OrderPaymentRequestNonNullablePaths = `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title`;
|
|
526
|
+
/**
|
|
527
|
+
* Creates a order payment request.
|
|
528
|
+
* @public
|
|
529
|
+
* @documentationMaturity preview
|
|
530
|
+
* @requiredField options.orderPaymentRequest.amount
|
|
531
|
+
* @requiredField options.orderPaymentRequest.orderId
|
|
532
|
+
* @requiredField options.orderPaymentRequest.title
|
|
533
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_CREATE
|
|
534
|
+
* @applicableIdentity APP
|
|
535
|
+
* @returns The created OrderPaymentRequest.
|
|
536
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.CreateOrderPaymentRequest
|
|
537
|
+
*/
|
|
538
|
+
declare function createOrderPaymentRequest(options?: NonNullablePaths<CreateOrderPaymentRequestOptions, `orderPaymentRequest.amount` | `orderPaymentRequest.orderId` | `orderPaymentRequest.title`>): Promise<NonNullablePaths<OrderPaymentRequest, OrderPaymentRequestNonNullablePaths>>;
|
|
491
539
|
interface CreateOrderPaymentRequestOptions {
|
|
492
540
|
/** OrderPaymentRequest to be created. */
|
|
493
541
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
494
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* Retrieves a order payment request.
|
|
545
|
+
* @param orderPaymentRequestId - ID of the OrderPaymentRequest to retrieve.
|
|
546
|
+
* @public
|
|
547
|
+
* @documentationMaturity preview
|
|
548
|
+
* @requiredField orderPaymentRequestId
|
|
549
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
550
|
+
* @applicableIdentity APP
|
|
551
|
+
* @applicableIdentity VISITOR
|
|
552
|
+
* @returns The requested OrderPaymentRequest.
|
|
553
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequest
|
|
554
|
+
*/
|
|
555
|
+
declare function getOrderPaymentRequest(orderPaymentRequestId: string): Promise<NonNullablePaths<OrderPaymentRequest, OrderPaymentRequestNonNullablePaths> & {
|
|
556
|
+
__applicationErrorsType?: GetOrderPaymentRequestApplicationErrors;
|
|
557
|
+
}>;
|
|
558
|
+
/**
|
|
559
|
+
* Updates a order payment request.
|
|
560
|
+
*
|
|
561
|
+
* Please note that only `UNPAID` payment requests can be updated.
|
|
562
|
+
* @param _id - Order payment request ID.
|
|
563
|
+
* @public
|
|
564
|
+
* @documentationMaturity preview
|
|
565
|
+
* @requiredField _id
|
|
566
|
+
* @requiredField orderPaymentRequest
|
|
567
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
|
|
568
|
+
* @applicableIdentity APP
|
|
569
|
+
* @returns Updated OrderPaymentRequest.
|
|
570
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateOrderPaymentRequest
|
|
571
|
+
*/
|
|
572
|
+
declare function updateOrderPaymentRequest(_id: string, orderPaymentRequest: UpdateOrderPaymentRequest): Promise<NonNullablePaths<OrderPaymentRequest, OrderPaymentRequestNonNullablePaths> & {
|
|
573
|
+
__applicationErrorsType?: UpdateOrderPaymentRequestApplicationErrors;
|
|
574
|
+
}>;
|
|
495
575
|
interface UpdateOrderPaymentRequest {
|
|
496
576
|
/**
|
|
497
577
|
* Order payment request ID.
|
|
@@ -570,20 +650,40 @@ interface UpdateOrderPaymentRequest {
|
|
|
570
650
|
_updatedDate?: Date | null;
|
|
571
651
|
/** Image to display to the customer on the payment page. */
|
|
572
652
|
image?: string;
|
|
573
|
-
/**
|
|
574
|
-
* List of payment methods that can't be used for this order payment request.
|
|
575
|
-
* @internal
|
|
576
|
-
* @maxSize 1
|
|
577
|
-
*/
|
|
578
|
-
blockedPaymentMethods?: PaymentMethodWithLiterals[];
|
|
579
|
-
/**
|
|
580
|
-
* A collection of action links (e.g., navigation or error resolution URLs) intended for client-side use.
|
|
581
|
-
*
|
|
582
|
-
* These actions are optional and may be conditionally rendered based on the client context.
|
|
583
|
-
* @internal
|
|
584
|
-
*/
|
|
585
|
-
actionLinks?: ActionLinks;
|
|
586
653
|
}
|
|
654
|
+
/**
|
|
655
|
+
* Deletes a order payment request.
|
|
656
|
+
*
|
|
657
|
+
* Please note that only `UNPAID` and `VOIDED` payment requests can be deleted.
|
|
658
|
+
* @param orderPaymentRequestId - Id of the OrderPaymentRequest to delete.
|
|
659
|
+
* @public
|
|
660
|
+
* @documentationMaturity preview
|
|
661
|
+
* @requiredField orderPaymentRequestId
|
|
662
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_DELETE
|
|
663
|
+
* @applicableIdentity APP
|
|
664
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.DeleteOrderPaymentRequest
|
|
665
|
+
*/
|
|
666
|
+
declare function deleteOrderPaymentRequest(orderPaymentRequestId: string): Promise<void & {
|
|
667
|
+
__applicationErrorsType?: DeleteOrderPaymentRequestApplicationErrors;
|
|
668
|
+
}>;
|
|
669
|
+
/**
|
|
670
|
+
* Retrieves a list of Payment Requests, given the provided [paging, filtering, and sorting][1].
|
|
671
|
+
*
|
|
672
|
+
* Query Payment Requests runs with these defaults, which you can override:
|
|
673
|
+
* - `createdDate` is sorted in DESC order
|
|
674
|
+
* - `cursorPaging.limit` is 100
|
|
675
|
+
*
|
|
676
|
+
* To learn about working with _Query_ endpoints, see
|
|
677
|
+
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and
|
|
678
|
+
* [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
679
|
+
* @public
|
|
680
|
+
* @documentationMaturity preview
|
|
681
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
682
|
+
* @applicableIdentity APP
|
|
683
|
+
* @applicableIdentity VISITOR
|
|
684
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.QueryOrderPaymentRequests
|
|
685
|
+
*/
|
|
686
|
+
declare function queryOrderPaymentRequests(): OrderPaymentRequestsQueryBuilder;
|
|
587
687
|
interface QueryCursorResult {
|
|
588
688
|
cursors: Cursors;
|
|
589
689
|
hasNext: () => boolean;
|
|
@@ -661,9 +761,40 @@ interface OrderPaymentRequestsQueryBuilder {
|
|
|
661
761
|
/** @documentationMaturity preview */
|
|
662
762
|
find: () => Promise<OrderPaymentRequestsQueryResult>;
|
|
663
763
|
}
|
|
764
|
+
/**
|
|
765
|
+
* Retrieves the order payment request page URL of a specified order payment request.
|
|
766
|
+
* @param orderPaymentRequestId - Order Payment Request ID.
|
|
767
|
+
* @public
|
|
768
|
+
* @documentationMaturity preview
|
|
769
|
+
* @requiredField orderPaymentRequestId
|
|
770
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
771
|
+
* @applicableIdentity APP
|
|
772
|
+
* @applicableIdentity VISITOR
|
|
773
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequestURL
|
|
774
|
+
*/
|
|
775
|
+
declare function getOrderPaymentRequestUrl(orderPaymentRequestId: string): Promise<NonNullablePaths<GetOrderPaymentRequestURLResponse, `orderPaymentRequestUrl`> & {
|
|
776
|
+
__applicationErrorsType?: GetOrderPaymentRequestUrlApplicationErrors;
|
|
777
|
+
}>;
|
|
778
|
+
/**
|
|
779
|
+
* Updates extended fields of a order payment request
|
|
780
|
+
* @param _id - ID of the entity to update.
|
|
781
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
782
|
+
* @public
|
|
783
|
+
* @documentationMaturity preview
|
|
784
|
+
* @requiredField _id
|
|
785
|
+
* @requiredField namespace
|
|
786
|
+
* @requiredField options
|
|
787
|
+
* @requiredField options.namespaceData
|
|
788
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
|
|
789
|
+
* @applicableIdentity APP
|
|
790
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateExtendedFields
|
|
791
|
+
*/
|
|
792
|
+
declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>): Promise<NonNullablePaths<UpdateExtendedFieldsResponse, {
|
|
793
|
+
[P in OrderPaymentRequestNonNullablePaths]: `orderPaymentRequest.${P}`;
|
|
794
|
+
}[OrderPaymentRequestNonNullablePaths]>>;
|
|
664
795
|
interface UpdateExtendedFieldsOptions {
|
|
665
796
|
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
666
797
|
namespaceData: Record<string, any> | null;
|
|
667
798
|
}
|
|
668
799
|
|
|
669
|
-
export { type
|
|
800
|
+
export { type ActionEvent, type ActionLink, type ActionLinks, type CreateOrderPaymentRequestOptions, type CreateOrderPaymentRequestRequest, type CreateOrderPaymentRequestResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteOrderPaymentRequestApplicationErrors, type DeleteOrderPaymentRequestRequest, type DeleteOrderPaymentRequestResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetOrderPaymentRequestApplicationErrors, type GetOrderPaymentRequestRequest, type GetOrderPaymentRequestResponse, type GetOrderPaymentRequestURLRequest, type GetOrderPaymentRequestURLResponse, type GetOrderPaymentRequestUrlApplicationErrors, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type OrderPaymentRequest, type OrderPaymentRequestExpired, type OrderPaymentRequestPaid, type OrderPaymentRequestVoided, type OrderPaymentRequestsQueryBuilder, type OrderPaymentRequestsQueryResult, PaymentMethod, type PaymentMethodWithLiterals, type Price, type QueryOrderPaymentRequestsRequest, type QueryOrderPaymentRequestsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, Status, type StatusWithLiterals, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateOrderPaymentRequest, type UpdateOrderPaymentRequestApplicationErrors, type UpdateOrderPaymentRequestRequest, type UpdateOrderPaymentRequestResponse, type VoidOrderPaymentRequestApplicationErrors, type VoidOrderPaymentRequestRequest, type VoidOrderPaymentRequestResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest };
|