@wix/auto_sdk_ecom_order-payment-requests 1.0.24 → 1.0.26
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 +14 -6
- 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 +14 -6
- 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 +17 -7
- 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 +17 -7
- 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 +3 -3
|
@@ -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,6 +78,19 @@ interface OrderPaymentRequest {
|
|
|
76
78
|
_updatedDate?: Date | null;
|
|
77
79
|
/** Image to display to the customer on the payment page. */
|
|
78
80
|
image?: string;
|
|
81
|
+
/**
|
|
82
|
+
* List of payment methods that can't be used for this order payment request.
|
|
83
|
+
* @internal
|
|
84
|
+
* @maxSize 1
|
|
85
|
+
*/
|
|
86
|
+
blockedPaymentMethods?: PaymentMethodWithLiterals[];
|
|
87
|
+
/**
|
|
88
|
+
* A collection of action links (e.g., navigation or error resolution URLs) intended for client-side use.
|
|
89
|
+
*
|
|
90
|
+
* These actions are optional and may be conditionally rendered based on the client context.
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
actionLinks?: ActionLinks;
|
|
79
94
|
}
|
|
80
95
|
interface Source {
|
|
81
96
|
/**
|
|
@@ -130,6 +145,8 @@ declare enum PaymentMethod {
|
|
|
130
145
|
/** Manual payment. */
|
|
131
146
|
MANUAL = "MANUAL"
|
|
132
147
|
}
|
|
148
|
+
/** @enumType */
|
|
149
|
+
type PaymentMethodWithLiterals = PaymentMethod | 'UNKNOWN_PAYMENT_METHOD' | 'MANUAL';
|
|
133
150
|
interface ActionLinks {
|
|
134
151
|
/**
|
|
135
152
|
* A general navigation action link rendered as an anchor in the UI.
|
|
@@ -473,10 +490,101 @@ declare enum WebhookIdentityType {
|
|
|
473
490
|
}
|
|
474
491
|
/** @enumType */
|
|
475
492
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
493
|
+
type GetOrderPaymentRequestApplicationErrors = {
|
|
494
|
+
code?: 'ORDER_PAYMENT_REQUEST_NOT_FOUND';
|
|
495
|
+
description?: string;
|
|
496
|
+
data?: Record<string, any>;
|
|
497
|
+
};
|
|
498
|
+
type UpdateOrderPaymentRequestApplicationErrors = {
|
|
499
|
+
code?: 'CANNOT_UPDATE_PAID_ORDER_PAYMENT_REQUEST';
|
|
500
|
+
description?: string;
|
|
501
|
+
data?: Record<string, any>;
|
|
502
|
+
} | {
|
|
503
|
+
code?: 'CANNOT_UPDATE_EXPIRED_ORDER_PAYMENT_REQUEST';
|
|
504
|
+
description?: string;
|
|
505
|
+
data?: Record<string, any>;
|
|
506
|
+
} | {
|
|
507
|
+
code?: 'CANNOT_UPDATE_VOIDED_ORDER_PAYMENT_REQUEST';
|
|
508
|
+
description?: string;
|
|
509
|
+
data?: Record<string, any>;
|
|
510
|
+
};
|
|
511
|
+
type DeleteOrderPaymentRequestApplicationErrors = {
|
|
512
|
+
code?: 'CANNOT_DELETE_PAID_ORDER_PAYMENT_REQUEST';
|
|
513
|
+
description?: string;
|
|
514
|
+
data?: Record<string, any>;
|
|
515
|
+
};
|
|
516
|
+
type GetOrderPaymentRequestUrlApplicationErrors = {
|
|
517
|
+
code?: 'ORDER_PAYMENT_REQUEST_NOT_FOUND';
|
|
518
|
+
description?: string;
|
|
519
|
+
data?: Record<string, any>;
|
|
520
|
+
} | {
|
|
521
|
+
code?: 'ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND';
|
|
522
|
+
description?: string;
|
|
523
|
+
data?: Record<string, any>;
|
|
524
|
+
};
|
|
525
|
+
type VoidOrderPaymentRequestApplicationErrors = {
|
|
526
|
+
code?: 'ORDER_PAYMENT_REQUEST_NOT_FOUND';
|
|
527
|
+
description?: string;
|
|
528
|
+
data?: Record<string, any>;
|
|
529
|
+
} | {
|
|
530
|
+
code?: 'CANNOT_VOID_PAID_ORDER_PAYMENT_REQUEST';
|
|
531
|
+
description?: string;
|
|
532
|
+
data?: Record<string, any>;
|
|
533
|
+
} | {
|
|
534
|
+
code?: 'CANNOT_VOID_EXPIRED_ORDER_PAYMENT_REQUEST';
|
|
535
|
+
description?: string;
|
|
536
|
+
data?: Record<string, any>;
|
|
537
|
+
};
|
|
538
|
+
type OrderPaymentRequestNonNullablePaths = `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title`;
|
|
539
|
+
/**
|
|
540
|
+
* Creates a order payment request.
|
|
541
|
+
* @public
|
|
542
|
+
* @documentationMaturity preview
|
|
543
|
+
* @requiredField options.orderPaymentRequest.amount
|
|
544
|
+
* @requiredField options.orderPaymentRequest.orderId
|
|
545
|
+
* @requiredField options.orderPaymentRequest.title
|
|
546
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_CREATE
|
|
547
|
+
* @applicableIdentity APP
|
|
548
|
+
* @returns The created OrderPaymentRequest.
|
|
549
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.CreateOrderPaymentRequest
|
|
550
|
+
*/
|
|
551
|
+
declare function createOrderPaymentRequest(options?: NonNullablePaths<CreateOrderPaymentRequestOptions, `orderPaymentRequest.amount` | `orderPaymentRequest.orderId` | `orderPaymentRequest.title`>): Promise<NonNullablePaths<OrderPaymentRequest, OrderPaymentRequestNonNullablePaths>>;
|
|
476
552
|
interface CreateOrderPaymentRequestOptions {
|
|
477
553
|
/** OrderPaymentRequest to be created. */
|
|
478
554
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
479
555
|
}
|
|
556
|
+
/**
|
|
557
|
+
* Retrieves a order payment request.
|
|
558
|
+
* @param orderPaymentRequestId - ID of the OrderPaymentRequest to retrieve.
|
|
559
|
+
* @public
|
|
560
|
+
* @documentationMaturity preview
|
|
561
|
+
* @requiredField orderPaymentRequestId
|
|
562
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
563
|
+
* @applicableIdentity APP
|
|
564
|
+
* @applicableIdentity VISITOR
|
|
565
|
+
* @returns The requested OrderPaymentRequest.
|
|
566
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequest
|
|
567
|
+
*/
|
|
568
|
+
declare function getOrderPaymentRequest(orderPaymentRequestId: string): Promise<NonNullablePaths<OrderPaymentRequest, OrderPaymentRequestNonNullablePaths> & {
|
|
569
|
+
__applicationErrorsType?: GetOrderPaymentRequestApplicationErrors;
|
|
570
|
+
}>;
|
|
571
|
+
/**
|
|
572
|
+
* Updates a order payment request.
|
|
573
|
+
*
|
|
574
|
+
* Please note that only `UNPAID` payment requests can be updated.
|
|
575
|
+
* @param _id - Order payment request ID.
|
|
576
|
+
* @public
|
|
577
|
+
* @documentationMaturity preview
|
|
578
|
+
* @requiredField _id
|
|
579
|
+
* @requiredField orderPaymentRequest
|
|
580
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
|
|
581
|
+
* @applicableIdentity APP
|
|
582
|
+
* @returns Updated OrderPaymentRequest.
|
|
583
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateOrderPaymentRequest
|
|
584
|
+
*/
|
|
585
|
+
declare function updateOrderPaymentRequest(_id: string, orderPaymentRequest: UpdateOrderPaymentRequest): Promise<NonNullablePaths<OrderPaymentRequest, OrderPaymentRequestNonNullablePaths> & {
|
|
586
|
+
__applicationErrorsType?: UpdateOrderPaymentRequestApplicationErrors;
|
|
587
|
+
}>;
|
|
480
588
|
interface UpdateOrderPaymentRequest {
|
|
481
589
|
/**
|
|
482
590
|
* Order payment request ID.
|
|
@@ -555,7 +663,53 @@ interface UpdateOrderPaymentRequest {
|
|
|
555
663
|
_updatedDate?: Date | null;
|
|
556
664
|
/** Image to display to the customer on the payment page. */
|
|
557
665
|
image?: string;
|
|
558
|
-
|
|
666
|
+
/**
|
|
667
|
+
* List of payment methods that can't be used for this order payment request.
|
|
668
|
+
* @internal
|
|
669
|
+
* @maxSize 1
|
|
670
|
+
*/
|
|
671
|
+
blockedPaymentMethods?: PaymentMethodWithLiterals[];
|
|
672
|
+
/**
|
|
673
|
+
* A collection of action links (e.g., navigation or error resolution URLs) intended for client-side use.
|
|
674
|
+
*
|
|
675
|
+
* These actions are optional and may be conditionally rendered based on the client context.
|
|
676
|
+
* @internal
|
|
677
|
+
*/
|
|
678
|
+
actionLinks?: ActionLinks;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Deletes a order payment request.
|
|
682
|
+
*
|
|
683
|
+
* Please note that only `UNPAID` and `VOIDED` payment requests can be deleted.
|
|
684
|
+
* @param orderPaymentRequestId - Id of the OrderPaymentRequest to delete.
|
|
685
|
+
* @public
|
|
686
|
+
* @documentationMaturity preview
|
|
687
|
+
* @requiredField orderPaymentRequestId
|
|
688
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_DELETE
|
|
689
|
+
* @applicableIdentity APP
|
|
690
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.DeleteOrderPaymentRequest
|
|
691
|
+
*/
|
|
692
|
+
declare function deleteOrderPaymentRequest(orderPaymentRequestId: string): Promise<void & {
|
|
693
|
+
__applicationErrorsType?: DeleteOrderPaymentRequestApplicationErrors;
|
|
694
|
+
}>;
|
|
695
|
+
/**
|
|
696
|
+
* Retrieves a list of Payment Requests, given the provided [paging, filtering, and sorting][1].
|
|
697
|
+
*
|
|
698
|
+
* Query Payment Requests runs with these defaults, which you can override:
|
|
699
|
+
* - `createdDate` is sorted in DESC order
|
|
700
|
+
* - `cursorPaging.limit` is 100
|
|
701
|
+
*
|
|
702
|
+
* To learn about working with _Query_ endpoints, see
|
|
703
|
+
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and
|
|
704
|
+
* [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
705
|
+
* @public
|
|
706
|
+
* @documentationMaturity preview
|
|
707
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
708
|
+
* @applicableIdentity APP
|
|
709
|
+
* @applicableIdentity VISITOR
|
|
710
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.QueryOrderPaymentRequests
|
|
711
|
+
*/
|
|
712
|
+
declare function queryOrderPaymentRequests(): OrderPaymentRequestsQueryBuilder;
|
|
559
713
|
interface QueryCursorResult {
|
|
560
714
|
cursors: Cursors;
|
|
561
715
|
hasNext: () => boolean;
|
|
@@ -633,9 +787,55 @@ interface OrderPaymentRequestsQueryBuilder {
|
|
|
633
787
|
/** @documentationMaturity preview */
|
|
634
788
|
find: () => Promise<OrderPaymentRequestsQueryResult>;
|
|
635
789
|
}
|
|
790
|
+
/**
|
|
791
|
+
* Retrieves the order payment request page URL of a specified order payment request.
|
|
792
|
+
* @param orderPaymentRequestId - Order Payment Request ID.
|
|
793
|
+
* @public
|
|
794
|
+
* @documentationMaturity preview
|
|
795
|
+
* @requiredField orderPaymentRequestId
|
|
796
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
797
|
+
* @applicableIdentity APP
|
|
798
|
+
* @applicableIdentity VISITOR
|
|
799
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequestURL
|
|
800
|
+
*/
|
|
801
|
+
declare function getOrderPaymentRequestUrl(orderPaymentRequestId: string): Promise<NonNullablePaths<GetOrderPaymentRequestURLResponse, `orderPaymentRequestUrl`> & {
|
|
802
|
+
__applicationErrorsType?: GetOrderPaymentRequestUrlApplicationErrors;
|
|
803
|
+
}>;
|
|
804
|
+
/**
|
|
805
|
+
* Updates extended fields of a order payment request
|
|
806
|
+
* @param _id - ID of the entity to update.
|
|
807
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
808
|
+
* @public
|
|
809
|
+
* @documentationMaturity preview
|
|
810
|
+
* @requiredField _id
|
|
811
|
+
* @requiredField namespace
|
|
812
|
+
* @requiredField options
|
|
813
|
+
* @requiredField options.namespaceData
|
|
814
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
|
|
815
|
+
* @applicableIdentity APP
|
|
816
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateExtendedFields
|
|
817
|
+
*/
|
|
818
|
+
declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>): Promise<NonNullablePaths<UpdateExtendedFieldsResponse, {
|
|
819
|
+
[P in OrderPaymentRequestNonNullablePaths]: `orderPaymentRequest.${P}`;
|
|
820
|
+
}[OrderPaymentRequestNonNullablePaths]>>;
|
|
636
821
|
interface UpdateExtendedFieldsOptions {
|
|
637
822
|
/** 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. */
|
|
638
823
|
namespaceData: Record<string, any> | null;
|
|
639
824
|
}
|
|
825
|
+
/**
|
|
826
|
+
* Voids the given order payment request
|
|
827
|
+
*
|
|
828
|
+
* Please note that only `UNPAID` payment requests can be voided.
|
|
829
|
+
* @param orderPaymentRequestId - ID of the order payment request to void.
|
|
830
|
+
* @internal
|
|
831
|
+
* @documentationMaturity preview
|
|
832
|
+
* @requiredField orderPaymentRequestId
|
|
833
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
|
|
834
|
+
* @applicableIdentity APP
|
|
835
|
+
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.VoidOrderPaymentRequest
|
|
836
|
+
*/
|
|
837
|
+
declare function voidOrderPaymentRequest(orderPaymentRequestId: string): Promise<void & {
|
|
838
|
+
__applicationErrorsType?: VoidOrderPaymentRequestApplicationErrors;
|
|
839
|
+
}>;
|
|
640
840
|
|
|
641
|
-
export { type
|
|
841
|
+
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, voidOrderPaymentRequest };
|