@wix/auto_sdk_ecom_order-invoices 1.0.32 → 1.0.33
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/meta.d.ts +234 -1
- package/build/cjs/meta.js +12 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/meta.d.mts +234 -1
- package/build/es/meta.mjs +11 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/meta.d.ts +234 -1
- package/build/internal/cjs/meta.js +12 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/meta.d.mts +234 -1
- package/build/internal/es/meta.mjs +11 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -7,6 +7,18 @@ interface Invoice {
|
|
|
7
7
|
/** ID of the app that set the invoice. */
|
|
8
8
|
appId?: string;
|
|
9
9
|
}
|
|
10
|
+
interface ListInvoicesForSingleOrderRequest {
|
|
11
|
+
/**
|
|
12
|
+
* Order ID.
|
|
13
|
+
* @minLength 1
|
|
14
|
+
* @maxLength 100
|
|
15
|
+
*/
|
|
16
|
+
orderId?: string;
|
|
17
|
+
}
|
|
18
|
+
interface ListInvoicesForSingleOrderResponse {
|
|
19
|
+
/** List of invoices. */
|
|
20
|
+
invoices?: Invoice[];
|
|
21
|
+
}
|
|
10
22
|
interface ListInvoicesForMultipleOrdersRequest {
|
|
11
23
|
/**
|
|
12
24
|
* Order IDs for which to retrieve invoices.
|
|
@@ -105,6 +117,227 @@ interface AddInvoiceToOrderResponse {
|
|
|
105
117
|
/** List of order invoices. */
|
|
106
118
|
orderInvoices?: Invoice[];
|
|
107
119
|
}
|
|
120
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
121
|
+
createdEvent?: EntityCreatedEvent;
|
|
122
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
123
|
+
deletedEvent?: EntityDeletedEvent;
|
|
124
|
+
actionEvent?: ActionEvent;
|
|
125
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
126
|
+
id?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
129
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
130
|
+
*/
|
|
131
|
+
entityFqdn?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
134
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
135
|
+
*/
|
|
136
|
+
slug?: string;
|
|
137
|
+
/** ID of the entity associated with the event. */
|
|
138
|
+
entityId?: string;
|
|
139
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
140
|
+
eventTime?: Date | null;
|
|
141
|
+
/**
|
|
142
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
143
|
+
* (for example, GDPR).
|
|
144
|
+
*/
|
|
145
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
146
|
+
/** If present, indicates the action that triggered the event. */
|
|
147
|
+
originatedFrom?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
150
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
151
|
+
*/
|
|
152
|
+
entityEventSequence?: string | null;
|
|
153
|
+
}
|
|
154
|
+
/** @oneof */
|
|
155
|
+
interface DomainEventBodyOneOf {
|
|
156
|
+
createdEvent?: EntityCreatedEvent;
|
|
157
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
158
|
+
deletedEvent?: EntityDeletedEvent;
|
|
159
|
+
actionEvent?: ActionEvent;
|
|
160
|
+
}
|
|
161
|
+
interface EntityCreatedEvent {
|
|
162
|
+
entityAsJson?: string;
|
|
163
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
164
|
+
restoreInfo?: RestoreInfo;
|
|
165
|
+
}
|
|
166
|
+
interface RestoreInfo {
|
|
167
|
+
deletedDate?: Date | null;
|
|
168
|
+
}
|
|
169
|
+
interface EntityUpdatedEvent {
|
|
170
|
+
/**
|
|
171
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
172
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
173
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
174
|
+
*/
|
|
175
|
+
currentEntityAsJson?: string;
|
|
176
|
+
}
|
|
177
|
+
interface EntityDeletedEvent {
|
|
178
|
+
/** Entity that was deleted. */
|
|
179
|
+
deletedEntityAsJson?: string | null;
|
|
180
|
+
}
|
|
181
|
+
interface ActionEvent {
|
|
182
|
+
bodyAsJson?: string;
|
|
183
|
+
}
|
|
184
|
+
interface Empty {
|
|
185
|
+
}
|
|
186
|
+
interface GetOrderInvoiceRequest {
|
|
187
|
+
/**
|
|
188
|
+
* Invoice ID.
|
|
189
|
+
* @minLength 1
|
|
190
|
+
* @maxLength 100
|
|
191
|
+
*/
|
|
192
|
+
invoiceId?: string;
|
|
193
|
+
}
|
|
194
|
+
interface GetOrderInvoiceResponse {
|
|
195
|
+
/**
|
|
196
|
+
* Order ID.
|
|
197
|
+
* @minLength 1
|
|
198
|
+
* @maxLength 100
|
|
199
|
+
*/
|
|
200
|
+
orderId?: string;
|
|
201
|
+
/** Invoice info. */
|
|
202
|
+
invoiceInfo?: Invoice;
|
|
203
|
+
}
|
|
204
|
+
interface GenerateInvoiceWithNumberRequest {
|
|
205
|
+
/**
|
|
206
|
+
* Order ID.
|
|
207
|
+
* @minLength 1
|
|
208
|
+
* @maxLength 100
|
|
209
|
+
*/
|
|
210
|
+
orderId?: string;
|
|
211
|
+
/**
|
|
212
|
+
* @minLength 1
|
|
213
|
+
* @maxLength 11
|
|
214
|
+
*/
|
|
215
|
+
invoiceNumber?: string;
|
|
216
|
+
/** 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. */
|
|
217
|
+
issueDate?: Date | null;
|
|
218
|
+
}
|
|
219
|
+
interface GenerateInvoiceWithNumberResponse {
|
|
220
|
+
/**
|
|
221
|
+
* Invoice ID.
|
|
222
|
+
* @minLength 1
|
|
223
|
+
* @maxLength 100
|
|
224
|
+
*/
|
|
225
|
+
invoiceId?: string;
|
|
226
|
+
}
|
|
227
|
+
interface MessageEnvelope {
|
|
228
|
+
/**
|
|
229
|
+
* App instance ID.
|
|
230
|
+
* @format GUID
|
|
231
|
+
*/
|
|
232
|
+
instanceId?: string | null;
|
|
233
|
+
/**
|
|
234
|
+
* Event type.
|
|
235
|
+
* @maxLength 150
|
|
236
|
+
*/
|
|
237
|
+
eventType?: string;
|
|
238
|
+
/** The identification type and identity data. */
|
|
239
|
+
identity?: IdentificationData;
|
|
240
|
+
/** Stringify payload. */
|
|
241
|
+
data?: string;
|
|
242
|
+
}
|
|
243
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
244
|
+
/**
|
|
245
|
+
* ID of a site visitor that has not logged in to the site.
|
|
246
|
+
* @format GUID
|
|
247
|
+
*/
|
|
248
|
+
anonymousVisitorId?: string;
|
|
249
|
+
/**
|
|
250
|
+
* ID of a site visitor that has logged in to the site.
|
|
251
|
+
* @format GUID
|
|
252
|
+
*/
|
|
253
|
+
memberId?: string;
|
|
254
|
+
/**
|
|
255
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
256
|
+
* @format GUID
|
|
257
|
+
*/
|
|
258
|
+
wixUserId?: string;
|
|
259
|
+
/**
|
|
260
|
+
* ID of an app.
|
|
261
|
+
* @format GUID
|
|
262
|
+
*/
|
|
263
|
+
appId?: string;
|
|
264
|
+
/** @readonly */
|
|
265
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
266
|
+
}
|
|
267
|
+
/** @oneof */
|
|
268
|
+
interface IdentificationDataIdOneOf {
|
|
269
|
+
/**
|
|
270
|
+
* ID of a site visitor that has not logged in to the site.
|
|
271
|
+
* @format GUID
|
|
272
|
+
*/
|
|
273
|
+
anonymousVisitorId?: string;
|
|
274
|
+
/**
|
|
275
|
+
* ID of a site visitor that has logged in to the site.
|
|
276
|
+
* @format GUID
|
|
277
|
+
*/
|
|
278
|
+
memberId?: string;
|
|
279
|
+
/**
|
|
280
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
281
|
+
* @format GUID
|
|
282
|
+
*/
|
|
283
|
+
wixUserId?: string;
|
|
284
|
+
/**
|
|
285
|
+
* ID of an app.
|
|
286
|
+
* @format GUID
|
|
287
|
+
*/
|
|
288
|
+
appId?: string;
|
|
289
|
+
}
|
|
290
|
+
declare enum WebhookIdentityType {
|
|
291
|
+
UNKNOWN = "UNKNOWN",
|
|
292
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
293
|
+
MEMBER = "MEMBER",
|
|
294
|
+
WIX_USER = "WIX_USER",
|
|
295
|
+
APP = "APP"
|
|
296
|
+
}
|
|
297
|
+
/** @enumType */
|
|
298
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
299
|
+
/** @docsIgnore */
|
|
300
|
+
type GenerateInvoiceApplicationErrors = {
|
|
301
|
+
code?: 'GENERATE_INVOICE_NOT_SUPPORTED';
|
|
302
|
+
description?: string;
|
|
303
|
+
data?: Record<string, any>;
|
|
304
|
+
} | {
|
|
305
|
+
code?: 'INVOICE_ALREADY_EXISTS';
|
|
306
|
+
description?: string;
|
|
307
|
+
data?: Record<string, any>;
|
|
308
|
+
} | {
|
|
309
|
+
code?: 'MISSING_CONTACT';
|
|
310
|
+
description?: string;
|
|
311
|
+
data?: Record<string, any>;
|
|
312
|
+
} | {
|
|
313
|
+
code?: 'MISSING_CONTACT_EMAIL';
|
|
314
|
+
description?: string;
|
|
315
|
+
data?: Record<string, any>;
|
|
316
|
+
} | {
|
|
317
|
+
code?: 'INVALID_EMAIL';
|
|
318
|
+
description?: string;
|
|
319
|
+
data?: Record<string, any>;
|
|
320
|
+
} | {
|
|
321
|
+
code?: 'INVALID_PRICE_AMOUNT';
|
|
322
|
+
description?: string;
|
|
323
|
+
data?: Record<string, any>;
|
|
324
|
+
} | {
|
|
325
|
+
code?: 'CONTACT_NOT_FOUND';
|
|
326
|
+
description?: string;
|
|
327
|
+
data?: Record<string, any>;
|
|
328
|
+
} | {
|
|
329
|
+
code?: 'FAILED_TO_RETRIEVE_CONTACT';
|
|
330
|
+
description?: string;
|
|
331
|
+
data?: Record<string, any>;
|
|
332
|
+
} | {
|
|
333
|
+
code?: 'UNKNOWN_CURRENCY';
|
|
334
|
+
description?: string;
|
|
335
|
+
data?: Record<string, any>;
|
|
336
|
+
} | {
|
|
337
|
+
code?: 'ORDER_HAS_CHARGEBACKS';
|
|
338
|
+
description?: string;
|
|
339
|
+
data?: Record<string, any>;
|
|
340
|
+
};
|
|
108
341
|
|
|
109
342
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
110
343
|
getUrl: (context: any) => string;
|
|
@@ -125,4 +358,4 @@ declare function addInvoiceToOrder(): __PublicMethodMetaInfo<'POST', {
|
|
|
125
358
|
orderId: string;
|
|
126
359
|
}, AddInvoiceToOrderRequest$1, AddInvoiceToOrderRequest, AddInvoiceToOrderResponse$1, AddInvoiceToOrderResponse>;
|
|
127
360
|
|
|
128
|
-
export { type __PublicMethodMetaInfo, addInvoiceToOrder, bulkGenerateInvoices, generateInvoice, listInvoicesForMultipleOrders };
|
|
361
|
+
export { type ActionEvent as ActionEventOriginal, type AddInvoiceToOrderRequest as AddInvoiceToOrderRequestOriginal, type AddInvoiceToOrderResponse as AddInvoiceToOrderResponseOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkGenerateInvoicesRequest as BulkGenerateInvoicesRequestOriginal, type BulkGenerateInvoicesResponse as BulkGenerateInvoicesResponseOriginal, type BulkInvoiceResult as BulkInvoiceResultOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GenerateInvoiceApplicationErrors as GenerateInvoiceApplicationErrorsOriginal, type GenerateInvoiceRequest as GenerateInvoiceRequestOriginal, type GenerateInvoiceResponse as GenerateInvoiceResponseOriginal, type GenerateInvoiceWithNumberRequest as GenerateInvoiceWithNumberRequestOriginal, type GenerateInvoiceWithNumberResponse as GenerateInvoiceWithNumberResponseOriginal, type GetOrderInvoiceRequest as GetOrderInvoiceRequestOriginal, type GetOrderInvoiceResponse as GetOrderInvoiceResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type InvoiceForOrder as InvoiceForOrderOriginal, type Invoice as InvoiceOriginal, type InvoicesForOrder as InvoicesForOrderOriginal, type ItemMetadata as ItemMetadataOriginal, type ListInvoicesForMultipleOrdersRequest as ListInvoicesForMultipleOrdersRequestOriginal, type ListInvoicesForMultipleOrdersResponse as ListInvoicesForMultipleOrdersResponseOriginal, type ListInvoicesForSingleOrderRequest as ListInvoicesForSingleOrderRequestOriginal, type ListInvoicesForSingleOrderResponse as ListInvoicesForSingleOrderResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type RestoreInfo as RestoreInfoOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, addInvoiceToOrder, bulkGenerateInvoices, generateInvoice, listInvoicesForMultipleOrders };
|
package/build/cjs/meta.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
+
WebhookIdentityTypeOriginal: () => WebhookIdentityType,
|
|
23
24
|
addInvoiceToOrder: () => addInvoiceToOrder2,
|
|
24
25
|
bulkGenerateInvoices: () => bulkGenerateInvoices2,
|
|
25
26
|
generateInvoice: () => generateInvoice2,
|
|
@@ -150,6 +151,16 @@ function addInvoiceToOrder(payload) {
|
|
|
150
151
|
return __addInvoiceToOrder;
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
// src/ecom-orders-v1-invoice-order-invoices.types.ts
|
|
155
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
156
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
157
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
158
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
159
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
160
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
161
|
+
return WebhookIdentityType2;
|
|
162
|
+
})(WebhookIdentityType || {});
|
|
163
|
+
|
|
153
164
|
// src/ecom-orders-v1-invoice-order-invoices.meta.ts
|
|
154
165
|
function listInvoicesForMultipleOrders2() {
|
|
155
166
|
const payload = {};
|
|
@@ -225,6 +236,7 @@ function addInvoiceToOrder2() {
|
|
|
225
236
|
}
|
|
226
237
|
// Annotate the CommonJS export names for ESM import in node:
|
|
227
238
|
0 && (module.exports = {
|
|
239
|
+
WebhookIdentityTypeOriginal,
|
|
228
240
|
addInvoiceToOrder,
|
|
229
241
|
bulkGenerateInvoices,
|
|
230
242
|
generateInvoice,
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/ecom-orders-v1-invoice-order-invoices.http.ts","../../src/ecom-orders-v1-invoice-order-invoices.meta.ts"],"sourcesContent":["export * from './src/ecom-orders-v1-invoice-order-invoices.meta.js';\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomOrdersInvoicesV1InvoicesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/bulk/invoices',\n destPath: '/v1/bulk/invoices',\n },\n {\n srcPath: '/ecom/v1/invoices',\n destPath: '/v1/invoices',\n },\n {\n srcPath: '/ecom/v1/ep-invoices',\n destPath: '/v1/invoices',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/ep-invoices',\n destPath: '/v1/invoices',\n },\n {\n srcPath: '/_api/ecom-payments/v1/invoices',\n destPath: '/v1/invoices',\n },\n ],\n _: [\n {\n srcPath: '/v1/invoices',\n destPath: '/v1/invoices',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_order-invoices';\n\n/**\n * Retrieves the IDs of invoices associated with all specified orders.\n *\n *\n * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.\n */\nexport function listInvoicesForMultipleOrders(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInvoicesForMultipleOrders({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/invoices/list-by-ids',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __listInvoicesForMultipleOrders;\n}\n\n/** Generates and adds an invoice to a specified order. */\nexport function generateInvoice(payload: object): RequestOptionsFactory<any> {\n function __generateInvoice({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn: 'com.wix.ecom.orders.invoices.v1.Invoices.GenerateInvoice',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/invoices/orders/{orderId}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateInvoice;\n}\n\n/** Generates and adds invoices to all specified orders. */\nexport function bulkGenerateInvoices(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGenerateInvoices({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.invoices.v1.Invoices.BulkGenerateInvoices',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/bulk/invoices/generate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkGenerateInvoices;\n}\n\n/** Adds an invoice to a specified order. */\nexport function addInvoiceToOrder(payload: object): RequestOptionsFactory<any> {\n function __addInvoiceToOrder({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn: 'com.wix.ecom.orders.invoices.v1.Invoices.AddInvoiceToOrder',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/invoices/orders/{orderId}/add-invoice',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addInvoiceToOrder;\n}\n","import * as ambassadorWixEcomOrdersV1Invoice from './ecom-orders-v1-invoice-order-invoices.http.js';\nimport * as ambassadorWixEcomOrdersV1InvoiceTypes from './ecom-orders-v1-invoice-order-invoices.types.js';\nimport * as ambassadorWixEcomOrdersV1InvoiceUniversalTypes from './ecom-orders-v1-invoice-order-invoices.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listInvoicesForMultipleOrders(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.ListInvoicesForMultipleOrdersRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.ListInvoicesForMultipleOrdersRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.ListInvoicesForMultipleOrdersResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.ListInvoicesForMultipleOrdersResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.listInvoicesForMultipleOrders(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/invoices/list-by-ids',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function generateInvoice(): __PublicMethodMetaInfo<\n 'POST',\n { orderId: string },\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.GenerateInvoiceRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.GenerateInvoiceRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.GenerateInvoiceResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.GenerateInvoiceResponse\n> {\n const payload = { orderId: ':orderId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.generateInvoice(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/invoices/orders/{orderId}',\n pathParams: { orderId: 'orderId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkGenerateInvoices(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.BulkGenerateInvoicesRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.BulkGenerateInvoicesRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.BulkGenerateInvoicesResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.BulkGenerateInvoicesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.bulkGenerateInvoices(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/invoices/generate',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function addInvoiceToOrder(): __PublicMethodMetaInfo<\n 'POST',\n { orderId: string },\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.AddInvoiceToOrderRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.AddInvoiceToOrderRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.AddInvoiceToOrderResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.AddInvoiceToOrderResponse\n> {\n const payload = { orderId: ':orderId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.addInvoiceToOrder(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/invoices/orders/{orderId}/add-invoice',\n pathParams: { orderId: 'orderId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,4BAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,qCAAAC;AAAA;AAAA;;;ACAA,0BAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAQd,SAAS,8BACd,SAC4B;AAC5B,WAAS,gCAAgC,EAAE,KAAK,GAAQ;AACtD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,6CAA6C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,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,SAAS,UAAU;AAAA,IACjC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["addInvoiceToOrder","bulkGenerateInvoices","generateInvoice","listInvoicesForMultipleOrders","listInvoicesForMultipleOrders","generateInvoice","bulkGenerateInvoices","addInvoiceToOrder"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/ecom-orders-v1-invoice-order-invoices.http.ts","../../src/ecom-orders-v1-invoice-order-invoices.types.ts","../../src/ecom-orders-v1-invoice-order-invoices.meta.ts"],"sourcesContent":["export * from './src/ecom-orders-v1-invoice-order-invoices.meta.js';\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomOrdersInvoicesV1InvoicesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/bulk/invoices',\n destPath: '/v1/bulk/invoices',\n },\n {\n srcPath: '/ecom/v1/invoices',\n destPath: '/v1/invoices',\n },\n {\n srcPath: '/ecom/v1/ep-invoices',\n destPath: '/v1/invoices',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/ep-invoices',\n destPath: '/v1/invoices',\n },\n {\n srcPath: '/_api/ecom-payments/v1/invoices',\n destPath: '/v1/invoices',\n },\n ],\n _: [\n {\n srcPath: '/v1/invoices',\n destPath: '/v1/invoices',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_order-invoices';\n\n/**\n * Retrieves the IDs of invoices associated with all specified orders.\n *\n *\n * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.\n */\nexport function listInvoicesForMultipleOrders(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInvoicesForMultipleOrders({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/invoices/list-by-ids',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __listInvoicesForMultipleOrders;\n}\n\n/** Generates and adds an invoice to a specified order. */\nexport function generateInvoice(payload: object): RequestOptionsFactory<any> {\n function __generateInvoice({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn: 'com.wix.ecom.orders.invoices.v1.Invoices.GenerateInvoice',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/invoices/orders/{orderId}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateInvoice;\n}\n\n/** Generates and adds invoices to all specified orders. */\nexport function bulkGenerateInvoices(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGenerateInvoices({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.invoices.v1.Invoices.BulkGenerateInvoices',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/bulk/invoices/generate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkGenerateInvoices;\n}\n\n/** Adds an invoice to a specified order. */\nexport function addInvoiceToOrder(payload: object): RequestOptionsFactory<any> {\n function __addInvoiceToOrder({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.orders.v1.invoice',\n method: 'POST' as any,\n methodFqn: 'com.wix.ecom.orders.invoices.v1.Invoices.AddInvoiceToOrder',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomOrdersInvoicesV1InvoicesUrl({\n protoPath: '/v1/invoices/orders/{orderId}/add-invoice',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addInvoiceToOrder;\n}\n","export interface Invoice {\n /** Invoice ID. */\n id?: string;\n /** ID of the app that set the invoice. */\n appId?: string;\n}\n\nexport interface ListInvoicesForSingleOrderRequest {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId?: string;\n}\n\nexport interface ListInvoicesForSingleOrderResponse {\n /** List of invoices. */\n invoices?: Invoice[];\n}\n\nexport interface ListInvoicesForMultipleOrdersRequest {\n /**\n * Order IDs for which to retrieve invoices.\n * @maxSize 100\n * @minLength 1\n * @maxLength 100\n */\n orderIds: string[];\n}\n\nexport interface ListInvoicesForMultipleOrdersResponse {\n /** List of order IDs and their associated invoices. */\n invoicesForOrder?: InvoicesForOrder[];\n}\n\nexport interface InvoicesForOrder {\n /** Order ID. */\n orderId?: string;\n /**\n * Invoices info.\n * @maxSize 300\n */\n invoicesInfo?: Invoice[];\n}\n\nexport interface GenerateInvoiceRequest {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n}\n\nexport interface GenerateInvoiceResponse {\n /** Invoice ID. */\n invoiceId?: string;\n}\n\nexport interface BulkGenerateInvoicesRequest {\n /**\n * Order IDs.\n * @minSize 1\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n orderIds: string[];\n}\n\nexport interface BulkGenerateInvoicesResponse {\n results?: BulkInvoiceResult[];\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkInvoiceResult {\n itemMetadata?: ItemMetadata;\n item?: InvoiceForOrder;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface InvoiceForOrder {\n /** Order ID. */\n orderId?: string;\n /** Invoice ID. */\n invoiceId?: string;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface AddInvoiceToOrderRequest {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n /** Invoice info. */\n invoiceInfo: Invoice;\n}\n\nexport interface AddInvoiceToOrderResponse {\n /** List of order invoices. */\n orderInvoices?: Invoice[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface GetOrderInvoiceRequest {\n /**\n * Invoice ID.\n * @minLength 1\n * @maxLength 100\n */\n invoiceId?: string;\n}\n\nexport interface GetOrderInvoiceResponse {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId?: string;\n /** Invoice info. */\n invoiceInfo?: Invoice;\n}\n\nexport interface GenerateInvoiceWithNumberRequest {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId?: string;\n /**\n * @minLength 1\n * @maxLength 11\n */\n invoiceNumber?: string;\n /** 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. */\n issueDate?: Date | null;\n}\n\nexport interface GenerateInvoiceWithNumberResponse {\n /**\n * Invoice ID.\n * @minLength 1\n * @maxLength 100\n */\n invoiceId?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type GenerateInvoiceApplicationErrors =\n | {\n code?: 'GENERATE_INVOICE_NOT_SUPPORTED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVOICE_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_CONTACT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_CONTACT_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_PRICE_AMOUNT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FAILED_TO_RETRIEVE_CONTACT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNKNOWN_CURRENCY';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ORDER_HAS_CHARGEBACKS';\n description?: string;\n data?: Record<string, any>;\n };\n","import * as ambassadorWixEcomOrdersV1Invoice from './ecom-orders-v1-invoice-order-invoices.http.js';\nimport * as ambassadorWixEcomOrdersV1InvoiceTypes from './ecom-orders-v1-invoice-order-invoices.types.js';\nimport * as ambassadorWixEcomOrdersV1InvoiceUniversalTypes from './ecom-orders-v1-invoice-order-invoices.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listInvoicesForMultipleOrders(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.ListInvoicesForMultipleOrdersRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.ListInvoicesForMultipleOrdersRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.ListInvoicesForMultipleOrdersResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.ListInvoicesForMultipleOrdersResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.listInvoicesForMultipleOrders(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/invoices/list-by-ids',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function generateInvoice(): __PublicMethodMetaInfo<\n 'POST',\n { orderId: string },\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.GenerateInvoiceRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.GenerateInvoiceRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.GenerateInvoiceResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.GenerateInvoiceResponse\n> {\n const payload = { orderId: ':orderId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.generateInvoice(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/invoices/orders/{orderId}',\n pathParams: { orderId: 'orderId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkGenerateInvoices(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.BulkGenerateInvoicesRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.BulkGenerateInvoicesRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.BulkGenerateInvoicesResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.BulkGenerateInvoicesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.bulkGenerateInvoices(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/invoices/generate',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function addInvoiceToOrder(): __PublicMethodMetaInfo<\n 'POST',\n { orderId: string },\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.AddInvoiceToOrderRequest,\n ambassadorWixEcomOrdersV1InvoiceTypes.AddInvoiceToOrderRequest,\n ambassadorWixEcomOrdersV1InvoiceUniversalTypes.AddInvoiceToOrderResponse,\n ambassadorWixEcomOrdersV1InvoiceTypes.AddInvoiceToOrderResponse\n> {\n const payload = { orderId: ':orderId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomOrdersV1Invoice.addInvoiceToOrder(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/invoices/orders/{orderId}/add-invoice',\n pathParams: { orderId: 'orderId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n Invoice as InvoiceOriginal,\n ListInvoicesForSingleOrderRequest as ListInvoicesForSingleOrderRequestOriginal,\n ListInvoicesForSingleOrderResponse as ListInvoicesForSingleOrderResponseOriginal,\n ListInvoicesForMultipleOrdersRequest as ListInvoicesForMultipleOrdersRequestOriginal,\n ListInvoicesForMultipleOrdersResponse as ListInvoicesForMultipleOrdersResponseOriginal,\n InvoicesForOrder as InvoicesForOrderOriginal,\n GenerateInvoiceRequest as GenerateInvoiceRequestOriginal,\n GenerateInvoiceResponse as GenerateInvoiceResponseOriginal,\n BulkGenerateInvoicesRequest as BulkGenerateInvoicesRequestOriginal,\n BulkGenerateInvoicesResponse as BulkGenerateInvoicesResponseOriginal,\n BulkInvoiceResult as BulkInvoiceResultOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n InvoiceForOrder as InvoiceForOrderOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n AddInvoiceToOrderRequest as AddInvoiceToOrderRequestOriginal,\n AddInvoiceToOrderResponse as AddInvoiceToOrderResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n GetOrderInvoiceRequest as GetOrderInvoiceRequestOriginal,\n GetOrderInvoiceResponse as GetOrderInvoiceResponseOriginal,\n GenerateInvoiceWithNumberRequest as GenerateInvoiceWithNumberRequestOriginal,\n GenerateInvoiceWithNumberResponse as GenerateInvoiceWithNumberResponseOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n GenerateInvoiceApplicationErrors as GenerateInvoiceApplicationErrorsOriginal,\n} from './ecom-orders-v1-invoice-order-invoices.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,4BAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,qCAAAC;AAAA;AAAA;;;ACAA,0BAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;A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AAAA,EAC1B;AACF;AAEO,SAASC,mBAOd;AACA,QAAM,UAAU,EAAE,SAAS,WAAW;AAEtC,QAAM,oBAC6B,gBAAgB,OAAO;AAE1D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,SAAS,UAAU;AAAA,IACjC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,wBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6B,qBAAqB,OAAO;AAE/D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,EAAE,SAAS,WAAW;AAEtC,QAAM,oBAC6B,kBAAkB,OAAO;AAE5D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,SAAS,UAAU;AAAA,IACjC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["addInvoiceToOrder","bulkGenerateInvoices","generateInvoice","listInvoicesForMultipleOrders","WebhookIdentityType","listInvoicesForMultipleOrders","generateInvoice","bulkGenerateInvoices","addInvoiceToOrder"]}
|
package/build/es/meta.d.mts
CHANGED
|
@@ -7,6 +7,18 @@ interface Invoice {
|
|
|
7
7
|
/** ID of the app that set the invoice. */
|
|
8
8
|
appId?: string;
|
|
9
9
|
}
|
|
10
|
+
interface ListInvoicesForSingleOrderRequest {
|
|
11
|
+
/**
|
|
12
|
+
* Order ID.
|
|
13
|
+
* @minLength 1
|
|
14
|
+
* @maxLength 100
|
|
15
|
+
*/
|
|
16
|
+
orderId?: string;
|
|
17
|
+
}
|
|
18
|
+
interface ListInvoicesForSingleOrderResponse {
|
|
19
|
+
/** List of invoices. */
|
|
20
|
+
invoices?: Invoice[];
|
|
21
|
+
}
|
|
10
22
|
interface ListInvoicesForMultipleOrdersRequest {
|
|
11
23
|
/**
|
|
12
24
|
* Order IDs for which to retrieve invoices.
|
|
@@ -105,6 +117,227 @@ interface AddInvoiceToOrderResponse {
|
|
|
105
117
|
/** List of order invoices. */
|
|
106
118
|
orderInvoices?: Invoice[];
|
|
107
119
|
}
|
|
120
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
121
|
+
createdEvent?: EntityCreatedEvent;
|
|
122
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
123
|
+
deletedEvent?: EntityDeletedEvent;
|
|
124
|
+
actionEvent?: ActionEvent;
|
|
125
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
126
|
+
id?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
129
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
130
|
+
*/
|
|
131
|
+
entityFqdn?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
134
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
135
|
+
*/
|
|
136
|
+
slug?: string;
|
|
137
|
+
/** ID of the entity associated with the event. */
|
|
138
|
+
entityId?: string;
|
|
139
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
140
|
+
eventTime?: Date | null;
|
|
141
|
+
/**
|
|
142
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
143
|
+
* (for example, GDPR).
|
|
144
|
+
*/
|
|
145
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
146
|
+
/** If present, indicates the action that triggered the event. */
|
|
147
|
+
originatedFrom?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
150
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
151
|
+
*/
|
|
152
|
+
entityEventSequence?: string | null;
|
|
153
|
+
}
|
|
154
|
+
/** @oneof */
|
|
155
|
+
interface DomainEventBodyOneOf {
|
|
156
|
+
createdEvent?: EntityCreatedEvent;
|
|
157
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
158
|
+
deletedEvent?: EntityDeletedEvent;
|
|
159
|
+
actionEvent?: ActionEvent;
|
|
160
|
+
}
|
|
161
|
+
interface EntityCreatedEvent {
|
|
162
|
+
entityAsJson?: string;
|
|
163
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
164
|
+
restoreInfo?: RestoreInfo;
|
|
165
|
+
}
|
|
166
|
+
interface RestoreInfo {
|
|
167
|
+
deletedDate?: Date | null;
|
|
168
|
+
}
|
|
169
|
+
interface EntityUpdatedEvent {
|
|
170
|
+
/**
|
|
171
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
172
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
173
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
174
|
+
*/
|
|
175
|
+
currentEntityAsJson?: string;
|
|
176
|
+
}
|
|
177
|
+
interface EntityDeletedEvent {
|
|
178
|
+
/** Entity that was deleted. */
|
|
179
|
+
deletedEntityAsJson?: string | null;
|
|
180
|
+
}
|
|
181
|
+
interface ActionEvent {
|
|
182
|
+
bodyAsJson?: string;
|
|
183
|
+
}
|
|
184
|
+
interface Empty {
|
|
185
|
+
}
|
|
186
|
+
interface GetOrderInvoiceRequest {
|
|
187
|
+
/**
|
|
188
|
+
* Invoice ID.
|
|
189
|
+
* @minLength 1
|
|
190
|
+
* @maxLength 100
|
|
191
|
+
*/
|
|
192
|
+
invoiceId?: string;
|
|
193
|
+
}
|
|
194
|
+
interface GetOrderInvoiceResponse {
|
|
195
|
+
/**
|
|
196
|
+
* Order ID.
|
|
197
|
+
* @minLength 1
|
|
198
|
+
* @maxLength 100
|
|
199
|
+
*/
|
|
200
|
+
orderId?: string;
|
|
201
|
+
/** Invoice info. */
|
|
202
|
+
invoiceInfo?: Invoice;
|
|
203
|
+
}
|
|
204
|
+
interface GenerateInvoiceWithNumberRequest {
|
|
205
|
+
/**
|
|
206
|
+
* Order ID.
|
|
207
|
+
* @minLength 1
|
|
208
|
+
* @maxLength 100
|
|
209
|
+
*/
|
|
210
|
+
orderId?: string;
|
|
211
|
+
/**
|
|
212
|
+
* @minLength 1
|
|
213
|
+
* @maxLength 11
|
|
214
|
+
*/
|
|
215
|
+
invoiceNumber?: string;
|
|
216
|
+
/** 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. */
|
|
217
|
+
issueDate?: Date | null;
|
|
218
|
+
}
|
|
219
|
+
interface GenerateInvoiceWithNumberResponse {
|
|
220
|
+
/**
|
|
221
|
+
* Invoice ID.
|
|
222
|
+
* @minLength 1
|
|
223
|
+
* @maxLength 100
|
|
224
|
+
*/
|
|
225
|
+
invoiceId?: string;
|
|
226
|
+
}
|
|
227
|
+
interface MessageEnvelope {
|
|
228
|
+
/**
|
|
229
|
+
* App instance ID.
|
|
230
|
+
* @format GUID
|
|
231
|
+
*/
|
|
232
|
+
instanceId?: string | null;
|
|
233
|
+
/**
|
|
234
|
+
* Event type.
|
|
235
|
+
* @maxLength 150
|
|
236
|
+
*/
|
|
237
|
+
eventType?: string;
|
|
238
|
+
/** The identification type and identity data. */
|
|
239
|
+
identity?: IdentificationData;
|
|
240
|
+
/** Stringify payload. */
|
|
241
|
+
data?: string;
|
|
242
|
+
}
|
|
243
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
244
|
+
/**
|
|
245
|
+
* ID of a site visitor that has not logged in to the site.
|
|
246
|
+
* @format GUID
|
|
247
|
+
*/
|
|
248
|
+
anonymousVisitorId?: string;
|
|
249
|
+
/**
|
|
250
|
+
* ID of a site visitor that has logged in to the site.
|
|
251
|
+
* @format GUID
|
|
252
|
+
*/
|
|
253
|
+
memberId?: string;
|
|
254
|
+
/**
|
|
255
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
256
|
+
* @format GUID
|
|
257
|
+
*/
|
|
258
|
+
wixUserId?: string;
|
|
259
|
+
/**
|
|
260
|
+
* ID of an app.
|
|
261
|
+
* @format GUID
|
|
262
|
+
*/
|
|
263
|
+
appId?: string;
|
|
264
|
+
/** @readonly */
|
|
265
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
266
|
+
}
|
|
267
|
+
/** @oneof */
|
|
268
|
+
interface IdentificationDataIdOneOf {
|
|
269
|
+
/**
|
|
270
|
+
* ID of a site visitor that has not logged in to the site.
|
|
271
|
+
* @format GUID
|
|
272
|
+
*/
|
|
273
|
+
anonymousVisitorId?: string;
|
|
274
|
+
/**
|
|
275
|
+
* ID of a site visitor that has logged in to the site.
|
|
276
|
+
* @format GUID
|
|
277
|
+
*/
|
|
278
|
+
memberId?: string;
|
|
279
|
+
/**
|
|
280
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
281
|
+
* @format GUID
|
|
282
|
+
*/
|
|
283
|
+
wixUserId?: string;
|
|
284
|
+
/**
|
|
285
|
+
* ID of an app.
|
|
286
|
+
* @format GUID
|
|
287
|
+
*/
|
|
288
|
+
appId?: string;
|
|
289
|
+
}
|
|
290
|
+
declare enum WebhookIdentityType {
|
|
291
|
+
UNKNOWN = "UNKNOWN",
|
|
292
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
293
|
+
MEMBER = "MEMBER",
|
|
294
|
+
WIX_USER = "WIX_USER",
|
|
295
|
+
APP = "APP"
|
|
296
|
+
}
|
|
297
|
+
/** @enumType */
|
|
298
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
299
|
+
/** @docsIgnore */
|
|
300
|
+
type GenerateInvoiceApplicationErrors = {
|
|
301
|
+
code?: 'GENERATE_INVOICE_NOT_SUPPORTED';
|
|
302
|
+
description?: string;
|
|
303
|
+
data?: Record<string, any>;
|
|
304
|
+
} | {
|
|
305
|
+
code?: 'INVOICE_ALREADY_EXISTS';
|
|
306
|
+
description?: string;
|
|
307
|
+
data?: Record<string, any>;
|
|
308
|
+
} | {
|
|
309
|
+
code?: 'MISSING_CONTACT';
|
|
310
|
+
description?: string;
|
|
311
|
+
data?: Record<string, any>;
|
|
312
|
+
} | {
|
|
313
|
+
code?: 'MISSING_CONTACT_EMAIL';
|
|
314
|
+
description?: string;
|
|
315
|
+
data?: Record<string, any>;
|
|
316
|
+
} | {
|
|
317
|
+
code?: 'INVALID_EMAIL';
|
|
318
|
+
description?: string;
|
|
319
|
+
data?: Record<string, any>;
|
|
320
|
+
} | {
|
|
321
|
+
code?: 'INVALID_PRICE_AMOUNT';
|
|
322
|
+
description?: string;
|
|
323
|
+
data?: Record<string, any>;
|
|
324
|
+
} | {
|
|
325
|
+
code?: 'CONTACT_NOT_FOUND';
|
|
326
|
+
description?: string;
|
|
327
|
+
data?: Record<string, any>;
|
|
328
|
+
} | {
|
|
329
|
+
code?: 'FAILED_TO_RETRIEVE_CONTACT';
|
|
330
|
+
description?: string;
|
|
331
|
+
data?: Record<string, any>;
|
|
332
|
+
} | {
|
|
333
|
+
code?: 'UNKNOWN_CURRENCY';
|
|
334
|
+
description?: string;
|
|
335
|
+
data?: Record<string, any>;
|
|
336
|
+
} | {
|
|
337
|
+
code?: 'ORDER_HAS_CHARGEBACKS';
|
|
338
|
+
description?: string;
|
|
339
|
+
data?: Record<string, any>;
|
|
340
|
+
};
|
|
108
341
|
|
|
109
342
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
110
343
|
getUrl: (context: any) => string;
|
|
@@ -125,4 +358,4 @@ declare function addInvoiceToOrder(): __PublicMethodMetaInfo<'POST', {
|
|
|
125
358
|
orderId: string;
|
|
126
359
|
}, AddInvoiceToOrderRequest$1, AddInvoiceToOrderRequest, AddInvoiceToOrderResponse$1, AddInvoiceToOrderResponse>;
|
|
127
360
|
|
|
128
|
-
export { type __PublicMethodMetaInfo, addInvoiceToOrder, bulkGenerateInvoices, generateInvoice, listInvoicesForMultipleOrders };
|
|
361
|
+
export { type ActionEvent as ActionEventOriginal, type AddInvoiceToOrderRequest as AddInvoiceToOrderRequestOriginal, type AddInvoiceToOrderResponse as AddInvoiceToOrderResponseOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkGenerateInvoicesRequest as BulkGenerateInvoicesRequestOriginal, type BulkGenerateInvoicesResponse as BulkGenerateInvoicesResponseOriginal, type BulkInvoiceResult as BulkInvoiceResultOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GenerateInvoiceApplicationErrors as GenerateInvoiceApplicationErrorsOriginal, type GenerateInvoiceRequest as GenerateInvoiceRequestOriginal, type GenerateInvoiceResponse as GenerateInvoiceResponseOriginal, type GenerateInvoiceWithNumberRequest as GenerateInvoiceWithNumberRequestOriginal, type GenerateInvoiceWithNumberResponse as GenerateInvoiceWithNumberResponseOriginal, type GetOrderInvoiceRequest as GetOrderInvoiceRequestOriginal, type GetOrderInvoiceResponse as GetOrderInvoiceResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type InvoiceForOrder as InvoiceForOrderOriginal, type Invoice as InvoiceOriginal, type InvoicesForOrder as InvoicesForOrderOriginal, type ItemMetadata as ItemMetadataOriginal, type ListInvoicesForMultipleOrdersRequest as ListInvoicesForMultipleOrdersRequestOriginal, type ListInvoicesForMultipleOrdersResponse as ListInvoicesForMultipleOrdersResponseOriginal, type ListInvoicesForSingleOrderRequest as ListInvoicesForSingleOrderRequestOriginal, type ListInvoicesForSingleOrderResponse as ListInvoicesForSingleOrderResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type RestoreInfo as RestoreInfoOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, addInvoiceToOrder, bulkGenerateInvoices, generateInvoice, listInvoicesForMultipleOrders };
|
package/build/es/meta.mjs
CHANGED
|
@@ -121,6 +121,16 @@ function addInvoiceToOrder(payload) {
|
|
|
121
121
|
return __addInvoiceToOrder;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
// src/ecom-orders-v1-invoice-order-invoices.types.ts
|
|
125
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
126
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
127
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
128
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
129
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
130
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
131
|
+
return WebhookIdentityType2;
|
|
132
|
+
})(WebhookIdentityType || {});
|
|
133
|
+
|
|
124
134
|
// src/ecom-orders-v1-invoice-order-invoices.meta.ts
|
|
125
135
|
function listInvoicesForMultipleOrders2() {
|
|
126
136
|
const payload = {};
|
|
@@ -195,6 +205,7 @@ function addInvoiceToOrder2() {
|
|
|
195
205
|
};
|
|
196
206
|
}
|
|
197
207
|
export {
|
|
208
|
+
WebhookIdentityType as WebhookIdentityTypeOriginal,
|
|
198
209
|
addInvoiceToOrder2 as addInvoiceToOrder,
|
|
199
210
|
bulkGenerateInvoices2 as bulkGenerateInvoices,
|
|
200
211
|
generateInvoice2 as generateInvoice,
|