@wix/auto_sdk_ecom_order-invoices 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +5 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js +15 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js.map +1 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +14 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js +114 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js.map +1 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +20 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js +104 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +1 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +17 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js +35 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js.map +1 -0
- package/build/{ecom-orders-v1-invoice-order-invoices.universal-MRNaa-Xt.d.mts → cjs/src/ecom-orders-v1-invoice-order-invoices.types.d.ts} +42 -42
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js +12 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js.map +1 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +333 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js +215 -0
- package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +5 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.js +11 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.js.map +1 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +14 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.js +107 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.js.map +1 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +20 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.js +74 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +1 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +17 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.js +27 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.js.map +1 -0
- package/build/{ecom-orders-v1-invoice-order-invoices.universal-MRNaa-Xt.d.ts → es/src/ecom-orders-v1-invoice-order-invoices.types.d.ts} +42 -42
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.types.js +9 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.types.js.map +1 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +333 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.js +185 -0
- package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +11 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js +15 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js.map +1 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +14 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js +114 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js.map +1 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +20 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js +104 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +45 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js +35 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js.map +1 -0
- package/build/internal/{ecom-orders-v1-invoice-order-invoices.universal-CZFxrTkE.d.mts → cjs/src/ecom-orders-v1-invoice-order-invoices.types.d.ts} +42 -42
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js +12 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js.map +1 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +396 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js +215 -0
- package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +11 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.js +11 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.js.map +1 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +14 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.js +107 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.js.map +1 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +20 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.js +74 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +1 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +45 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.js +27 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.js.map +1 -0
- package/build/internal/{ecom-orders-v1-invoice-order-invoices.universal-CZFxrTkE.d.ts → es/src/ecom-orders-v1-invoice-order-invoices.types.d.ts} +42 -42
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.types.js +9 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.types.js.map +1 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +396 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.js +185 -0
- package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -19
- package/build/index.d.ts +0 -19
- package/build/index.js +0 -284
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -256
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -53
- package/build/internal/index.d.ts +0 -53
- package/build/internal/index.js +0 -284
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -256
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -127
- package/build/internal/meta.d.ts +0 -127
- package/build/internal/meta.js +0 -209
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -179
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -127
- package/build/meta.d.ts +0 -127
- package/build/meta.js +0 -209
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -179
- package/build/meta.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
interface Invoice {
|
|
1
|
+
export interface Invoice {
|
|
2
2
|
/** Invoice ID. */
|
|
3
|
-
|
|
3
|
+
id?: string;
|
|
4
4
|
/** ID of the app that set the invoice. */
|
|
5
5
|
appId?: string;
|
|
6
6
|
}
|
|
7
|
-
interface ListInvoicesForSingleOrderRequest {
|
|
7
|
+
export interface ListInvoicesForSingleOrderRequest {
|
|
8
8
|
/**
|
|
9
9
|
* Order ID.
|
|
10
10
|
* @minLength 1
|
|
@@ -12,11 +12,11 @@ interface ListInvoicesForSingleOrderRequest {
|
|
|
12
12
|
*/
|
|
13
13
|
orderId?: string;
|
|
14
14
|
}
|
|
15
|
-
interface ListInvoicesForSingleOrderResponse {
|
|
15
|
+
export interface ListInvoicesForSingleOrderResponse {
|
|
16
16
|
/** List of invoices. */
|
|
17
17
|
invoices?: Invoice[];
|
|
18
18
|
}
|
|
19
|
-
interface ListInvoicesForMultipleOrdersRequest {
|
|
19
|
+
export interface ListInvoicesForMultipleOrdersRequest {
|
|
20
20
|
/**
|
|
21
21
|
* Order IDs for which to retrieve invoices.
|
|
22
22
|
* @maxSize 100
|
|
@@ -25,11 +25,11 @@ interface ListInvoicesForMultipleOrdersRequest {
|
|
|
25
25
|
*/
|
|
26
26
|
orderIds: string[];
|
|
27
27
|
}
|
|
28
|
-
interface ListInvoicesForMultipleOrdersResponse {
|
|
28
|
+
export interface ListInvoicesForMultipleOrdersResponse {
|
|
29
29
|
/** List of order IDs and their associated invoices. */
|
|
30
30
|
invoicesForOrder?: InvoicesForOrder[];
|
|
31
31
|
}
|
|
32
|
-
interface InvoicesForOrder {
|
|
32
|
+
export interface InvoicesForOrder {
|
|
33
33
|
/** Order ID. */
|
|
34
34
|
orderId?: string;
|
|
35
35
|
/**
|
|
@@ -38,7 +38,7 @@ interface InvoicesForOrder {
|
|
|
38
38
|
*/
|
|
39
39
|
invoicesInfo?: Invoice[];
|
|
40
40
|
}
|
|
41
|
-
interface GenerateInvoiceRequest {
|
|
41
|
+
export interface GenerateInvoiceRequest {
|
|
42
42
|
/**
|
|
43
43
|
* Order ID.
|
|
44
44
|
* @minLength 1
|
|
@@ -46,11 +46,11 @@ interface GenerateInvoiceRequest {
|
|
|
46
46
|
*/
|
|
47
47
|
orderId: string;
|
|
48
48
|
}
|
|
49
|
-
interface GenerateInvoiceResponse {
|
|
49
|
+
export interface GenerateInvoiceResponse {
|
|
50
50
|
/** Invoice ID. */
|
|
51
51
|
invoiceId?: string;
|
|
52
52
|
}
|
|
53
|
-
interface BulkGenerateInvoicesRequest {
|
|
53
|
+
export interface BulkGenerateInvoicesRequest {
|
|
54
54
|
/**
|
|
55
55
|
* Order IDs.
|
|
56
56
|
* @minSize 1
|
|
@@ -60,17 +60,17 @@ interface BulkGenerateInvoicesRequest {
|
|
|
60
60
|
*/
|
|
61
61
|
orderIds: string[];
|
|
62
62
|
}
|
|
63
|
-
interface BulkGenerateInvoicesResponse {
|
|
63
|
+
export interface BulkGenerateInvoicesResponse {
|
|
64
64
|
results?: BulkInvoiceResult[];
|
|
65
65
|
bulkActionMetadata?: BulkActionMetadata;
|
|
66
66
|
}
|
|
67
|
-
interface BulkInvoiceResult {
|
|
67
|
+
export interface BulkInvoiceResult {
|
|
68
68
|
itemMetadata?: ItemMetadata;
|
|
69
69
|
item?: InvoiceForOrder;
|
|
70
70
|
}
|
|
71
|
-
interface ItemMetadata {
|
|
71
|
+
export interface ItemMetadata {
|
|
72
72
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
73
|
-
|
|
73
|
+
id?: string | null;
|
|
74
74
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
75
75
|
originalIndex?: number;
|
|
76
76
|
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
@@ -78,7 +78,7 @@ interface ItemMetadata {
|
|
|
78
78
|
/** Details about the error in case of failure. */
|
|
79
79
|
error?: ApplicationError;
|
|
80
80
|
}
|
|
81
|
-
interface ApplicationError {
|
|
81
|
+
export interface ApplicationError {
|
|
82
82
|
/** Error code. */
|
|
83
83
|
code?: string;
|
|
84
84
|
/** Description of the error. */
|
|
@@ -86,13 +86,13 @@ interface ApplicationError {
|
|
|
86
86
|
/** Data related to the error. */
|
|
87
87
|
data?: Record<string, any> | null;
|
|
88
88
|
}
|
|
89
|
-
interface InvoiceForOrder {
|
|
89
|
+
export interface InvoiceForOrder {
|
|
90
90
|
/** Order ID. */
|
|
91
91
|
orderId?: string;
|
|
92
92
|
/** Invoice ID. */
|
|
93
93
|
invoiceId?: string;
|
|
94
94
|
}
|
|
95
|
-
interface BulkActionMetadata {
|
|
95
|
+
export interface BulkActionMetadata {
|
|
96
96
|
/** Number of items that were successfully processed. */
|
|
97
97
|
totalSuccesses?: number;
|
|
98
98
|
/** Number of items that couldn't be processed. */
|
|
@@ -100,7 +100,7 @@ interface BulkActionMetadata {
|
|
|
100
100
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
101
101
|
undetailedFailures?: number;
|
|
102
102
|
}
|
|
103
|
-
interface AddInvoiceToOrderRequest {
|
|
103
|
+
export interface AddInvoiceToOrderRequest {
|
|
104
104
|
/**
|
|
105
105
|
* Order ID.
|
|
106
106
|
* @minLength 1
|
|
@@ -110,11 +110,11 @@ interface AddInvoiceToOrderRequest {
|
|
|
110
110
|
/** Invoice info. */
|
|
111
111
|
invoiceInfo: Invoice;
|
|
112
112
|
}
|
|
113
|
-
interface AddInvoiceToOrderResponse {
|
|
113
|
+
export interface AddInvoiceToOrderResponse {
|
|
114
114
|
/** List of order invoices. */
|
|
115
115
|
orderInvoices?: Invoice[];
|
|
116
116
|
}
|
|
117
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
117
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
118
118
|
createdEvent?: EntityCreatedEvent;
|
|
119
119
|
updatedEvent?: EntityUpdatedEvent;
|
|
120
120
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -123,7 +123,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
123
123
|
* Unique event ID.
|
|
124
124
|
* Allows clients to ignore duplicate webhooks.
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
id?: string;
|
|
127
127
|
/**
|
|
128
128
|
* Assumes actions are also always typed to an entity_type
|
|
129
129
|
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
@@ -157,36 +157,38 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
157
157
|
entityEventSequence?: string | null;
|
|
158
158
|
}
|
|
159
159
|
/** @oneof */
|
|
160
|
-
interface DomainEventBodyOneOf {
|
|
160
|
+
export interface DomainEventBodyOneOf {
|
|
161
161
|
createdEvent?: EntityCreatedEvent;
|
|
162
162
|
updatedEvent?: EntityUpdatedEvent;
|
|
163
163
|
deletedEvent?: EntityDeletedEvent;
|
|
164
164
|
actionEvent?: ActionEvent;
|
|
165
165
|
}
|
|
166
|
-
interface EntityCreatedEvent {
|
|
167
|
-
|
|
166
|
+
export interface EntityCreatedEvent {
|
|
167
|
+
entityAsJson?: string;
|
|
168
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
169
|
+
restoreInfo?: RestoreInfo;
|
|
168
170
|
}
|
|
169
|
-
interface RestoreInfo {
|
|
171
|
+
export interface RestoreInfo {
|
|
170
172
|
deletedDate?: Date | null;
|
|
171
173
|
}
|
|
172
|
-
interface EntityUpdatedEvent {
|
|
174
|
+
export interface EntityUpdatedEvent {
|
|
173
175
|
/**
|
|
174
176
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
175
177
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
176
178
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
177
179
|
*/
|
|
178
|
-
|
|
180
|
+
currentEntityAsJson?: string;
|
|
179
181
|
}
|
|
180
|
-
interface EntityDeletedEvent {
|
|
182
|
+
export interface EntityDeletedEvent {
|
|
181
183
|
/** Entity that was deleted */
|
|
182
|
-
|
|
184
|
+
deletedEntityAsJson?: string | null;
|
|
183
185
|
}
|
|
184
|
-
interface ActionEvent {
|
|
185
|
-
|
|
186
|
+
export interface ActionEvent {
|
|
187
|
+
bodyAsJson?: string;
|
|
186
188
|
}
|
|
187
|
-
interface Empty {
|
|
189
|
+
export interface Empty {
|
|
188
190
|
}
|
|
189
|
-
interface GetOrderInvoiceRequest {
|
|
191
|
+
export interface GetOrderInvoiceRequest {
|
|
190
192
|
/**
|
|
191
193
|
* Invoice ID.
|
|
192
194
|
* @minLength 1
|
|
@@ -194,7 +196,7 @@ interface GetOrderInvoiceRequest {
|
|
|
194
196
|
*/
|
|
195
197
|
invoiceId?: string;
|
|
196
198
|
}
|
|
197
|
-
interface GetOrderInvoiceResponse {
|
|
199
|
+
export interface GetOrderInvoiceResponse {
|
|
198
200
|
/**
|
|
199
201
|
* Order ID.
|
|
200
202
|
* @minLength 1
|
|
@@ -204,7 +206,7 @@ interface GetOrderInvoiceResponse {
|
|
|
204
206
|
/** Invoice info. */
|
|
205
207
|
invoiceInfo?: Invoice;
|
|
206
208
|
}
|
|
207
|
-
interface GenerateInvoiceWithNumberRequest {
|
|
209
|
+
export interface GenerateInvoiceWithNumberRequest {
|
|
208
210
|
/**
|
|
209
211
|
* Order ID.
|
|
210
212
|
* @minLength 1
|
|
@@ -219,7 +221,7 @@ interface GenerateInvoiceWithNumberRequest {
|
|
|
219
221
|
/** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */
|
|
220
222
|
issueDate?: Date | null;
|
|
221
223
|
}
|
|
222
|
-
interface GenerateInvoiceWithNumberResponse {
|
|
224
|
+
export interface GenerateInvoiceWithNumberResponse {
|
|
223
225
|
/**
|
|
224
226
|
* Invoice ID.
|
|
225
227
|
* @minLength 1
|
|
@@ -227,7 +229,7 @@ interface GenerateInvoiceWithNumberResponse {
|
|
|
227
229
|
*/
|
|
228
230
|
invoiceId?: string;
|
|
229
231
|
}
|
|
230
|
-
interface MessageEnvelope {
|
|
232
|
+
export interface MessageEnvelope {
|
|
231
233
|
/**
|
|
232
234
|
* App instance ID.
|
|
233
235
|
* @format GUID
|
|
@@ -243,7 +245,7 @@ interface MessageEnvelope {
|
|
|
243
245
|
/** Stringify payload. */
|
|
244
246
|
data?: string;
|
|
245
247
|
}
|
|
246
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
248
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
247
249
|
/**
|
|
248
250
|
* ID of a site visitor that has not logged in to the site.
|
|
249
251
|
* @format GUID
|
|
@@ -268,7 +270,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
268
270
|
identityType?: WebhookIdentityType;
|
|
269
271
|
}
|
|
270
272
|
/** @oneof */
|
|
271
|
-
interface IdentificationDataIdOneOf {
|
|
273
|
+
export interface IdentificationDataIdOneOf {
|
|
272
274
|
/**
|
|
273
275
|
* ID of a site visitor that has not logged in to the site.
|
|
274
276
|
* @format GUID
|
|
@@ -290,12 +292,10 @@ interface IdentificationDataIdOneOf {
|
|
|
290
292
|
*/
|
|
291
293
|
appId?: string;
|
|
292
294
|
}
|
|
293
|
-
declare enum WebhookIdentityType {
|
|
295
|
+
export declare enum WebhookIdentityType {
|
|
294
296
|
UNKNOWN = "UNKNOWN",
|
|
295
297
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
296
298
|
MEMBER = "MEMBER",
|
|
297
299
|
WIX_USER = "WIX_USER",
|
|
298
300
|
APP = "APP"
|
|
299
301
|
}
|
|
300
|
-
|
|
301
|
-
export { type ApplicationError as A, type BulkGenerateInvoicesRequest as B, type DomainEvent as D, type EntityCreatedEvent as E, type GenerateInvoiceRequest as G, type Invoice as I, type ListInvoicesForMultipleOrdersResponse as L, type MessageEnvelope as M, type RestoreInfo as R, WebhookIdentityType as W, type ListInvoicesForSingleOrderRequest as a, type ListInvoicesForSingleOrderResponse as b, type ListInvoicesForMultipleOrdersRequest as c, type InvoicesForOrder as d, type GenerateInvoiceResponse as e, type BulkGenerateInvoicesResponse as f, type BulkInvoiceResult as g, type ItemMetadata as h, type InvoiceForOrder as i, type BulkActionMetadata as j, type AddInvoiceToOrderRequest as k, type AddInvoiceToOrderResponse as l, type DomainEventBodyOneOf as m, type EntityUpdatedEvent as n, type EntityDeletedEvent as o, type ActionEvent as p, type Empty as q, type GetOrderInvoiceRequest as r, type GetOrderInvoiceResponse as s, type GenerateInvoiceWithNumberRequest as t, type GenerateInvoiceWithNumberResponse as u, type IdentificationData as v, type IdentificationDataIdOneOf as w };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookIdentityType = void 0;
|
|
4
|
+
var WebhookIdentityType;
|
|
5
|
+
(function (WebhookIdentityType) {
|
|
6
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
7
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
8
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
9
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
10
|
+
WebhookIdentityType["APP"] = "APP";
|
|
11
|
+
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
12
|
+
//# sourceMappingURL=ecom-orders-v1-invoice-order-invoices.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecom-orders-v1-invoice-order-invoices.types.js","sourceRoot":"","sources":["../../../src/ecom-orders-v1-invoice-order-invoices.types.ts"],"names":[],"mappings":";;;AAqUA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
export interface Invoice {
|
|
3
|
+
/** Invoice ID. */
|
|
4
|
+
_id?: string;
|
|
5
|
+
/** ID of the app that set the invoice. */
|
|
6
|
+
appId?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ListInvoicesForSingleOrderRequest {
|
|
9
|
+
/**
|
|
10
|
+
* Order ID.
|
|
11
|
+
* @minLength 1
|
|
12
|
+
* @maxLength 100
|
|
13
|
+
*/
|
|
14
|
+
orderId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ListInvoicesForSingleOrderResponse {
|
|
17
|
+
/** List of invoices. */
|
|
18
|
+
invoices?: Invoice[];
|
|
19
|
+
}
|
|
20
|
+
export interface ListInvoicesForMultipleOrdersRequest {
|
|
21
|
+
/**
|
|
22
|
+
* Order IDs for which to retrieve invoices.
|
|
23
|
+
* @maxSize 100
|
|
24
|
+
* @minLength 1
|
|
25
|
+
* @maxLength 100
|
|
26
|
+
*/
|
|
27
|
+
orderIds: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface ListInvoicesForMultipleOrdersResponse {
|
|
30
|
+
/** List of order IDs and their associated invoices. */
|
|
31
|
+
invoicesForOrder?: InvoicesForOrder[];
|
|
32
|
+
}
|
|
33
|
+
export interface InvoicesForOrder {
|
|
34
|
+
/** Order ID. */
|
|
35
|
+
orderId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Invoices info.
|
|
38
|
+
* @maxSize 300
|
|
39
|
+
*/
|
|
40
|
+
invoicesInfo?: Invoice[];
|
|
41
|
+
}
|
|
42
|
+
export interface GenerateInvoiceRequest {
|
|
43
|
+
/**
|
|
44
|
+
* Order ID.
|
|
45
|
+
* @minLength 1
|
|
46
|
+
* @maxLength 100
|
|
47
|
+
*/
|
|
48
|
+
orderId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface GenerateInvoiceResponse {
|
|
51
|
+
/** Invoice ID. */
|
|
52
|
+
invoiceId?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface BulkGenerateInvoicesRequest {
|
|
55
|
+
/**
|
|
56
|
+
* Order IDs.
|
|
57
|
+
* @minSize 1
|
|
58
|
+
* @maxSize 300
|
|
59
|
+
* @minLength 1
|
|
60
|
+
* @maxLength 100
|
|
61
|
+
*/
|
|
62
|
+
orderIds: string[];
|
|
63
|
+
}
|
|
64
|
+
export interface BulkGenerateInvoicesResponse {
|
|
65
|
+
results?: BulkInvoiceResult[];
|
|
66
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
67
|
+
}
|
|
68
|
+
export interface BulkInvoiceResult {
|
|
69
|
+
itemMetadata?: ItemMetadata;
|
|
70
|
+
item?: InvoiceForOrder;
|
|
71
|
+
}
|
|
72
|
+
export interface ItemMetadata {
|
|
73
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
74
|
+
_id?: string | null;
|
|
75
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
76
|
+
originalIndex?: number;
|
|
77
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
78
|
+
success?: boolean;
|
|
79
|
+
/** Details about the error in case of failure. */
|
|
80
|
+
error?: ApplicationError;
|
|
81
|
+
}
|
|
82
|
+
export interface ApplicationError {
|
|
83
|
+
/** Error code. */
|
|
84
|
+
code?: string;
|
|
85
|
+
/** Description of the error. */
|
|
86
|
+
description?: string;
|
|
87
|
+
/** Data related to the error. */
|
|
88
|
+
data?: Record<string, any> | null;
|
|
89
|
+
}
|
|
90
|
+
export interface InvoiceForOrder {
|
|
91
|
+
/** Order ID. */
|
|
92
|
+
orderId?: string;
|
|
93
|
+
/** Invoice ID. */
|
|
94
|
+
invoiceId?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface BulkActionMetadata {
|
|
97
|
+
/** Number of items that were successfully processed. */
|
|
98
|
+
totalSuccesses?: number;
|
|
99
|
+
/** Number of items that couldn't be processed. */
|
|
100
|
+
totalFailures?: number;
|
|
101
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
102
|
+
undetailedFailures?: number;
|
|
103
|
+
}
|
|
104
|
+
export interface AddInvoiceToOrderRequest {
|
|
105
|
+
/**
|
|
106
|
+
* Order ID.
|
|
107
|
+
* @minLength 1
|
|
108
|
+
* @maxLength 100
|
|
109
|
+
*/
|
|
110
|
+
orderId: string;
|
|
111
|
+
/** Invoice info. */
|
|
112
|
+
invoiceInfo: Invoice;
|
|
113
|
+
}
|
|
114
|
+
export interface AddInvoiceToOrderResponse {
|
|
115
|
+
/** List of order invoices. */
|
|
116
|
+
orderInvoices?: Invoice[];
|
|
117
|
+
}
|
|
118
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
119
|
+
createdEvent?: EntityCreatedEvent;
|
|
120
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
121
|
+
deletedEvent?: EntityDeletedEvent;
|
|
122
|
+
actionEvent?: ActionEvent;
|
|
123
|
+
/**
|
|
124
|
+
* Unique event ID.
|
|
125
|
+
* Allows clients to ignore duplicate webhooks.
|
|
126
|
+
*/
|
|
127
|
+
_id?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Assumes actions are also always typed to an entity_type
|
|
130
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
131
|
+
*/
|
|
132
|
+
entityFqdn?: string;
|
|
133
|
+
/**
|
|
134
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
135
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
136
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
137
|
+
*/
|
|
138
|
+
slug?: string;
|
|
139
|
+
/** ID of the entity associated with the event. */
|
|
140
|
+
entityId?: string;
|
|
141
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
142
|
+
eventTime?: Date | null;
|
|
143
|
+
/**
|
|
144
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
145
|
+
* (for example, GDPR).
|
|
146
|
+
*/
|
|
147
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
148
|
+
/** If present, indicates the action that triggered the event. */
|
|
149
|
+
originatedFrom?: string | null;
|
|
150
|
+
/**
|
|
151
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
152
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
153
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
154
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
155
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
156
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
157
|
+
*/
|
|
158
|
+
entityEventSequence?: string | null;
|
|
159
|
+
}
|
|
160
|
+
/** @oneof */
|
|
161
|
+
export interface DomainEventBodyOneOf {
|
|
162
|
+
createdEvent?: EntityCreatedEvent;
|
|
163
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
164
|
+
deletedEvent?: EntityDeletedEvent;
|
|
165
|
+
actionEvent?: ActionEvent;
|
|
166
|
+
}
|
|
167
|
+
export interface EntityCreatedEvent {
|
|
168
|
+
entity?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface RestoreInfo {
|
|
171
|
+
deletedDate?: Date | null;
|
|
172
|
+
}
|
|
173
|
+
export interface EntityUpdatedEvent {
|
|
174
|
+
/**
|
|
175
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
176
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
177
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
178
|
+
*/
|
|
179
|
+
currentEntity?: string;
|
|
180
|
+
}
|
|
181
|
+
export interface EntityDeletedEvent {
|
|
182
|
+
/** Entity that was deleted */
|
|
183
|
+
deletedEntity?: string | null;
|
|
184
|
+
}
|
|
185
|
+
export interface ActionEvent {
|
|
186
|
+
body?: string;
|
|
187
|
+
}
|
|
188
|
+
export interface Empty {
|
|
189
|
+
}
|
|
190
|
+
export interface GetOrderInvoiceRequest {
|
|
191
|
+
/**
|
|
192
|
+
* Invoice ID.
|
|
193
|
+
* @minLength 1
|
|
194
|
+
* @maxLength 100
|
|
195
|
+
*/
|
|
196
|
+
invoiceId?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface GetOrderInvoiceResponse {
|
|
199
|
+
/**
|
|
200
|
+
* Order ID.
|
|
201
|
+
* @minLength 1
|
|
202
|
+
* @maxLength 100
|
|
203
|
+
*/
|
|
204
|
+
orderId?: string;
|
|
205
|
+
/** Invoice info. */
|
|
206
|
+
invoiceInfo?: Invoice;
|
|
207
|
+
}
|
|
208
|
+
export interface GenerateInvoiceWithNumberRequest {
|
|
209
|
+
/**
|
|
210
|
+
* Order ID.
|
|
211
|
+
* @minLength 1
|
|
212
|
+
* @maxLength 100
|
|
213
|
+
*/
|
|
214
|
+
orderId?: string;
|
|
215
|
+
/**
|
|
216
|
+
* @minLength 1
|
|
217
|
+
* @maxLength 11
|
|
218
|
+
*/
|
|
219
|
+
invoiceNumber?: string;
|
|
220
|
+
/** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */
|
|
221
|
+
issueDate?: Date | null;
|
|
222
|
+
}
|
|
223
|
+
export interface GenerateInvoiceWithNumberResponse {
|
|
224
|
+
/**
|
|
225
|
+
* Invoice ID.
|
|
226
|
+
* @minLength 1
|
|
227
|
+
* @maxLength 100
|
|
228
|
+
*/
|
|
229
|
+
invoiceId?: string;
|
|
230
|
+
}
|
|
231
|
+
export interface MessageEnvelope {
|
|
232
|
+
/**
|
|
233
|
+
* App instance ID.
|
|
234
|
+
* @format GUID
|
|
235
|
+
*/
|
|
236
|
+
instanceId?: string | null;
|
|
237
|
+
/**
|
|
238
|
+
* Event type.
|
|
239
|
+
* @maxLength 150
|
|
240
|
+
*/
|
|
241
|
+
eventType?: string;
|
|
242
|
+
/** The identification type and identity data. */
|
|
243
|
+
identity?: IdentificationData;
|
|
244
|
+
/** Stringify payload. */
|
|
245
|
+
data?: string;
|
|
246
|
+
}
|
|
247
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
248
|
+
/**
|
|
249
|
+
* ID of a site visitor that has not logged in to the site.
|
|
250
|
+
* @format GUID
|
|
251
|
+
*/
|
|
252
|
+
anonymousVisitorId?: string;
|
|
253
|
+
/**
|
|
254
|
+
* ID of a site visitor that has logged in to the site.
|
|
255
|
+
* @format GUID
|
|
256
|
+
*/
|
|
257
|
+
memberId?: string;
|
|
258
|
+
/**
|
|
259
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
260
|
+
* @format GUID
|
|
261
|
+
*/
|
|
262
|
+
wixUserId?: string;
|
|
263
|
+
/**
|
|
264
|
+
* ID of an app.
|
|
265
|
+
* @format GUID
|
|
266
|
+
*/
|
|
267
|
+
appId?: string;
|
|
268
|
+
/** @readonly */
|
|
269
|
+
identityType?: WebhookIdentityType;
|
|
270
|
+
}
|
|
271
|
+
/** @oneof */
|
|
272
|
+
export interface IdentificationDataIdOneOf {
|
|
273
|
+
/**
|
|
274
|
+
* ID of a site visitor that has not logged in to the site.
|
|
275
|
+
* @format GUID
|
|
276
|
+
*/
|
|
277
|
+
anonymousVisitorId?: string;
|
|
278
|
+
/**
|
|
279
|
+
* ID of a site visitor that has logged in to the site.
|
|
280
|
+
* @format GUID
|
|
281
|
+
*/
|
|
282
|
+
memberId?: string;
|
|
283
|
+
/**
|
|
284
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
285
|
+
* @format GUID
|
|
286
|
+
*/
|
|
287
|
+
wixUserId?: string;
|
|
288
|
+
/**
|
|
289
|
+
* ID of an app.
|
|
290
|
+
* @format GUID
|
|
291
|
+
*/
|
|
292
|
+
appId?: string;
|
|
293
|
+
}
|
|
294
|
+
export declare enum WebhookIdentityType {
|
|
295
|
+
UNKNOWN = "UNKNOWN",
|
|
296
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
297
|
+
MEMBER = "MEMBER",
|
|
298
|
+
WIX_USER = "WIX_USER",
|
|
299
|
+
APP = "APP"
|
|
300
|
+
}
|
|
301
|
+
type InvoiceNonNullablePaths = `_id` | `appId`;
|
|
302
|
+
/**
|
|
303
|
+
* Retrieves the IDs of invoices associated with all specified orders.
|
|
304
|
+
*
|
|
305
|
+
*
|
|
306
|
+
* The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.
|
|
307
|
+
* @param orderIds - Order IDs for which to retrieve invoices.
|
|
308
|
+
* @public
|
|
309
|
+
* @documentationMaturity preview
|
|
310
|
+
* @requiredField orderIds
|
|
311
|
+
* @permissionId ECOM.READ_INVOICES
|
|
312
|
+
* @permissionScope Manage Stores - all permissions
|
|
313
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
314
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
315
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
316
|
+
* @permissionScope Read Orders
|
|
317
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
318
|
+
* @permissionScope Read Stores - all read permissions
|
|
319
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
320
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
321
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
322
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
323
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
324
|
+
* @permissionScope Manage Orders
|
|
325
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
326
|
+
* @applicableIdentity APP
|
|
327
|
+
* @applicableIdentity MEMBER
|
|
328
|
+
* @fqn com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders
|
|
329
|
+
*/
|
|
330
|
+
export declare function listInvoicesForMultipleOrders(orderIds: string[]): Promise<NonNullablePaths<ListInvoicesForMultipleOrdersResponse, `invoicesForOrder` | `invoicesForOrder.${number}.orderId` | {
|
|
331
|
+
[P in InvoiceNonNullablePaths]: `invoicesForOrder.${number}.invoicesInfo.${number}.${P}`;
|
|
332
|
+
}[InvoiceNonNullablePaths]>>;
|
|
333
|
+
export {};
|