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