@wix/ecom 1.0.504 → 1.0.505

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 (195) hide show
  1. package/build/cjs/context.d.ts +15 -0
  2. package/build/cjs/context.js +16 -1
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +1 -1
  5. package/build/cjs/index.js +2 -2
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/index.typings.d.ts +1 -1
  8. package/build/cjs/index.typings.js +2 -2
  9. package/build/cjs/index.typings.js.map +1 -1
  10. package/build/cjs/meta.d.ts +1 -1
  11. package/build/cjs/meta.js +2 -2
  12. package/build/cjs/meta.js.map +1 -1
  13. package/build/cjs/src/ecom-discounts-v1-discount-rule.context.d.ts +7 -0
  14. package/build/cjs/src/ecom-discounts-v1-discount-rule.context.js +60 -0
  15. package/build/cjs/src/ecom-discounts-v1-discount-rule.context.js.map +1 -0
  16. package/build/cjs/src/ecom-orders-v1-invoice.context.d.ts +3 -0
  17. package/build/cjs/src/ecom-orders-v1-invoice.context.js +16 -0
  18. package/build/cjs/src/ecom-orders-v1-invoice.context.js.map +1 -0
  19. package/build/cjs/src/ecom-recommendations-v1-recommendation.context.d.ts +4 -0
  20. package/build/cjs/src/ecom-recommendations-v1-recommendation.context.js +27 -0
  21. package/build/cjs/src/ecom-recommendations-v1-recommendation.context.js.map +1 -0
  22. package/build/cjs/src/ecom-v1-abandoned-checkout.context.d.ts +3 -0
  23. package/build/cjs/src/ecom-v1-abandoned-checkout.context.js +16 -0
  24. package/build/cjs/src/ecom-v1-abandoned-checkout.context.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-back-in-stock-notification-request.context.d.ts +9 -0
  26. package/build/cjs/src/ecom-v1-back-in-stock-notification-request.context.js +82 -0
  27. package/build/cjs/src/ecom-v1-back-in-stock-notification-request.context.js.map +1 -0
  28. package/build/cjs/src/ecom-v1-back-in-stock-settings.context.d.ts +5 -0
  29. package/build/cjs/src/ecom-v1-back-in-stock-settings.context.js +38 -0
  30. package/build/cjs/src/ecom-v1-back-in-stock-settings.context.js.map +1 -0
  31. package/build/cjs/src/ecom-v1-cart-cart.context.d.ts +12 -0
  32. package/build/cjs/src/ecom-v1-cart-cart.context.js +115 -0
  33. package/build/cjs/src/ecom-v1-cart-cart.context.js.map +1 -0
  34. package/build/cjs/src/ecom-v1-cart-cart.http.d.ts +1 -1
  35. package/build/cjs/src/ecom-v1-cart-cart.http.js +1 -1
  36. package/build/cjs/src/ecom-v1-cart-cart.types.d.ts +0 -2
  37. package/build/cjs/src/ecom-v1-cart-cart.types.js.map +1 -1
  38. package/build/cjs/src/ecom-v1-cart-cart.universal.d.ts +15 -3
  39. package/build/cjs/src/ecom-v1-cart-cart.universal.js +15 -1
  40. package/build/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -1
  41. package/build/cjs/src/ecom-v1-cart-current-cart.context.d.ts +11 -0
  42. package/build/cjs/src/ecom-v1-cart-current-cart.context.js +104 -0
  43. package/build/cjs/src/ecom-v1-cart-current-cart.context.js.map +1 -0
  44. package/build/cjs/src/ecom-v1-cart-current-cart.http.d.ts +2 -2
  45. package/build/cjs/src/ecom-v1-cart-current-cart.http.js +2 -2
  46. package/build/cjs/src/ecom-v1-cart-current-cart.types.d.ts +0 -2
  47. package/build/cjs/src/ecom-v1-cart-current-cart.types.js.map +1 -1
  48. package/build/cjs/src/ecom-v1-cart-current-cart.universal.d.ts +13 -3
  49. package/build/cjs/src/ecom-v1-cart-current-cart.universal.js +13 -1
  50. package/build/cjs/src/ecom-v1-cart-current-cart.universal.js.map +1 -1
  51. package/build/cjs/src/ecom-v1-checkout-checkout.context.d.ts +14 -0
  52. package/build/cjs/src/ecom-v1-checkout-checkout.context.js +137 -0
  53. package/build/cjs/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  54. package/build/cjs/src/ecom-v1-checkout-checkout.types.d.ts +0 -2
  55. package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -1
  56. package/build/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +0 -2
  57. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  58. package/build/cjs/src/ecom-v1-checkout-settings.context.d.ts +4 -0
  59. package/build/cjs/src/ecom-v1-checkout-settings.context.js +27 -0
  60. package/build/cjs/src/ecom-v1-checkout-settings.context.js.map +1 -0
  61. package/build/cjs/src/ecom-v1-checkout-settings.public.d.ts +1 -1
  62. package/build/cjs/src/ecom-v1-checkout-settings.types.d.ts +48 -8
  63. package/build/cjs/src/ecom-v1-checkout-settings.universal.d.ts +50 -9
  64. package/build/cjs/src/ecom-v1-checkout-settings.universal.js.map +1 -1
  65. package/build/cjs/src/ecom-v1-checkout-template.context.d.ts +8 -0
  66. package/build/cjs/src/ecom-v1-checkout-template.context.js +71 -0
  67. package/build/cjs/src/ecom-v1-checkout-template.context.js.map +1 -0
  68. package/build/cjs/src/ecom-v1-checkout-template.types.d.ts +0 -2
  69. package/build/cjs/src/ecom-v1-checkout-template.types.js.map +1 -1
  70. package/build/cjs/src/ecom-v1-checkout-template.universal.d.ts +12 -2
  71. package/build/cjs/src/ecom-v1-checkout-template.universal.js +12 -0
  72. package/build/cjs/src/ecom-v1-checkout-template.universal.js.map +1 -1
  73. package/build/cjs/src/ecom-v1-fulfillments.context.d.ts +8 -0
  74. package/build/cjs/src/ecom-v1-fulfillments.context.js +71 -0
  75. package/build/cjs/src/ecom-v1-fulfillments.context.js.map +1 -0
  76. package/build/cjs/src/ecom-v1-order-transactions.context.d.ts +7 -0
  77. package/build/cjs/src/ecom-v1-order-transactions.context.js +60 -0
  78. package/build/cjs/src/ecom-v1-order-transactions.context.js.map +1 -0
  79. package/build/cjs/src/ecom-v1-order-transactions.http.js +3 -25
  80. package/build/cjs/src/ecom-v1-order-transactions.http.js.map +1 -1
  81. package/build/cjs/src/ecom-v1-order.context.d.ts +7 -0
  82. package/build/cjs/src/ecom-v1-order.context.js +60 -0
  83. package/build/cjs/src/ecom-v1-order.context.js.map +1 -0
  84. package/build/cjs/src/ecom-v1-order.http.js +6 -16
  85. package/build/cjs/src/ecom-v1-order.http.js.map +1 -1
  86. package/build/cjs/src/ecom-v1-order.public.d.ts +26 -2
  87. package/build/cjs/src/ecom-v1-order.public.js +8 -8
  88. package/build/cjs/src/ecom-v1-order.public.js.map +1 -1
  89. package/build/cjs/src/ecom-v1-order.types.d.ts +1063 -996
  90. package/build/cjs/src/ecom-v1-order.types.js +61 -61
  91. package/build/cjs/src/ecom-v1-order.types.js.map +1 -1
  92. package/build/cjs/src/ecom-v1-order.universal.d.ts +1066 -997
  93. package/build/cjs/src/ecom-v1-order.universal.js +61 -61
  94. package/build/cjs/src/ecom-v1-order.universal.js.map +1 -1
  95. package/build/cjs/src/ecom-v1-orders-settings.context.d.ts +4 -0
  96. package/build/cjs/src/ecom-v1-orders-settings.context.js +27 -0
  97. package/build/cjs/src/ecom-v1-orders-settings.context.js.map +1 -0
  98. package/build/es/context.d.ts +15 -0
  99. package/build/es/context.js +15 -0
  100. package/build/es/context.js.map +1 -1
  101. package/build/es/index.d.ts +1 -1
  102. package/build/es/index.js +1 -1
  103. package/build/es/index.js.map +1 -1
  104. package/build/es/index.typings.d.ts +1 -1
  105. package/build/es/index.typings.js +1 -1
  106. package/build/es/index.typings.js.map +1 -1
  107. package/build/es/meta.d.ts +1 -1
  108. package/build/es/meta.js +1 -1
  109. package/build/es/meta.js.map +1 -1
  110. package/build/es/src/ecom-discounts-v1-discount-rule.context.d.ts +7 -0
  111. package/build/es/src/ecom-discounts-v1-discount-rule.context.js +52 -0
  112. package/build/es/src/ecom-discounts-v1-discount-rule.context.js.map +1 -0
  113. package/build/es/src/ecom-orders-v1-invoice.context.d.ts +3 -0
  114. package/build/es/src/ecom-orders-v1-invoice.context.js +12 -0
  115. package/build/es/src/ecom-orders-v1-invoice.context.js.map +1 -0
  116. package/build/es/src/ecom-recommendations-v1-recommendation.context.d.ts +4 -0
  117. package/build/es/src/ecom-recommendations-v1-recommendation.context.js +22 -0
  118. package/build/es/src/ecom-recommendations-v1-recommendation.context.js.map +1 -0
  119. package/build/es/src/ecom-v1-abandoned-checkout.context.d.ts +3 -0
  120. package/build/es/src/ecom-v1-abandoned-checkout.context.js +12 -0
  121. package/build/es/src/ecom-v1-abandoned-checkout.context.js.map +1 -0
  122. package/build/es/src/ecom-v1-back-in-stock-notification-request.context.d.ts +9 -0
  123. package/build/es/src/ecom-v1-back-in-stock-notification-request.context.js +72 -0
  124. package/build/es/src/ecom-v1-back-in-stock-notification-request.context.js.map +1 -0
  125. package/build/es/src/ecom-v1-back-in-stock-settings.context.d.ts +5 -0
  126. package/build/es/src/ecom-v1-back-in-stock-settings.context.js +32 -0
  127. package/build/es/src/ecom-v1-back-in-stock-settings.context.js.map +1 -0
  128. package/build/es/src/ecom-v1-cart-cart.context.d.ts +12 -0
  129. package/build/es/src/ecom-v1-cart-cart.context.js +102 -0
  130. package/build/es/src/ecom-v1-cart-cart.context.js.map +1 -0
  131. package/build/es/src/ecom-v1-cart-cart.http.d.ts +1 -1
  132. package/build/es/src/ecom-v1-cart-cart.http.js +1 -1
  133. package/build/es/src/ecom-v1-cart-cart.types.d.ts +0 -2
  134. package/build/es/src/ecom-v1-cart-cart.types.js.map +1 -1
  135. package/build/es/src/ecom-v1-cart-cart.universal.d.ts +15 -3
  136. package/build/es/src/ecom-v1-cart-cart.universal.js +15 -1
  137. package/build/es/src/ecom-v1-cart-cart.universal.js.map +1 -1
  138. package/build/es/src/ecom-v1-cart-current-cart.context.d.ts +11 -0
  139. package/build/es/src/ecom-v1-cart-current-cart.context.js +92 -0
  140. package/build/es/src/ecom-v1-cart-current-cart.context.js.map +1 -0
  141. package/build/es/src/ecom-v1-cart-current-cart.http.d.ts +2 -2
  142. package/build/es/src/ecom-v1-cart-current-cart.http.js +2 -2
  143. package/build/es/src/ecom-v1-cart-current-cart.types.d.ts +0 -2
  144. package/build/es/src/ecom-v1-cart-current-cart.types.js.map +1 -1
  145. package/build/es/src/ecom-v1-cart-current-cart.universal.d.ts +13 -3
  146. package/build/es/src/ecom-v1-cart-current-cart.universal.js +13 -1
  147. package/build/es/src/ecom-v1-cart-current-cart.universal.js.map +1 -1
  148. package/build/es/src/ecom-v1-checkout-checkout.context.d.ts +14 -0
  149. package/build/es/src/ecom-v1-checkout-checkout.context.js +122 -0
  150. package/build/es/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  151. package/build/es/src/ecom-v1-checkout-checkout.types.d.ts +0 -2
  152. package/build/es/src/ecom-v1-checkout-checkout.types.js.map +1 -1
  153. package/build/es/src/ecom-v1-checkout-checkout.universal.d.ts +0 -2
  154. package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  155. package/build/es/src/ecom-v1-checkout-settings.context.d.ts +4 -0
  156. package/build/es/src/ecom-v1-checkout-settings.context.js +22 -0
  157. package/build/es/src/ecom-v1-checkout-settings.context.js.map +1 -0
  158. package/build/es/src/ecom-v1-checkout-settings.public.d.ts +1 -1
  159. package/build/es/src/ecom-v1-checkout-settings.types.d.ts +48 -8
  160. package/build/es/src/ecom-v1-checkout-settings.universal.d.ts +50 -9
  161. package/build/es/src/ecom-v1-checkout-settings.universal.js.map +1 -1
  162. package/build/es/src/ecom-v1-checkout-template.context.d.ts +8 -0
  163. package/build/es/src/ecom-v1-checkout-template.context.js +62 -0
  164. package/build/es/src/ecom-v1-checkout-template.context.js.map +1 -0
  165. package/build/es/src/ecom-v1-checkout-template.types.d.ts +0 -2
  166. package/build/es/src/ecom-v1-checkout-template.types.js.map +1 -1
  167. package/build/es/src/ecom-v1-checkout-template.universal.d.ts +12 -2
  168. package/build/es/src/ecom-v1-checkout-template.universal.js +12 -0
  169. package/build/es/src/ecom-v1-checkout-template.universal.js.map +1 -1
  170. package/build/es/src/ecom-v1-fulfillments.context.d.ts +8 -0
  171. package/build/es/src/ecom-v1-fulfillments.context.js +62 -0
  172. package/build/es/src/ecom-v1-fulfillments.context.js.map +1 -0
  173. package/build/es/src/ecom-v1-order-transactions.context.d.ts +7 -0
  174. package/build/es/src/ecom-v1-order-transactions.context.js +52 -0
  175. package/build/es/src/ecom-v1-order-transactions.context.js.map +1 -0
  176. package/build/es/src/ecom-v1-order-transactions.http.js +3 -25
  177. package/build/es/src/ecom-v1-order-transactions.http.js.map +1 -1
  178. package/build/es/src/ecom-v1-order.context.d.ts +7 -0
  179. package/build/es/src/ecom-v1-order.context.js +52 -0
  180. package/build/es/src/ecom-v1-order.context.js.map +1 -0
  181. package/build/es/src/ecom-v1-order.http.js +6 -16
  182. package/build/es/src/ecom-v1-order.http.js.map +1 -1
  183. package/build/es/src/ecom-v1-order.public.d.ts +26 -2
  184. package/build/es/src/ecom-v1-order.public.js +1 -1
  185. package/build/es/src/ecom-v1-order.public.js.map +1 -1
  186. package/build/es/src/ecom-v1-order.types.d.ts +1063 -996
  187. package/build/es/src/ecom-v1-order.types.js +60 -60
  188. package/build/es/src/ecom-v1-order.types.js.map +1 -1
  189. package/build/es/src/ecom-v1-order.universal.d.ts +1066 -997
  190. package/build/es/src/ecom-v1-order.universal.js +60 -60
  191. package/build/es/src/ecom-v1-order.universal.js.map +1 -1
  192. package/build/es/src/ecom-v1-orders-settings.context.d.ts +4 -0
  193. package/build/es/src/ecom-v1-orders-settings.context.js +22 -0
  194. package/build/es/src/ecom-v1-orders-settings.context.js.map +1 -0
  195. package/package.json +2 -2
@@ -120,6 +120,8 @@ export interface Order {
120
120
  * + No shipping option is selected.
121
121
  */
122
122
  recipientInfo?: AddressWithContact;
123
+ /** Tag ids collections associated with current entity. private_tags requires separate permissions to be accessible and modifiable. */
124
+ tags?: Tags;
123
125
  }
124
126
  export interface OrderLineItem {
125
127
  /** Line item ID. */
@@ -1107,6 +1109,38 @@ export interface ExtendedFields {
1107
1109
  */
1108
1110
  namespaces?: Record<string, Record<string, any>>;
1109
1111
  }
1112
+ /**
1113
+ * Common object for tags.
1114
+ * Should be use as in this example:
1115
+ * message Foo {
1116
+ * string id = 1;
1117
+ * ...
1118
+ * Tags tags = 5
1119
+ * }
1120
+ *
1121
+ * example of taggable entity
1122
+ * {
1123
+ * id: "123"
1124
+ * tags: {
1125
+ * tags: {
1126
+ * tag_ids:["11","22"]
1127
+ * },
1128
+ * private_tags: {
1129
+ * tag_ids: ["33", "44"]
1130
+ * }
1131
+ * }
1132
+ * }
1133
+ */
1134
+ export interface Tags {
1135
+ /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
1136
+ privateTags?: TagList;
1137
+ /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
1138
+ tags?: TagList;
1139
+ }
1140
+ export interface TagList {
1141
+ /** List of tag IDs */
1142
+ tagIds?: string[];
1143
+ }
1110
1144
  export interface TriggerReindexWithConsistencyRequest {
1111
1145
  metasiteId?: string;
1112
1146
  orderId?: string;
@@ -2002,827 +2036,644 @@ export interface PreviewResendDownloadLinksEmailRequest {
2002
2036
  export interface PreviewResendDownloadLinksEmailResponse {
2003
2037
  emailPreview?: string;
2004
2038
  }
2005
- export interface InvoicePaidEvent {
2006
- id?: IdAndVersion;
2007
- /** @readonly */
2008
- data?: InvoiceFields;
2009
- /** @readonly */
2010
- status?: InvoiceStatus;
2011
- }
2012
- export interface IdAndVersion {
2013
- id?: string | null;
2014
- version?: number | null;
2015
- }
2016
- export interface InvoiceFields {
2017
- /** The invoice number allocated the invoice by the server. The number is limited to at most 11 digits. */
2018
- number?: string | null;
2019
- /** The invoice 3-letter currency code in [ISO-4217 alphabetic](https://www.iso.org/iso-4217-currency-codes.html) format. */
2020
- currencyCode?: string | null;
2021
- /** The invoice customer. The customer must be a contact of the site, with an email. */
2022
- customer?: Customer;
2023
- /**
2024
- * Invoice dates: issue date and due date are mandatory and provided when the invoice is created.
2025
- * Last seen date is the optional date when the invoice was last seen be UoU.
2026
- */
2027
- dates?: InvoiceDates;
2028
- /**
2029
- * Line items containing the details of the products or services relevant to the invoice, with their name, prices,
2030
- * and quantity. There must be at least one line item on the invoice.
2031
- */
2032
- lineItems?: LineItems;
2033
- /**
2034
- * Locale of the invoice, containing the language.
2035
- * This field is not mandatory but is used for display purposes, to determine the appearance of numbers and dates
2036
- * on the invoice.
2037
- */
2038
- locale?: Locale;
2039
- /**
2040
- * The totals on the invoice.
2041
- * The totals.subtotal, totals.total and totals.taxed_amount are calculated by the server based on the line items.
2042
- * Alternatively, these fields can be provided in the invoice creation request, in this case, these values are fixed.
2043
- * The totals contain fees and a discount, that apply to the invoice.
2044
- */
2045
- totals?: TotalPrice;
2046
- /** An optional discount on the invoice. */
2047
- discount?: Discount;
2048
- /** The taxes of the invoice. */
2049
- taxes?: CalculatedTaxes;
2050
- /** The payments on the invoice. The invoice has status paid if its payments cover the invoice total. */
2051
- payments?: Payments;
2052
- /** Invoice metadata */
2053
- metaData?: MetaData;
2054
- /** Not used */
2055
- creationAdditional_BIInformation?: string | null;
2039
+ export interface PreparePaymentCollectionRequest {
2040
+ /** Ecom order ID. */
2041
+ ecomOrderId?: string;
2042
+ /** Amount to collect */
2043
+ amount?: Price;
2056
2044
  /**
2057
- * The balance and amount paid on the invoice.
2058
- * This read-only field is calculated based on the invoice totals and payments.
2059
- * @readonly
2045
+ * Optional parameter. When present, payment collection will be performed using given payment gateway order.
2046
+ * Existing payment gateway order will be updated with a new amount.
2047
+ * When parameter is absent, new payment gateway order will be created and used for payment collection.
2060
2048
  */
2061
- dynamicTotals?: InvoiceDynamicPriceTotals;
2062
- /** The invoice title */
2063
- title?: string | null;
2064
- /** Invoice custom fields */
2065
- customFields?: CustomFieldValue[];
2066
- /** Not used */
2067
- designTemplateId?: string | null;
2068
- /** Not used */
2069
- createOrder?: boolean | null;
2070
- /** The optional deposit of the invoice */
2071
- deposit?: Deposit;
2072
- /** associated checkout for this invoice */
2073
- ecomCheckoutId?: string | null;
2074
- }
2075
- export interface Customer {
2076
- contactId?: string | null;
2077
- name?: string | null;
2078
- email?: Email;
2079
- address?: QuotesAddress;
2080
- phone?: Phone;
2081
- company?: Company;
2082
- firstName?: string | null;
2083
- lastName?: string | null;
2084
- billingAddress?: CommonAddress;
2085
- shippingAddress?: CommonAddress;
2049
+ paymentGatewayOrderId?: string | null;
2086
2050
  }
2087
- export interface Email {
2088
- address?: string;
2051
+ export interface PreparePaymentCollectionResponse {
2052
+ /** Payment gateway order id which is associated with given payment */
2053
+ paymentGatewayOrderId?: string;
2089
2054
  }
2090
- export interface QuotesAddress {
2091
- street?: string | null;
2092
- city?: string | null;
2093
- zip?: string | null;
2094
- state?: string | null;
2095
- country?: string | null;
2096
- /** @readonly */
2097
- description?: AddressDescription;
2055
+ export interface GetPaymentCollectabilityStatusRequest {
2056
+ /** Ecom order ID. */
2057
+ ecomOrderId?: string;
2098
2058
  }
2099
- export interface AddressDescription {
2100
- content?: string;
2101
- placement?: Placement;
2059
+ export interface GetPaymentCollectabilityStatusResponse {
2060
+ /** Payment collectability status */
2061
+ status?: PaymentCollectabilityStatus;
2062
+ /** Collectable order amount */
2063
+ amount?: Price;
2102
2064
  }
2103
- export declare enum Placement {
2104
- Unknown = "Unknown",
2105
- Replace = "Replace",
2106
- Before = "Before",
2107
- After = "After"
2065
+ export declare enum PaymentCollectabilityStatus {
2066
+ UNKNOWN = "UNKNOWN",
2067
+ COLLECTABLE = "COLLECTABLE",
2068
+ NONCOLLECTABLE_ORDER_IS_CANCELLED = "NONCOLLECTABLE_ORDER_IS_CANCELLED",
2069
+ NONCOLLECTABLE_ORDER_IS_PAID = "NONCOLLECTABLE_ORDER_IS_PAID",
2070
+ NONCOLLECTABLE_MISSING_PAYMENT_METHOD = "NONCOLLECTABLE_MISSING_PAYMENT_METHOD"
2108
2071
  }
2109
- export interface Phone {
2110
- number?: string;
2072
+ export interface RecordManuallyCollectedPaymentRequest {
2073
+ /** Order ID. */
2074
+ orderId?: string;
2075
+ /** Amount to be recorded as approved manual payment for given order */
2076
+ amount?: Price;
2111
2077
  }
2112
- export interface Company {
2113
- name?: string;
2114
- id?: string | null;
2078
+ export interface RecordManuallyCollectedPaymentResponse {
2115
2079
  }
2116
- /** Physical address */
2117
- export interface CommonAddress extends CommonAddressStreetOneOf {
2118
- /** Street name and number. */
2119
- streetAddress?: StreetAddress;
2120
- /** Main address line, usually street and number as free text. */
2121
- addressLine?: string | null;
2122
- /** Country code. */
2123
- country?: string | null;
2124
- /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
2125
- subdivision?: string | null;
2126
- /** City name. */
2127
- city?: string | null;
2128
- /** Zip/postal code. */
2129
- postalCode?: string | null;
2130
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
2131
- addressLine2?: string | null;
2080
+ export interface V1MarkOrderAsPaidRequest {
2081
+ /** Ecom order ID. */
2082
+ ecomOrderId?: string;
2132
2083
  }
2133
- /** @oneof */
2134
- export interface CommonAddressStreetOneOf {
2135
- /** Street name and number. */
2136
- streetAddress?: StreetAddress;
2137
- /** Main address line, usually street and number as free text. */
2138
- addressLine?: string | null;
2084
+ export interface V1MarkOrderAsPaidResponse {
2085
+ /** Updated order. */
2086
+ order?: Order;
2139
2087
  }
2140
- export interface Subdivision {
2141
- /** Short subdivision code. */
2142
- code?: string;
2143
- /** Subdivision full name. */
2144
- name?: string;
2088
+ /** Triggered when the payment status of an order is updated */
2089
+ export interface PaymentStatusUpdated {
2090
+ /** The order that was updated */
2091
+ order?: Order;
2092
+ /** The previous status (before the update) */
2093
+ previousPaymentStatus?: PaymentStatus;
2145
2094
  }
2146
- export declare enum SubdivisionType {
2147
- UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
2148
- /** State */
2149
- ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
2150
- /** County */
2151
- ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
2152
- /** City/town */
2153
- ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
2154
- /** Neighborhood/quarter */
2155
- ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
2156
- /** Street/block */
2157
- ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
2158
- /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
2159
- COUNTRY = "COUNTRY"
2095
+ export interface V1BulkMarkOrdersAsPaidRequest {
2096
+ /** IDs of orders to mark as paid. */
2097
+ ecomOrderIds?: string[];
2160
2098
  }
2161
- export interface InvoiceDates {
2162
- /** use UTC midnight date to set the issue date according to the site time zone */
2163
- issueDate?: Date;
2164
- /** use UTC midnight date to set the due date according to the site time zone */
2165
- dueDate?: Date;
2166
- /** <a href="http://joda-time.sourceforge.net/timezones.html">Valid time zones</a> */
2167
- timeZoneCode?: string | null;
2099
+ export interface V1BulkMarkOrdersAsPaidResponse {
2168
2100
  /**
2169
- * ignored in request use in response to get the site time zone
2170
- * @readonly
2101
+ * Items updated by the bulk action.
2102
+ * The Order entity within the results optimistically changes its payment status to paid, however this process is async.
2171
2103
  */
2172
- lastSeenDate?: Date;
2173
- }
2174
- export interface LineItems {
2175
- lineItems?: LineItem[];
2104
+ results?: BulkOrderResult[];
2105
+ /** Bulk action metadata. */
2106
+ bulkActionMetadata?: BulkActionMetadata;
2176
2107
  }
2177
- export interface LineItem {
2178
- id?: string;
2179
- name?: string;
2180
- description?: string | null;
2181
- price?: BigDecimalWrapper;
2182
- taxedTotal?: BigDecimalWrapper;
2183
- quantity?: BigDecimalWrapper;
2184
- taxes?: LineItemTax[];
2185
- /** The source of the line item */
2186
- source?: Source;
2187
- /** The line-item level metadata. */
2188
- metadata?: LineItemMetaData;
2108
+ export interface BulkOrderResult {
2109
+ /** Item metadata. */
2110
+ itemMetadata?: ItemMetadata;
2111
+ /** Updated item. Optional - returned only if requested with `return_full_entity` set to `true`. */
2112
+ item?: Order;
2189
2113
  }
2190
- export interface BigDecimalWrapper {
2191
- serializedValue?: number;
2114
+ export interface ItemMetadata {
2115
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
2116
+ id?: string | null;
2117
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
2118
+ originalIndex?: number;
2119
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
2120
+ success?: boolean;
2121
+ /** Details about the error in case of failure. */
2122
+ error?: ApplicationError;
2192
2123
  }
2193
- export interface LineItemTax {
2194
- name?: string;
2195
- rate?: BigDecimalWrapper;
2196
- code?: string | null;
2124
+ export interface ApplicationError {
2125
+ /** Error code. */
2126
+ code?: string;
2127
+ /** Description of the error. */
2128
+ description?: string;
2129
+ /** Data related to the error. */
2130
+ data?: Record<string, any> | null;
2197
2131
  }
2198
- export interface Source {
2199
- /**
2200
- * Source app or service ID.
2201
- * @readonly
2202
- */
2203
- sourceId?: string;
2204
- /**
2205
- * App or service type.
2206
- * @readonly
2207
- */
2208
- sourceType?: SourceType;
2132
+ export interface BulkActionMetadata {
2133
+ /** Number of items that were successfully processed. */
2134
+ totalSuccesses?: number;
2135
+ /** Number of items that couldn't be processed. */
2136
+ totalFailures?: number;
2137
+ /** Number of failures without details because detailed failure threshold was exceeded. */
2138
+ undetailedFailures?: number;
2209
2139
  }
2210
- export declare enum SourceType {
2211
- UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
2212
- WIX_APP = "WIX_APP",
2213
- EXTERNAL = "EXTERNAL",
2214
- ADMIN = "ADMIN",
2215
- OTHER = "OTHER"
2140
+ export interface GetRefundabilityStatusRequest {
2141
+ /** Order ID. */
2142
+ ecomOrderId?: string;
2216
2143
  }
2217
- export interface LineItemMetaData {
2218
- metadata?: Record<string, string>;
2144
+ export interface GetRefundabilityStatusResponse {
2145
+ /** Refundability details. */
2146
+ refundabilities?: Refundability[];
2147
+ /** Whether the order supports refunding per item. */
2148
+ refundablePerItem?: boolean;
2219
2149
  }
2220
- export interface Locale {
2221
- /** ISO 639 alpha-2 or alpha-3 language code, or a language subtag */
2222
- language?: string;
2223
- /** An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code. */
2224
- country?: string | null;
2225
- invariant?: string | null;
2150
+ export interface Refundability extends RefundabilityAdditionalRefundabilityInfoOneOf {
2151
+ /** Reason why payment is not refundable. */
2152
+ nonRefundableReason?: NonRefundableReason;
2153
+ /** Reason why payment is only refundable manually. */
2154
+ manuallyRefundableReason?: ManuallyRefundableReason;
2155
+ /** Payment ID. */
2156
+ paymentId?: string;
2157
+ /** Payment refundability status. */
2158
+ refundabilityStatus?: RefundableStatus;
2159
+ /** Link to payment provider dashboard. */
2160
+ providerLink?: string | null;
2226
2161
  }
2227
- export interface TotalPrice {
2228
- /** the subtotal of the line items without the tax reduction */
2229
- subtotal?: BigDecimalWrapper;
2230
- /** the total price taking into account the itemized fees and the taxes */
2231
- total?: BigDecimalWrapper;
2232
- fees?: ItemizedFee[];
2233
- discountAmount?: BigDecimalWrapper;
2234
- taxedAmount?: BigDecimalWrapper;
2162
+ /** @oneof */
2163
+ export interface RefundabilityAdditionalRefundabilityInfoOneOf {
2164
+ /** Reason why payment is not refundable. */
2165
+ nonRefundableReason?: NonRefundableReason;
2166
+ /** Reason why payment is only refundable manually. */
2167
+ manuallyRefundableReason?: ManuallyRefundableReason;
2235
2168
  }
2236
- export interface ItemizedFee {
2237
- name?: string;
2238
- price?: BigDecimalWrapper;
2169
+ export declare enum RefundableStatus {
2170
+ NOT_REFUNDABLE = "NOT_REFUNDABLE",
2171
+ MANUAL = "MANUAL",
2172
+ REFUNDABLE = "REFUNDABLE"
2239
2173
  }
2240
- export interface Discount extends DiscountOneDiscountTypeOneOf {
2241
- /** Discount as percentage value. */
2242
- percentage?: BigDecimalWrapper;
2174
+ export declare enum NonRefundableReason {
2175
+ NONE = "NONE",
2176
+ ALREADY_REFUNDED = "ALREADY_REFUNDED",
2177
+ PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN",
2178
+ INTERNAL_ERROR = "INTERNAL_ERROR",
2179
+ NOT_PAID = "NOT_PAID",
2180
+ ACCESS_DENIED = "ACCESS_DENIED",
2181
+ ZERO_PRICE = "ZERO_PRICE",
2182
+ DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER",
2183
+ PENDING_REFUND = "PENDING_REFUND",
2184
+ FORBIDDEN = "FORBIDDEN",
2185
+ TRANSACTION_NOT_FOUND = "TRANSACTION_NOT_FOUND"
2243
2186
  }
2244
- /** @oneof */
2245
- export interface DiscountOneDiscountTypeOneOf {
2246
- /** Discount as percentage value. */
2247
- percentage?: BigDecimalWrapper;
2187
+ export declare enum ManuallyRefundableReason {
2188
+ EXPIRED = "EXPIRED",
2189
+ NOT_SUPPORTED = "NOT_SUPPORTED",
2190
+ OFFLINE = "OFFLINE"
2248
2191
  }
2249
- export interface CalculatedTaxes {
2250
- /** consider calculated or not - cannot enforce set */
2251
- taxes?: CalculatedTax[];
2192
+ export interface V1CreatePaymentGatewayOrderRequest {
2193
+ /** Ecom order ID. */
2194
+ ecomOrderId?: string;
2195
+ /** Information about the user who initiated the payment. */
2196
+ chargedBy?: ChargedBy;
2252
2197
  }
2253
- export interface CalculatedTax {
2254
- name?: string;
2255
- rate?: BigDecimalWrapper;
2256
- /** the costs on which the taxes are applied */
2257
- taxable?: BigDecimalWrapper;
2258
- /** the taxes as a result of the */
2259
- taxed?: BigDecimalWrapper;
2260
- code?: string | null;
2198
+ export interface ChargedBy {
2199
+ /** ID - id of the user who initiated the payment */
2200
+ id?: string;
2201
+ /** Full name - name of the user who initiated the payment */
2202
+ fullName?: string | null;
2261
2203
  }
2262
- export interface Payments {
2263
- payments?: Payment[];
2204
+ export interface V1CreatePaymentGatewayOrderResponse {
2205
+ /** ID of the order created in the payment gateway */
2206
+ paymentGatewayOrderId?: string;
2264
2207
  }
2265
- export interface Payment {
2266
- /** document */
2267
- id?: string;
2268
- type?: string;
2269
- amount?: BigDecimalWrapper;
2270
- date?: Date;
2208
+ export interface ChargeMembershipsRequest {
2209
+ /** Order ID. */
2210
+ ecomOrderId?: string;
2271
2211
  /**
2272
- * The orderId of the order in cashier associated with the payment.
2273
- * This field is populated for external payments that are charged by invoices via AddPayment endpoint.
2212
+ * The member id. Do not attempt to get it from the request context, since in some cases the caller is not a member
2213
+ * but a user which is using the membership on behalf of the a member
2274
2214
  */
2275
- orderId?: string | null;
2215
+ memberId?: string;
2216
+ /** List of items to be paid by memberships */
2217
+ membershipCharges?: MembershipChargeItem[];
2218
+ }
2219
+ export interface MembershipChargeItem {
2220
+ /** The id of used membership */
2221
+ membershipId?: string;
2222
+ /** ID of the application providing this payment option */
2223
+ appId?: string;
2224
+ /** The name of used membership */
2225
+ membershipName?: MembershipName;
2226
+ /** Additional data about this membership */
2227
+ membershipAdditionalData?: Record<string, any> | null;
2228
+ /** Catalog and item reference info. */
2229
+ catalogReference?: CatalogReference;
2230
+ /** Properties of the service. When relevant, contains information such as date and number of participants. */
2231
+ serviceProperties?: ServiceProperties;
2276
2232
  /**
2277
- * The transactionId corresponding to the orderId of the payment which are returned by cashier.
2278
- * This field is populated for external payments that are charged by invoices via AddPayment endpoint as well.
2233
+ * Usually would be the same as catalogReference.catalogItemId
2234
+ * For cases when these are not the same, this field would return the actual id of the item in the catalog
2235
+ * For example, for Wix bookings, catalogReference.catalogItemId is the booking id, and this value is being set to be the service id
2279
2236
  */
2280
- transactionId?: string | null;
2281
- }
2282
- export interface MetaData {
2283
- notes?: string | null;
2284
- legalTerms?: string | null;
2285
- sourceUrl?: string | null;
2286
- sourceProperties?: Record<string, string>;
2287
- source?: string | null;
2288
- sourceRefId?: string | null;
2289
- /** Optional indicator whether to allow editing of the invoice by other applications other than the source. Default is true. */
2290
- allowEditByOthers?: boolean | null;
2291
- }
2292
- export interface InvoiceDynamicPriceTotals {
2293
- paidAmount?: BigDecimalWrapper;
2294
- balance?: BigDecimalWrapper;
2237
+ rootCatalogItemId?: string | null;
2238
+ /** line item id of Checkout/Order line item */
2239
+ lineItemId?: string;
2295
2240
  }
2296
- /**
2297
- * A custom field value is used to add additional data to a financial document or to a financial document template.
2298
- * The custom field value may be based on a custom field definition.
2299
- */
2300
- export interface CustomFieldValue {
2241
+ export interface ServiceProperties {
2301
2242
  /**
2302
- * The unique id of the custom field value
2303
- * @readonly
2243
+ * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
2244
+ * For example, the start time of a class.
2304
2245
  */
2305
- id?: string | null;
2306
- /** The display name of the custom field value */
2307
- displayName?: string;
2308
- /** The optional namespace of the custom field value. This field may be used to indicate intended usage or source. */
2309
- namespace?: string | null;
2310
- /** The group of the custom field indicates its intended placement in the financial document */
2311
- group?: CustomFieldGroup;
2312
- /** The value of the custom field */
2313
- value?: Value;
2314
- /** The optional key of the custom field definition on which the custom field value is based */
2315
- originCustomFieldKey?: string | null;
2316
- }
2317
- export declare enum CustomFieldGroup {
2318
- UNKNOWN_CUSTOM_FIELD_GROUP = "UNKNOWN_CUSTOM_FIELD_GROUP",
2319
- BUSINESS_DETAILS = "BUSINESS_DETAILS",
2320
- CUSTOMER_DETAILS = "CUSTOMER_DETAILS",
2321
- DOCUMENT = "DOCUMENT",
2322
- FOOTER = "FOOTER",
2323
- OTHER = "OTHER"
2246
+ scheduledDate?: Date;
2247
+ /** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */
2248
+ numberOfParticipants?: number | null;
2324
2249
  }
2325
- export interface Value {
2326
- value?: string;
2327
- valueType?: ValueType;
2250
+ export interface ChargeMembershipsResponse {
2328
2251
  }
2329
- export declare enum ValueType {
2330
- UNKNOWN_VALUE_TYPE = "UNKNOWN_VALUE_TYPE",
2331
- STRING = "STRING",
2332
- DATE = "DATE",
2333
- BOOLEAN = "BOOLEAN",
2334
- NUMBER = "NUMBER"
2252
+ export interface TriggerRefundRequest {
2253
+ /** The order this refund related to */
2254
+ ecomOrderId?: string;
2255
+ /** Refund operations information */
2256
+ payments?: PaymentRefund[];
2257
+ /** Business model of a refund */
2258
+ details?: RefundDetails;
2259
+ /** Side effect details related to refund */
2260
+ sideEffects?: RefundSideEffects;
2335
2261
  }
2336
- export interface Deposit {
2337
- /** The flat amount of the deposit. The flat amount of the deposit must be less than the invoice total. */
2338
- flatAmount?: string;
2262
+ export interface PaymentRefund {
2263
+ /** Specific payment within the order to refund */
2264
+ paymentId?: string;
2265
+ /** Refund amount. Not relevant for membership refunds. */
2266
+ amount?: Price;
2339
2267
  /**
2340
- * The read-only percentage value of the deposit.
2341
- * It is computed according to the flat_amount and the invoice total and is rounded to 2 digits precision.
2342
- * @readonly
2268
+ * Whether refund is made externally and manually (on the payment provider's side)
2269
+ * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded.
2270
+ * When true, the payment will only be *marked* as refunded, and no actual refund will be performed.
2343
2271
  */
2344
- percentage?: string;
2345
- /** The type of the deposit. The default is FLAT. */
2346
- type?: DepositType;
2272
+ externalRefund?: boolean;
2347
2273
  }
2348
- export declare enum DepositType {
2349
- UNKNOWN = "UNKNOWN",
2350
- FLAT = "FLAT",
2351
- PERCENTAGE = "PERCENTAGE"
2274
+ export interface RefundSideEffects {
2275
+ /** Inventory restock details as part of this refund. */
2276
+ restockInfo?: RestockInfo;
2277
+ /** Whether to send a refund confirmation email to the customer. */
2278
+ sendOrderRefundedEmail?: boolean;
2279
+ /** Custom message added to the refund confirmation email. */
2280
+ customMessage?: string | null;
2352
2281
  }
2353
- /**
2354
- * InvoiceStatus allowed transitions based on current status:
2355
- * Draft -> Deleted, Paid, Partially Paid, Sent
2356
- * Sent -> Draft, Deleted, Void, Paid, Partially Paid, Processing, (Overdue)
2357
- * Processing -> PartiallyPaid, Paid, Sent
2358
- * Paid -> Void
2359
- * PartiallyPaid -> Void, (PartialAndOverdue)
2360
- * Void -> Deleted
2361
- * Deleted
2362
- */
2363
- export declare enum InvoiceStatus {
2364
- Draft = "Draft",
2365
- Sent = "Sent",
2366
- Processing = "Processing",
2367
- Paid = "Paid",
2368
- Overdue = "Overdue",
2369
- Void = "Void",
2370
- Deleted = "Deleted",
2371
- PartiallyPaid = "PartiallyPaid",
2372
- PartialAndOverdue = "PartialAndOverdue"
2282
+ export interface RestockInfo {
2283
+ /** Restock type. */
2284
+ type?: RestockType;
2285
+ /** Restocked line items and quantities. Only relevant for `{"type": "SOME_ITEMS"}`. */
2286
+ items?: V1RestockItem[];
2373
2287
  }
2374
- export interface PreparePaymentCollectionRequest {
2375
- /** Ecom order ID. */
2376
- ecomOrderId?: string;
2377
- /** Amount to collect */
2378
- amount?: Price;
2379
- /**
2380
- * Optional parameter. When present, payment collection will be performed using given payment gateway order.
2381
- * Existing payment gateway order will be updated with a new amount.
2382
- * When parameter is absent, new payment gateway order will be created and used for payment collection.
2383
- */
2384
- paymentGatewayOrderId?: string | null;
2288
+ export declare enum RestockType {
2289
+ NO_ITEMS = "NO_ITEMS",
2290
+ ALL_ITEMS = "ALL_ITEMS",
2291
+ SOME_ITEMS = "SOME_ITEMS"
2385
2292
  }
2386
- export interface PreparePaymentCollectionResponse {
2387
- /** Payment gateway order id which is associated with given payment */
2388
- paymentGatewayOrderId?: string;
2293
+ export interface V1RestockItem {
2294
+ /** ID of the line item being restocked. */
2295
+ lineItemId?: string;
2296
+ /** Line item quantity being restocked. */
2297
+ quantity?: number;
2389
2298
  }
2390
- export interface GetPaymentCollectabilityStatusRequest {
2391
- /** Ecom order ID. */
2299
+ export interface TriggerRefundResponse {
2300
+ /** All order's transactions after the refunds were added */
2301
+ orderTransactions?: OrderTransactions;
2302
+ /** Created refund ID */
2303
+ refundId?: string | null;
2304
+ /** Payment ID's that the refund execution had failed for */
2305
+ failedPaymentIds?: ItemMetadata[];
2306
+ }
2307
+ /** Triggered when a refund is created. */
2308
+ export interface RefundCreated {
2309
+ /** Updated order transactions. */
2310
+ orderTransactions?: OrderTransactions;
2311
+ /** ID of the created refund. */
2312
+ refundId?: string;
2313
+ /** Inventory restock details as part of this refund.. */
2314
+ restockInfo?: RestockInfo;
2315
+ /** Whether to send a refund confirmation email to the customer. */
2316
+ sendOrderRefundedEmail?: boolean;
2317
+ /** Custom message added to the refund confirmation email. */
2318
+ customMessage?: string | null;
2319
+ /** Refunded line items and quantities that are part of the created refund. */
2320
+ refundItems?: RefundItem[];
2321
+ }
2322
+ export interface CalculateRefundRequest {
2323
+ /** Order ID */
2392
2324
  ecomOrderId?: string;
2325
+ /** Refunded line items and quantity */
2326
+ refundItems?: CalculateRefundItemRequest[];
2327
+ /** Should include shipping in refund calculation */
2328
+ refundShipping?: boolean;
2393
2329
  }
2394
- export interface GetPaymentCollectabilityStatusResponse {
2395
- /** Payment collectability status */
2396
- status?: PaymentCollectabilityStatus;
2397
- /** Collectable order amount */
2398
- amount?: Price;
2330
+ export interface CalculateRefundItemRequest {
2331
+ /** ID of the line item being refunded */
2332
+ id?: string;
2333
+ /** How much of that line item is being refunded */
2334
+ quantity?: number;
2399
2335
  }
2400
- export declare enum PaymentCollectabilityStatus {
2401
- UNKNOWN = "UNKNOWN",
2402
- COLLECTABLE = "COLLECTABLE",
2403
- NONCOLLECTABLE_ORDER_IS_CANCELLED = "NONCOLLECTABLE_ORDER_IS_CANCELLED",
2404
- NONCOLLECTABLE_ORDER_IS_PAID = "NONCOLLECTABLE_ORDER_IS_PAID",
2405
- NONCOLLECTABLE_MISSING_PAYMENT_METHOD = "NONCOLLECTABLE_MISSING_PAYMENT_METHOD"
2336
+ export interface CalculateRefundResponse {
2337
+ /** Total refundable amount */
2338
+ total?: Price;
2339
+ /** Tax cost of the order */
2340
+ tax?: Price;
2341
+ /** Discount given for this order */
2342
+ discount?: Price;
2343
+ /** Total cost of the order (without tax) */
2344
+ subtotal?: Price;
2345
+ /** Total shipping cost for order */
2346
+ shipping?: Price;
2347
+ /** Previous refund given on that order */
2348
+ previouslyRefundedAmount?: Price;
2349
+ /** The refundable items of that order */
2350
+ items?: CalculateRefundItemResponse[];
2406
2351
  }
2407
- export interface RecordManuallyCollectedPaymentRequest {
2408
- /** Order ID. */
2352
+ export interface CalculateRefundItemResponse {
2353
+ /** Line item ID */
2354
+ id?: string;
2355
+ /** Refundable amount for requested quantity of items (price of requested quantity of items without tax and discount) */
2356
+ price?: Price;
2357
+ }
2358
+ export interface DiffmatokyPayload {
2359
+ left?: string;
2360
+ right?: string;
2361
+ compareChannel?: string;
2362
+ entityId?: string;
2363
+ errorInformation?: ErrorInformation;
2364
+ tags?: string[];
2365
+ }
2366
+ export interface ErrorInformation {
2367
+ stackTrace?: string;
2368
+ }
2369
+ export interface ContinueSideEffectsFlowInLegacyData {
2370
+ storeId?: string;
2409
2371
  orderId?: string;
2410
- /** Amount to be recorded as approved manual payment for given order */
2411
- amount?: Price;
2372
+ ordersExperiments?: OrdersExperiments;
2412
2373
  }
2413
- export interface RecordManuallyCollectedPaymentResponse {
2374
+ export interface OrdersExperiments {
2375
+ epCommitTax?: boolean;
2376
+ moveMerchantEmailToEp?: boolean;
2377
+ moveBuyerOrderConfirmationEmailToEp?: boolean;
2378
+ producedByEpBridge?: boolean;
2379
+ enableRewrittenSideEffects?: boolean;
2414
2380
  }
2415
- export interface V1MarkOrderAsPaidRequest {
2416
- /** Ecom order ID. */
2417
- ecomOrderId?: string;
2381
+ export interface IndexingMessage {
2382
+ id?: string;
2383
+ opType?: number;
2384
+ requiredVersions?: string[];
2418
2385
  }
2419
- export interface V1MarkOrderAsPaidResponse {
2420
- /** Updated order. */
2421
- order?: Order;
2386
+ export interface GetOrderRequest {
2387
+ /** ID of the order to retrieve. */
2388
+ id: string;
2422
2389
  }
2423
- /** Triggered when the payment status of an order is updated */
2424
- export interface PaymentStatusUpdated {
2425
- /** The order that was updated */
2390
+ export interface GetOrderResponse {
2391
+ /** The requested order. */
2426
2392
  order?: Order;
2427
- /** The previous status (before the update) */
2428
- previousPaymentStatus?: PaymentStatus;
2429
2393
  }
2430
- export interface V1BulkMarkOrdersAsPaidRequest {
2431
- /** IDs of orders to mark as paid. */
2432
- ecomOrderIds?: string[];
2394
+ export interface ListOrdersResponse {
2395
+ /** The requested order. */
2396
+ orders?: Order[];
2397
+ /** Details on the paged set of results returned. */
2398
+ pagingMetadata?: CursorPagingMetadata;
2433
2399
  }
2434
- export interface V1BulkMarkOrdersAsPaidResponse {
2435
- /**
2436
- * Items updated by the bulk action.
2437
- * The Order entity within the results optimistically changes its payment status to paid, however this process is async.
2438
- */
2439
- results?: BulkOrderResult[];
2440
- /** Bulk action metadata. */
2441
- bulkActionMetadata?: BulkActionMetadata;
2400
+ export interface InternalQueryOrdersResponse {
2401
+ /** List of orders. */
2402
+ orders?: Order[];
2403
+ /** Details on the paged set of results returned. */
2404
+ metadata?: PlatformPagingMetadata;
2442
2405
  }
2443
- export interface BulkOrderResult {
2444
- /** Item metadata. */
2445
- itemMetadata?: ItemMetadata;
2446
- /** Updated item. Optional - returned only if requested with `return_full_entity` set to `true`. */
2447
- item?: Order;
2406
+ export interface QueryOrderRequest {
2407
+ /** Query options. */
2408
+ query?: PlatformQuery;
2448
2409
  }
2449
- export interface ItemMetadata {
2450
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
2451
- id?: string | null;
2452
- /** Index of the item within the request array. Allows for correlation between request and response items. */
2453
- originalIndex?: number;
2454
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
2455
- success?: boolean;
2456
- /** Details about the error in case of failure. */
2457
- error?: ApplicationError;
2410
+ export interface QueryOrderResponse {
2411
+ /** List of orders. */
2412
+ orders?: Order[];
2413
+ /** Details on the paged set of results returned. */
2414
+ metadata?: PlatformPagingMetadata;
2458
2415
  }
2459
- export interface ApplicationError {
2460
- /** Error code. */
2461
- code?: string;
2462
- /** Description of the error. */
2463
- description?: string;
2464
- /** Data related to the error. */
2465
- data?: Record<string, any> | null;
2416
+ export interface SearchOrdersRequest {
2417
+ /** Search options. */
2418
+ search?: CursorSearch;
2466
2419
  }
2467
- export interface BulkActionMetadata {
2468
- /** Number of items that were successfully processed. */
2469
- totalSuccesses?: number;
2470
- /** Number of items that couldn't be processed. */
2471
- totalFailures?: number;
2472
- /** Number of failures without details because detailed failure threshold was exceeded. */
2473
- undetailedFailures?: number;
2420
+ export interface CursorSearch extends CursorSearchPagingMethodOneOf {
2421
+ /** Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'. */
2422
+ cursorPaging?: CursorPaging;
2423
+ /**
2424
+ * Filter object.
2425
+ *
2426
+ * For example, the following `filter` object will only return orders with payment statuses of paid and/or partially paid:
2427
+ * `"filter": {"paymentStatus": {"$in": ["PAID", "PARTIALLY_PAID"]}}`
2428
+ *
2429
+ * Learn more about the filter format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2430
+ */
2431
+ filter?: Record<string, any> | null;
2432
+ /**
2433
+ * Array of sort objects that specify the order in which results should be sorted.
2434
+ *
2435
+ * For example, the following `sort` array will sort by `createdDate` in descending order:
2436
+ * `"sort": [{"fieldName": "createdDate", "order":"DESC"}]`.
2437
+ *
2438
+ * Learn more about the sort format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2439
+ */
2440
+ sort?: Sorting[];
2474
2441
  }
2475
- export interface GetRefundabilityStatusRequest {
2476
- /** Order ID. */
2477
- ecomOrderId?: string;
2442
+ /** @oneof */
2443
+ export interface CursorSearchPagingMethodOneOf {
2444
+ /** Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'. */
2445
+ cursorPaging?: CursorPaging;
2478
2446
  }
2479
- export interface GetRefundabilityStatusResponse {
2480
- /** Refundability details. */
2481
- refundabilities?: Refundability[];
2482
- /** Whether the order supports refunding per item. */
2483
- refundablePerItem?: boolean;
2447
+ export interface SearchOrdersResponse {
2448
+ /** List of orders. */
2449
+ orders?: Order[];
2450
+ /** Details on the paged set of results returned. */
2451
+ metadata?: CursorPagingMetadata;
2484
2452
  }
2485
- export interface Refundability extends RefundabilityAdditionalRefundabilityInfoOneOf {
2486
- /** Reason why payment is not refundable. */
2487
- nonRefundableReason?: NonRefundableReason;
2488
- /** Reason why payment is only refundable manually. */
2489
- manuallyRefundableReason?: ManuallyRefundableReason;
2490
- /** Payment ID. */
2491
- paymentId?: string;
2492
- /** Payment refundability status. */
2493
- refundabilityStatus?: RefundableStatus;
2494
- /** Link to payment provider dashboard. */
2495
- providerLink?: string | null;
2496
- }
2497
- /** @oneof */
2498
- export interface RefundabilityAdditionalRefundabilityInfoOneOf {
2499
- /** Reason why payment is not refundable. */
2500
- nonRefundableReason?: NonRefundableReason;
2501
- /** Reason why payment is only refundable manually. */
2502
- manuallyRefundableReason?: ManuallyRefundableReason;
2503
- }
2504
- export declare enum RefundableStatus {
2505
- NOT_REFUNDABLE = "NOT_REFUNDABLE",
2506
- MANUAL = "MANUAL",
2507
- REFUNDABLE = "REFUNDABLE"
2453
+ export interface CreateOrderRequest {
2454
+ /** Order info. */
2455
+ order: Order;
2508
2456
  }
2509
- export declare enum NonRefundableReason {
2510
- NONE = "NONE",
2511
- ALREADY_REFUNDED = "ALREADY_REFUNDED",
2512
- PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN",
2513
- INTERNAL_ERROR = "INTERNAL_ERROR",
2514
- NOT_PAID = "NOT_PAID",
2515
- ACCESS_DENIED = "ACCESS_DENIED",
2516
- ZERO_PRICE = "ZERO_PRICE",
2517
- DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER",
2518
- PENDING_REFUND = "PENDING_REFUND",
2519
- FORBIDDEN = "FORBIDDEN",
2520
- TRANSACTION_NOT_FOUND = "TRANSACTION_NOT_FOUND"
2457
+ export interface CreateOrderResponse {
2458
+ /** Newly created order. */
2459
+ order?: Order;
2521
2460
  }
2522
- export declare enum ManuallyRefundableReason {
2523
- EXPIRED = "EXPIRED",
2524
- NOT_SUPPORTED = "NOT_SUPPORTED",
2525
- OFFLINE = "OFFLINE"
2461
+ export interface UpdateOrderRequest {
2462
+ /** Order to be updated. */
2463
+ order: Order;
2526
2464
  }
2527
- export interface V1CreatePaymentGatewayOrderRequest {
2528
- /** Ecom order ID. */
2529
- ecomOrderId?: string;
2530
- /** Information about the user who initiated the payment. */
2531
- chargedBy?: ChargedBy;
2465
+ export interface UpdateOrderResponse {
2466
+ /** Newly created order. */
2467
+ order?: Order;
2532
2468
  }
2533
- export interface ChargedBy {
2534
- /** ID - id of the user who initiated the payment */
2469
+ export interface CommitDeltasRequest {
2470
+ /** Order id to be updated */
2535
2471
  id?: string;
2536
- /** Full name - name of the user who initiated the payment */
2537
- fullName?: string | null;
2538
- }
2539
- export interface V1CreatePaymentGatewayOrderResponse {
2540
- /** ID of the order created in the payment gateway */
2541
- paymentGatewayOrderId?: string;
2542
- }
2543
- export interface ChargeMembershipsRequest {
2544
- /** Order ID. */
2545
- ecomOrderId?: string;
2546
2472
  /**
2547
- * The member id. Do not attempt to get it from the request context, since in some cases the caller is not a member
2548
- * but a user which is using the membership on behalf of the a member
2473
+ * Draft order Id representing this change.
2474
+ * Use this ID to get this specific draft content. call .../v1/draft-orders/{draft_order_id}/get
2549
2475
  */
2550
- memberId?: string;
2551
- /** List of items to be paid by memberships */
2552
- membershipCharges?: MembershipChargeItem[];
2476
+ draftOrderId?: string;
2477
+ /** Draft order changes to be applied */
2478
+ changes?: DraftOrderDiffs;
2479
+ /** Side-effects to happen after order is updated */
2480
+ commitSettings?: DraftOrderCommitSettings;
2481
+ /** Reason for edit, given by user (optional). */
2482
+ reason?: string | null;
2553
2483
  }
2554
- export interface MembershipChargeItem {
2555
- /** The id of used membership */
2556
- membershipId?: string;
2557
- /** ID of the application providing this payment option */
2558
- appId?: string;
2559
- /** The name of used membership */
2560
- membershipName?: MembershipName;
2561
- /** Additional data about this membership */
2562
- membershipAdditionalData?: Record<string, any> | null;
2563
- /** Catalog and item reference info. */
2564
- catalogReference?: CatalogReference;
2565
- /** Properties of the service. When relevant, contains information such as date and number of participants. */
2566
- serviceProperties?: ServiceProperties;
2484
+ export interface DraftOrderDiffs extends DraftOrderDiffsShippingUpdateInfoOneOf {
2485
+ /** Shipping info and selected shipping option details. */
2486
+ changedShippingInfo?: ShippingInformation;
2487
+ /** Remove existing shipping info. */
2488
+ shippingInfoRemoved?: boolean;
2489
+ /** Added/updated/removed order line items. */
2490
+ lineItems?: LineItemDelta[];
2567
2491
  /**
2568
- * Usually would be the same as catalogReference.catalogItemId
2569
- * For cases when these are not the same, this field would return the actual id of the item in the catalog
2570
- * For example, for Wix bookings, catalogReference.catalogItemId is the booking id, and this value is being set to be the service id
2492
+ * Added/updated/removed discounts.
2493
+ * todo: set (.wix.api.maxSize). need to find it. existing : merchant can have 100 + 1 coupon + ? due to automatic discounts
2571
2494
  */
2572
- rootCatalogItemId?: string | null;
2573
- /** line item id of Checkout/Order line item */
2574
- lineItemId?: string;
2575
- }
2576
- export interface ServiceProperties {
2495
+ appliedDiscounts?: AppliedDiscountDelta[];
2496
+ /** Added/updated/removed additional fee. */
2497
+ additionalFees?: AdditionalFeeDelta[];
2498
+ /** Updated Tax summary. overwrites existing tax summary. */
2499
+ taxSummary?: TaxSummary;
2577
2500
  /**
2578
- * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
2579
- * For example, the start time of a class.
2501
+ * Updated order price summary. overwrites existing price summary.
2502
+ * balance will be updated automatically.
2580
2503
  */
2581
- scheduledDate?: Date;
2582
- /** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */
2583
- numberOfParticipants?: number | null;
2504
+ priceSummary?: PriceSummary;
2584
2505
  }
2585
- export interface ChargeMembershipsResponse {
2506
+ /** @oneof */
2507
+ export interface DraftOrderDiffsShippingUpdateInfoOneOf {
2508
+ /** Shipping info and selected shipping option details. */
2509
+ changedShippingInfo?: ShippingInformation;
2510
+ /** Remove existing shipping info. */
2511
+ shippingInfoRemoved?: boolean;
2586
2512
  }
2587
- export interface TriggerRefundRequest {
2588
- /** The order this refund related to */
2589
- ecomOrderId?: string;
2590
- /** Refund operations information */
2591
- payments?: PaymentRefund[];
2592
- /** Business model of a refund */
2593
- details?: RefundDetails;
2594
- /** Side effect details related to refund */
2595
- sideEffects?: RefundSideEffects;
2513
+ export interface LineItemDelta extends LineItemDeltaDeltaOneOf {
2514
+ /** The line item was added. */
2515
+ lineItemAdded?: boolean;
2516
+ /** The line item was modified. */
2517
+ changedDetails?: ItemChangedDetails;
2518
+ /** The line item was added. */
2519
+ lineItemRemoved?: boolean;
2520
+ /** Line item ID. */
2521
+ lineItemId?: string;
2522
+ lineItem?: OrderLineItemChangedDetails;
2596
2523
  }
2597
- export interface PaymentRefund {
2598
- /** Specific payment within the order to refund */
2599
- paymentId?: string;
2600
- /** Refund amount. Not relevant for membership refunds. */
2601
- amount?: Price;
2524
+ /** @oneof */
2525
+ export interface LineItemDeltaDeltaOneOf {
2526
+ /** The line item was added. */
2527
+ lineItemAdded?: boolean;
2528
+ /** The line item was modified. */
2529
+ changedDetails?: ItemChangedDetails;
2530
+ /** The line item was added. */
2531
+ lineItemRemoved?: boolean;
2532
+ }
2533
+ export interface OrderLineItemChangedDetails {
2602
2534
  /**
2603
- * Whether refund is made externally and manually (on the payment provider's side)
2604
- * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded.
2605
- * When true, the payment will only be *marked* as refunded, and no actual refund will be performed.
2535
+ * Item name.
2536
+ * + Stores - `product.name`
2537
+ * + Bookings - `service.info.name`
2538
+ * + Events - `ticket.name`
2606
2539
  */
2607
- externalRefund?: boolean;
2540
+ productName?: ProductName;
2541
+ /**
2542
+ * References to the line item's origin catalog.
2543
+ * This field is empty in the case of a custom line item.
2544
+ */
2545
+ catalogReference?: CatalogReference;
2546
+ /** Line item quantity. */
2547
+ quantity?: number;
2548
+ /** Total discount for this line item's entire quantity. */
2549
+ totalDiscount?: Price;
2550
+ /** Line item description lines. Used for display purposes for the cart, checkout and order. */
2551
+ descriptionLines?: DescriptionLine[];
2552
+ /** Line item image. */
2553
+ image?: Image;
2554
+ /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */
2555
+ physicalProperties?: PhysicalProperties;
2556
+ /** Item type. Either a preset type or custom. */
2557
+ itemType?: ItemType;
2558
+ /**
2559
+ * Fulfiller ID. Field is empty when the line item is self-fulfilled.
2560
+ * To get fulfillment information, pass this order's ID to [List Fulfillments For Single Order](https://bo.wix.com/wix-docs/rest/ecommerce/order-fulfillments/list-fulfillments-for-single-order).
2561
+ */
2562
+ fulfillerId?: string | null;
2563
+ /** Line item price after line item discounts for display purposes. */
2564
+ price?: Price;
2565
+ /** Line item price before line item discounts for display purposes. Defaults to `price` when not provided. */
2566
+ priceBeforeDiscounts?: Price;
2567
+ /** Total price after all discounts and tax. */
2568
+ totalPriceAfterTax?: Price;
2569
+ /**
2570
+ * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
2571
+ * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
2572
+ * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
2573
+ */
2574
+ paymentOption?: DeltaPaymentOptionType;
2575
+ /** Tax details for this line item. */
2576
+ taxDetails?: ItemTaxFullDetails;
2577
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2578
+ priceDescription?: PriceDescription;
2579
+ /** Total price after all discounts excluding tax. */
2580
+ totalPriceBeforeTax?: Price;
2608
2581
  }
2609
- export interface RefundSideEffects {
2610
- /** Inventory restock details as part of this refund. */
2611
- restockInfo?: RestockInfo;
2612
- /** Whether to send a refund confirmation email to the customer. */
2613
- sendOrderRefundedEmail?: boolean;
2614
- /** Custom message added to the refund confirmation email. */
2615
- customMessage?: string | null;
2582
+ /** Type of selected payment option for catalog item */
2583
+ export declare enum DeltaPaymentOptionType {
2584
+ /** irrelevant */
2585
+ UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
2586
+ /** The entire payment for given item will happen after the checkout. */
2587
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
2588
+ /**
2589
+ * Payment for this item can only be done using a membership and must be manually redeemed in the dashboard by the site owner.
2590
+ * Note: when this option is used, price will be 0.
2591
+ */
2592
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
2616
2593
  }
2617
- export interface RestockInfo {
2618
- /** Restock type. */
2619
- type?: RestockType;
2620
- /** Restocked line items and quantities. Only relevant for `{"type": "SOME_ITEMS"}`. */
2621
- items?: V1RestockItem[];
2594
+ export interface ItemChangedDetails {
2595
+ /** The quantity before the change. */
2596
+ quantityBeforeChange?: number | null;
2597
+ /** The price before the change. */
2598
+ priceBeforeChange?: Price;
2599
+ /** The price description before the change */
2600
+ priceDescriptionBeforeChange?: PriceDescription;
2622
2601
  }
2623
- export declare enum RestockType {
2624
- NO_ITEMS = "NO_ITEMS",
2625
- ALL_ITEMS = "ALL_ITEMS",
2626
- SOME_ITEMS = "SOME_ITEMS"
2602
+ export interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaOneOf {
2603
+ editedDiscount?: AppliedDiscount;
2604
+ discountRemoved?: boolean;
2605
+ /** Discount id. */
2606
+ discountId?: string;
2627
2607
  }
2628
- export interface V1RestockItem {
2629
- /** ID of the line item being restocked. */
2630
- lineItemId?: string;
2631
- /** Line item quantity being restocked. */
2632
- quantity?: number;
2633
- }
2634
- export interface TriggerRefundResponse {
2635
- /** All order's transactions after the refunds were added */
2636
- orderTransactions?: OrderTransactions;
2637
- /** Created refund ID */
2638
- refundId?: string | null;
2639
- /** Payment ID's that the refund execution had failed for */
2640
- failedPaymentIds?: ItemMetadata[];
2641
- }
2642
- /** Triggered when a refund is created. */
2643
- export interface RefundCreated {
2644
- /** Updated order transactions. */
2645
- orderTransactions?: OrderTransactions;
2646
- /** ID of the created refund. */
2647
- refundId?: string;
2648
- /** Inventory restock details as part of this refund.. */
2649
- restockInfo?: RestockInfo;
2650
- /** Whether to send a refund confirmation email to the customer. */
2651
- sendOrderRefundedEmail?: boolean;
2652
- /** Custom message added to the refund confirmation email. */
2653
- customMessage?: string | null;
2654
- /** Refunded line items and quantities that are part of the created refund. */
2655
- refundItems?: RefundItem[];
2656
- }
2657
- export interface CalculateRefundRequest {
2658
- /** Order ID */
2659
- ecomOrderId?: string;
2660
- /** Refunded line items and quantity */
2661
- refundItems?: CalculateRefundItemRequest[];
2662
- /** Should include shipping in refund calculation */
2663
- refundShipping?: boolean;
2664
- }
2665
- export interface CalculateRefundItemRequest {
2666
- /** ID of the line item being refunded */
2667
- id?: string;
2668
- /** How much of that line item is being refunded */
2669
- quantity?: number;
2670
- }
2671
- export interface CalculateRefundResponse {
2672
- /** Total refundable amount */
2673
- total?: Price;
2674
- /** Tax cost of the order */
2675
- tax?: Price;
2676
- /** Discount given for this order */
2677
- discount?: Price;
2678
- /** Total cost of the order (without tax) */
2679
- subtotal?: Price;
2680
- /** Total shipping cost for order */
2681
- shipping?: Price;
2682
- /** Previous refund given on that order */
2683
- previouslyRefundedAmount?: Price;
2684
- /** The refundable items of that order */
2685
- items?: CalculateRefundItemResponse[];
2686
- }
2687
- export interface CalculateRefundItemResponse {
2688
- /** Line item ID */
2689
- id?: string;
2690
- /** Refundable amount for requested quantity of items (price of requested quantity of items without tax and discount) */
2691
- price?: Price;
2692
- }
2693
- export interface DiffmatokyPayload {
2694
- left?: string;
2695
- right?: string;
2696
- compareChannel?: string;
2697
- entityId?: string;
2698
- errorInformation?: ErrorInformation;
2699
- tags?: string[];
2700
- }
2701
- export interface ErrorInformation {
2702
- stackTrace?: string;
2703
- }
2704
- export interface ContinueSideEffectsFlowInLegacyData {
2705
- storeId?: string;
2706
- orderId?: string;
2707
- ordersExperiments?: OrdersExperiments;
2708
- }
2709
- export interface OrdersExperiments {
2710
- epCommitTax?: boolean;
2711
- moveMerchantEmailToEp?: boolean;
2712
- moveBuyerOrderConfirmationEmailToEp?: boolean;
2713
- producedByEpBridge?: boolean;
2714
- enableRewrittenSideEffects?: boolean;
2715
- }
2716
- export interface IndexingMessage {
2717
- id?: string;
2718
- opType?: number;
2719
- requiredVersions?: string[];
2720
- }
2721
- export interface GetOrderRequest {
2722
- /** ID of the order to retrieve. */
2723
- id: string;
2724
- }
2725
- export interface GetOrderResponse {
2726
- /** The requested order. */
2727
- order?: Order;
2728
- }
2729
- export interface ListOrdersResponse {
2730
- /** The requested order. */
2731
- orders?: Order[];
2732
- /** Details on the paged set of results returned. */
2733
- pagingMetadata?: CursorPagingMetadata;
2734
- }
2735
- export interface InternalQueryOrdersResponse {
2736
- /** List of orders. */
2737
- orders?: Order[];
2738
- /** Details on the paged set of results returned. */
2739
- metadata?: PlatformPagingMetadata;
2740
- }
2741
- export interface QueryOrderRequest {
2742
- /** Query options. */
2743
- query?: PlatformQuery;
2744
- }
2745
- export interface QueryOrderResponse {
2746
- /** List of orders. */
2747
- orders?: Order[];
2748
- /** Details on the paged set of results returned. */
2749
- metadata?: PlatformPagingMetadata;
2750
- }
2751
- export interface SearchOrdersRequest {
2752
- /** Search options. */
2753
- search?: CursorSearch;
2608
+ /** @oneof */
2609
+ export interface AppliedDiscountDeltaDeltaOneOf {
2610
+ editedDiscount?: AppliedDiscount;
2611
+ discountRemoved?: boolean;
2754
2612
  }
2755
- export interface CursorSearch extends CursorSearchPagingMethodOneOf {
2756
- /** Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'. */
2757
- cursorPaging?: CursorPaging;
2758
- /**
2759
- * Filter object.
2760
- *
2761
- * For example, the following `filter` object will only return orders with payment statuses of paid and/or partially paid:
2762
- * `"filter": {"paymentStatus": {"$in": ["PAID", "PARTIALLY_PAID"]}}`
2763
- *
2764
- * Learn more about the filter format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2765
- */
2766
- filter?: Record<string, any> | null;
2767
- /**
2768
- * Array of sort objects that specify the order in which results should be sorted.
2769
- *
2770
- * For example, the following `sort` array will sort by `createdDate` in descending order:
2771
- * `"sort": [{"fieldName": "createdDate", "order":"DESC"}]`.
2772
- *
2773
- * Learn more about the sort format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2774
- */
2775
- sort?: Sorting[];
2613
+ export interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaOneOf {
2614
+ editedAdditionalFee?: AdditionalFee;
2615
+ additionalFeeRemoved?: boolean;
2616
+ /** Additional fee id. */
2617
+ additionalFeeId?: string;
2776
2618
  }
2777
2619
  /** @oneof */
2778
- export interface CursorSearchPagingMethodOneOf {
2779
- /** Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'. */
2780
- cursorPaging?: CursorPaging;
2781
- }
2782
- export interface SearchOrdersResponse {
2783
- /** List of orders. */
2784
- orders?: Order[];
2785
- /** Details on the paged set of results returned. */
2786
- metadata?: CursorPagingMetadata;
2620
+ export interface AdditionalFeeDeltaDeltaOneOf {
2621
+ editedAdditionalFee?: AdditionalFee;
2622
+ additionalFeeRemoved?: boolean;
2787
2623
  }
2788
- export interface CreateOrderRequest {
2789
- /** Order info. */
2790
- order: Order;
2624
+ export interface DraftOrderCommitSettings {
2625
+ /** If false, do not send notifications to buyer. Default is true. */
2626
+ sendNotificationsToBuyer?: boolean | null;
2627
+ /** If false, do not send notifications to business. Default is true. */
2628
+ sendNotificationsToBusiness?: boolean | null;
2629
+ /** If false,do not add activities to the order. Default is true. */
2630
+ addActivitiesToOrder?: boolean | null;
2631
+ /** If false, do not send mails to custom fulfillers in case of a change of shippable items fulfilled by custom fulfillers. Default is true. */
2632
+ sendNotificationsToCustomFulfillers?: boolean | null;
2633
+ /** Inventory changes to be applied. Either to restock, or decrease. */
2634
+ inventoryUpdates?: InventoryUpdateDetails[];
2791
2635
  }
2792
- export interface CreateOrderResponse {
2793
- /** Newly created order. */
2794
- order?: Order;
2636
+ export interface InventoryUpdateDetails {
2637
+ /** Action to be applied - decrease or restock */
2638
+ actionType?: InventoryAction;
2639
+ /** Order line item id */
2640
+ lineItemId?: string;
2641
+ /** The amount to be increased or restocked */
2642
+ quantityChange?: number;
2795
2643
  }
2796
- export interface UpdateOrderRequest {
2797
- /** Order to be updated. */
2798
- order: Order;
2644
+ export declare enum InventoryAction {
2645
+ /** Restock inventory */
2646
+ RESTOCK = "RESTOCK",
2647
+ /** Decrease inventory. Without failing on negative inventory. */
2648
+ DECREASE = "DECREASE"
2799
2649
  }
2800
- export interface UpdateOrderResponse {
2801
- /** Newly created order. */
2650
+ export interface CommitDeltasResponse {
2651
+ /** Order after deltas are applied */
2802
2652
  order?: Order;
2803
2653
  }
2804
- export interface CommitDeltasRequest {
2805
- /** Order id to be updated */
2806
- id?: string;
2807
- /**
2808
- * Draft order Id representing this change.
2809
- * Use this ID to get this specific draft content. call .../v1/draft-orders/{draft_order_id}/get
2810
- */
2654
+ /** Triggered when order is edited by draftOrders */
2655
+ export interface OrderDeltasCommitted {
2656
+ /** The order after committed changes. */
2657
+ order?: Order;
2658
+ /** Draft order Id representing this change. */
2811
2659
  draftOrderId?: string;
2812
- /** Draft order changes to be applied */
2813
- changes?: DraftOrderDiffs;
2814
- /** Side-effects to happen after order is updated */
2660
+ /** Applied changes. */
2661
+ changes?: CommittedDiffs;
2662
+ /** Side-effects requested to happen as a result of this edit. */
2815
2663
  commitSettings?: DraftOrderCommitSettings;
2816
- /** Reason for edit, given by user (optional). */
2817
- reason?: string | null;
2664
+ /**
2665
+ * Date and time when order deltas were committed.
2666
+ * @readonly
2667
+ */
2668
+ commitDate?: Date;
2818
2669
  }
2819
- export interface DraftOrderDiffs extends DraftOrderDiffsShippingUpdateInfoOneOf {
2670
+ export interface CommittedDiffs extends CommittedDiffsShippingUpdateInfoOneOf {
2820
2671
  /** Shipping info and selected shipping option details. */
2821
2672
  changedShippingInfo?: ShippingInformation;
2822
2673
  /** Remove existing shipping info. */
2823
2674
  shippingInfoRemoved?: boolean;
2824
2675
  /** Added/updated/removed order line items. */
2825
- lineItems?: LineItemDelta[];
2676
+ lineItems?: CommittedDiffsLineItemDelta[];
2826
2677
  /**
2827
2678
  * Added/updated/removed discounts.
2828
2679
  * todo: set (.wix.api.maxSize). need to find it. existing : merchant can have 100 + 1 coupon + ? due to automatic discounts
@@ -2830,212 +2681,26 @@ export interface DraftOrderDiffs extends DraftOrderDiffsShippingUpdateInfoOneOf
2830
2681
  appliedDiscounts?: AppliedDiscountDelta[];
2831
2682
  /** Added/updated/removed additional fee. */
2832
2683
  additionalFees?: AdditionalFeeDelta[];
2833
- /** Updated Tax summary. overwrites existing tax summary. */
2834
- taxSummary?: TaxSummary;
2835
- /**
2836
- * Updated order price summary. overwrites existing price summary.
2837
- * balance will be updated automatically.
2838
- */
2839
- priceSummary?: PriceSummary;
2840
2684
  }
2841
2685
  /** @oneof */
2842
- export interface DraftOrderDiffsShippingUpdateInfoOneOf {
2686
+ export interface CommittedDiffsShippingUpdateInfoOneOf {
2843
2687
  /** Shipping info and selected shipping option details. */
2844
2688
  changedShippingInfo?: ShippingInformation;
2845
2689
  /** Remove existing shipping info. */
2846
2690
  shippingInfoRemoved?: boolean;
2847
2691
  }
2848
- export interface LineItemDelta extends LineItemDeltaDeltaOneOf {
2849
- /** The line item was added. */
2692
+ export interface CommittedDiffsLineItemDelta extends CommittedDiffsLineItemDeltaDeltaOneOf {
2850
2693
  lineItemAdded?: boolean;
2851
- /** The line item was modified. */
2852
2694
  changedDetails?: ItemChangedDetails;
2853
- /** The line item was added. */
2854
- lineItemRemoved?: boolean;
2695
+ lineItemRemoved?: OrderLineItemChangedDetails;
2855
2696
  /** Line item ID. */
2856
2697
  lineItemId?: string;
2857
- lineItem?: OrderLineItemChangedDetails;
2858
2698
  }
2859
2699
  /** @oneof */
2860
- export interface LineItemDeltaDeltaOneOf {
2861
- /** The line item was added. */
2700
+ export interface CommittedDiffsLineItemDeltaDeltaOneOf {
2862
2701
  lineItemAdded?: boolean;
2863
- /** The line item was modified. */
2864
2702
  changedDetails?: ItemChangedDetails;
2865
- /** The line item was added. */
2866
- lineItemRemoved?: boolean;
2867
- }
2868
- export interface OrderLineItemChangedDetails {
2869
- /**
2870
- * Item name.
2871
- * + Stores - `product.name`
2872
- * + Bookings - `service.info.name`
2873
- * + Events - `ticket.name`
2874
- */
2875
- productName?: ProductName;
2876
- /**
2877
- * References to the line item's origin catalog.
2878
- * This field is empty in the case of a custom line item.
2879
- */
2880
- catalogReference?: CatalogReference;
2881
- /** Line item quantity. */
2882
- quantity?: number;
2883
- /** Total discount for this line item's entire quantity. */
2884
- totalDiscount?: Price;
2885
- /** Line item description lines. Used for display purposes for the cart, checkout and order. */
2886
- descriptionLines?: DescriptionLine[];
2887
- /** Line item image. */
2888
- image?: Image;
2889
- /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */
2890
- physicalProperties?: PhysicalProperties;
2891
- /** Item type. Either a preset type or custom. */
2892
- itemType?: ItemType;
2893
- /**
2894
- * Fulfiller ID. Field is empty when the line item is self-fulfilled.
2895
- * To get fulfillment information, pass this order's ID to [List Fulfillments For Single Order](https://bo.wix.com/wix-docs/rest/ecommerce/order-fulfillments/list-fulfillments-for-single-order).
2896
- */
2897
- fulfillerId?: string | null;
2898
- /** Line item price after line item discounts for display purposes. */
2899
- price?: Price;
2900
- /** Line item price before line item discounts for display purposes. Defaults to `price` when not provided. */
2901
- priceBeforeDiscounts?: Price;
2902
- /** Total price after all discounts and tax. */
2903
- totalPriceAfterTax?: Price;
2904
- /**
2905
- * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
2906
- * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
2907
- * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
2908
- */
2909
- paymentOption?: DeltaPaymentOptionType;
2910
- /** Tax details for this line item. */
2911
- taxDetails?: ItemTaxFullDetails;
2912
- /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2913
- priceDescription?: PriceDescription;
2914
- /** Total price after all discounts excluding tax. */
2915
- totalPriceBeforeTax?: Price;
2916
- }
2917
- /** Type of selected payment option for catalog item */
2918
- export declare enum DeltaPaymentOptionType {
2919
- /** irrelevant */
2920
- UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
2921
- /** The entire payment for given item will happen after the checkout. */
2922
- FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
2923
- /**
2924
- * Payment for this item can only be done using a membership and must be manually redeemed in the dashboard by the site owner.
2925
- * Note: when this option is used, price will be 0.
2926
- */
2927
- MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
2928
- }
2929
- export interface ItemChangedDetails {
2930
- /** The quantity before the change. */
2931
- quantityBeforeChange?: number | null;
2932
- /** The price before the change. */
2933
- priceBeforeChange?: Price;
2934
- /** The price description before the change */
2935
- priceDescriptionBeforeChange?: PriceDescription;
2936
- }
2937
- export interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaOneOf {
2938
- editedDiscount?: AppliedDiscount;
2939
- discountRemoved?: boolean;
2940
- /** Discount id. */
2941
- discountId?: string;
2942
- }
2943
- /** @oneof */
2944
- export interface AppliedDiscountDeltaDeltaOneOf {
2945
- editedDiscount?: AppliedDiscount;
2946
- discountRemoved?: boolean;
2947
- }
2948
- export interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaOneOf {
2949
- editedAdditionalFee?: AdditionalFee;
2950
- additionalFeeRemoved?: boolean;
2951
- /** Additional fee id. */
2952
- additionalFeeId?: string;
2953
- }
2954
- /** @oneof */
2955
- export interface AdditionalFeeDeltaDeltaOneOf {
2956
- editedAdditionalFee?: AdditionalFee;
2957
- additionalFeeRemoved?: boolean;
2958
- }
2959
- export interface DraftOrderCommitSettings {
2960
- /** If false, do not send notifications to buyer. Default is true. */
2961
- sendNotificationsToBuyer?: boolean | null;
2962
- /** If false, do not send notifications to business. Default is true. */
2963
- sendNotificationsToBusiness?: boolean | null;
2964
- /** If false,do not add activities to the order. Default is true. */
2965
- addActivitiesToOrder?: boolean | null;
2966
- /** If false, do not send mails to custom fulfillers in case of a change of shippable items fulfilled by custom fulfillers. Default is true. */
2967
- sendNotificationsToCustomFulfillers?: boolean | null;
2968
- /** Inventory changes to be applied. Either to restock, or decrease. */
2969
- inventoryUpdates?: InventoryUpdateDetails[];
2970
- }
2971
- export interface InventoryUpdateDetails {
2972
- /** Action to be applied - decrease or restock */
2973
- actionType?: InventoryAction;
2974
- /** Order line item id */
2975
- lineItemId?: string;
2976
- /** The amount to be increased or restocked */
2977
- quantityChange?: number;
2978
- }
2979
- export declare enum InventoryAction {
2980
- /** Restock inventory */
2981
- RESTOCK = "RESTOCK",
2982
- /** Decrease inventory. Without failing on negative inventory. */
2983
- DECREASE = "DECREASE"
2984
- }
2985
- export interface CommitDeltasResponse {
2986
- /** Order after deltas are applied */
2987
- order?: Order;
2988
- }
2989
- /** Triggered when order is edited by draftOrders */
2990
- export interface OrderDeltasCommitted {
2991
- /** The order after committed changes. */
2992
- order?: Order;
2993
- /** Draft order Id representing this change. */
2994
- draftOrderId?: string;
2995
- /** Applied changes. */
2996
- changes?: CommittedDiffs;
2997
- /** Side-effects requested to happen as a result of this edit. */
2998
- commitSettings?: DraftOrderCommitSettings;
2999
- /**
3000
- * Date and time when order deltas were committed.
3001
- * @readonly
3002
- */
3003
- commitDate?: Date;
3004
- }
3005
- export interface CommittedDiffs extends CommittedDiffsShippingUpdateInfoOneOf {
3006
- /** Shipping info and selected shipping option details. */
3007
- changedShippingInfo?: ShippingInformation;
3008
- /** Remove existing shipping info. */
3009
- shippingInfoRemoved?: boolean;
3010
- /** Added/updated/removed order line items. */
3011
- lineItems?: CommittedDiffsLineItemDelta[];
3012
- /**
3013
- * Added/updated/removed discounts.
3014
- * todo: set (.wix.api.maxSize). need to find it. existing : merchant can have 100 + 1 coupon + ? due to automatic discounts
3015
- */
3016
- appliedDiscounts?: AppliedDiscountDelta[];
3017
- /** Added/updated/removed additional fee. */
3018
- additionalFees?: AdditionalFeeDelta[];
3019
- }
3020
- /** @oneof */
3021
- export interface CommittedDiffsShippingUpdateInfoOneOf {
3022
- /** Shipping info and selected shipping option details. */
3023
- changedShippingInfo?: ShippingInformation;
3024
- /** Remove existing shipping info. */
3025
- shippingInfoRemoved?: boolean;
3026
- }
3027
- export interface CommittedDiffsLineItemDelta extends CommittedDiffsLineItemDeltaDeltaOneOf {
3028
- lineItemAdded?: boolean;
3029
- changedDetails?: ItemChangedDetails;
3030
- lineItemRemoved?: OrderLineItemChangedDetails;
3031
- /** Line item ID. */
3032
- lineItemId?: string;
3033
- }
3034
- /** @oneof */
3035
- export interface CommittedDiffsLineItemDeltaDeltaOneOf {
3036
- lineItemAdded?: boolean;
3037
- changedDetails?: ItemChangedDetails;
3038
- lineItemRemoved?: OrderLineItemChangedDetails;
2703
+ lineItemRemoved?: OrderLineItemChangedDetails;
3039
2704
  }
3040
2705
  export interface ArchiveOrderRequest {
3041
2706
  /** Order ID. */
@@ -3527,115 +3192,477 @@ export interface BulkMarkOrdersAsPaidRequest {
3527
3192
  }
3528
3193
  export interface BulkMarkOrdersAsPaidResponse {
3529
3194
  /**
3530
- * Items updated by the bulk action.
3531
- * The Order entity within the results optimistically changes its payment status to paid, however this process is async.
3195
+ * Items updated by the bulk action.
3196
+ * The Order entity within the results optimistically changes its payment status to paid, however this process is async.
3197
+ */
3198
+ results?: BulkOrderResult[];
3199
+ /** Bulk action metadata. */
3200
+ bulkActionMetadata?: BulkActionMetadata;
3201
+ }
3202
+ export interface CreatePaymentGatewayOrderRequest {
3203
+ /** eCom Order ID */
3204
+ ecomOrderId?: string;
3205
+ }
3206
+ export interface CreatePaymentGatewayOrderResponse {
3207
+ /** ID of the order created in the payment gateway */
3208
+ paymentGatewayOrderId?: string;
3209
+ }
3210
+ export interface GetShipmentsRequest {
3211
+ id?: string;
3212
+ }
3213
+ export interface GetShipmentsResponse {
3214
+ shipmentIds?: string[];
3215
+ }
3216
+ export interface AggregateOrdersRequest {
3217
+ /** Filter applied to original data */
3218
+ filter?: Record<string, any> | null;
3219
+ /** This is an object defining aggregation itself */
3220
+ aggregation?: Record<string, any> | null;
3221
+ /**
3222
+ * Optional custom separator string that can be used to override default separator value '|'
3223
+ * for hierarchical responses of multifaceted aggregation requests like:
3224
+ * '{"aggregation": {"example_request_key": {"$count" : ["deliveryMethod", "shippingRegion"]}}}'
3225
+ * with example response for default '|' separator like:
3226
+ * '{"aggregates" :{"example_request_key": {"(Mail|Region 1)": 5, "(Pickup|Region 2)": 10}}}'
3227
+ */
3228
+ hierarchySeparatorOverride?: string | null;
3229
+ }
3230
+ export interface AggregateOrdersResponse {
3231
+ aggregates?: Record<string, any> | null;
3232
+ }
3233
+ export interface DecrementItemsQuantityRequest {
3234
+ /** Order ID */
3235
+ id?: string;
3236
+ /** Which items to decrement, and how much to decrement from each one */
3237
+ decrementData?: DecrementData[];
3238
+ }
3239
+ export interface DecrementData {
3240
+ /** ID of the line item being decremented. */
3241
+ lineItemId?: string;
3242
+ /** Line item quantity being decremented. */
3243
+ decrementBy?: number;
3244
+ /** Whether to restock the line item (triggers inventory update). */
3245
+ restock?: boolean;
3246
+ }
3247
+ export interface DecrementItemsQuantityResponse {
3248
+ /** Updated order data */
3249
+ order?: Order;
3250
+ }
3251
+ /** Triggered when order items are marked as restocked */
3252
+ export interface OrderItemsRestocked {
3253
+ /** The order which items were restocked */
3254
+ order?: Order;
3255
+ /** Restocked items and quantities */
3256
+ restockItems?: RestockItem[];
3257
+ }
3258
+ export interface RestockItem {
3259
+ /** ID of the line item being restocked. */
3260
+ lineItemId?: string;
3261
+ /** Line item quantity being restocked. */
3262
+ quantity?: number;
3263
+ }
3264
+ /** Triggered when the the order status changes to approved */
3265
+ export interface OrderApproved {
3266
+ /** The order that was updated */
3267
+ order?: Order;
3268
+ }
3269
+ export interface Task {
3270
+ key?: TaskKey;
3271
+ executeAt?: Date;
3272
+ payload?: string | null;
3273
+ }
3274
+ export interface TaskKey {
3275
+ appId?: string;
3276
+ instanceId?: string;
3277
+ subjectId?: string | null;
3278
+ }
3279
+ export interface TaskAction extends TaskActionActionOneOf {
3280
+ complete?: Complete;
3281
+ cancel?: Cancel;
3282
+ reschedule?: Reschedule;
3283
+ }
3284
+ /** @oneof */
3285
+ export interface TaskActionActionOneOf {
3286
+ complete?: Complete;
3287
+ cancel?: Cancel;
3288
+ reschedule?: Reschedule;
3289
+ }
3290
+ export interface Complete {
3291
+ }
3292
+ export interface Cancel {
3293
+ }
3294
+ export interface Reschedule {
3295
+ executeAt?: Date;
3296
+ payload?: string | null;
3297
+ }
3298
+ export interface InvoiceSentEvent {
3299
+ id?: IdAndVersion;
3300
+ /** @readonly */
3301
+ data?: InvoiceFields;
3302
+ /** @readonly */
3303
+ status?: InvoiceStatus;
3304
+ }
3305
+ export interface IdAndVersion {
3306
+ id?: string | null;
3307
+ version?: number | null;
3308
+ }
3309
+ export interface InvoiceFields {
3310
+ /** The invoice number allocated the invoice by the server. The number is limited to at most 11 digits. */
3311
+ number?: string | null;
3312
+ /** The invoice 3-letter currency code in [ISO-4217 alphabetic](https://www.iso.org/iso-4217-currency-codes.html) format. */
3313
+ currencyCode?: string | null;
3314
+ /** The invoice customer. The customer must be a contact of the site, with an email. */
3315
+ customer?: Customer;
3316
+ /**
3317
+ * Invoice dates: issue date and due date are mandatory and provided when the invoice is created.
3318
+ * Last seen date is the optional date when the invoice was last seen be UoU.
3319
+ */
3320
+ dates?: InvoiceDates;
3321
+ /**
3322
+ * Line items containing the details of the products or services relevant to the invoice, with their name, prices,
3323
+ * and quantity. There must be at least one line item on the invoice.
3324
+ */
3325
+ lineItems?: LineItems;
3326
+ /**
3327
+ * Locale of the invoice, containing the language.
3328
+ * This field is not mandatory but is used for display purposes, to determine the appearance of numbers and dates
3329
+ * on the invoice.
3330
+ */
3331
+ locale?: Locale;
3332
+ /**
3333
+ * The totals on the invoice.
3334
+ * The totals.subtotal, totals.total and totals.taxed_amount are calculated by the server based on the line items.
3335
+ * Alternatively, these fields can be provided in the invoice creation request, in this case, these values are fixed.
3336
+ * The totals contain fees and a discount, that apply to the invoice.
3337
+ */
3338
+ totals?: TotalPrice;
3339
+ /** An optional discount on the invoice. */
3340
+ discount?: Discount;
3341
+ /** The taxes of the invoice. */
3342
+ taxes?: CalculatedTaxes;
3343
+ /** The payments on the invoice. The invoice has status paid if its payments cover the invoice total. */
3344
+ payments?: Payments;
3345
+ /** Invoice metadata */
3346
+ metaData?: MetaData;
3347
+ /** Not used */
3348
+ creationAdditional_BIInformation?: string | null;
3349
+ /**
3350
+ * The balance and amount paid on the invoice.
3351
+ * This read-only field is calculated based on the invoice totals and payments.
3352
+ * @readonly
3353
+ */
3354
+ dynamicTotals?: InvoiceDynamicPriceTotals;
3355
+ /** The invoice title */
3356
+ title?: string | null;
3357
+ /** Invoice custom fields */
3358
+ customFields?: CustomFieldValue[];
3359
+ /** Not used */
3360
+ designTemplateId?: string | null;
3361
+ /** Not used */
3362
+ createOrder?: boolean | null;
3363
+ /** The optional deposit of the invoice */
3364
+ deposit?: Deposit;
3365
+ /** associated checkout for this invoice */
3366
+ ecomCheckoutId?: string | null;
3367
+ }
3368
+ export interface Customer {
3369
+ contactId?: string | null;
3370
+ name?: string | null;
3371
+ email?: Email;
3372
+ address?: QuotesAddress;
3373
+ phone?: Phone;
3374
+ company?: Company;
3375
+ firstName?: string | null;
3376
+ lastName?: string | null;
3377
+ billingAddress?: CommonAddress;
3378
+ shippingAddress?: CommonAddress;
3379
+ }
3380
+ export interface Email {
3381
+ address?: string;
3382
+ }
3383
+ export interface QuotesAddress {
3384
+ street?: string | null;
3385
+ city?: string | null;
3386
+ zip?: string | null;
3387
+ state?: string | null;
3388
+ country?: string | null;
3389
+ /** @readonly */
3390
+ description?: AddressDescription;
3391
+ }
3392
+ export interface AddressDescription {
3393
+ content?: string;
3394
+ placement?: Placement;
3395
+ }
3396
+ export declare enum Placement {
3397
+ Unknown = "Unknown",
3398
+ Replace = "Replace",
3399
+ Before = "Before",
3400
+ After = "After"
3401
+ }
3402
+ export interface Phone {
3403
+ number?: string;
3404
+ }
3405
+ export interface Company {
3406
+ name?: string;
3407
+ id?: string | null;
3408
+ }
3409
+ /** Physical address */
3410
+ export interface CommonAddress extends CommonAddressStreetOneOf {
3411
+ /** Street name and number. */
3412
+ streetAddress?: StreetAddress;
3413
+ /** Main address line, usually street and number as free text. */
3414
+ addressLine?: string | null;
3415
+ /** Country code. */
3416
+ country?: string | null;
3417
+ /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
3418
+ subdivision?: string | null;
3419
+ /** City name. */
3420
+ city?: string | null;
3421
+ /** Zip/postal code. */
3422
+ postalCode?: string | null;
3423
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
3424
+ addressLine2?: string | null;
3425
+ }
3426
+ /** @oneof */
3427
+ export interface CommonAddressStreetOneOf {
3428
+ /** Street name and number. */
3429
+ streetAddress?: StreetAddress;
3430
+ /** Main address line, usually street and number as free text. */
3431
+ addressLine?: string | null;
3432
+ }
3433
+ export interface Subdivision {
3434
+ /** Short subdivision code. */
3435
+ code?: string;
3436
+ /** Subdivision full name. */
3437
+ name?: string;
3438
+ }
3439
+ export declare enum SubdivisionType {
3440
+ UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
3441
+ /** State */
3442
+ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
3443
+ /** County */
3444
+ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
3445
+ /** City/town */
3446
+ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
3447
+ /** Neighborhood/quarter */
3448
+ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
3449
+ /** Street/block */
3450
+ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
3451
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
3452
+ COUNTRY = "COUNTRY"
3453
+ }
3454
+ export interface InvoiceDates {
3455
+ /** use UTC midnight date to set the issue date according to the site time zone */
3456
+ issueDate?: Date;
3457
+ /** use UTC midnight date to set the due date according to the site time zone */
3458
+ dueDate?: Date;
3459
+ /** <a href="http://joda-time.sourceforge.net/timezones.html">Valid time zones</a> */
3460
+ timeZoneCode?: string | null;
3461
+ /**
3462
+ * ignored in request use in response to get the site time zone
3463
+ * @readonly
3464
+ */
3465
+ lastSeenDate?: Date;
3466
+ }
3467
+ export interface LineItems {
3468
+ lineItems?: LineItem[];
3469
+ }
3470
+ export interface LineItem {
3471
+ id?: string;
3472
+ name?: string;
3473
+ description?: string | null;
3474
+ price?: BigDecimalWrapper;
3475
+ taxedTotal?: BigDecimalWrapper;
3476
+ quantity?: BigDecimalWrapper;
3477
+ taxes?: LineItemTax[];
3478
+ /** The source of the line item */
3479
+ source?: Source;
3480
+ /** The line-item level metadata. */
3481
+ metadata?: LineItemMetaData;
3482
+ }
3483
+ export interface BigDecimalWrapper {
3484
+ serializedValue?: number;
3485
+ }
3486
+ export interface LineItemTax {
3487
+ name?: string;
3488
+ rate?: BigDecimalWrapper;
3489
+ code?: string | null;
3490
+ }
3491
+ export interface Source {
3492
+ /**
3493
+ * Source app or service ID.
3494
+ * @readonly
3532
3495
  */
3533
- results?: BulkOrderResult[];
3534
- /** Bulk action metadata. */
3535
- bulkActionMetadata?: BulkActionMetadata;
3496
+ sourceId?: string;
3497
+ /**
3498
+ * App or service type.
3499
+ * @readonly
3500
+ */
3501
+ sourceType?: SourceType;
3536
3502
  }
3537
- export interface CreatePaymentGatewayOrderRequest {
3538
- /** eCom Order ID */
3539
- ecomOrderId?: string;
3503
+ export declare enum SourceType {
3504
+ UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
3505
+ WIX_APP = "WIX_APP",
3506
+ EXTERNAL = "EXTERNAL",
3507
+ ADMIN = "ADMIN",
3508
+ OTHER = "OTHER"
3540
3509
  }
3541
- export interface CreatePaymentGatewayOrderResponse {
3542
- /** ID of the order created in the payment gateway */
3543
- paymentGatewayOrderId?: string;
3510
+ export interface LineItemMetaData {
3511
+ metadata?: Record<string, string>;
3544
3512
  }
3545
- export interface GetShipmentsRequest {
3546
- id?: string;
3513
+ export interface Locale {
3514
+ /** ISO 639 alpha-2 or alpha-3 language code, or a language subtag */
3515
+ language?: string;
3516
+ /** An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code. */
3517
+ country?: string | null;
3518
+ invariant?: string | null;
3547
3519
  }
3548
- export interface GetShipmentsResponse {
3549
- shipmentIds?: string[];
3520
+ export interface TotalPrice {
3521
+ /** the subtotal of the line items without the tax reduction */
3522
+ subtotal?: BigDecimalWrapper;
3523
+ /** the total price taking into account the itemized fees and the taxes */
3524
+ total?: BigDecimalWrapper;
3525
+ fees?: ItemizedFee[];
3526
+ discountAmount?: BigDecimalWrapper;
3527
+ taxedAmount?: BigDecimalWrapper;
3550
3528
  }
3551
- export interface AggregateOrdersRequest {
3552
- /** Filter applied to original data */
3553
- filter?: Record<string, any> | null;
3554
- /** This is an object defining aggregation itself */
3555
- aggregation?: Record<string, any> | null;
3556
- /**
3557
- * Optional custom separator string that can be used to override default separator value '|'
3558
- * for hierarchical responses of multifaceted aggregation requests like:
3559
- * '{"aggregation": {"example_request_key": {"$count" : ["deliveryMethod", "shippingRegion"]}}}'
3560
- * with example response for default '|' separator like:
3561
- * '{"aggregates" :{"example_request_key": {"(Mail|Region 1)": 5, "(Pickup|Region 2)": 10}}}'
3562
- */
3563
- hierarchySeparatorOverride?: string | null;
3529
+ export interface ItemizedFee {
3530
+ name?: string;
3531
+ price?: BigDecimalWrapper;
3564
3532
  }
3565
- export interface AggregateOrdersResponse {
3566
- aggregates?: Record<string, any> | null;
3533
+ export interface Discount extends DiscountOneDiscountTypeOneOf {
3534
+ /** Discount as percentage value. */
3535
+ percentage?: BigDecimalWrapper;
3567
3536
  }
3568
- export interface DecrementItemsQuantityRequest {
3569
- /** Order ID */
3570
- id?: string;
3571
- /** Which items to decrement, and how much to decrement from each one */
3572
- decrementData?: DecrementData[];
3537
+ /** @oneof */
3538
+ export interface DiscountOneDiscountTypeOneOf {
3539
+ /** Discount as percentage value. */
3540
+ percentage?: BigDecimalWrapper;
3573
3541
  }
3574
- export interface DecrementData {
3575
- /** ID of the line item being decremented. */
3576
- lineItemId?: string;
3577
- /** Line item quantity being decremented. */
3578
- decrementBy?: number;
3579
- /** Whether to restock the line item (triggers inventory update). */
3580
- restock?: boolean;
3542
+ export interface CalculatedTaxes {
3543
+ /** consider calculated or not - cannot enforce set */
3544
+ taxes?: CalculatedTax[];
3581
3545
  }
3582
- export interface DecrementItemsQuantityResponse {
3583
- /** Updated order data */
3584
- order?: Order;
3546
+ export interface CalculatedTax {
3547
+ name?: string;
3548
+ rate?: BigDecimalWrapper;
3549
+ /** the costs on which the taxes are applied */
3550
+ taxable?: BigDecimalWrapper;
3551
+ /** the taxes as a result of the */
3552
+ taxed?: BigDecimalWrapper;
3553
+ code?: string | null;
3585
3554
  }
3586
- /** Triggered when order items are marked as restocked */
3587
- export interface OrderItemsRestocked {
3588
- /** The order which items were restocked */
3589
- order?: Order;
3590
- /** Restocked items and quantities */
3591
- restockItems?: RestockItem[];
3555
+ export interface Payments {
3556
+ payments?: Payment[];
3592
3557
  }
3593
- export interface RestockItem {
3594
- /** ID of the line item being restocked. */
3595
- lineItemId?: string;
3596
- /** Line item quantity being restocked. */
3597
- quantity?: number;
3558
+ export interface Payment {
3559
+ /** document */
3560
+ id?: string;
3561
+ type?: string;
3562
+ amount?: BigDecimalWrapper;
3563
+ date?: Date;
3564
+ /**
3565
+ * The orderId of the order in cashier associated with the payment.
3566
+ * This field is populated for external payments that are charged by invoices via AddPayment endpoint.
3567
+ */
3568
+ orderId?: string | null;
3569
+ /**
3570
+ * The transactionId corresponding to the orderId of the payment which are returned by cashier.
3571
+ * This field is populated for external payments that are charged by invoices via AddPayment endpoint as well.
3572
+ */
3573
+ transactionId?: string | null;
3598
3574
  }
3599
- /** Triggered when the the order status changes to approved */
3600
- export interface OrderApproved {
3601
- /** The order that was updated */
3602
- order?: Order;
3575
+ export interface MetaData {
3576
+ notes?: string | null;
3577
+ legalTerms?: string | null;
3578
+ sourceUrl?: string | null;
3579
+ sourceProperties?: Record<string, string>;
3580
+ source?: string | null;
3581
+ sourceRefId?: string | null;
3582
+ /** Optional indicator whether to allow editing of the invoice by other applications other than the source. Default is true. */
3583
+ allowEditByOthers?: boolean | null;
3603
3584
  }
3604
- export interface Task {
3605
- key?: TaskKey;
3606
- executeAt?: Date;
3607
- payload?: string | null;
3585
+ export interface InvoiceDynamicPriceTotals {
3586
+ paidAmount?: BigDecimalWrapper;
3587
+ balance?: BigDecimalWrapper;
3608
3588
  }
3609
- export interface TaskKey {
3610
- appId?: string;
3611
- instanceId?: string;
3612
- subjectId?: string | null;
3589
+ /**
3590
+ * A custom field value is used to add additional data to a financial document or to a financial document template.
3591
+ * The custom field value may be based on a custom field definition.
3592
+ */
3593
+ export interface CustomFieldValue {
3594
+ /**
3595
+ * The unique id of the custom field value
3596
+ * @readonly
3597
+ */
3598
+ id?: string | null;
3599
+ /** The display name of the custom field value */
3600
+ displayName?: string;
3601
+ /** The optional namespace of the custom field value. This field may be used to indicate intended usage or source. */
3602
+ namespace?: string | null;
3603
+ /** The group of the custom field indicates its intended placement in the financial document */
3604
+ group?: CustomFieldGroup;
3605
+ /** The value of the custom field */
3606
+ value?: Value;
3607
+ /** The optional key of the custom field definition on which the custom field value is based */
3608
+ originCustomFieldKey?: string | null;
3613
3609
  }
3614
- export interface TaskAction extends TaskActionActionOneOf {
3615
- complete?: Complete;
3616
- cancel?: Cancel;
3617
- reschedule?: Reschedule;
3610
+ export declare enum CustomFieldGroup {
3611
+ UNKNOWN_CUSTOM_FIELD_GROUP = "UNKNOWN_CUSTOM_FIELD_GROUP",
3612
+ BUSINESS_DETAILS = "BUSINESS_DETAILS",
3613
+ CUSTOMER_DETAILS = "CUSTOMER_DETAILS",
3614
+ DOCUMENT = "DOCUMENT",
3615
+ FOOTER = "FOOTER",
3616
+ OTHER = "OTHER"
3618
3617
  }
3619
- /** @oneof */
3620
- export interface TaskActionActionOneOf {
3621
- complete?: Complete;
3622
- cancel?: Cancel;
3623
- reschedule?: Reschedule;
3618
+ export interface Value {
3619
+ value?: string;
3620
+ valueType?: ValueType;
3624
3621
  }
3625
- export interface Complete {
3622
+ export declare enum ValueType {
3623
+ UNKNOWN_VALUE_TYPE = "UNKNOWN_VALUE_TYPE",
3624
+ STRING = "STRING",
3625
+ DATE = "DATE",
3626
+ BOOLEAN = "BOOLEAN",
3627
+ NUMBER = "NUMBER"
3626
3628
  }
3627
- export interface Cancel {
3629
+ export interface Deposit {
3630
+ /** The flat amount of the deposit. The flat amount of the deposit must be less than the invoice total. */
3631
+ flatAmount?: string;
3632
+ /**
3633
+ * The read-only percentage value of the deposit.
3634
+ * It is computed according to the flat_amount and the invoice total and is rounded to 2 digits precision.
3635
+ * @readonly
3636
+ */
3637
+ percentage?: string;
3638
+ /** The type of the deposit. The default is FLAT. */
3639
+ type?: DepositType;
3628
3640
  }
3629
- export interface Reschedule {
3630
- executeAt?: Date;
3631
- payload?: string | null;
3641
+ export declare enum DepositType {
3642
+ UNKNOWN = "UNKNOWN",
3643
+ FLAT = "FLAT",
3644
+ PERCENTAGE = "PERCENTAGE"
3632
3645
  }
3633
- export interface InvoiceSentEvent {
3634
- id?: IdAndVersion;
3635
- /** @readonly */
3636
- data?: InvoiceFields;
3637
- /** @readonly */
3638
- status?: InvoiceStatus;
3646
+ /**
3647
+ * InvoiceStatus allowed transitions based on current status:
3648
+ * Draft -> Deleted, Paid, Partially Paid, Sent
3649
+ * Sent -> Draft, Deleted, Void, Paid, Partially Paid, Processing, (Overdue)
3650
+ * Processing -> PartiallyPaid, Paid, Sent
3651
+ * Paid -> Void
3652
+ * PartiallyPaid -> Void, (PartialAndOverdue)
3653
+ * Void -> Deleted
3654
+ * Deleted
3655
+ */
3656
+ export declare enum InvoiceStatus {
3657
+ Draft = "Draft",
3658
+ Sent = "Sent",
3659
+ Processing = "Processing",
3660
+ Paid = "Paid",
3661
+ Overdue = "Overdue",
3662
+ Void = "Void",
3663
+ Deleted = "Deleted",
3664
+ PartiallyPaid = "PartiallyPaid",
3665
+ PartialAndOverdue = "PartialAndOverdue"
3639
3666
  }
3640
3667
  export interface TriggerSideEffectsFromLegacyData {
3641
3668
  storeId?: string;
@@ -4164,6 +4191,14 @@ export interface GetOrderResponseNonNullableFields {
4164
4191
  };
4165
4192
  };
4166
4193
  };
4194
+ tags?: {
4195
+ privateTags?: {
4196
+ tagIds: string[];
4197
+ };
4198
+ tags?: {
4199
+ tagIds: string[];
4200
+ };
4201
+ };
4167
4202
  };
4168
4203
  }
4169
4204
  export interface SearchOrdersResponseNonNullableFields {
@@ -4688,6 +4723,14 @@ export interface SearchOrdersResponseNonNullableFields {
4688
4723
  };
4689
4724
  };
4690
4725
  };
4726
+ tags?: {
4727
+ privateTags?: {
4728
+ tagIds: string[];
4729
+ };
4730
+ tags?: {
4731
+ tagIds: string[];
4732
+ };
4733
+ };
4691
4734
  }[];
4692
4735
  }
4693
4736
  export interface CreateOrderResponseNonNullableFields {
@@ -5212,6 +5255,14 @@ export interface CreateOrderResponseNonNullableFields {
5212
5255
  };
5213
5256
  };
5214
5257
  };
5258
+ tags?: {
5259
+ privateTags?: {
5260
+ tagIds: string[];
5261
+ };
5262
+ tags?: {
5263
+ tagIds: string[];
5264
+ };
5265
+ };
5215
5266
  };
5216
5267
  }
5217
5268
  export interface UpdateOrderResponseNonNullableFields {
@@ -5736,6 +5787,14 @@ export interface UpdateOrderResponseNonNullableFields {
5736
5787
  };
5737
5788
  };
5738
5789
  };
5790
+ tags?: {
5791
+ privateTags?: {
5792
+ tagIds: string[];
5793
+ };
5794
+ tags?: {
5795
+ tagIds: string[];
5796
+ };
5797
+ };
5739
5798
  };
5740
5799
  }
5741
5800
  export interface CancelOrderResponseNonNullableFields {
@@ -6260,5 +6319,13 @@ export interface CancelOrderResponseNonNullableFields {
6260
6319
  };
6261
6320
  };
6262
6321
  };
6322
+ tags?: {
6323
+ privateTags?: {
6324
+ tagIds: string[];
6325
+ };
6326
+ tags?: {
6327
+ tagIds: string[];
6328
+ };
6329
+ };
6263
6330
  };
6264
6331
  }