@wix/auto_sdk_ecom_order-payment-requests 1.0.19 → 1.0.20

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.
Files changed (29) hide show
  1. package/build/{ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.d.mts → ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.d.mts} +24 -9
  2. package/build/{ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.d.ts → ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.d.ts} +24 -9
  3. package/build/index.d.mts +15 -4
  4. package/build/index.d.ts +15 -4
  5. package/build/index.js +53 -2
  6. package/build/index.js.map +1 -1
  7. package/build/index.mjs +51 -1
  8. package/build/index.mjs.map +1 -1
  9. package/build/internal/{ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.d.mts → ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.d.mts} +24 -9
  10. package/build/internal/{ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.d.ts → ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.d.ts} +24 -9
  11. package/build/internal/index.d.mts +15 -4
  12. package/build/internal/index.d.ts +15 -4
  13. package/build/internal/index.js +53 -2
  14. package/build/internal/index.js.map +1 -1
  15. package/build/internal/index.mjs +51 -1
  16. package/build/internal/index.mjs.map +1 -1
  17. package/build/internal/meta.d.mts +28 -17
  18. package/build/internal/meta.d.ts +28 -17
  19. package/build/internal/meta.js +38 -2
  20. package/build/internal/meta.js.map +1 -1
  21. package/build/internal/meta.mjs +36 -1
  22. package/build/internal/meta.mjs.map +1 -1
  23. package/build/meta.d.mts +28 -17
  24. package/build/meta.d.ts +28 -17
  25. package/build/meta.js +38 -2
  26. package/build/meta.js.map +1 -1
  27. package/build/meta.mjs +36 -1
  28. package/build/meta.mjs.map +1 -1
  29. package/package.json +2 -2
@@ -57,8 +57,6 @@ interface OrderPaymentRequest {
57
57
  * @maxLength 300
58
58
  */
59
59
  description?: string | null;
60
- /** Image to be displayed to the customer on the payment page. */
61
- image?: string;
62
60
  /**
63
61
  * Time and date the order payment request expires.
64
62
  * @immutable
@@ -76,6 +74,8 @@ interface OrderPaymentRequest {
76
74
  * @readonly
77
75
  */
78
76
  _updatedDate?: Date | null;
77
+ /** Image to display to the customer on the payment page. */
78
+ image?: string;
79
79
  /**
80
80
  * List of payment methods that can't be used for this order payment request.
81
81
  * @maxSize 1
@@ -103,10 +103,11 @@ declare enum Status {
103
103
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
104
104
  UNPAID = "UNPAID",
105
105
  PAID = "PAID",
106
- EXPIRED = "EXPIRED"
106
+ EXPIRED = "EXPIRED",
107
+ VOIDED = "VOIDED"
107
108
  }
108
109
  /** @enumType */
109
- type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'UNPAID' | 'PAID' | 'EXPIRED';
110
+ type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'UNPAID' | 'PAID' | 'EXPIRED' | 'VOIDED';
110
111
  interface Price {
111
112
  /**
112
113
  * Amount.
@@ -139,12 +140,17 @@ declare enum PaymentMethod {
139
140
  type PaymentMethodWithLiterals = PaymentMethod | 'UNKNOWN_PAYMENT_METHOD' | 'MANUAL';
140
141
  /** Triggered when the order payment request status changes to paid */
141
142
  interface OrderPaymentRequestPaid {
142
- /** The order that was updated */
143
+ /** Order payment request */
143
144
  orderPaymentRequest?: OrderPaymentRequest;
144
145
  }
145
146
  /** Triggered when the order payment request status changes to expired */
146
147
  interface OrderPaymentRequestExpired {
147
- /** The order that was updated */
148
+ /** Order payment request */
149
+ orderPaymentRequest?: OrderPaymentRequest;
150
+ }
151
+ /** Triggered when the order payment request status changes to voided */
152
+ interface OrderPaymentRequestVoided {
153
+ /** Order payment request */
148
154
  orderPaymentRequest?: OrderPaymentRequest;
149
155
  }
150
156
  interface CreateOrderPaymentRequestRequest {
@@ -308,6 +314,15 @@ interface UpdateExtendedFieldsResponse {
308
314
  /** Updated OrderPaymentRequest. */
309
315
  orderPaymentRequest?: OrderPaymentRequest;
310
316
  }
317
+ interface VoidOrderPaymentRequestRequest {
318
+ /**
319
+ * ID of the order payment request to void.
320
+ * @format GUID
321
+ */
322
+ orderPaymentRequestId: string;
323
+ }
324
+ interface VoidOrderPaymentRequestResponse {
325
+ }
311
326
  interface DomainEvent extends DomainEventBodyOneOf {
312
327
  createdEvent?: EntityCreatedEvent;
313
328
  updatedEvent?: EntityUpdatedEvent;
@@ -507,8 +522,6 @@ interface UpdateOrderPaymentRequest {
507
522
  * @maxLength 300
508
523
  */
509
524
  description?: string | null;
510
- /** Image to be displayed to the customer on the payment page. */
511
- image?: string;
512
525
  /**
513
526
  * Time and date the order payment request expires.
514
527
  * @immutable
@@ -526,6 +539,8 @@ interface UpdateOrderPaymentRequest {
526
539
  * @readonly
527
540
  */
528
541
  _updatedDate?: Date | null;
542
+ /** Image to display to the customer on the payment page. */
543
+ image?: string;
529
544
  /**
530
545
  * List of payment methods that can't be used for this order payment request.
531
546
  * @maxSize 1
@@ -614,4 +629,4 @@ interface UpdateExtendedFieldsOptions {
614
629
  namespaceData: Record<string, any> | null;
615
630
  }
616
631
 
617
- export { type EntityCreatedEvent as A, type EntityUpdatedEvent as B, type CreateOrderPaymentRequestOptions as C, type DeleteOrderPaymentRequestRequest as D, type ExtendedFields as E, type EntityDeletedEvent as F, type GetOrderPaymentRequestURLResponse as G, type ActionEvent as H, type Empty as I, type IdentificationData as J, type IdentificationDataIdOneOf as K, type OrderPaymentRequestsQueryResult as L, type MessageEnvelope as M, type OrderPaymentRequest as O, PaymentMethod as P, type QueryOrderPaymentRequestsRequest as Q, type RestoreInfo as R, Status as S, type UpdateOrderPaymentRequest as U, WebhookIdentityType as W, type OrderPaymentRequestsQueryBuilder as a, type UpdateExtendedFieldsOptions as b, type UpdateExtendedFieldsResponse as c, SortOrder as d, type Source as e, type Price as f, type OrderPaymentRequestPaid as g, type OrderPaymentRequestExpired as h, type CreateOrderPaymentRequestRequest as i, type CreateOrderPaymentRequestResponse as j, type GetOrderPaymentRequestRequest as k, type GetOrderPaymentRequestResponse as l, type UpdateOrderPaymentRequestRequest as m, type UpdateOrderPaymentRequestResponse as n, type DeleteOrderPaymentRequestResponse as o, type CursorQuery as p, type CursorQueryPagingMethodOneOf as q, type Sorting as r, type CursorPaging as s, type QueryOrderPaymentRequestsResponse as t, type CursorPagingMetadata as u, type Cursors as v, type GetOrderPaymentRequestURLRequest as w, type UpdateExtendedFieldsRequest as x, type DomainEvent as y, type DomainEventBodyOneOf as z };
632
+ export { type DomainEvent as A, type DomainEventBodyOneOf as B, type CreateOrderPaymentRequestOptions as C, type DeleteOrderPaymentRequestRequest as D, type ExtendedFields as E, type EntityCreatedEvent as F, type GetOrderPaymentRequestURLResponse as G, type EntityUpdatedEvent as H, type EntityDeletedEvent as I, type ActionEvent as J, type Empty as K, type IdentificationData as L, type MessageEnvelope as M, type IdentificationDataIdOneOf as N, type OrderPaymentRequest as O, PaymentMethod as P, type QueryOrderPaymentRequestsRequest as Q, type RestoreInfo as R, Status as S, type OrderPaymentRequestsQueryResult as T, type UpdateOrderPaymentRequest as U, type VoidOrderPaymentRequestRequest as V, WebhookIdentityType as W, type OrderPaymentRequestsQueryBuilder as a, type UpdateExtendedFieldsOptions as b, type UpdateExtendedFieldsResponse as c, SortOrder as d, type Source as e, type Price as f, type OrderPaymentRequestPaid as g, type OrderPaymentRequestExpired as h, type OrderPaymentRequestVoided as i, type CreateOrderPaymentRequestRequest as j, type CreateOrderPaymentRequestResponse as k, type GetOrderPaymentRequestRequest as l, type GetOrderPaymentRequestResponse as m, type UpdateOrderPaymentRequestRequest as n, type UpdateOrderPaymentRequestResponse as o, type DeleteOrderPaymentRequestResponse as p, type CursorQuery as q, type CursorQueryPagingMethodOneOf as r, type Sorting as s, type CursorPaging as t, type QueryOrderPaymentRequestsResponse as u, type CursorPagingMetadata as v, type Cursors as w, type GetOrderPaymentRequestURLRequest as x, type UpdateExtendedFieldsRequest as y, type VoidOrderPaymentRequestResponse as z };
@@ -57,8 +57,6 @@ interface OrderPaymentRequest {
57
57
  * @maxLength 300
58
58
  */
59
59
  description?: string | null;
60
- /** Image to be displayed to the customer on the payment page. */
61
- image?: string;
62
60
  /**
63
61
  * Time and date the order payment request expires.
64
62
  * @immutable
@@ -76,6 +74,8 @@ interface OrderPaymentRequest {
76
74
  * @readonly
77
75
  */
78
76
  _updatedDate?: Date | null;
77
+ /** Image to display to the customer on the payment page. */
78
+ image?: string;
79
79
  /**
80
80
  * List of payment methods that can't be used for this order payment request.
81
81
  * @maxSize 1
@@ -103,10 +103,11 @@ declare enum Status {
103
103
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
104
104
  UNPAID = "UNPAID",
105
105
  PAID = "PAID",
106
- EXPIRED = "EXPIRED"
106
+ EXPIRED = "EXPIRED",
107
+ VOIDED = "VOIDED"
107
108
  }
108
109
  /** @enumType */
109
- type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'UNPAID' | 'PAID' | 'EXPIRED';
110
+ type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'UNPAID' | 'PAID' | 'EXPIRED' | 'VOIDED';
110
111
  interface Price {
111
112
  /**
112
113
  * Amount.
@@ -139,12 +140,17 @@ declare enum PaymentMethod {
139
140
  type PaymentMethodWithLiterals = PaymentMethod | 'UNKNOWN_PAYMENT_METHOD' | 'MANUAL';
140
141
  /** Triggered when the order payment request status changes to paid */
141
142
  interface OrderPaymentRequestPaid {
142
- /** The order that was updated */
143
+ /** Order payment request */
143
144
  orderPaymentRequest?: OrderPaymentRequest;
144
145
  }
145
146
  /** Triggered when the order payment request status changes to expired */
146
147
  interface OrderPaymentRequestExpired {
147
- /** The order that was updated */
148
+ /** Order payment request */
149
+ orderPaymentRequest?: OrderPaymentRequest;
150
+ }
151
+ /** Triggered when the order payment request status changes to voided */
152
+ interface OrderPaymentRequestVoided {
153
+ /** Order payment request */
148
154
  orderPaymentRequest?: OrderPaymentRequest;
149
155
  }
150
156
  interface CreateOrderPaymentRequestRequest {
@@ -308,6 +314,15 @@ interface UpdateExtendedFieldsResponse {
308
314
  /** Updated OrderPaymentRequest. */
309
315
  orderPaymentRequest?: OrderPaymentRequest;
310
316
  }
317
+ interface VoidOrderPaymentRequestRequest {
318
+ /**
319
+ * ID of the order payment request to void.
320
+ * @format GUID
321
+ */
322
+ orderPaymentRequestId: string;
323
+ }
324
+ interface VoidOrderPaymentRequestResponse {
325
+ }
311
326
  interface DomainEvent extends DomainEventBodyOneOf {
312
327
  createdEvent?: EntityCreatedEvent;
313
328
  updatedEvent?: EntityUpdatedEvent;
@@ -507,8 +522,6 @@ interface UpdateOrderPaymentRequest {
507
522
  * @maxLength 300
508
523
  */
509
524
  description?: string | null;
510
- /** Image to be displayed to the customer on the payment page. */
511
- image?: string;
512
525
  /**
513
526
  * Time and date the order payment request expires.
514
527
  * @immutable
@@ -526,6 +539,8 @@ interface UpdateOrderPaymentRequest {
526
539
  * @readonly
527
540
  */
528
541
  _updatedDate?: Date | null;
542
+ /** Image to display to the customer on the payment page. */
543
+ image?: string;
529
544
  /**
530
545
  * List of payment methods that can't be used for this order payment request.
531
546
  * @maxSize 1
@@ -614,4 +629,4 @@ interface UpdateExtendedFieldsOptions {
614
629
  namespaceData: Record<string, any> | null;
615
630
  }
616
631
 
617
- export { type EntityCreatedEvent as A, type EntityUpdatedEvent as B, type CreateOrderPaymentRequestOptions as C, type DeleteOrderPaymentRequestRequest as D, type ExtendedFields as E, type EntityDeletedEvent as F, type GetOrderPaymentRequestURLResponse as G, type ActionEvent as H, type Empty as I, type IdentificationData as J, type IdentificationDataIdOneOf as K, type OrderPaymentRequestsQueryResult as L, type MessageEnvelope as M, type OrderPaymentRequest as O, PaymentMethod as P, type QueryOrderPaymentRequestsRequest as Q, type RestoreInfo as R, Status as S, type UpdateOrderPaymentRequest as U, WebhookIdentityType as W, type OrderPaymentRequestsQueryBuilder as a, type UpdateExtendedFieldsOptions as b, type UpdateExtendedFieldsResponse as c, SortOrder as d, type Source as e, type Price as f, type OrderPaymentRequestPaid as g, type OrderPaymentRequestExpired as h, type CreateOrderPaymentRequestRequest as i, type CreateOrderPaymentRequestResponse as j, type GetOrderPaymentRequestRequest as k, type GetOrderPaymentRequestResponse as l, type UpdateOrderPaymentRequestRequest as m, type UpdateOrderPaymentRequestResponse as n, type DeleteOrderPaymentRequestResponse as o, type CursorQuery as p, type CursorQueryPagingMethodOneOf as q, type Sorting as r, type CursorPaging as s, type QueryOrderPaymentRequestsResponse as t, type CursorPagingMetadata as u, type Cursors as v, type GetOrderPaymentRequestURLRequest as w, type UpdateExtendedFieldsRequest as x, type DomainEvent as y, type DomainEventBodyOneOf as z };
632
+ export { type DomainEvent as A, type DomainEventBodyOneOf as B, type CreateOrderPaymentRequestOptions as C, type DeleteOrderPaymentRequestRequest as D, type ExtendedFields as E, type EntityCreatedEvent as F, type GetOrderPaymentRequestURLResponse as G, type EntityUpdatedEvent as H, type EntityDeletedEvent as I, type ActionEvent as J, type Empty as K, type IdentificationData as L, type MessageEnvelope as M, type IdentificationDataIdOneOf as N, type OrderPaymentRequest as O, PaymentMethod as P, type QueryOrderPaymentRequestsRequest as Q, type RestoreInfo as R, Status as S, type OrderPaymentRequestsQueryResult as T, type UpdateOrderPaymentRequest as U, type VoidOrderPaymentRequestRequest as V, WebhookIdentityType as W, type OrderPaymentRequestsQueryBuilder as a, type UpdateExtendedFieldsOptions as b, type UpdateExtendedFieldsResponse as c, SortOrder as d, type Source as e, type Price as f, type OrderPaymentRequestPaid as g, type OrderPaymentRequestExpired as h, type OrderPaymentRequestVoided as i, type CreateOrderPaymentRequestRequest as j, type CreateOrderPaymentRequestResponse as k, type GetOrderPaymentRequestRequest as l, type GetOrderPaymentRequestResponse as m, type UpdateOrderPaymentRequestRequest as n, type UpdateOrderPaymentRequestResponse as o, type DeleteOrderPaymentRequestResponse as p, type CursorQuery as q, type CursorQueryPagingMethodOneOf as r, type Sorting as s, type CursorPaging as t, type QueryOrderPaymentRequestsResponse as u, type CursorPagingMetadata as v, type Cursors as w, type GetOrderPaymentRequestURLRequest as x, type UpdateExtendedFieldsRequest as y, type VoidOrderPaymentRequestResponse as z };
package/build/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { C as CreateOrderPaymentRequestOptions, O as OrderPaymentRequest, U as UpdateOrderPaymentRequest, a as OrderPaymentRequestsQueryBuilder, G as GetOrderPaymentRequestURLResponse, b as UpdateExtendedFieldsOptions, c as UpdateExtendedFieldsResponse } from './ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.mjs';
3
- export { H as ActionEvent, i as CreateOrderPaymentRequestRequest, j as CreateOrderPaymentRequestResponse, s as CursorPaging, u as CursorPagingMetadata, p as CursorQuery, q as CursorQueryPagingMethodOneOf, v as Cursors, D as DeleteOrderPaymentRequestRequest, o as DeleteOrderPaymentRequestResponse, y as DomainEvent, z as DomainEventBodyOneOf, I as Empty, A as EntityCreatedEvent, F as EntityDeletedEvent, B as EntityUpdatedEvent, E as ExtendedFields, k as GetOrderPaymentRequestRequest, l as GetOrderPaymentRequestResponse, w as GetOrderPaymentRequestURLRequest, J as IdentificationData, K as IdentificationDataIdOneOf, M as MessageEnvelope, h as OrderPaymentRequestExpired, g as OrderPaymentRequestPaid, L as OrderPaymentRequestsQueryResult, P as PaymentMethod, f as Price, Q as QueryOrderPaymentRequestsRequest, t as QueryOrderPaymentRequestsResponse, R as RestoreInfo, d as SortOrder, r as Sorting, e as Source, S as Status, x as UpdateExtendedFieldsRequest, m as UpdateOrderPaymentRequestRequest, n as UpdateOrderPaymentRequestResponse, W as WebhookIdentityType } from './ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.mjs';
2
+ import { C as CreateOrderPaymentRequestOptions, O as OrderPaymentRequest, U as UpdateOrderPaymentRequest, a as OrderPaymentRequestsQueryBuilder, G as GetOrderPaymentRequestURLResponse, b as UpdateExtendedFieldsOptions, c as UpdateExtendedFieldsResponse } from './ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.mjs';
3
+ export { J as ActionEvent, j as CreateOrderPaymentRequestRequest, k as CreateOrderPaymentRequestResponse, t as CursorPaging, v as CursorPagingMetadata, q as CursorQuery, r as CursorQueryPagingMethodOneOf, w as Cursors, D as DeleteOrderPaymentRequestRequest, p as DeleteOrderPaymentRequestResponse, A as DomainEvent, B as DomainEventBodyOneOf, K as Empty, F as EntityCreatedEvent, I as EntityDeletedEvent, H as EntityUpdatedEvent, E as ExtendedFields, l as GetOrderPaymentRequestRequest, m as GetOrderPaymentRequestResponse, x as GetOrderPaymentRequestURLRequest, L as IdentificationData, N as IdentificationDataIdOneOf, M as MessageEnvelope, h as OrderPaymentRequestExpired, g as OrderPaymentRequestPaid, i as OrderPaymentRequestVoided, T as OrderPaymentRequestsQueryResult, P as PaymentMethod, f as Price, Q as QueryOrderPaymentRequestsRequest, u as QueryOrderPaymentRequestsResponse, R as RestoreInfo, d as SortOrder, s as Sorting, e as Source, S as Status, y as UpdateExtendedFieldsRequest, n as UpdateOrderPaymentRequestRequest, o as UpdateOrderPaymentRequestResponse, V as VoidOrderPaymentRequestRequest, z as VoidOrderPaymentRequestResponse, W as WebhookIdentityType } from './ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.mjs';
4
4
 
5
5
  declare function createOrderPaymentRequest$1(httpClient: HttpClient): CreateOrderPaymentRequestSignature;
6
6
  interface CreateOrderPaymentRequestSignature {
@@ -35,7 +35,7 @@ interface DeleteOrderPaymentRequestSignature {
35
35
  /**
36
36
  * Deletes a order payment request.
37
37
  *
38
- * Please note that only `UNPAID` payment requests can be deleted.
38
+ * Please note that only `UNPAID` and `VOIDED` payment requests can be deleted.
39
39
  * @param - Id of the OrderPaymentRequest to delete.
40
40
  */
41
41
  (orderPaymentRequestId: string): Promise<void>;
@@ -72,6 +72,16 @@ interface UpdateExtendedFieldsSignature {
72
72
  */
73
73
  (_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
74
74
  }
75
+ declare function voidOrderPaymentRequest$1(httpClient: HttpClient): VoidOrderPaymentRequestSignature;
76
+ interface VoidOrderPaymentRequestSignature {
77
+ /**
78
+ * Voids the given order payment request
79
+ *
80
+ * Please note that only `UNPAID` payment requests can be voided.
81
+ * @param - ID of the order payment request to void.
82
+ */
83
+ (orderPaymentRequestId: string): Promise<void>;
84
+ }
75
85
 
76
86
  declare const createOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof createOrderPaymentRequest$1> & typeof createOrderPaymentRequest$1>;
77
87
  declare const getOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof getOrderPaymentRequest$1> & typeof getOrderPaymentRequest$1>;
@@ -80,5 +90,6 @@ declare const deleteOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof d
80
90
  declare const queryOrderPaymentRequests: MaybeContext<BuildRESTFunction<typeof queryOrderPaymentRequests$1> & typeof queryOrderPaymentRequests$1>;
81
91
  declare const getOrderPaymentRequestUrl: MaybeContext<BuildRESTFunction<typeof getOrderPaymentRequestUrl$1> & typeof getOrderPaymentRequestUrl$1>;
82
92
  declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
93
+ declare const voidOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof voidOrderPaymentRequest$1> & typeof voidOrderPaymentRequest$1>;
83
94
 
84
- export { CreateOrderPaymentRequestOptions, GetOrderPaymentRequestURLResponse, OrderPaymentRequest, OrderPaymentRequestsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateOrderPaymentRequest, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest };
95
+ export { CreateOrderPaymentRequestOptions, GetOrderPaymentRequestURLResponse, OrderPaymentRequest, OrderPaymentRequestsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateOrderPaymentRequest, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest, voidOrderPaymentRequest };
package/build/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { C as CreateOrderPaymentRequestOptions, O as OrderPaymentRequest, U as UpdateOrderPaymentRequest, a as OrderPaymentRequestsQueryBuilder, G as GetOrderPaymentRequestURLResponse, b as UpdateExtendedFieldsOptions, c as UpdateExtendedFieldsResponse } from './ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.js';
3
- export { H as ActionEvent, i as CreateOrderPaymentRequestRequest, j as CreateOrderPaymentRequestResponse, s as CursorPaging, u as CursorPagingMetadata, p as CursorQuery, q as CursorQueryPagingMethodOneOf, v as Cursors, D as DeleteOrderPaymentRequestRequest, o as DeleteOrderPaymentRequestResponse, y as DomainEvent, z as DomainEventBodyOneOf, I as Empty, A as EntityCreatedEvent, F as EntityDeletedEvent, B as EntityUpdatedEvent, E as ExtendedFields, k as GetOrderPaymentRequestRequest, l as GetOrderPaymentRequestResponse, w as GetOrderPaymentRequestURLRequest, J as IdentificationData, K as IdentificationDataIdOneOf, M as MessageEnvelope, h as OrderPaymentRequestExpired, g as OrderPaymentRequestPaid, L as OrderPaymentRequestsQueryResult, P as PaymentMethod, f as Price, Q as QueryOrderPaymentRequestsRequest, t as QueryOrderPaymentRequestsResponse, R as RestoreInfo, d as SortOrder, r as Sorting, e as Source, S as Status, x as UpdateExtendedFieldsRequest, m as UpdateOrderPaymentRequestRequest, n as UpdateOrderPaymentRequestResponse, W as WebhookIdentityType } from './ecom-v1-order-payment-request-order-payment-requests.universal-59AOR9bE.js';
2
+ import { C as CreateOrderPaymentRequestOptions, O as OrderPaymentRequest, U as UpdateOrderPaymentRequest, a as OrderPaymentRequestsQueryBuilder, G as GetOrderPaymentRequestURLResponse, b as UpdateExtendedFieldsOptions, c as UpdateExtendedFieldsResponse } from './ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.js';
3
+ export { J as ActionEvent, j as CreateOrderPaymentRequestRequest, k as CreateOrderPaymentRequestResponse, t as CursorPaging, v as CursorPagingMetadata, q as CursorQuery, r as CursorQueryPagingMethodOneOf, w as Cursors, D as DeleteOrderPaymentRequestRequest, p as DeleteOrderPaymentRequestResponse, A as DomainEvent, B as DomainEventBodyOneOf, K as Empty, F as EntityCreatedEvent, I as EntityDeletedEvent, H as EntityUpdatedEvent, E as ExtendedFields, l as GetOrderPaymentRequestRequest, m as GetOrderPaymentRequestResponse, x as GetOrderPaymentRequestURLRequest, L as IdentificationData, N as IdentificationDataIdOneOf, M as MessageEnvelope, h as OrderPaymentRequestExpired, g as OrderPaymentRequestPaid, i as OrderPaymentRequestVoided, T as OrderPaymentRequestsQueryResult, P as PaymentMethod, f as Price, Q as QueryOrderPaymentRequestsRequest, u as QueryOrderPaymentRequestsResponse, R as RestoreInfo, d as SortOrder, s as Sorting, e as Source, S as Status, y as UpdateExtendedFieldsRequest, n as UpdateOrderPaymentRequestRequest, o as UpdateOrderPaymentRequestResponse, V as VoidOrderPaymentRequestRequest, z as VoidOrderPaymentRequestResponse, W as WebhookIdentityType } from './ecom-v1-order-payment-request-order-payment-requests.universal-BpikSM2h.js';
4
4
 
5
5
  declare function createOrderPaymentRequest$1(httpClient: HttpClient): CreateOrderPaymentRequestSignature;
6
6
  interface CreateOrderPaymentRequestSignature {
@@ -35,7 +35,7 @@ interface DeleteOrderPaymentRequestSignature {
35
35
  /**
36
36
  * Deletes a order payment request.
37
37
  *
38
- * Please note that only `UNPAID` payment requests can be deleted.
38
+ * Please note that only `UNPAID` and `VOIDED` payment requests can be deleted.
39
39
  * @param - Id of the OrderPaymentRequest to delete.
40
40
  */
41
41
  (orderPaymentRequestId: string): Promise<void>;
@@ -72,6 +72,16 @@ interface UpdateExtendedFieldsSignature {
72
72
  */
73
73
  (_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
74
74
  }
75
+ declare function voidOrderPaymentRequest$1(httpClient: HttpClient): VoidOrderPaymentRequestSignature;
76
+ interface VoidOrderPaymentRequestSignature {
77
+ /**
78
+ * Voids the given order payment request
79
+ *
80
+ * Please note that only `UNPAID` payment requests can be voided.
81
+ * @param - ID of the order payment request to void.
82
+ */
83
+ (orderPaymentRequestId: string): Promise<void>;
84
+ }
75
85
 
76
86
  declare const createOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof createOrderPaymentRequest$1> & typeof createOrderPaymentRequest$1>;
77
87
  declare const getOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof getOrderPaymentRequest$1> & typeof getOrderPaymentRequest$1>;
@@ -80,5 +90,6 @@ declare const deleteOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof d
80
90
  declare const queryOrderPaymentRequests: MaybeContext<BuildRESTFunction<typeof queryOrderPaymentRequests$1> & typeof queryOrderPaymentRequests$1>;
81
91
  declare const getOrderPaymentRequestUrl: MaybeContext<BuildRESTFunction<typeof getOrderPaymentRequestUrl$1> & typeof getOrderPaymentRequestUrl$1>;
82
92
  declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
93
+ declare const voidOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof voidOrderPaymentRequest$1> & typeof voidOrderPaymentRequest$1>;
83
94
 
84
- export { CreateOrderPaymentRequestOptions, GetOrderPaymentRequestURLResponse, OrderPaymentRequest, OrderPaymentRequestsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateOrderPaymentRequest, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest };
95
+ export { CreateOrderPaymentRequestOptions, GetOrderPaymentRequestURLResponse, OrderPaymentRequest, OrderPaymentRequestsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateOrderPaymentRequest, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest, voidOrderPaymentRequest };
package/build/index.js CHANGED
@@ -30,7 +30,8 @@ __export(index_exports, {
30
30
  getOrderPaymentRequestUrl: () => getOrderPaymentRequestUrl4,
31
31
  queryOrderPaymentRequests: () => queryOrderPaymentRequests4,
32
32
  updateExtendedFields: () => updateExtendedFields4,
33
- updateOrderPaymentRequest: () => updateOrderPaymentRequest4
33
+ updateOrderPaymentRequest: () => updateOrderPaymentRequest4,
34
+ voidOrderPaymentRequest: () => voidOrderPaymentRequest4
34
35
  });
35
36
  module.exports = __toCommonJS(index_exports);
36
37
 
@@ -284,6 +285,22 @@ function updateExtendedFields(payload) {
284
285
  }
285
286
  return __updateExtendedFields;
286
287
  }
288
+ function voidOrderPaymentRequest(payload) {
289
+ function __voidOrderPaymentRequest({ host }) {
290
+ const metadata = {
291
+ entityFqdn: "wix.ecom.v1.order_payment_request",
292
+ method: "POST",
293
+ methodFqn: "wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.VoidOrderPaymentRequest",
294
+ packageName: PACKAGE_NAME,
295
+ url: resolveWixEcomOrderPaymentRequestApiV1OrderPaymentRequestsServiceUrl(
296
+ { protoPath: "/v1/order-payment-requests/void", data: payload, host }
297
+ ),
298
+ data: payload
299
+ };
300
+ return metadata;
301
+ }
302
+ return __voidOrderPaymentRequest;
303
+ }
287
304
 
288
305
  // src/ecom-v1-order-payment-request-order-payment-requests.universal.ts
289
306
  var import_image = require("@wix/sdk-runtime/transformations/image");
@@ -294,6 +311,7 @@ var Status = /* @__PURE__ */ ((Status2) => {
294
311
  Status2["UNPAID"] = "UNPAID";
295
312
  Status2["PAID"] = "PAID";
296
313
  Status2["EXPIRED"] = "EXPIRED";
314
+ Status2["VOIDED"] = "VOIDED";
297
315
  return Status2;
298
316
  })(Status || {});
299
317
  var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
@@ -567,6 +585,30 @@ async function updateExtendedFields2(_id, namespace, options) {
567
585
  throw transformedError;
568
586
  }
569
587
  }
588
+ async function voidOrderPaymentRequest2(orderPaymentRequestId) {
589
+ const { httpClient, sideEffects } = arguments[1];
590
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
591
+ orderPaymentRequestId
592
+ });
593
+ const reqOpts = voidOrderPaymentRequest(payload);
594
+ sideEffects?.onSiteCall?.();
595
+ try {
596
+ const result = await httpClient.request(reqOpts);
597
+ sideEffects?.onSuccess?.(result);
598
+ } catch (err) {
599
+ const transformedError = (0, import_transform_error.transformError)(
600
+ err,
601
+ {
602
+ spreadPathsToArguments: {},
603
+ explicitPathsToArguments: { orderPaymentRequestId: "$[0]" },
604
+ singleArgumentUnchanged: false
605
+ },
606
+ ["orderPaymentRequestId"]
607
+ );
608
+ sideEffects?.onError?.(err);
609
+ throw transformedError;
610
+ }
611
+ }
570
612
 
571
613
  // src/ecom-v1-order-payment-request-order-payment-requests.public.ts
572
614
  function createOrderPaymentRequest3(httpClient) {
@@ -620,6 +662,13 @@ function updateExtendedFields3(httpClient) {
620
662
  { httpClient }
621
663
  );
622
664
  }
665
+ function voidOrderPaymentRequest3(httpClient) {
666
+ return (orderPaymentRequestId) => voidOrderPaymentRequest2(
667
+ orderPaymentRequestId,
668
+ // @ts-ignore
669
+ { httpClient }
670
+ );
671
+ }
623
672
 
624
673
  // src/ecom-v1-order-payment-request-order-payment-requests.context.ts
625
674
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
@@ -630,6 +679,7 @@ var deleteOrderPaymentRequest4 = /* @__PURE__ */ (0, import_rest_modules3.create
630
679
  var queryOrderPaymentRequests4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryOrderPaymentRequests3);
631
680
  var getOrderPaymentRequestUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getOrderPaymentRequestUrl3);
632
681
  var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateExtendedFields3);
682
+ var voidOrderPaymentRequest4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(voidOrderPaymentRequest3);
633
683
  // Annotate the CommonJS export names for ESM import in node:
634
684
  0 && (module.exports = {
635
685
  PaymentMethod,
@@ -642,6 +692,7 @@ var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTM
642
692
  getOrderPaymentRequestUrl,
643
693
  queryOrderPaymentRequests,
644
694
  updateExtendedFields,
645
- updateOrderPaymentRequest
695
+ updateOrderPaymentRequest,
696
+ voidOrderPaymentRequest
646
697
  });
647
698
  //# sourceMappingURL=index.js.map