@wix/auto_sdk_ecom_order-payment-requests 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.context.d.ts +11 -0
  11. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.context.js +17 -0
  12. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.http.d.ts +33 -0
  14. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.http.js +266 -0
  15. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.meta.d.ts +27 -0
  17. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.meta.js +163 -0
  18. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.public.d.ts +76 -0
  20. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.public.js +52 -0
  21. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.public.js.map +1 -0
  22. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.types.d.ts +399 -0
  23. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.types.js +24 -0
  24. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.types.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.universal.d.ts +639 -0
  26. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.universal.js +405 -0
  27. package/build/cjs/src/ecom-v1-order-payment-request-order-payment-requests.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.context.d.ts +11 -0
  39. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.context.js +11 -0
  40. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.http.d.ts +33 -0
  42. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.http.js +256 -0
  43. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.meta.d.ts +27 -0
  45. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.meta.js +130 -0
  46. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.public.d.ts +76 -0
  48. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.public.js +39 -0
  49. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.public.js.map +1 -0
  50. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.types.d.ts +399 -0
  51. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.types.js +21 -0
  52. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.types.js.map +1 -0
  53. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.universal.d.ts +639 -0
  54. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.universal.js +372 -0
  55. package/build/es/src/ecom-v1-order-payment-request-order-payment-requests.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.context.d.ts +11 -0
  66. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.context.js +17 -0
  67. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.http.d.ts +33 -0
  69. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.http.js +266 -0
  70. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.meta.d.ts +27 -0
  72. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.meta.js +163 -0
  73. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.public.d.ts +76 -0
  75. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.public.js +52 -0
  76. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.types.d.ts +399 -0
  78. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.types.js +24 -0
  79. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.universal.d.ts +639 -0
  81. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.universal.js +405 -0
  82. package/build/internal/cjs/src/ecom-v1-order-payment-request-order-payment-requests.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.context.d.ts +11 -0
  93. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.context.js +11 -0
  94. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.http.d.ts +33 -0
  96. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.http.js +256 -0
  97. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.meta.d.ts +27 -0
  99. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.meta.js +130 -0
  100. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.public.d.ts +76 -0
  102. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.public.js +39 -0
  103. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.types.d.ts +399 -0
  105. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.types.js +21 -0
  106. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.universal.d.ts +639 -0
  108. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.universal.js +372 -0
  109. package/build/internal/es/src/ecom-v1-order-payment-request-order-payment-requests.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,639 @@
1
+ export interface OrderPaymentRequest {
2
+ /**
3
+ * Order payment request ID.
4
+ * @readonly
5
+ */
6
+ _id?: string | null;
7
+ /** Additional parameters to identify the source of the order payment request. */
8
+ source?: Source;
9
+ /**
10
+ * status.
11
+ * @readonly
12
+ */
13
+ status?: Status;
14
+ /** Order ID. */
15
+ orderId?: string;
16
+ /**
17
+ * Order number.
18
+ * @readonly
19
+ */
20
+ orderNumber?: string | null;
21
+ /**
22
+ * Amount to collect.
23
+ * > **Note:** The amount can only be set once.
24
+ */
25
+ amount?: Price;
26
+ /**
27
+ * Currency code. The value will always match the currency used in the order.
28
+ * @readonly
29
+ */
30
+ currency?: string;
31
+ /**
32
+ * Payment gateway order id which is associated with this payment request
33
+ * @readonly
34
+ */
35
+ paymentGatewayOrderId?: string | null;
36
+ /** Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for. */
37
+ title?: string;
38
+ /** Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for. */
39
+ description?: string | null;
40
+ /** Image to be displayed to the customer on the payment page. */
41
+ image?: string;
42
+ /** Time and date the order payment request expires. */
43
+ expirationDate?: Date | null;
44
+ /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */
45
+ extendedFields?: ExtendedFields;
46
+ /**
47
+ * Date and time the OrderPaymentRequest was created.
48
+ * @readonly
49
+ */
50
+ _createdDate?: Date | null;
51
+ /**
52
+ * Date and time the OrderPaymentRequest was last updated.
53
+ * @readonly
54
+ */
55
+ _updatedDate?: Date | null;
56
+ }
57
+ export interface Source {
58
+ /** App Def ID that created the order payment request. */
59
+ appId?: string | null;
60
+ /** Reference to an ID from an external system, indicating the original source of the order payment request. */
61
+ externalId?: string;
62
+ }
63
+ export declare enum Status {
64
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
65
+ UNPAID = "UNPAID",
66
+ PAID = "PAID",
67
+ EXPIRED = "EXPIRED"
68
+ }
69
+ export interface Price {
70
+ /** Amount. */
71
+ amount?: string;
72
+ /**
73
+ * Amount formatted with currency symbol.
74
+ * @readonly
75
+ */
76
+ formattedAmount?: string;
77
+ }
78
+ export interface ExtendedFields {
79
+ /**
80
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
81
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
82
+ *
83
+ * You can only access fields for which you have the appropriate permissions.
84
+ *
85
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
86
+ */
87
+ namespaces?: Record<string, Record<string, any>>;
88
+ }
89
+ /** Triggered when the the order payment request status changes to paid */
90
+ export interface OrderPaymentRequestPaid {
91
+ /** The order that was updated */
92
+ orderPaymentRequest?: OrderPaymentRequest;
93
+ }
94
+ /** Triggered when the the order payment request status changes to expired */
95
+ export interface OrderPaymentRequestExpired {
96
+ /** The order that was updated */
97
+ orderPaymentRequest?: OrderPaymentRequest;
98
+ }
99
+ export interface CreateOrderPaymentRequestRequest {
100
+ /** OrderPaymentRequest to be created. */
101
+ orderPaymentRequest?: OrderPaymentRequest;
102
+ }
103
+ export interface CreateOrderPaymentRequestResponse {
104
+ /** The created OrderPaymentRequest. */
105
+ orderPaymentRequest?: OrderPaymentRequest;
106
+ /** Order payment request URL. */
107
+ orderPaymentRequestUrl?: string;
108
+ }
109
+ export interface GetOrderPaymentRequestRequest {
110
+ /** ID of the OrderPaymentRequest to retrieve. */
111
+ orderPaymentRequestId: string;
112
+ }
113
+ export interface GetOrderPaymentRequestResponse {
114
+ /** The requested OrderPaymentRequest. */
115
+ orderPaymentRequest?: OrderPaymentRequest;
116
+ }
117
+ export interface UpdateOrderPaymentRequestRequest {
118
+ /** OrderPaymentRequest to be updated, may be partial. */
119
+ orderPaymentRequest: OrderPaymentRequest;
120
+ }
121
+ export interface UpdateOrderPaymentRequestResponse {
122
+ /** Updated OrderPaymentRequest. */
123
+ orderPaymentRequest?: OrderPaymentRequest;
124
+ }
125
+ export interface DeleteOrderPaymentRequestRequest {
126
+ /** Id of the OrderPaymentRequest to delete. */
127
+ orderPaymentRequestId: string;
128
+ }
129
+ export interface DeleteOrderPaymentRequestResponse {
130
+ }
131
+ export interface QueryOrderPaymentRequestsRequest {
132
+ /** WQL expression. */
133
+ query?: CursorQuery;
134
+ }
135
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
136
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
137
+ cursorPaging?: CursorPaging;
138
+ /**
139
+ * Filter object in the following format:
140
+ * `"filter" : {
141
+ * "fieldName1": "value1",
142
+ * "fieldName2":{"$operator":"value2"}
143
+ * }`
144
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
145
+ */
146
+ filter?: Record<string, any> | null;
147
+ /**
148
+ * Sort object in the following format:
149
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
150
+ */
151
+ sort?: Sorting[];
152
+ }
153
+ /** @oneof */
154
+ export interface CursorQueryPagingMethodOneOf {
155
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
156
+ cursorPaging?: CursorPaging;
157
+ }
158
+ export interface Sorting {
159
+ /** Name of the field to sort by. */
160
+ fieldName?: string;
161
+ /** Sort order. */
162
+ order?: SortOrder;
163
+ }
164
+ export declare enum SortOrder {
165
+ ASC = "ASC",
166
+ DESC = "DESC"
167
+ }
168
+ export interface CursorPaging {
169
+ /** Maximum number of items to return in the results. */
170
+ limit?: number | null;
171
+ /**
172
+ * Pointer to the next or previous page in the list of results.
173
+ *
174
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
175
+ * Not relevant for the first request.
176
+ */
177
+ cursor?: string | null;
178
+ }
179
+ export interface QueryOrderPaymentRequestsResponse {
180
+ /** List of payment requests. */
181
+ orderPaymentRequests?: OrderPaymentRequest[];
182
+ /** Paging metadata */
183
+ pagingMetadata?: CursorPagingMetadata;
184
+ }
185
+ export interface CursorPagingMetadata {
186
+ /** Number of items returned in the response. */
187
+ count?: number | null;
188
+ /** Cursor strings that point to the next page, previous page, or both. */
189
+ cursors?: Cursors;
190
+ /**
191
+ * Whether there are more pages to retrieve following the current page.
192
+ *
193
+ * + `true`: Another page of results can be retrieved.
194
+ * + `false`: This is the last page.
195
+ */
196
+ hasNext?: boolean | null;
197
+ }
198
+ export interface Cursors {
199
+ /** Cursor string pointing to the next page in the list of results. */
200
+ next?: string | null;
201
+ /** Cursor pointing to the previous page in the list of results. */
202
+ prev?: string | null;
203
+ }
204
+ export interface GetOrderPaymentRequestURLRequest {
205
+ /** Order Payment Request ID. */
206
+ orderPaymentRequestId: string;
207
+ }
208
+ export interface GetOrderPaymentRequestURLResponse {
209
+ /** Order Payment Request URL. */
210
+ orderPaymentRequestUrl?: string;
211
+ }
212
+ export interface UpdateExtendedFieldsRequest {
213
+ /** ID of the entity to update. */
214
+ _id: string;
215
+ /** Identifier for the app whose extended fields are being updated. */
216
+ namespace: string;
217
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
218
+ namespaceData: Record<string, any> | null;
219
+ }
220
+ export interface UpdateExtendedFieldsResponse {
221
+ /** Updated OrderPaymentRequest. */
222
+ orderPaymentRequest?: OrderPaymentRequest;
223
+ }
224
+ export interface DomainEvent extends DomainEventBodyOneOf {
225
+ createdEvent?: EntityCreatedEvent;
226
+ updatedEvent?: EntityUpdatedEvent;
227
+ deletedEvent?: EntityDeletedEvent;
228
+ actionEvent?: ActionEvent;
229
+ /**
230
+ * Unique event ID.
231
+ * Allows clients to ignore duplicate webhooks.
232
+ */
233
+ _id?: string;
234
+ /**
235
+ * Assumes actions are also always typed to an entity_type
236
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
237
+ */
238
+ entityFqdn?: string;
239
+ /**
240
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
241
+ * This is although the created/updated/deleted notion is duplication of the oneof types
242
+ * Example: created/updated/deleted/started/completed/email_opened
243
+ */
244
+ slug?: string;
245
+ /** ID of the entity associated with the event. */
246
+ entityId?: string;
247
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
248
+ eventTime?: Date | null;
249
+ /**
250
+ * Whether the event was triggered as a result of a privacy regulation application
251
+ * (for example, GDPR).
252
+ */
253
+ triggeredByAnonymizeRequest?: boolean | null;
254
+ /** If present, indicates the action that triggered the event. */
255
+ originatedFrom?: string | null;
256
+ /**
257
+ * A sequence number defining the order of updates to the underlying entity.
258
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
259
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
260
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
261
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
262
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
263
+ */
264
+ entityEventSequence?: string | null;
265
+ }
266
+ /** @oneof */
267
+ export interface DomainEventBodyOneOf {
268
+ createdEvent?: EntityCreatedEvent;
269
+ updatedEvent?: EntityUpdatedEvent;
270
+ deletedEvent?: EntityDeletedEvent;
271
+ actionEvent?: ActionEvent;
272
+ }
273
+ export interface EntityCreatedEvent {
274
+ entity?: string;
275
+ }
276
+ export interface RestoreInfo {
277
+ deletedDate?: Date | null;
278
+ }
279
+ export interface EntityUpdatedEvent {
280
+ /**
281
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
282
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
283
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
284
+ */
285
+ currentEntity?: string;
286
+ }
287
+ export interface EntityDeletedEvent {
288
+ /** Entity that was deleted */
289
+ deletedEntity?: string | null;
290
+ }
291
+ export interface ActionEvent {
292
+ body?: string;
293
+ }
294
+ export interface Empty {
295
+ }
296
+ export interface MessageEnvelope {
297
+ /** App instance ID. */
298
+ instanceId?: string | null;
299
+ /** Event type. */
300
+ eventType?: string;
301
+ /** The identification type and identity data. */
302
+ identity?: IdentificationData;
303
+ /** Stringify payload. */
304
+ data?: string;
305
+ }
306
+ export interface IdentificationData extends IdentificationDataIdOneOf {
307
+ /** ID of a site visitor that has not logged in to the site. */
308
+ anonymousVisitorId?: string;
309
+ /** ID of a site visitor that has logged in to the site. */
310
+ memberId?: string;
311
+ /** ID of a Wix user (site owner, contributor, etc.). */
312
+ wixUserId?: string;
313
+ /** ID of an app. */
314
+ appId?: string;
315
+ /** @readonly */
316
+ identityType?: WebhookIdentityType;
317
+ }
318
+ /** @oneof */
319
+ export interface IdentificationDataIdOneOf {
320
+ /** ID of a site visitor that has not logged in to the site. */
321
+ anonymousVisitorId?: string;
322
+ /** ID of a site visitor that has logged in to the site. */
323
+ memberId?: string;
324
+ /** ID of a Wix user (site owner, contributor, etc.). */
325
+ wixUserId?: string;
326
+ /** ID of an app. */
327
+ appId?: string;
328
+ }
329
+ export declare enum WebhookIdentityType {
330
+ UNKNOWN = "UNKNOWN",
331
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
332
+ MEMBER = "MEMBER",
333
+ WIX_USER = "WIX_USER",
334
+ APP = "APP"
335
+ }
336
+ interface SourceNonNullableFields {
337
+ externalId: string;
338
+ }
339
+ interface PriceNonNullableFields {
340
+ amount: string;
341
+ formattedAmount: string;
342
+ }
343
+ export interface OrderPaymentRequestNonNullableFields {
344
+ source?: SourceNonNullableFields;
345
+ status: Status;
346
+ orderId: string;
347
+ amount?: PriceNonNullableFields;
348
+ currency: string;
349
+ title: string;
350
+ image: string;
351
+ }
352
+ export interface CreateOrderPaymentRequestResponseNonNullableFields {
353
+ orderPaymentRequest?: OrderPaymentRequestNonNullableFields;
354
+ orderPaymentRequestUrl: string;
355
+ }
356
+ export interface GetOrderPaymentRequestResponseNonNullableFields {
357
+ orderPaymentRequest?: OrderPaymentRequestNonNullableFields;
358
+ }
359
+ export interface UpdateOrderPaymentRequestResponseNonNullableFields {
360
+ orderPaymentRequest?: OrderPaymentRequestNonNullableFields;
361
+ }
362
+ export interface QueryOrderPaymentRequestsResponseNonNullableFields {
363
+ orderPaymentRequests: OrderPaymentRequestNonNullableFields[];
364
+ }
365
+ export interface GetOrderPaymentRequestURLResponseNonNullableFields {
366
+ orderPaymentRequestUrl: string;
367
+ }
368
+ export interface UpdateExtendedFieldsResponseNonNullableFields {
369
+ orderPaymentRequest?: OrderPaymentRequestNonNullableFields;
370
+ }
371
+ /**
372
+ * Creates a order payment request.
373
+ * @public
374
+ * @documentationMaturity preview
375
+ * @requiredField options.orderPaymentRequest.amount
376
+ * @requiredField options.orderPaymentRequest.orderId
377
+ * @requiredField options.orderPaymentRequest.title
378
+ * @permissionId ECOM.ORDER_PAYMENT_REQUEST_CREATE
379
+ * @permissionScope Manage Stores - all permissions
380
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
381
+ * @permissionScope Manage eCommerce - all permissions
382
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
383
+ * @applicableIdentity APP
384
+ * @returns The created OrderPaymentRequest.
385
+ * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.CreateOrderPaymentRequest
386
+ */
387
+ export declare function createOrderPaymentRequest(options?: CreateOrderPaymentRequestOptions): Promise<OrderPaymentRequest & OrderPaymentRequestNonNullableFields>;
388
+ export interface CreateOrderPaymentRequestOptions {
389
+ /** OrderPaymentRequest to be created. */
390
+ orderPaymentRequest?: OrderPaymentRequest;
391
+ }
392
+ /**
393
+ * Retrieves a order payment request.
394
+ * @param orderPaymentRequestId - ID of the OrderPaymentRequest to retrieve.
395
+ * @public
396
+ * @documentationMaturity preview
397
+ * @requiredField orderPaymentRequestId
398
+ * @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
399
+ * @permissionScope Manage Stores - all permissions
400
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
401
+ * @permissionScope Manage eCommerce - all permissions
402
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
403
+ * @applicableIdentity APP
404
+ * @applicableIdentity VISITOR
405
+ * @returns The requested OrderPaymentRequest.
406
+ * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequest
407
+ */
408
+ export declare function getOrderPaymentRequest(orderPaymentRequestId: string): Promise<OrderPaymentRequest & OrderPaymentRequestNonNullableFields>;
409
+ /**
410
+ * Updates a order payment request.
411
+ *
412
+ * Please note that only `UNPAID` payment requests can be updated.
413
+ * @param _id - Order payment request ID.
414
+ * @public
415
+ * @documentationMaturity preview
416
+ * @requiredField _id
417
+ * @requiredField orderPaymentRequest
418
+ * @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
419
+ * @permissionScope Manage Stores - all permissions
420
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
421
+ * @permissionScope Manage eCommerce - all permissions
422
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
423
+ * @applicableIdentity APP
424
+ * @returns Updated OrderPaymentRequest.
425
+ * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateOrderPaymentRequest
426
+ */
427
+ export declare function updateOrderPaymentRequest(_id: string | null, orderPaymentRequest: UpdateOrderPaymentRequest): Promise<OrderPaymentRequest & OrderPaymentRequestNonNullableFields>;
428
+ export interface UpdateOrderPaymentRequest {
429
+ /**
430
+ * Order payment request ID.
431
+ * @readonly
432
+ */
433
+ _id?: string | null;
434
+ /** Additional parameters to identify the source of the order payment request. */
435
+ source?: Source;
436
+ /**
437
+ * status.
438
+ * @readonly
439
+ */
440
+ status?: Status;
441
+ /** Order ID. */
442
+ orderId?: string;
443
+ /**
444
+ * Order number.
445
+ * @readonly
446
+ */
447
+ orderNumber?: string | null;
448
+ /**
449
+ * Amount to collect.
450
+ * > **Note:** The amount can only be set once.
451
+ */
452
+ amount?: Price;
453
+ /**
454
+ * Currency code. The value will always match the currency used in the order.
455
+ * @readonly
456
+ */
457
+ currency?: string;
458
+ /**
459
+ * Payment gateway order id which is associated with this payment request
460
+ * @readonly
461
+ */
462
+ paymentGatewayOrderId?: string | null;
463
+ /** Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for. */
464
+ title?: string;
465
+ /** Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for. */
466
+ description?: string | null;
467
+ /** Image to be displayed to the customer on the payment page. */
468
+ image?: string;
469
+ /** Time and date the order payment request expires. */
470
+ expirationDate?: Date | null;
471
+ /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */
472
+ extendedFields?: ExtendedFields;
473
+ /**
474
+ * Date and time the OrderPaymentRequest was created.
475
+ * @readonly
476
+ */
477
+ _createdDate?: Date | null;
478
+ /**
479
+ * Date and time the OrderPaymentRequest was last updated.
480
+ * @readonly
481
+ */
482
+ _updatedDate?: Date | null;
483
+ }
484
+ /**
485
+ * Deletes a order payment request.
486
+ *
487
+ * Please note that only `UNPAID` payment requests can be deleted.
488
+ * @param orderPaymentRequestId - Id of the OrderPaymentRequest to delete.
489
+ * @public
490
+ * @documentationMaturity preview
491
+ * @requiredField orderPaymentRequestId
492
+ * @permissionId ECOM.ORDER_PAYMENT_REQUEST_DELETE
493
+ * @permissionScope Manage Stores - all permissions
494
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
495
+ * @permissionScope Manage eCommerce - all permissions
496
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
497
+ * @applicableIdentity APP
498
+ * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.DeleteOrderPaymentRequest
499
+ */
500
+ export declare function deleteOrderPaymentRequest(orderPaymentRequestId: string): Promise<void>;
501
+ /**
502
+ * Retrieves a list of Payment Requests, given the provided [paging, filtering, and sorting][1].
503
+ *
504
+ * Query Payment Requests runs with these defaults, which you can override:
505
+ * - `createdDate` is sorted in DESC order
506
+ * - `cursorPaging.limit` is 100
507
+ *
508
+ * To learn about working with _Query_ endpoints, see
509
+ * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and
510
+ * [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
511
+ * @public
512
+ * @documentationMaturity preview
513
+ * @permissionScope Manage Stores - all permissions
514
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
515
+ * @permissionScope Manage eCommerce - all permissions
516
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
517
+ * @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
518
+ * @applicableIdentity APP
519
+ * @applicableIdentity VISITOR
520
+ * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.QueryOrderPaymentRequests
521
+ */
522
+ export declare function queryOrderPaymentRequests(): OrderPaymentRequestsQueryBuilder;
523
+ interface QueryCursorResult {
524
+ cursors: Cursors;
525
+ hasNext: () => boolean;
526
+ hasPrev: () => boolean;
527
+ length: number;
528
+ pageSize: number;
529
+ }
530
+ export interface OrderPaymentRequestsQueryResult extends QueryCursorResult {
531
+ items: OrderPaymentRequest[];
532
+ query: OrderPaymentRequestsQueryBuilder;
533
+ next: () => Promise<OrderPaymentRequestsQueryResult>;
534
+ prev: () => Promise<OrderPaymentRequestsQueryResult>;
535
+ }
536
+ export interface OrderPaymentRequestsQueryBuilder {
537
+ /** @param propertyName - Property whose value is compared with `value`.
538
+ * @param value - Value to compare against.
539
+ * @documentationMaturity preview
540
+ */
541
+ eq: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'amount.amount' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
542
+ /** @param propertyName - Property whose value is compared with `value`.
543
+ * @param value - Value to compare against.
544
+ * @documentationMaturity preview
545
+ */
546
+ ne: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
547
+ /** @param propertyName - Property whose value is compared with `value`.
548
+ * @param value - Value to compare against.
549
+ * @documentationMaturity preview
550
+ */
551
+ ge: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
552
+ /** @param propertyName - Property whose value is compared with `value`.
553
+ * @param value - Value to compare against.
554
+ * @documentationMaturity preview
555
+ */
556
+ gt: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
557
+ /** @param propertyName - Property whose value is compared with `value`.
558
+ * @param value - Value to compare against.
559
+ * @documentationMaturity preview
560
+ */
561
+ le: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
562
+ /** @param propertyName - Property whose value is compared with `value`.
563
+ * @param value - Value to compare against.
564
+ * @documentationMaturity preview
565
+ */
566
+ lt: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
567
+ /** @param propertyName - Property whose value is compared with `string`.
568
+ * @param string - String to compare against. Case-insensitive.
569
+ * @documentationMaturity preview
570
+ */
571
+ startsWith: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description', value: string) => OrderPaymentRequestsQueryBuilder;
572
+ /** @param propertyName - Property whose value is compared with `values`.
573
+ * @param values - List of values to compare against.
574
+ * @documentationMaturity preview
575
+ */
576
+ hasSome: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any[]) => OrderPaymentRequestsQueryBuilder;
577
+ /** @documentationMaturity preview */
578
+ in: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
579
+ /** @documentationMaturity preview */
580
+ exists: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: boolean) => OrderPaymentRequestsQueryBuilder;
581
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
582
+ * @documentationMaturity preview
583
+ */
584
+ ascending: (...propertyNames: Array<'status' | 'orderNumber' | 'amount.amount' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate'>) => OrderPaymentRequestsQueryBuilder;
585
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
586
+ * @documentationMaturity preview
587
+ */
588
+ descending: (...propertyNames: Array<'status' | 'orderNumber' | 'amount.amount' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate'>) => OrderPaymentRequestsQueryBuilder;
589
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
590
+ * @documentationMaturity preview
591
+ */
592
+ limit: (limit: number) => OrderPaymentRequestsQueryBuilder;
593
+ /** @param cursor - A pointer to specific record
594
+ * @documentationMaturity preview
595
+ */
596
+ skipTo: (cursor: string) => OrderPaymentRequestsQueryBuilder;
597
+ /** @documentationMaturity preview */
598
+ find: () => Promise<OrderPaymentRequestsQueryResult>;
599
+ }
600
+ /**
601
+ * Retrieves the order payment request page URL of a specified order payment request.
602
+ * @param orderPaymentRequestId - Order Payment Request ID.
603
+ * @public
604
+ * @documentationMaturity preview
605
+ * @requiredField orderPaymentRequestId
606
+ * @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
607
+ * @permissionScope Manage Stores - all permissions
608
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
609
+ * @permissionScope Manage eCommerce - all permissions
610
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
611
+ * @applicableIdentity APP
612
+ * @applicableIdentity VISITOR
613
+ * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequestURL
614
+ */
615
+ export declare function getOrderPaymentRequestUrl(orderPaymentRequestId: string): Promise<GetOrderPaymentRequestURLResponse & GetOrderPaymentRequestURLResponseNonNullableFields>;
616
+ /**
617
+ * Updates extended fields of a order payment request
618
+ * @param _id - ID of the entity to update.
619
+ * @param namespace - Identifier for the app whose extended fields are being updated.
620
+ * @public
621
+ * @documentationMaturity preview
622
+ * @requiredField _id
623
+ * @requiredField namespace
624
+ * @requiredField options
625
+ * @requiredField options.namespaceData
626
+ * @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
627
+ * @permissionScope Manage Stores - all permissions
628
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
629
+ * @permissionScope Manage eCommerce - all permissions
630
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
631
+ * @applicableIdentity APP
632
+ * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateExtendedFields
633
+ */
634
+ export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
635
+ export interface UpdateExtendedFieldsOptions {
636
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
637
+ namespaceData: Record<string, any> | null;
638
+ }
639
+ export {};