@wix/auto_sdk_ecom_order-invoices 1.0.15 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/build/{cjs/src/ecom-orders-v1-invoice-order-invoices.types.d.ts → ecom-orders-v1-invoice-order-invoices.universal-Be8NGMCD.d.mts} +43 -43
  2. package/build/{internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.d.ts → ecom-orders-v1-invoice-order-invoices.universal-Be8NGMCD.d.ts} +43 -43
  3. package/build/index.d.mts +19 -0
  4. package/build/index.d.ts +19 -0
  5. package/build/index.js +284 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +256 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/ecom-orders-v1-invoice-order-invoices.types.d.ts → ecom-orders-v1-invoice-order-invoices.universal-CuUkLxV0.d.mts} +43 -43
  10. package/build/{es/src/ecom-orders-v1-invoice-order-invoices.types.d.ts → internal/ecom-orders-v1-invoice-order-invoices.universal-CuUkLxV0.d.ts} +43 -43
  11. package/build/internal/index.d.mts +53 -0
  12. package/build/internal/index.d.ts +53 -0
  13. package/build/internal/index.js +284 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +256 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +127 -0
  18. package/build/internal/meta.d.ts +127 -0
  19. package/build/internal/meta.js +209 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +179 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +127 -0
  24. package/build/meta.d.ts +127 -0
  25. package/build/meta.js +209 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +179 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +0 -5
  40. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js +0 -15
  41. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js.map +0 -1
  42. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +0 -14
  43. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js +0 -114
  44. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js.map +0 -1
  45. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +0 -20
  46. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js +0 -104
  47. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +0 -17
  49. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js +0 -35
  50. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js.map +0 -1
  51. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js +0 -12
  52. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js.map +0 -1
  53. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +0 -329
  54. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js +0 -223
  55. package/build/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +0 -5
  67. package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.js +0 -11
  68. package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.js.map +0 -1
  69. package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +0 -14
  70. package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.js +0 -107
  71. package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.js.map +0 -1
  72. package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +0 -20
  73. package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.js +0 -74
  74. package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +0 -1
  75. package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +0 -17
  76. package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.js +0 -27
  77. package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.js.map +0 -1
  78. package/build/es/src/ecom-orders-v1-invoice-order-invoices.types.js +0 -9
  79. package/build/es/src/ecom-orders-v1-invoice-order-invoices.types.js.map +0 -1
  80. package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +0 -329
  81. package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.js +0 -193
  82. package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +0 -11
  93. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js +0 -15
  94. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js.map +0 -1
  95. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +0 -14
  96. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js +0 -114
  97. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js.map +0 -1
  98. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +0 -20
  99. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js +0 -104
  100. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +0 -45
  102. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js +0 -35
  103. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js.map +0 -1
  104. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js +0 -12
  105. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js.map +0 -1
  106. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +0 -398
  107. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js +0 -223
  108. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +0 -11
  119. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.js +0 -11
  120. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.js.map +0 -1
  121. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +0 -14
  122. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.js +0 -107
  123. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.js.map +0 -1
  124. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +0 -20
  125. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.js +0 -74
  126. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +0 -1
  127. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +0 -45
  128. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.js +0 -27
  129. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.js.map +0 -1
  130. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.types.js +0 -9
  131. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.types.js.map +0 -1
  132. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +0 -398
  133. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.js +0 -193
  134. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +0 -1
@@ -1,398 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface Invoice {
3
- /** Invoice ID. */
4
- _id?: string;
5
- /** ID of the app that set the invoice. */
6
- appId?: string;
7
- }
8
- export interface ListInvoicesForSingleOrderRequest {
9
- /**
10
- * Order ID.
11
- * @minLength 1
12
- * @maxLength 100
13
- */
14
- orderId?: string;
15
- }
16
- export interface ListInvoicesForSingleOrderResponse {
17
- /** List of invoices. */
18
- invoices?: Invoice[];
19
- }
20
- export interface ListInvoicesForMultipleOrdersRequest {
21
- /**
22
- * Order IDs for which to retrieve invoices.
23
- * @maxSize 100
24
- * @minLength 1
25
- * @maxLength 100
26
- */
27
- orderIds: string[];
28
- }
29
- export interface ListInvoicesForMultipleOrdersResponse {
30
- /** List of order IDs and their associated invoices. */
31
- invoicesForOrder?: InvoicesForOrder[];
32
- }
33
- export interface InvoicesForOrder {
34
- /** Order ID. */
35
- orderId?: string;
36
- /**
37
- * Invoices info.
38
- * @maxSize 300
39
- */
40
- invoicesInfo?: Invoice[];
41
- }
42
- export interface GenerateInvoiceRequest {
43
- /**
44
- * Order ID.
45
- * @minLength 1
46
- * @maxLength 100
47
- */
48
- orderId: string;
49
- }
50
- export interface GenerateInvoiceResponse {
51
- /** Invoice ID. */
52
- invoiceId?: string;
53
- }
54
- export interface BulkGenerateInvoicesRequest {
55
- /**
56
- * Order IDs.
57
- * @minSize 1
58
- * @maxSize 300
59
- * @minLength 1
60
- * @maxLength 100
61
- */
62
- orderIds: string[];
63
- }
64
- export interface BulkGenerateInvoicesResponse {
65
- results?: BulkInvoiceResult[];
66
- bulkActionMetadata?: BulkActionMetadata;
67
- }
68
- export interface BulkInvoiceResult {
69
- itemMetadata?: ItemMetadata;
70
- item?: InvoiceForOrder;
71
- }
72
- export interface ItemMetadata {
73
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
74
- _id?: string | null;
75
- /** Index of the item within the request array. Allows for correlation between request and response items. */
76
- originalIndex?: number;
77
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
78
- success?: boolean;
79
- /** Details about the error in case of failure. */
80
- error?: ApplicationError;
81
- }
82
- export interface ApplicationError {
83
- /** Error code. */
84
- code?: string;
85
- /** Description of the error. */
86
- description?: string;
87
- /** Data related to the error. */
88
- data?: Record<string, any> | null;
89
- }
90
- export interface InvoiceForOrder {
91
- /** Order ID. */
92
- orderId?: string;
93
- /** Invoice ID. */
94
- invoiceId?: string;
95
- }
96
- export interface BulkActionMetadata {
97
- /** Number of items that were successfully processed. */
98
- totalSuccesses?: number;
99
- /** Number of items that couldn't be processed. */
100
- totalFailures?: number;
101
- /** Number of failures without details because detailed failure threshold was exceeded. */
102
- undetailedFailures?: number;
103
- }
104
- export interface AddInvoiceToOrderRequest {
105
- /**
106
- * Order ID.
107
- * @minLength 1
108
- * @maxLength 100
109
- */
110
- orderId: string;
111
- /** Invoice info. */
112
- invoiceInfo: Invoice;
113
- }
114
- export interface AddInvoiceToOrderResponse {
115
- /** List of order invoices. */
116
- orderInvoices?: Invoice[];
117
- }
118
- export interface DomainEvent extends DomainEventBodyOneOf {
119
- createdEvent?: EntityCreatedEvent;
120
- updatedEvent?: EntityUpdatedEvent;
121
- deletedEvent?: EntityDeletedEvent;
122
- actionEvent?: ActionEvent;
123
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
124
- _id?: string;
125
- /**
126
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
127
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
128
- */
129
- entityFqdn?: string;
130
- /**
131
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
132
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
133
- */
134
- slug?: string;
135
- /** ID of the entity associated with the event. */
136
- entityId?: string;
137
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
138
- eventTime?: Date | null;
139
- /**
140
- * Whether the event was triggered as a result of a privacy regulation application
141
- * (for example, GDPR).
142
- */
143
- triggeredByAnonymizeRequest?: boolean | null;
144
- /** If present, indicates the action that triggered the event. */
145
- originatedFrom?: string | null;
146
- /**
147
- * 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.
148
- * 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.
149
- */
150
- entityEventSequence?: string | null;
151
- }
152
- /** @oneof */
153
- export interface DomainEventBodyOneOf {
154
- createdEvent?: EntityCreatedEvent;
155
- updatedEvent?: EntityUpdatedEvent;
156
- deletedEvent?: EntityDeletedEvent;
157
- actionEvent?: ActionEvent;
158
- }
159
- export interface EntityCreatedEvent {
160
- entity?: string;
161
- }
162
- export interface RestoreInfo {
163
- deletedDate?: Date | null;
164
- }
165
- export interface EntityUpdatedEvent {
166
- /**
167
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
168
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
169
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
170
- */
171
- currentEntity?: string;
172
- }
173
- export interface EntityDeletedEvent {
174
- /** Entity that was deleted. */
175
- deletedEntity?: string | null;
176
- }
177
- export interface ActionEvent {
178
- body?: string;
179
- }
180
- export interface Empty {
181
- }
182
- export interface GetOrderInvoiceRequest {
183
- /**
184
- * Invoice ID.
185
- * @minLength 1
186
- * @maxLength 100
187
- */
188
- invoiceId?: string;
189
- }
190
- export interface GetOrderInvoiceResponse {
191
- /**
192
- * Order ID.
193
- * @minLength 1
194
- * @maxLength 100
195
- */
196
- orderId?: string;
197
- /** Invoice info. */
198
- invoiceInfo?: Invoice;
199
- }
200
- export interface GenerateInvoiceWithNumberRequest {
201
- /**
202
- * Order ID.
203
- * @minLength 1
204
- * @maxLength 100
205
- */
206
- orderId?: string;
207
- /**
208
- * @minLength 1
209
- * @maxLength 11
210
- */
211
- invoiceNumber?: string;
212
- /** 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. */
213
- issueDate?: Date | null;
214
- }
215
- export interface GenerateInvoiceWithNumberResponse {
216
- /**
217
- * Invoice ID.
218
- * @minLength 1
219
- * @maxLength 100
220
- */
221
- invoiceId?: string;
222
- }
223
- export interface MessageEnvelope {
224
- /**
225
- * App instance ID.
226
- * @format GUID
227
- */
228
- instanceId?: string | null;
229
- /**
230
- * Event type.
231
- * @maxLength 150
232
- */
233
- eventType?: string;
234
- /** The identification type and identity data. */
235
- identity?: IdentificationData;
236
- /** Stringify payload. */
237
- data?: string;
238
- }
239
- export interface IdentificationData extends IdentificationDataIdOneOf {
240
- /**
241
- * ID of a site visitor that has not logged in to the site.
242
- * @format GUID
243
- */
244
- anonymousVisitorId?: string;
245
- /**
246
- * ID of a site visitor that has logged in to the site.
247
- * @format GUID
248
- */
249
- memberId?: string;
250
- /**
251
- * ID of a Wix user (site owner, contributor, etc.).
252
- * @format GUID
253
- */
254
- wixUserId?: string;
255
- /**
256
- * ID of an app.
257
- * @format GUID
258
- */
259
- appId?: string;
260
- /** @readonly */
261
- identityType?: WebhookIdentityTypeWithLiterals;
262
- }
263
- /** @oneof */
264
- export interface IdentificationDataIdOneOf {
265
- /**
266
- * ID of a site visitor that has not logged in to the site.
267
- * @format GUID
268
- */
269
- anonymousVisitorId?: string;
270
- /**
271
- * ID of a site visitor that has logged in to the site.
272
- * @format GUID
273
- */
274
- memberId?: string;
275
- /**
276
- * ID of a Wix user (site owner, contributor, etc.).
277
- * @format GUID
278
- */
279
- wixUserId?: string;
280
- /**
281
- * ID of an app.
282
- * @format GUID
283
- */
284
- appId?: string;
285
- }
286
- export declare enum WebhookIdentityType {
287
- UNKNOWN = "UNKNOWN",
288
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
289
- MEMBER = "MEMBER",
290
- WIX_USER = "WIX_USER",
291
- APP = "APP"
292
- }
293
- /** @enumType */
294
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
295
- type InvoiceNonNullablePaths = `_id` | `appId`;
296
- /**
297
- * Retrieves the IDs of invoices associated with all specified orders.
298
- *
299
- *
300
- * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.
301
- * @param orderIds - Order IDs for which to retrieve invoices.
302
- * @public
303
- * @documentationMaturity preview
304
- * @requiredField orderIds
305
- * @permissionId ECOM.READ_INVOICES
306
- * @permissionScope Manage Stores - all permissions
307
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
308
- * @permissionScope Manage Stores
309
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
310
- * @permissionScope Read eCommerce - all read permissions
311
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
312
- * @permissionScope Read Orders
313
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
314
- * @permissionScope Read Stores - all read permissions
315
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
316
- * @permissionScope Manage Restaurants - all permissions
317
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
318
- * @permissionScope Manage eCommerce - all permissions
319
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
320
- * @permissionScope Manage Orders
321
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
322
- * @applicableIdentity APP
323
- * @applicableIdentity MEMBER
324
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders
325
- */
326
- export declare function listInvoicesForMultipleOrders(orderIds: string[]): Promise<NonNullablePaths<ListInvoicesForMultipleOrdersResponse, `invoicesForOrder` | `invoicesForOrder.${number}.orderId` | {
327
- [P in InvoiceNonNullablePaths]: `invoicesForOrder.${number}.invoicesInfo.${number}.${P}`;
328
- }[InvoiceNonNullablePaths]>>;
329
- /**
330
- * Generates and adds an invoice to a specified order.
331
- * @param orderId - Order ID.
332
- * @internal
333
- * @documentationMaturity preview
334
- * @requiredField orderId
335
- * @permissionId ECOM.MODIFY_INVOICES
336
- * @permissionScope Manage Stores - all permissions
337
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
338
- * @permissionScope Manage Stores
339
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
340
- * @permissionScope Manage Restaurants - all permissions
341
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
342
- * @permissionScope Manage eCommerce - all permissions
343
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
344
- * @permissionScope Manage Orders
345
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
346
- * @applicableIdentity APP
347
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.GenerateInvoice
348
- */
349
- export declare function generateInvoice(orderId: string): Promise<NonNullablePaths<GenerateInvoiceResponse, `invoiceId`>>;
350
- /**
351
- * Generates and adds invoices to all specified orders.
352
- * @param orderIds - Order IDs.
353
- * @internal
354
- * @documentationMaturity preview
355
- * @requiredField orderIds
356
- * @permissionId ECOM.MODIFY_INVOICES
357
- * @permissionScope Manage Stores - all permissions
358
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
359
- * @permissionScope Manage Stores
360
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
361
- * @permissionScope Manage Restaurants - all permissions
362
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
363
- * @permissionScope Manage eCommerce - all permissions
364
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
365
- * @permissionScope Manage Orders
366
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
367
- * @applicableIdentity APP
368
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.BulkGenerateInvoices
369
- */
370
- export declare function bulkGenerateInvoices(orderIds: string[]): Promise<NonNullablePaths<BulkGenerateInvoicesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.orderId` | `results.${number}.item.invoiceId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
371
- /**
372
- * Adds an invoice to a specified order.
373
- * @param orderId - Order ID.
374
- * @param invoiceInfo - Invoice info.
375
- * @internal
376
- * @documentationMaturity preview
377
- * @requiredField invoiceInfo
378
- * @requiredField invoiceInfo._id
379
- * @requiredField invoiceInfo.appId
380
- * @requiredField orderId
381
- * @permissionId ECOM.ADD_INVOICE
382
- * @permissionScope Manage Stores - all permissions
383
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
384
- * @permissionScope Manage Stores
385
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
386
- * @permissionScope Manage Restaurants - all permissions
387
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
388
- * @permissionScope Manage eCommerce - all permissions
389
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
390
- * @permissionScope Manage Orders
391
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
392
- * @applicableIdentity APP
393
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.AddInvoiceToOrder
394
- */
395
- export declare function addInvoiceToOrder(orderId: string, invoiceInfo: NonNullablePaths<Invoice, `_id` | `appId`>): Promise<NonNullablePaths<AddInvoiceToOrderResponse, {
396
- [P in InvoiceNonNullablePaths]: `orderInvoices.${number}.${P}`;
397
- }[InvoiceNonNullablePaths]>>;
398
- export {};
@@ -1,193 +0,0 @@
1
- import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
- import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
- import * as ambassadorWixEcomOrdersV1Invoice from './ecom-orders-v1-invoice-order-invoices.http.js';
4
- export 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 || (WebhookIdentityType = {}));
12
- /**
13
- * Retrieves the IDs of invoices associated with all specified orders.
14
- *
15
- *
16
- * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.
17
- * @param orderIds - Order IDs for which to retrieve invoices.
18
- * @public
19
- * @documentationMaturity preview
20
- * @requiredField orderIds
21
- * @permissionId ECOM.READ_INVOICES
22
- * @permissionScope Manage Stores - all permissions
23
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
24
- * @permissionScope Manage Stores
25
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
26
- * @permissionScope Read eCommerce - all read permissions
27
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
28
- * @permissionScope Read Orders
29
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
30
- * @permissionScope Read Stores - all read permissions
31
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
32
- * @permissionScope Manage Restaurants - all permissions
33
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
34
- * @permissionScope Manage eCommerce - all permissions
35
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
36
- * @permissionScope Manage Orders
37
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
38
- * @applicableIdentity APP
39
- * @applicableIdentity MEMBER
40
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders
41
- */
42
- export async function listInvoicesForMultipleOrders(orderIds) {
43
- // @ts-ignore
44
- const { httpClient, sideEffects } = arguments[1];
45
- const payload = renameKeysFromSDKRequestToRESTRequest({ orderIds: orderIds });
46
- const reqOpts = ambassadorWixEcomOrdersV1Invoice.listInvoicesForMultipleOrders(payload);
47
- sideEffects?.onSiteCall?.();
48
- try {
49
- const result = await httpClient.request(reqOpts);
50
- sideEffects?.onSuccess?.(result);
51
- return renameKeysFromRESTResponseToSDKResponse(result.data);
52
- }
53
- catch (err) {
54
- const transformedError = sdkTransformError(err, {
55
- spreadPathsToArguments: {},
56
- explicitPathsToArguments: { orderIds: '$[0]' },
57
- singleArgumentUnchanged: false,
58
- }, ['orderIds']);
59
- sideEffects?.onError?.(err);
60
- throw transformedError;
61
- }
62
- }
63
- /**
64
- * Generates and adds an invoice to a specified order.
65
- * @param orderId - Order ID.
66
- * @internal
67
- * @documentationMaturity preview
68
- * @requiredField orderId
69
- * @permissionId ECOM.MODIFY_INVOICES
70
- * @permissionScope Manage Stores - all permissions
71
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
72
- * @permissionScope Manage Stores
73
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
74
- * @permissionScope Manage Restaurants - all permissions
75
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
76
- * @permissionScope Manage eCommerce - all permissions
77
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
78
- * @permissionScope Manage Orders
79
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
80
- * @applicableIdentity APP
81
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.GenerateInvoice
82
- */
83
- export async function generateInvoice(orderId) {
84
- // @ts-ignore
85
- const { httpClient, sideEffects } = arguments[1];
86
- const payload = renameKeysFromSDKRequestToRESTRequest({ orderId: orderId });
87
- const reqOpts = ambassadorWixEcomOrdersV1Invoice.generateInvoice(payload);
88
- sideEffects?.onSiteCall?.();
89
- try {
90
- const result = await httpClient.request(reqOpts);
91
- sideEffects?.onSuccess?.(result);
92
- return renameKeysFromRESTResponseToSDKResponse(result.data);
93
- }
94
- catch (err) {
95
- const transformedError = sdkTransformError(err, {
96
- spreadPathsToArguments: {},
97
- explicitPathsToArguments: { orderId: '$[0]' },
98
- singleArgumentUnchanged: false,
99
- }, ['orderId']);
100
- sideEffects?.onError?.(err);
101
- throw transformedError;
102
- }
103
- }
104
- /**
105
- * Generates and adds invoices to all specified orders.
106
- * @param orderIds - Order IDs.
107
- * @internal
108
- * @documentationMaturity preview
109
- * @requiredField orderIds
110
- * @permissionId ECOM.MODIFY_INVOICES
111
- * @permissionScope Manage Stores - all permissions
112
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
113
- * @permissionScope Manage Stores
114
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
115
- * @permissionScope Manage Restaurants - all permissions
116
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
117
- * @permissionScope Manage eCommerce - all permissions
118
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
119
- * @permissionScope Manage Orders
120
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
121
- * @applicableIdentity APP
122
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.BulkGenerateInvoices
123
- */
124
- export async function bulkGenerateInvoices(orderIds) {
125
- // @ts-ignore
126
- const { httpClient, sideEffects } = arguments[1];
127
- const payload = renameKeysFromSDKRequestToRESTRequest({ orderIds: orderIds });
128
- const reqOpts = ambassadorWixEcomOrdersV1Invoice.bulkGenerateInvoices(payload);
129
- sideEffects?.onSiteCall?.();
130
- try {
131
- const result = await httpClient.request(reqOpts);
132
- sideEffects?.onSuccess?.(result);
133
- return renameKeysFromRESTResponseToSDKResponse(result.data);
134
- }
135
- catch (err) {
136
- const transformedError = sdkTransformError(err, {
137
- spreadPathsToArguments: {},
138
- explicitPathsToArguments: { orderIds: '$[0]' },
139
- singleArgumentUnchanged: false,
140
- }, ['orderIds']);
141
- sideEffects?.onError?.(err);
142
- throw transformedError;
143
- }
144
- }
145
- /**
146
- * Adds an invoice to a specified order.
147
- * @param orderId - Order ID.
148
- * @param invoiceInfo - Invoice info.
149
- * @internal
150
- * @documentationMaturity preview
151
- * @requiredField invoiceInfo
152
- * @requiredField invoiceInfo._id
153
- * @requiredField invoiceInfo.appId
154
- * @requiredField orderId
155
- * @permissionId ECOM.ADD_INVOICE
156
- * @permissionScope Manage Stores - all permissions
157
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
158
- * @permissionScope Manage Stores
159
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
160
- * @permissionScope Manage Restaurants - all permissions
161
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
162
- * @permissionScope Manage eCommerce - all permissions
163
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
164
- * @permissionScope Manage Orders
165
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
166
- * @applicableIdentity APP
167
- * @fqn com.wix.ecom.orders.invoices.v1.Invoices.AddInvoiceToOrder
168
- */
169
- export async function addInvoiceToOrder(orderId, invoiceInfo) {
170
- // @ts-ignore
171
- const { httpClient, sideEffects } = arguments[2];
172
- const payload = renameKeysFromSDKRequestToRESTRequest({
173
- orderId: orderId,
174
- invoiceInfo: invoiceInfo,
175
- });
176
- const reqOpts = ambassadorWixEcomOrdersV1Invoice.addInvoiceToOrder(payload);
177
- sideEffects?.onSiteCall?.();
178
- try {
179
- const result = await httpClient.request(reqOpts);
180
- sideEffects?.onSuccess?.(result);
181
- return renameKeysFromRESTResponseToSDKResponse(result.data);
182
- }
183
- catch (err) {
184
- const transformedError = sdkTransformError(err, {
185
- spreadPathsToArguments: {},
186
- explicitPathsToArguments: { orderId: '$[0]', invoiceInfo: '$[1]' },
187
- singleArgumentUnchanged: false,
188
- }, ['orderId', 'invoiceInfo']);
189
- sideEffects?.onError?.(err);
190
- throw transformedError;
191
- }
192
- }
193
- //# sourceMappingURL=ecom-orders-v1-invoice-order-invoices.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ecom-orders-v1-invoice-order-invoices.universal.js","sourceRoot":"","sources":["../../../../src/ecom-orders-v1-invoice-order-invoices.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,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