@wix/auto_sdk_ecom_order-invoices 1.0.5 → 1.0.7

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 (133) hide show
  1. package/build/{cjs/src/ecom-orders-v1-invoice-order-invoices.types.d.ts → ecom-orders-v1-invoice-order-invoices.universal-MRNaa-Xt.d.mts} +42 -42
  2. package/build/{internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.d.ts → ecom-orders-v1-invoice-order-invoices.universal-MRNaa-Xt.d.ts} +42 -42
  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-CZFxrTkE.d.mts} +42 -42
  10. package/build/{es/src/ecom-orders-v1-invoice-order-invoices.types.d.ts → internal/ecom-orders-v1-invoice-order-invoices.universal-CZFxrTkE.d.ts} +42 -42
  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 +13 -12
  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 -335
  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/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +0 -5
  66. package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.js +0 -11
  67. package/build/es/src/ecom-orders-v1-invoice-order-invoices.context.js.map +0 -1
  68. package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +0 -14
  69. package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.js +0 -107
  70. package/build/es/src/ecom-orders-v1-invoice-order-invoices.http.js.map +0 -1
  71. package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +0 -20
  72. package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.js +0 -74
  73. package/build/es/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +0 -1
  74. package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +0 -17
  75. package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.js +0 -27
  76. package/build/es/src/ecom-orders-v1-invoice-order-invoices.public.js.map +0 -1
  77. package/build/es/src/ecom-orders-v1-invoice-order-invoices.types.js +0 -9
  78. package/build/es/src/ecom-orders-v1-invoice-order-invoices.types.js.map +0 -1
  79. package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +0 -335
  80. package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.js +0 -193
  81. package/build/es/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +0 -1
  82. package/build/internal/cjs/index.d.ts +0 -1
  83. package/build/internal/cjs/index.js +0 -18
  84. package/build/internal/cjs/index.js.map +0 -1
  85. package/build/internal/cjs/index.typings.d.ts +0 -1
  86. package/build/internal/cjs/index.typings.js +0 -18
  87. package/build/internal/cjs/index.typings.js.map +0 -1
  88. package/build/internal/cjs/meta.d.ts +0 -1
  89. package/build/internal/cjs/meta.js +0 -18
  90. package/build/internal/cjs/meta.js.map +0 -1
  91. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +0 -11
  92. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js +0 -15
  93. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.context.js.map +0 -1
  94. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +0 -14
  95. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js +0 -114
  96. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.http.js.map +0 -1
  97. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +0 -20
  98. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js +0 -104
  99. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +0 -1
  100. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +0 -45
  101. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js +0 -35
  102. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.public.js.map +0 -1
  103. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js +0 -12
  104. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.types.js.map +0 -1
  105. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +0 -404
  106. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js +0 -223
  107. package/build/internal/cjs/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +0 -1
  108. package/build/internal/es/index.d.ts +0 -1
  109. package/build/internal/es/index.js +0 -2
  110. package/build/internal/es/index.js.map +0 -1
  111. package/build/internal/es/index.typings.d.ts +0 -1
  112. package/build/internal/es/index.typings.js +0 -2
  113. package/build/internal/es/index.typings.js.map +0 -1
  114. package/build/internal/es/meta.d.ts +0 -1
  115. package/build/internal/es/meta.js +0 -2
  116. package/build/internal/es/meta.js.map +0 -1
  117. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.d.ts +0 -11
  118. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.js +0 -11
  119. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.context.js.map +0 -1
  120. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.d.ts +0 -14
  121. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.js +0 -107
  122. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.http.js.map +0 -1
  123. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.d.ts +0 -20
  124. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.js +0 -74
  125. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.meta.js.map +0 -1
  126. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.d.ts +0 -45
  127. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.js +0 -27
  128. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.public.js.map +0 -1
  129. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.types.js +0 -9
  130. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.types.js.map +0 -1
  131. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.d.ts +0 -404
  132. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.js +0 -193
  133. package/build/internal/es/src/ecom-orders-v1-invoice-order-invoices.universal.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ecom-orders-v1-invoice-order-invoices.universal.ts","../src/ecom-orders-v1-invoice-order-invoices.http.ts","../src/ecom-orders-v1-invoice-order-invoices.public.ts","../src/ecom-orders-v1-invoice-order-invoices.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomOrdersV1Invoice from './ecom-orders-v1-invoice-order-invoices.http.js';\n\nexport 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 /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * 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 defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\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 entity?: string;\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 currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: 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?: WebhookIdentityType;\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\ntype InvoiceNonNullablePaths = `_id` | `appId`;\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 * @param orderIds - Order IDs for which to retrieve invoices.\n * @public\n * @documentationMaturity preview\n * @requiredField orderIds\n * @permissionId ECOM.READ_INVOICES\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Picasso private app mega scope\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders\n */\nexport async function listInvoicesForMultipleOrders(\n orderIds: string[]\n): Promise<\n NonNullablePaths<\n ListInvoicesForMultipleOrdersResponse,\n | `invoicesForOrder`\n | `invoicesForOrder.${number}.orderId`\n | {\n [P in InvoiceNonNullablePaths]: `invoicesForOrder.${number}.invoicesInfo.${number}.${P}`;\n }[InvoiceNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ orderIds: orderIds });\n\n const reqOpts =\n ambassadorWixEcomOrdersV1Invoice.listInvoicesForMultipleOrders(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['orderIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Generates and adds an invoice to a specified order.\n * @param orderId - Order ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField orderId\n * @permissionId ECOM.MODIFY_INVOICES\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Picasso private app mega scope\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.invoices.v1.Invoices.GenerateInvoice\n */\nexport async function generateInvoice(\n orderId: string\n): Promise<NonNullablePaths<GenerateInvoiceResponse, `invoiceId`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ orderId: orderId });\n\n const reqOpts = ambassadorWixEcomOrdersV1Invoice.generateInvoice(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['orderId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Generates and adds invoices to all specified orders.\n * @param orderIds - Order IDs.\n * @internal\n * @documentationMaturity preview\n * @requiredField orderIds\n * @permissionId ECOM.MODIFY_INVOICES\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Picasso private app mega scope\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.invoices.v1.Invoices.BulkGenerateInvoices\n */\nexport async function bulkGenerateInvoices(\n orderIds: string[]\n): Promise<\n NonNullablePaths<\n BulkGenerateInvoicesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.orderId`\n | `results.${number}.item.invoiceId`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ orderIds: orderIds });\n\n const reqOpts =\n ambassadorWixEcomOrdersV1Invoice.bulkGenerateInvoices(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['orderIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Adds an invoice to a specified order.\n * @param orderId - Order ID.\n * @param invoiceInfo - Invoice info.\n * @internal\n * @documentationMaturity preview\n * @requiredField invoiceInfo\n * @requiredField invoiceInfo._id\n * @requiredField invoiceInfo.appId\n * @requiredField orderId\n * @permissionId ECOM.ADD_INVOICE\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Picasso private app mega scope\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.invoices.v1.Invoices.AddInvoiceToOrder\n */\nexport async function addInvoiceToOrder(\n orderId: string,\n invoiceInfo: NonNullablePaths<Invoice, `_id` | `appId`>\n): Promise<\n NonNullablePaths<\n AddInvoiceToOrderResponse,\n {\n [P in InvoiceNonNullablePaths]: `orderInvoices.${number}.${P}`;\n }[InvoiceNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n orderId: orderId,\n invoiceInfo: invoiceInfo,\n });\n\n const reqOpts = ambassadorWixEcomOrdersV1Invoice.addInvoiceToOrder(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderId: '$[0]', invoiceInfo: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['orderId', 'invoiceInfo']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\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/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 _: [\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 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 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 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 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 { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddInvoiceToOrderResponse,\n BulkGenerateInvoicesResponse,\n GenerateInvoiceResponse,\n Invoice,\n ListInvoicesForMultipleOrdersResponse,\n addInvoiceToOrder as universalAddInvoiceToOrder,\n bulkGenerateInvoices as universalBulkGenerateInvoices,\n generateInvoice as universalGenerateInvoice,\n listInvoicesForMultipleOrders as universalListInvoicesForMultipleOrders,\n} from './ecom-orders-v1-invoice-order-invoices.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function listInvoicesForMultipleOrders(\n httpClient: HttpClient\n): ListInvoicesForMultipleOrdersSignature {\n return (orderIds: string[]) =>\n universalListInvoicesForMultipleOrders(\n orderIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListInvoicesForMultipleOrdersSignature {\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 * @param - Order IDs for which to retrieve invoices.\n */\n (orderIds: string[]): Promise<ListInvoicesForMultipleOrdersResponse>;\n}\n\n/** @internal */\nexport function generateInvoice(\n httpClient: HttpClient\n): GenerateInvoiceSignature {\n return (orderId: string) =>\n universalGenerateInvoice(\n orderId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateInvoiceSignature {\n /**\n * Generates and adds an invoice to a specified order.\n * @param - Order ID.\n */\n (orderId: string): Promise<GenerateInvoiceResponse>;\n}\n\n/** @internal */\nexport function bulkGenerateInvoices(\n httpClient: HttpClient\n): BulkGenerateInvoicesSignature {\n return (orderIds: string[]) =>\n universalBulkGenerateInvoices(\n orderIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGenerateInvoicesSignature {\n /**\n * Generates and adds invoices to all specified orders.\n * @param - Order IDs.\n */\n (orderIds: string[]): Promise<BulkGenerateInvoicesResponse>;\n}\n\n/** @internal */\nexport function addInvoiceToOrder(\n httpClient: HttpClient\n): AddInvoiceToOrderSignature {\n return (\n orderId: string,\n invoiceInfo: NonNullablePaths<Invoice, `_id` | `appId`>\n ) =>\n universalAddInvoiceToOrder(\n orderId,\n invoiceInfo,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddInvoiceToOrderSignature {\n /**\n * Adds an invoice to a specified order.\n * @param - Order ID.\n * @param - Invoice info.\n */\n (orderId: string, invoiceInfo: Invoice): Promise<AddInvoiceToOrderResponse>;\n}\n\nexport {\n ActionEvent,\n AddInvoiceToOrderRequest,\n AddInvoiceToOrderResponse,\n ApplicationError,\n BulkActionMetadata,\n BulkGenerateInvoicesRequest,\n BulkGenerateInvoicesResponse,\n BulkInvoiceResult,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GenerateInvoiceRequest,\n GenerateInvoiceResponse,\n GenerateInvoiceWithNumberRequest,\n GenerateInvoiceWithNumberResponse,\n GetOrderInvoiceRequest,\n GetOrderInvoiceResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Invoice,\n InvoiceForOrder,\n InvoicesForOrder,\n ItemMetadata,\n ListInvoicesForMultipleOrdersRequest,\n ListInvoicesForMultipleOrdersResponse,\n ListInvoicesForSingleOrderRequest,\n ListInvoicesForSingleOrderResponse,\n MessageEnvelope,\n RestoreInfo,\n WebhookIdentityType,\n} from './ecom-orders-v1-invoice-order-invoices.universal.js';\n","import {\n listInvoicesForMultipleOrders as publicListInvoicesForMultipleOrders,\n generateInvoice as publicGenerateInvoice,\n bulkGenerateInvoices as publicBulkGenerateInvoices,\n addInvoiceToOrder as publicAddInvoiceToOrder,\n} from './ecom-orders-v1-invoice-order-invoices.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listInvoicesForMultipleOrders: MaybeContext<\n BuildRESTFunction<typeof publicListInvoicesForMultipleOrders> &\n typeof publicListInvoicesForMultipleOrders\n> = /*#__PURE__*/ createRESTModule(publicListInvoicesForMultipleOrders);\n/** @internal */\nexport const generateInvoice: MaybeContext<\n BuildRESTFunction<typeof publicGenerateInvoice> & typeof publicGenerateInvoice\n> = /*#__PURE__*/ createRESTModule(publicGenerateInvoice);\n/** @internal */\nexport const bulkGenerateInvoices: MaybeContext<\n BuildRESTFunction<typeof publicBulkGenerateInvoices> &\n typeof publicBulkGenerateInvoices\n> = /*#__PURE__*/ createRESTModule(publicBulkGenerateInvoices);\n/** @internal */\nexport const addInvoiceToOrder: MaybeContext<\n BuildRESTFunction<typeof publicAddInvoiceToOrder> &\n typeof publicAddInvoiceToOrder\n> = /*#__PURE__*/ createRESTModule(publicAddInvoiceToOrder);\n\nexport { WebhookIdentityType } from './ecom-orders-v1-invoice-order-invoices.universal.js';\nexport {\n Invoice,\n ListInvoicesForSingleOrderRequest,\n ListInvoicesForSingleOrderResponse,\n ListInvoicesForMultipleOrdersRequest,\n ListInvoicesForMultipleOrdersResponse,\n InvoicesForOrder,\n GenerateInvoiceRequest,\n GenerateInvoiceResponse,\n BulkGenerateInvoicesRequest,\n BulkGenerateInvoicesResponse,\n BulkInvoiceResult,\n ItemMetadata,\n ApplicationError,\n InvoiceForOrder,\n BulkActionMetadata,\n AddInvoiceToOrderRequest,\n AddInvoiceToOrderResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n GetOrderInvoiceRequest,\n GetOrderInvoiceResponse,\n GenerateInvoiceWithNumberRequest,\n GenerateInvoiceWithNumberResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n} from './ecom-orders-v1-invoice-order-invoices.universal.js';\n"],"mappings":"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","names":["WebhookIdentityType","listInvoicesForMultipleOrders","generateInvoice","bulkGenerateInvoices","addInvoiceToOrder","listInvoicesForMultipleOrders","generateInvoice","bulkGenerateInvoices","addInvoiceToOrder","listInvoicesForMultipleOrders","generateInvoice","bulkGenerateInvoices","addInvoiceToOrder"]}
@@ -1,10 +1,10 @@
1
- export interface Invoice {
1
+ interface Invoice {
2
2
  /** Invoice ID. */
3
- id?: string;
3
+ _id?: string;
4
4
  /** ID of the app that set the invoice. */
5
5
  appId?: string;
6
6
  }
7
- export interface ListInvoicesForSingleOrderRequest {
7
+ interface ListInvoicesForSingleOrderRequest {
8
8
  /**
9
9
  * Order ID.
10
10
  * @minLength 1
@@ -12,11 +12,11 @@ export interface ListInvoicesForSingleOrderRequest {
12
12
  */
13
13
  orderId?: string;
14
14
  }
15
- export interface ListInvoicesForSingleOrderResponse {
15
+ interface ListInvoicesForSingleOrderResponse {
16
16
  /** List of invoices. */
17
17
  invoices?: Invoice[];
18
18
  }
19
- export interface ListInvoicesForMultipleOrdersRequest {
19
+ interface ListInvoicesForMultipleOrdersRequest {
20
20
  /**
21
21
  * Order IDs for which to retrieve invoices.
22
22
  * @maxSize 100
@@ -25,11 +25,11 @@ export interface ListInvoicesForMultipleOrdersRequest {
25
25
  */
26
26
  orderIds: string[];
27
27
  }
28
- export interface ListInvoicesForMultipleOrdersResponse {
28
+ interface ListInvoicesForMultipleOrdersResponse {
29
29
  /** List of order IDs and their associated invoices. */
30
30
  invoicesForOrder?: InvoicesForOrder[];
31
31
  }
32
- export interface InvoicesForOrder {
32
+ interface InvoicesForOrder {
33
33
  /** Order ID. */
34
34
  orderId?: string;
35
35
  /**
@@ -38,7 +38,7 @@ export interface InvoicesForOrder {
38
38
  */
39
39
  invoicesInfo?: Invoice[];
40
40
  }
41
- export interface GenerateInvoiceRequest {
41
+ interface GenerateInvoiceRequest {
42
42
  /**
43
43
  * Order ID.
44
44
  * @minLength 1
@@ -46,11 +46,11 @@ export interface GenerateInvoiceRequest {
46
46
  */
47
47
  orderId: string;
48
48
  }
49
- export interface GenerateInvoiceResponse {
49
+ interface GenerateInvoiceResponse {
50
50
  /** Invoice ID. */
51
51
  invoiceId?: string;
52
52
  }
53
- export interface BulkGenerateInvoicesRequest {
53
+ interface BulkGenerateInvoicesRequest {
54
54
  /**
55
55
  * Order IDs.
56
56
  * @minSize 1
@@ -60,17 +60,17 @@ export interface BulkGenerateInvoicesRequest {
60
60
  */
61
61
  orderIds: string[];
62
62
  }
63
- export interface BulkGenerateInvoicesResponse {
63
+ interface BulkGenerateInvoicesResponse {
64
64
  results?: BulkInvoiceResult[];
65
65
  bulkActionMetadata?: BulkActionMetadata;
66
66
  }
67
- export interface BulkInvoiceResult {
67
+ interface BulkInvoiceResult {
68
68
  itemMetadata?: ItemMetadata;
69
69
  item?: InvoiceForOrder;
70
70
  }
71
- export interface ItemMetadata {
71
+ interface ItemMetadata {
72
72
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
73
- id?: string | null;
73
+ _id?: string | null;
74
74
  /** Index of the item within the request array. Allows for correlation between request and response items. */
75
75
  originalIndex?: number;
76
76
  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
@@ -78,7 +78,7 @@ export interface ItemMetadata {
78
78
  /** Details about the error in case of failure. */
79
79
  error?: ApplicationError;
80
80
  }
81
- export interface ApplicationError {
81
+ interface ApplicationError {
82
82
  /** Error code. */
83
83
  code?: string;
84
84
  /** Description of the error. */
@@ -86,13 +86,13 @@ export interface ApplicationError {
86
86
  /** Data related to the error. */
87
87
  data?: Record<string, any> | null;
88
88
  }
89
- export interface InvoiceForOrder {
89
+ interface InvoiceForOrder {
90
90
  /** Order ID. */
91
91
  orderId?: string;
92
92
  /** Invoice ID. */
93
93
  invoiceId?: string;
94
94
  }
95
- export interface BulkActionMetadata {
95
+ interface BulkActionMetadata {
96
96
  /** Number of items that were successfully processed. */
97
97
  totalSuccesses?: number;
98
98
  /** Number of items that couldn't be processed. */
@@ -100,7 +100,7 @@ export interface BulkActionMetadata {
100
100
  /** Number of failures without details because detailed failure threshold was exceeded. */
101
101
  undetailedFailures?: number;
102
102
  }
103
- export interface AddInvoiceToOrderRequest {
103
+ interface AddInvoiceToOrderRequest {
104
104
  /**
105
105
  * Order ID.
106
106
  * @minLength 1
@@ -110,11 +110,11 @@ export interface AddInvoiceToOrderRequest {
110
110
  /** Invoice info. */
111
111
  invoiceInfo: Invoice;
112
112
  }
113
- export interface AddInvoiceToOrderResponse {
113
+ interface AddInvoiceToOrderResponse {
114
114
  /** List of order invoices. */
115
115
  orderInvoices?: Invoice[];
116
116
  }
117
- export interface DomainEvent extends DomainEventBodyOneOf {
117
+ interface DomainEvent extends DomainEventBodyOneOf {
118
118
  createdEvent?: EntityCreatedEvent;
119
119
  updatedEvent?: EntityUpdatedEvent;
120
120
  deletedEvent?: EntityDeletedEvent;
@@ -123,7 +123,7 @@ export interface DomainEvent extends DomainEventBodyOneOf {
123
123
  * Unique event ID.
124
124
  * Allows clients to ignore duplicate webhooks.
125
125
  */
126
- id?: string;
126
+ _id?: string;
127
127
  /**
128
128
  * Assumes actions are also always typed to an entity_type
129
129
  * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
@@ -157,38 +157,36 @@ export interface DomainEvent extends DomainEventBodyOneOf {
157
157
  entityEventSequence?: string | null;
158
158
  }
159
159
  /** @oneof */
160
- export interface DomainEventBodyOneOf {
160
+ interface DomainEventBodyOneOf {
161
161
  createdEvent?: EntityCreatedEvent;
162
162
  updatedEvent?: EntityUpdatedEvent;
163
163
  deletedEvent?: EntityDeletedEvent;
164
164
  actionEvent?: ActionEvent;
165
165
  }
166
- export interface EntityCreatedEvent {
167
- entityAsJson?: string;
168
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
169
- restoreInfo?: RestoreInfo;
166
+ interface EntityCreatedEvent {
167
+ entity?: string;
170
168
  }
171
- export interface RestoreInfo {
169
+ interface RestoreInfo {
172
170
  deletedDate?: Date | null;
173
171
  }
174
- export interface EntityUpdatedEvent {
172
+ interface EntityUpdatedEvent {
175
173
  /**
176
174
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
177
175
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
178
176
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
179
177
  */
180
- currentEntityAsJson?: string;
178
+ currentEntity?: string;
181
179
  }
182
- export interface EntityDeletedEvent {
180
+ interface EntityDeletedEvent {
183
181
  /** Entity that was deleted */
184
- deletedEntityAsJson?: string | null;
182
+ deletedEntity?: string | null;
185
183
  }
186
- export interface ActionEvent {
187
- bodyAsJson?: string;
184
+ interface ActionEvent {
185
+ body?: string;
188
186
  }
189
- export interface Empty {
187
+ interface Empty {
190
188
  }
191
- export interface GetOrderInvoiceRequest {
189
+ interface GetOrderInvoiceRequest {
192
190
  /**
193
191
  * Invoice ID.
194
192
  * @minLength 1
@@ -196,7 +194,7 @@ export interface GetOrderInvoiceRequest {
196
194
  */
197
195
  invoiceId?: string;
198
196
  }
199
- export interface GetOrderInvoiceResponse {
197
+ interface GetOrderInvoiceResponse {
200
198
  /**
201
199
  * Order ID.
202
200
  * @minLength 1
@@ -206,7 +204,7 @@ export interface GetOrderInvoiceResponse {
206
204
  /** Invoice info. */
207
205
  invoiceInfo?: Invoice;
208
206
  }
209
- export interface GenerateInvoiceWithNumberRequest {
207
+ interface GenerateInvoiceWithNumberRequest {
210
208
  /**
211
209
  * Order ID.
212
210
  * @minLength 1
@@ -221,7 +219,7 @@ export interface GenerateInvoiceWithNumberRequest {
221
219
  /** 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. */
222
220
  issueDate?: Date | null;
223
221
  }
224
- export interface GenerateInvoiceWithNumberResponse {
222
+ interface GenerateInvoiceWithNumberResponse {
225
223
  /**
226
224
  * Invoice ID.
227
225
  * @minLength 1
@@ -229,7 +227,7 @@ export interface GenerateInvoiceWithNumberResponse {
229
227
  */
230
228
  invoiceId?: string;
231
229
  }
232
- export interface MessageEnvelope {
230
+ interface MessageEnvelope {
233
231
  /**
234
232
  * App instance ID.
235
233
  * @format GUID
@@ -245,7 +243,7 @@ export interface MessageEnvelope {
245
243
  /** Stringify payload. */
246
244
  data?: string;
247
245
  }
248
- export interface IdentificationData extends IdentificationDataIdOneOf {
246
+ interface IdentificationData extends IdentificationDataIdOneOf {
249
247
  /**
250
248
  * ID of a site visitor that has not logged in to the site.
251
249
  * @format GUID
@@ -270,7 +268,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
270
268
  identityType?: WebhookIdentityType;
271
269
  }
272
270
  /** @oneof */
273
- export interface IdentificationDataIdOneOf {
271
+ interface IdentificationDataIdOneOf {
274
272
  /**
275
273
  * ID of a site visitor that has not logged in to the site.
276
274
  * @format GUID
@@ -292,10 +290,12 @@ export interface IdentificationDataIdOneOf {
292
290
  */
293
291
  appId?: string;
294
292
  }
295
- export declare enum WebhookIdentityType {
293
+ declare enum WebhookIdentityType {
296
294
  UNKNOWN = "UNKNOWN",
297
295
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
298
296
  MEMBER = "MEMBER",
299
297
  WIX_USER = "WIX_USER",
300
298
  APP = "APP"
301
299
  }
300
+
301
+ export { type AddInvoiceToOrderResponse as A, type BulkGenerateInvoicesResponse as B, type DomainEvent as D, type EntityCreatedEvent as E, type GenerateInvoiceResponse as G, type Invoice as I, type ListInvoicesForMultipleOrdersResponse as L, type MessageEnvelope as M, type RestoreInfo as R, WebhookIdentityType as W, type ListInvoicesForSingleOrderRequest as a, type ListInvoicesForSingleOrderResponse as b, type ListInvoicesForMultipleOrdersRequest as c, type InvoicesForOrder as d, type GenerateInvoiceRequest as e, type BulkGenerateInvoicesRequest as f, type BulkInvoiceResult as g, type ItemMetadata as h, type ApplicationError as i, type InvoiceForOrder as j, type BulkActionMetadata as k, type AddInvoiceToOrderRequest as l, type DomainEventBodyOneOf as m, type EntityUpdatedEvent as n, type EntityDeletedEvent as o, type ActionEvent as p, type Empty as q, type GetOrderInvoiceRequest as r, type GetOrderInvoiceResponse as s, type GenerateInvoiceWithNumberRequest as t, type GenerateInvoiceWithNumberResponse as u, type IdentificationData as v, type IdentificationDataIdOneOf as w };
@@ -1,10 +1,10 @@
1
- export interface Invoice {
1
+ interface Invoice {
2
2
  /** Invoice ID. */
3
- id?: string;
3
+ _id?: string;
4
4
  /** ID of the app that set the invoice. */
5
5
  appId?: string;
6
6
  }
7
- export interface ListInvoicesForSingleOrderRequest {
7
+ interface ListInvoicesForSingleOrderRequest {
8
8
  /**
9
9
  * Order ID.
10
10
  * @minLength 1
@@ -12,11 +12,11 @@ export interface ListInvoicesForSingleOrderRequest {
12
12
  */
13
13
  orderId?: string;
14
14
  }
15
- export interface ListInvoicesForSingleOrderResponse {
15
+ interface ListInvoicesForSingleOrderResponse {
16
16
  /** List of invoices. */
17
17
  invoices?: Invoice[];
18
18
  }
19
- export interface ListInvoicesForMultipleOrdersRequest {
19
+ interface ListInvoicesForMultipleOrdersRequest {
20
20
  /**
21
21
  * Order IDs for which to retrieve invoices.
22
22
  * @maxSize 100
@@ -25,11 +25,11 @@ export interface ListInvoicesForMultipleOrdersRequest {
25
25
  */
26
26
  orderIds: string[];
27
27
  }
28
- export interface ListInvoicesForMultipleOrdersResponse {
28
+ interface ListInvoicesForMultipleOrdersResponse {
29
29
  /** List of order IDs and their associated invoices. */
30
30
  invoicesForOrder?: InvoicesForOrder[];
31
31
  }
32
- export interface InvoicesForOrder {
32
+ interface InvoicesForOrder {
33
33
  /** Order ID. */
34
34
  orderId?: string;
35
35
  /**
@@ -38,7 +38,7 @@ export interface InvoicesForOrder {
38
38
  */
39
39
  invoicesInfo?: Invoice[];
40
40
  }
41
- export interface GenerateInvoiceRequest {
41
+ interface GenerateInvoiceRequest {
42
42
  /**
43
43
  * Order ID.
44
44
  * @minLength 1
@@ -46,11 +46,11 @@ export interface GenerateInvoiceRequest {
46
46
  */
47
47
  orderId: string;
48
48
  }
49
- export interface GenerateInvoiceResponse {
49
+ interface GenerateInvoiceResponse {
50
50
  /** Invoice ID. */
51
51
  invoiceId?: string;
52
52
  }
53
- export interface BulkGenerateInvoicesRequest {
53
+ interface BulkGenerateInvoicesRequest {
54
54
  /**
55
55
  * Order IDs.
56
56
  * @minSize 1
@@ -60,17 +60,17 @@ export interface BulkGenerateInvoicesRequest {
60
60
  */
61
61
  orderIds: string[];
62
62
  }
63
- export interface BulkGenerateInvoicesResponse {
63
+ interface BulkGenerateInvoicesResponse {
64
64
  results?: BulkInvoiceResult[];
65
65
  bulkActionMetadata?: BulkActionMetadata;
66
66
  }
67
- export interface BulkInvoiceResult {
67
+ interface BulkInvoiceResult {
68
68
  itemMetadata?: ItemMetadata;
69
69
  item?: InvoiceForOrder;
70
70
  }
71
- export interface ItemMetadata {
71
+ interface ItemMetadata {
72
72
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
73
- id?: string | null;
73
+ _id?: string | null;
74
74
  /** Index of the item within the request array. Allows for correlation between request and response items. */
75
75
  originalIndex?: number;
76
76
  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
@@ -78,7 +78,7 @@ export interface ItemMetadata {
78
78
  /** Details about the error in case of failure. */
79
79
  error?: ApplicationError;
80
80
  }
81
- export interface ApplicationError {
81
+ interface ApplicationError {
82
82
  /** Error code. */
83
83
  code?: string;
84
84
  /** Description of the error. */
@@ -86,13 +86,13 @@ export interface ApplicationError {
86
86
  /** Data related to the error. */
87
87
  data?: Record<string, any> | null;
88
88
  }
89
- export interface InvoiceForOrder {
89
+ interface InvoiceForOrder {
90
90
  /** Order ID. */
91
91
  orderId?: string;
92
92
  /** Invoice ID. */
93
93
  invoiceId?: string;
94
94
  }
95
- export interface BulkActionMetadata {
95
+ interface BulkActionMetadata {
96
96
  /** Number of items that were successfully processed. */
97
97
  totalSuccesses?: number;
98
98
  /** Number of items that couldn't be processed. */
@@ -100,7 +100,7 @@ export interface BulkActionMetadata {
100
100
  /** Number of failures without details because detailed failure threshold was exceeded. */
101
101
  undetailedFailures?: number;
102
102
  }
103
- export interface AddInvoiceToOrderRequest {
103
+ interface AddInvoiceToOrderRequest {
104
104
  /**
105
105
  * Order ID.
106
106
  * @minLength 1
@@ -110,11 +110,11 @@ export interface AddInvoiceToOrderRequest {
110
110
  /** Invoice info. */
111
111
  invoiceInfo: Invoice;
112
112
  }
113
- export interface AddInvoiceToOrderResponse {
113
+ interface AddInvoiceToOrderResponse {
114
114
  /** List of order invoices. */
115
115
  orderInvoices?: Invoice[];
116
116
  }
117
- export interface DomainEvent extends DomainEventBodyOneOf {
117
+ interface DomainEvent extends DomainEventBodyOneOf {
118
118
  createdEvent?: EntityCreatedEvent;
119
119
  updatedEvent?: EntityUpdatedEvent;
120
120
  deletedEvent?: EntityDeletedEvent;
@@ -123,7 +123,7 @@ export interface DomainEvent extends DomainEventBodyOneOf {
123
123
  * Unique event ID.
124
124
  * Allows clients to ignore duplicate webhooks.
125
125
  */
126
- id?: string;
126
+ _id?: string;
127
127
  /**
128
128
  * Assumes actions are also always typed to an entity_type
129
129
  * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
@@ -157,38 +157,36 @@ export interface DomainEvent extends DomainEventBodyOneOf {
157
157
  entityEventSequence?: string | null;
158
158
  }
159
159
  /** @oneof */
160
- export interface DomainEventBodyOneOf {
160
+ interface DomainEventBodyOneOf {
161
161
  createdEvent?: EntityCreatedEvent;
162
162
  updatedEvent?: EntityUpdatedEvent;
163
163
  deletedEvent?: EntityDeletedEvent;
164
164
  actionEvent?: ActionEvent;
165
165
  }
166
- export interface EntityCreatedEvent {
167
- entityAsJson?: string;
168
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
169
- restoreInfo?: RestoreInfo;
166
+ interface EntityCreatedEvent {
167
+ entity?: string;
170
168
  }
171
- export interface RestoreInfo {
169
+ interface RestoreInfo {
172
170
  deletedDate?: Date | null;
173
171
  }
174
- export interface EntityUpdatedEvent {
172
+ interface EntityUpdatedEvent {
175
173
  /**
176
174
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
177
175
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
178
176
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
179
177
  */
180
- currentEntityAsJson?: string;
178
+ currentEntity?: string;
181
179
  }
182
- export interface EntityDeletedEvent {
180
+ interface EntityDeletedEvent {
183
181
  /** Entity that was deleted */
184
- deletedEntityAsJson?: string | null;
182
+ deletedEntity?: string | null;
185
183
  }
186
- export interface ActionEvent {
187
- bodyAsJson?: string;
184
+ interface ActionEvent {
185
+ body?: string;
188
186
  }
189
- export interface Empty {
187
+ interface Empty {
190
188
  }
191
- export interface GetOrderInvoiceRequest {
189
+ interface GetOrderInvoiceRequest {
192
190
  /**
193
191
  * Invoice ID.
194
192
  * @minLength 1
@@ -196,7 +194,7 @@ export interface GetOrderInvoiceRequest {
196
194
  */
197
195
  invoiceId?: string;
198
196
  }
199
- export interface GetOrderInvoiceResponse {
197
+ interface GetOrderInvoiceResponse {
200
198
  /**
201
199
  * Order ID.
202
200
  * @minLength 1
@@ -206,7 +204,7 @@ export interface GetOrderInvoiceResponse {
206
204
  /** Invoice info. */
207
205
  invoiceInfo?: Invoice;
208
206
  }
209
- export interface GenerateInvoiceWithNumberRequest {
207
+ interface GenerateInvoiceWithNumberRequest {
210
208
  /**
211
209
  * Order ID.
212
210
  * @minLength 1
@@ -221,7 +219,7 @@ export interface GenerateInvoiceWithNumberRequest {
221
219
  /** 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. */
222
220
  issueDate?: Date | null;
223
221
  }
224
- export interface GenerateInvoiceWithNumberResponse {
222
+ interface GenerateInvoiceWithNumberResponse {
225
223
  /**
226
224
  * Invoice ID.
227
225
  * @minLength 1
@@ -229,7 +227,7 @@ export interface GenerateInvoiceWithNumberResponse {
229
227
  */
230
228
  invoiceId?: string;
231
229
  }
232
- export interface MessageEnvelope {
230
+ interface MessageEnvelope {
233
231
  /**
234
232
  * App instance ID.
235
233
  * @format GUID
@@ -245,7 +243,7 @@ export interface MessageEnvelope {
245
243
  /** Stringify payload. */
246
244
  data?: string;
247
245
  }
248
- export interface IdentificationData extends IdentificationDataIdOneOf {
246
+ interface IdentificationData extends IdentificationDataIdOneOf {
249
247
  /**
250
248
  * ID of a site visitor that has not logged in to the site.
251
249
  * @format GUID
@@ -270,7 +268,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
270
268
  identityType?: WebhookIdentityType;
271
269
  }
272
270
  /** @oneof */
273
- export interface IdentificationDataIdOneOf {
271
+ interface IdentificationDataIdOneOf {
274
272
  /**
275
273
  * ID of a site visitor that has not logged in to the site.
276
274
  * @format GUID
@@ -292,10 +290,12 @@ export interface IdentificationDataIdOneOf {
292
290
  */
293
291
  appId?: string;
294
292
  }
295
- export declare enum WebhookIdentityType {
293
+ declare enum WebhookIdentityType {
296
294
  UNKNOWN = "UNKNOWN",
297
295
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
298
296
  MEMBER = "MEMBER",
299
297
  WIX_USER = "WIX_USER",
300
298
  APP = "APP"
301
299
  }
300
+
301
+ export { type AddInvoiceToOrderResponse as A, type BulkGenerateInvoicesResponse as B, type DomainEvent as D, type EntityCreatedEvent as E, type GenerateInvoiceResponse as G, type Invoice as I, type ListInvoicesForMultipleOrdersResponse as L, type MessageEnvelope as M, type RestoreInfo as R, WebhookIdentityType as W, type ListInvoicesForSingleOrderRequest as a, type ListInvoicesForSingleOrderResponse as b, type ListInvoicesForMultipleOrdersRequest as c, type InvoicesForOrder as d, type GenerateInvoiceRequest as e, type BulkGenerateInvoicesRequest as f, type BulkInvoiceResult as g, type ItemMetadata as h, type ApplicationError as i, type InvoiceForOrder as j, type BulkActionMetadata as k, type AddInvoiceToOrderRequest as l, type DomainEventBodyOneOf as m, type EntityUpdatedEvent as n, type EntityDeletedEvent as o, type ActionEvent as p, type Empty as q, type GetOrderInvoiceRequest as r, type GetOrderInvoiceResponse as s, type GenerateInvoiceWithNumberRequest as t, type GenerateInvoiceWithNumberResponse as u, type IdentificationData as v, type IdentificationDataIdOneOf as w };
@@ -0,0 +1,53 @@
1
+ import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { L as ListInvoicesForMultipleOrdersResponse, G as GenerateInvoiceResponse, B as BulkGenerateInvoicesResponse, I as Invoice, A as AddInvoiceToOrderResponse } from './ecom-orders-v1-invoice-order-invoices.universal-CZFxrTkE.mjs';
3
+ export { p as ActionEvent, l as AddInvoiceToOrderRequest, i as ApplicationError, k as BulkActionMetadata, f as BulkGenerateInvoicesRequest, g as BulkInvoiceResult, D as DomainEvent, m as DomainEventBodyOneOf, q as Empty, E as EntityCreatedEvent, o as EntityDeletedEvent, n as EntityUpdatedEvent, e as GenerateInvoiceRequest, t as GenerateInvoiceWithNumberRequest, u as GenerateInvoiceWithNumberResponse, r as GetOrderInvoiceRequest, s as GetOrderInvoiceResponse, v as IdentificationData, w as IdentificationDataIdOneOf, j as InvoiceForOrder, d as InvoicesForOrder, h as ItemMetadata, c as ListInvoicesForMultipleOrdersRequest, a as ListInvoicesForSingleOrderRequest, b as ListInvoicesForSingleOrderResponse, M as MessageEnvelope, R as RestoreInfo, W as WebhookIdentityType } from './ecom-orders-v1-invoice-order-invoices.universal-CZFxrTkE.mjs';
4
+
5
+ declare function listInvoicesForMultipleOrders$1(httpClient: HttpClient): ListInvoicesForMultipleOrdersSignature;
6
+ interface ListInvoicesForMultipleOrdersSignature {
7
+ /**
8
+ * Retrieves the IDs of invoices associated with all specified orders.
9
+ *
10
+ *
11
+ * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.
12
+ * @param - Order IDs for which to retrieve invoices.
13
+ */
14
+ (orderIds: string[]): Promise<ListInvoicesForMultipleOrdersResponse>;
15
+ }
16
+ /** @internal */
17
+ declare function generateInvoice$1(httpClient: HttpClient): GenerateInvoiceSignature;
18
+ interface GenerateInvoiceSignature {
19
+ /**
20
+ * Generates and adds an invoice to a specified order.
21
+ * @param - Order ID.
22
+ */
23
+ (orderId: string): Promise<GenerateInvoiceResponse>;
24
+ }
25
+ /** @internal */
26
+ declare function bulkGenerateInvoices$1(httpClient: HttpClient): BulkGenerateInvoicesSignature;
27
+ interface BulkGenerateInvoicesSignature {
28
+ /**
29
+ * Generates and adds invoices to all specified orders.
30
+ * @param - Order IDs.
31
+ */
32
+ (orderIds: string[]): Promise<BulkGenerateInvoicesResponse>;
33
+ }
34
+ /** @internal */
35
+ declare function addInvoiceToOrder$1(httpClient: HttpClient): AddInvoiceToOrderSignature;
36
+ interface AddInvoiceToOrderSignature {
37
+ /**
38
+ * Adds an invoice to a specified order.
39
+ * @param - Order ID.
40
+ * @param - Invoice info.
41
+ */
42
+ (orderId: string, invoiceInfo: Invoice): Promise<AddInvoiceToOrderResponse>;
43
+ }
44
+
45
+ declare const listInvoicesForMultipleOrders: MaybeContext<BuildRESTFunction<typeof listInvoicesForMultipleOrders$1> & typeof listInvoicesForMultipleOrders$1>;
46
+ /** @internal */
47
+ declare const generateInvoice: MaybeContext<BuildRESTFunction<typeof generateInvoice$1> & typeof generateInvoice$1>;
48
+ /** @internal */
49
+ declare const bulkGenerateInvoices: MaybeContext<BuildRESTFunction<typeof bulkGenerateInvoices$1> & typeof bulkGenerateInvoices$1>;
50
+ /** @internal */
51
+ declare const addInvoiceToOrder: MaybeContext<BuildRESTFunction<typeof addInvoiceToOrder$1> & typeof addInvoiceToOrder$1>;
52
+
53
+ export { AddInvoiceToOrderResponse, BulkGenerateInvoicesResponse, GenerateInvoiceResponse, Invoice, ListInvoicesForMultipleOrdersResponse, addInvoiceToOrder, bulkGenerateInvoices, generateInvoice, listInvoicesForMultipleOrders };