@myparcel-dev/pdk-admin 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (816) hide show
  1. package/CHANGELOG.md +459 -0
  2. package/dist/__tests__/doComponentTestSetup.d.ts +2 -0
  3. package/dist/__tests__/doComponentTestTeardown.d.ts +1 -0
  4. package/dist/__tests__/index.d.ts +3 -0
  5. package/dist/__tests__/mocks/index.d.ts +14 -0
  6. package/dist/__tests__/mocks/mockDefaultAccount.d.ts +2 -0
  7. package/dist/__tests__/mocks/mockDefaultAppConfig.d.ts +2 -0
  8. package/dist/__tests__/mocks/mockDefaultAppInfo.d.ts +2 -0
  9. package/dist/__tests__/mocks/mockDefaultCarriers.d.ts +2 -0
  10. package/dist/__tests__/mocks/mockDefaultConfig.d.ts +2 -0
  11. package/dist/__tests__/mocks/mockDefaultDynamicContext.d.ts +2 -0
  12. package/dist/__tests__/mocks/mockDefaultEndpoints.d.ts +2 -0
  13. package/dist/__tests__/mocks/mockDefaultGlobalContext.d.ts +2 -0
  14. package/dist/__tests__/mocks/mockDefaultLogger.d.ts +1 -0
  15. package/dist/__tests__/mocks/mockDefaultPlatform.d.ts +2 -0
  16. package/dist/__tests__/mocks/mockDefaultPluginSettings.d.ts +2 -0
  17. package/dist/__tests__/mocks/mockDefaultPrintOptionsView.d.ts +2 -0
  18. package/dist/__tests__/mocks/mockDefaultShop.d.ts +2 -0
  19. package/dist/__tests__/mocks/mockDefaultTranslations.d.ts +2 -0
  20. package/dist/actions/composables/index.d.ts +2 -0
  21. package/dist/actions/composables/mutations/account/index.d.ts +2 -0
  22. package/dist/actions/composables/mutations/account/useDeleteAccountMutation.d.ts +3 -0
  23. package/dist/actions/composables/mutations/account/useUpdateAccountMutation.d.ts +3 -0
  24. package/dist/actions/composables/mutations/debug/index.d.ts +3 -0
  25. package/dist/actions/composables/mutations/debug/useDownloadLogsMutation.d.ts +3 -0
  26. package/dist/actions/composables/mutations/debug/useSwitchToAcceptanceApiMutation.d.ts +3 -0
  27. package/dist/actions/composables/mutations/debug/useSwitchToProductionApiMutation.d.ts +3 -0
  28. package/dist/actions/composables/mutations/index.d.ts +7 -0
  29. package/dist/actions/composables/mutations/orders/index.d.ts +3 -0
  30. package/dist/actions/composables/mutations/orders/useExportOrdersMutation.d.ts +5 -0
  31. package/dist/actions/composables/mutations/orders/usePrintOrdersMutation.d.ts +4 -0
  32. package/dist/actions/composables/mutations/orders/useUpdateOrdersMutation.d.ts +4 -0
  33. package/dist/actions/composables/mutations/settings/index.d.ts +2 -0
  34. package/dist/actions/composables/mutations/settings/useUpdatePluginSettingsMutation.d.ts +3 -0
  35. package/dist/actions/composables/mutations/settings/useUpdateProductSettingsMutation.d.ts +3 -0
  36. package/dist/actions/composables/mutations/shipments/index.d.ts +4 -0
  37. package/dist/actions/composables/mutations/shipments/useDeleteShipmentsMutation.d.ts +4 -0
  38. package/dist/actions/composables/mutations/shipments/useExportReturnMutation.d.ts +4 -0
  39. package/dist/actions/composables/mutations/shipments/usePrintShipmentsMutation.d.ts +4 -0
  40. package/dist/actions/composables/mutations/shipments/useUpdateShipmentsMutation.d.ts +4 -0
  41. package/dist/actions/composables/mutations/usePdkMutation.d.ts +15 -0
  42. package/dist/actions/composables/mutations/webhooks/index.d.ts +2 -0
  43. package/dist/actions/composables/mutations/webhooks/useCreateWebhooksMutation.d.ts +1 -0
  44. package/dist/actions/composables/mutations/webhooks/useDeleteWebhooksMutation.d.ts +3 -0
  45. package/dist/actions/composables/queries/account/index.d.ts +1 -0
  46. package/dist/actions/composables/queries/account/useFetchContextQuery.d.ts +3 -0
  47. package/dist/actions/composables/queries/index.d.ts +6 -0
  48. package/dist/actions/composables/queries/orders/index.d.ts +1 -0
  49. package/dist/actions/composables/queries/orders/useFetchOrdersQuery.d.ts +3 -0
  50. package/dist/actions/composables/queries/products/index.d.ts +1 -0
  51. package/dist/actions/composables/queries/products/useFetchProductsQuery.d.ts +3 -0
  52. package/dist/actions/composables/queries/queryKeys.d.ts +2 -0
  53. package/dist/actions/composables/queries/shipments/index.d.ts +1 -0
  54. package/dist/actions/composables/queries/shipments/useFetchShipmentsQuery.d.ts +4 -0
  55. package/dist/actions/composables/queries/webhooks/index.d.ts +1 -0
  56. package/dist/actions/composables/queries/webhooks/useFetchWebhooksQuery.d.ts +3 -0
  57. package/dist/actions/defineAction.d.ts +8 -0
  58. package/dist/actions/definitions/account.d.ts +13 -0
  59. package/dist/actions/definitions/context.d.ts +6 -0
  60. package/dist/actions/definitions/debug.d.ts +13 -0
  61. package/dist/actions/definitions/index.d.ts +8 -0
  62. package/dist/actions/definitions/modal.d.ts +17 -0
  63. package/dist/actions/definitions/orders.d.ts +38 -0
  64. package/dist/actions/definitions/settings.d.ts +2 -0
  65. package/dist/actions/definitions/shipments.d.ts +15 -0
  66. package/dist/actions/definitions/webhooks.d.ts +4 -0
  67. package/dist/actions/executors/createHandlerWithParameters.d.ts +5 -0
  68. package/dist/actions/executors/createMutationHandler.d.ts +3 -0
  69. package/dist/actions/executors/createOrdersMutationHandler.d.ts +2 -0
  70. package/dist/actions/executors/createQueryHandler.d.ts +3 -0
  71. package/dist/actions/executors/createShipmentsMutationHandler.d.ts +2 -0
  72. package/dist/actions/executors/doMutate.d.ts +4 -0
  73. package/dist/actions/executors/executeAction.d.ts +6 -0
  74. package/dist/actions/executors/executeAfterHandle.d.ts +3 -0
  75. package/dist/actions/executors/executeBeforeHandle.d.ts +4 -0
  76. package/dist/actions/executors/executeHandler.d.ts +3 -0
  77. package/dist/actions/executors/executeNextAction.d.ts +6 -0
  78. package/dist/actions/executors/index.d.ts +14 -0
  79. package/dist/actions/executors/resolveOrderParameters.d.ts +3 -0
  80. package/dist/actions/executors/resolveQuerySuffix.d.ts +3 -0
  81. package/dist/actions/executors/types.d.ts +19 -0
  82. package/dist/actions/index.d.ts +6 -0
  83. package/dist/actions/print/index.d.ts +3 -0
  84. package/dist/actions/print/openOrPrintPdf.d.ts +3 -0
  85. package/dist/actions/print/resolvePrintParameters.d.ts +3 -0
  86. package/dist/actions/print/waitForLabelPrompt.d.ts +3 -0
  87. package/dist/actions/stopActionHandler.d.ts +2 -0
  88. package/dist/components/OrderBox/OrderShipmentsTable.vue.d.ts +6 -0
  89. package/dist/components/OrderBox/OrderShipmentsTableRow.vue.d.ts +21 -0
  90. package/dist/components/OrderBox/ShipmentOptionsBox.vue.d.ts +2 -0
  91. package/dist/components/OrderBox/ShipmentTableBox.vue.d.ts +2 -0
  92. package/dist/components/OrderListItem/OrderModeOrderListItem.vue.d.ts +2 -0
  93. package/dist/components/OrderListItem/ShipmentLabel.vue.d.ts +15 -0
  94. package/dist/components/OrderListItem/ShipmentModeOrderListItem.vue.d.ts +2 -0
  95. package/dist/components/PluginSettings/AccountSettings.vue.d.ts +2 -0
  96. package/dist/components/PluginSettings/DebugOptions.vue.d.ts +2 -0
  97. package/dist/components/PluginSettings/EditApiKeyForm.vue.d.ts +7 -0
  98. package/dist/components/PluginSettings/PluginSettingsForms.vue.d.ts +2 -0
  99. package/dist/components/PluginSettings/WebhooksStatus.vue.d.ts +2 -0
  100. package/dist/components/PluginSettings/createUpdateAccountSettingsValidator.d.ts +4 -0
  101. package/dist/components/common/ActionButton.vue.d.ts +52 -0
  102. package/dist/components/common/BulkSelectCheckbox.vue.d.ts +22 -0
  103. package/dist/components/common/CarrierLogo.vue.d.ts +16 -0
  104. package/dist/components/common/DateRelative.vue.d.ts +16 -0
  105. package/dist/components/common/DeliveryOptionsDeliveryType.vue.d.ts +16 -0
  106. package/dist/components/common/DeliveryOptionsExcerpt.vue.d.ts +2 -0
  107. package/dist/components/common/DeliveryOptionsExcerptCarrierName.vue.d.ts +16 -0
  108. package/dist/components/common/DeliveryOptionsPackageType.vue.d.ts +16 -0
  109. package/dist/components/common/DigitalStampWeightRange.vue.d.ts +15 -0
  110. package/dist/components/common/NotificationContainer.vue.d.ts +19 -0
  111. package/dist/components/common/PackageType.vue.d.ts +16 -0
  112. package/dist/components/common/PlainElement.d.ts +2 -0
  113. package/dist/components/common/ResetButton.vue.d.ts +15 -0
  114. package/dist/components/common/ReturnsForm.vue.d.ts +14 -0
  115. package/dist/components/common/ShipmentBarcode.vue.d.ts +15 -0
  116. package/dist/components/common/ShipmentOptionsForm.vue.d.ts +16 -0
  117. package/dist/components/common/ShipmentStatus.vue.d.ts +15 -0
  118. package/dist/components/common/StatusIndicator.vue.d.ts +23 -0
  119. package/dist/components/common/SubmitButton.vue.d.ts +15 -0
  120. package/dist/components/common/TabNavigation.vue.d.ts +66 -0
  121. package/dist/components/common/index.d.ts +20 -0
  122. package/dist/components/index.d.ts +1 -0
  123. package/dist/components/modals/PrintOptionsModal.vue.d.ts +2 -0
  124. package/dist/components/modals/PrintOptionsModalForm.vue.d.ts +2 -0
  125. package/dist/components/modals/ShipmentOptionsModal.vue.d.ts +2 -0
  126. package/dist/components/modals/ShipmentOptionsModalForm.vue.d.ts +16 -0
  127. package/dist/composables/components/index.d.ts +15 -0
  128. package/dist/composables/components/useBulkSelectCheckbox.d.ts +9 -0
  129. package/dist/composables/components/useCheckboxGroupContext.d.ts +4 -0
  130. package/dist/composables/components/useDropOffInputContext.d.ts +13 -0
  131. package/dist/composables/components/useDropdownButtonContext.d.ts +15 -0
  132. package/dist/composables/components/useElementContext.d.ts +7 -0
  133. package/dist/composables/components/useElementOptions.d.ts +6 -0
  134. package/dist/composables/components/useInputWithOptionsContext.d.ts +10 -0
  135. package/dist/composables/components/useModalElementContext.d.ts +11 -0
  136. package/dist/composables/components/useMultiSelectInputContext.d.ts +4 -0
  137. package/dist/composables/components/useRadioGroupContext.d.ts +10 -0
  138. package/dist/composables/components/useSelectInputContext.d.ts +4 -0
  139. package/dist/composables/components/useShippingMethodsInputContext.d.ts +13 -0
  140. package/dist/composables/components/useTableContext.d.ts +7 -0
  141. package/dist/composables/components/useToggleInputContext.d.ts +11 -0
  142. package/dist/composables/components/useTriStateInputContext.d.ts +17 -0
  143. package/dist/composables/context/index.d.ts +7 -0
  144. package/dist/composables/context/useAppInfo.d.ts +2 -0
  145. package/dist/composables/context/useContext.d.ts +3 -0
  146. package/dist/composables/context/useGlobalContext.d.ts +2 -0
  147. package/dist/composables/context/useInstanceContext.d.ts +8 -0
  148. package/dist/composables/context/useModalContext.d.ts +11 -0
  149. package/dist/composables/context/useModalOrder.d.ts +1 -0
  150. package/dist/composables/context/usePluginSettings.d.ts +2 -0
  151. package/dist/composables/formatter/default/createCurrencyFormat.d.ts +1 -0
  152. package/dist/composables/formatter/default/createLongDateFormat.d.ts +1 -0
  153. package/dist/composables/formatter/default/createRelativeTimeFormat.d.ts +1 -0
  154. package/dist/composables/formatter/default/defaultCurrencyFormatters.d.ts +2 -0
  155. package/dist/composables/formatter/default/defaultDateFormatters.d.ts +4 -0
  156. package/dist/composables/formatter/default/index.d.ts +6 -0
  157. package/dist/composables/formatter/default/parseDate.d.ts +1 -0
  158. package/dist/composables/formatter/formatter.types.d.ts +23 -0
  159. package/dist/composables/formatter/index.d.ts +4 -0
  160. package/dist/composables/formatter/useFormatter.d.ts +2 -0
  161. package/dist/composables/formatter/useLocalizedFormatter.d.ts +2 -0
  162. package/dist/composables/index.d.ts +17 -0
  163. package/dist/composables/language/index.d.ts +4 -0
  164. package/dist/composables/language/resolveTranslatedString.d.ts +3 -0
  165. package/dist/composables/language/resolveTranslationKey.d.ts +2 -0
  166. package/dist/composables/language/types.d.ts +1 -0
  167. package/dist/composables/language/useLanguage.d.ts +23 -0
  168. package/dist/composables/orders/index.d.ts +3 -0
  169. package/dist/composables/orders/useOrder.d.ts +3 -0
  170. package/dist/composables/orders/useOrderData.d.ts +9 -0
  171. package/dist/composables/orders/useOrdersData.d.ts +3 -0
  172. package/dist/composables/products/index.d.ts +1 -0
  173. package/dist/composables/products/useProductData.d.ts +8 -0
  174. package/dist/composables/shipments/index.d.ts +3 -0
  175. package/dist/composables/shipments/useShipment.d.ts +3 -0
  176. package/dist/composables/shipments/useShipmentData.d.ts +12 -0
  177. package/dist/composables/shipments/useShipmentsData.d.ts +2 -0
  178. package/dist/composables/useAdminConfig.d.ts +2 -0
  179. package/dist/composables/useAdminInstance.d.ts +2 -0
  180. package/dist/composables/useDigitalStampRanges.d.ts +9 -0
  181. package/dist/composables/useGlobalPdkAdmin.d.ts +2 -0
  182. package/dist/composables/useLoadMore.d.ts +14 -0
  183. package/dist/composables/useLoading.d.ts +10 -0
  184. package/dist/composables/useLogger.d.ts +2 -0
  185. package/dist/composables/useStoreContextQuery.d.ts +3 -0
  186. package/dist/composables/useStoreQuery.d.ts +4 -0
  187. package/dist/composables/useWeekdays.d.ts +9 -0
  188. package/dist/data/components.d.ts +195 -0
  189. package/dist/data/constants.d.ts +63 -0
  190. package/dist/data/endpoints.d.ts +5 -0
  191. package/dist/data/index.d.ts +4 -0
  192. package/dist/data/view.d.ts +9 -0
  193. package/dist/deprecated.d.ts +6 -0
  194. package/dist/forms/createReturnsForm.d.ts +1 -0
  195. package/dist/forms/form-builder/builders/buildAfterUpdate.d.ts +3 -0
  196. package/dist/forms/form-builder/builders/buildFormStateWatcher.d.ts +3 -0
  197. package/dist/forms/form-builder/builders/index.d.ts +2 -0
  198. package/dist/forms/form-builder/conditions/index.d.ts +3 -0
  199. package/dist/forms/form-builder/conditions/validateIfCondition.d.ts +2 -0
  200. package/dist/forms/form-builder/conditions/validateIfConditions.d.ts +2 -0
  201. package/dist/forms/form-builder/conditions/validateIsTruthy.d.ts +2 -0
  202. package/dist/forms/form-builder/index.d.ts +5 -0
  203. package/dist/forms/form-builder/operations/executeCustomOperationHandlers.d.ts +2 -0
  204. package/dist/forms/form-builder/operations/executeOperation.d.ts +2 -0
  205. package/dist/forms/form-builder/operations/executeOperations.d.ts +2 -0
  206. package/dist/forms/form-builder/operations/executeSetPropOperation.d.ts +2 -0
  207. package/dist/forms/form-builder/operations/executeSetValueOperation.d.ts +2 -0
  208. package/dist/forms/form-builder/operations/index.d.ts +5 -0
  209. package/dist/forms/form-builder/operations/parseBuilders.d.ts +3 -0
  210. package/dist/forms/form-builder/types/FormCondition.types.d.ts +36 -0
  211. package/dist/forms/form-builder/types/FormOperations.types.d.ts +16 -0
  212. package/dist/forms/form-builder/types/SubOperationBuilder.types.d.ts +13 -0
  213. package/dist/forms/form-builder/types/common.types.d.ts +21 -0
  214. package/dist/forms/form-builder/types/index.d.ts +4 -0
  215. package/dist/forms/form-builder/utils/createPropSetter.d.ts +4 -0
  216. package/dist/forms/form-builder/utils/createValueGetter.d.ts +4 -0
  217. package/dist/forms/form-builder/utils/createValueSetter.d.ts +4 -0
  218. package/dist/forms/form-builder/utils/index.d.ts +4 -0
  219. package/dist/forms/formKeys.d.ts +10 -0
  220. package/dist/forms/helpers/addBulkEditNotification.d.ts +1 -0
  221. package/dist/forms/helpers/createDefaultOption.d.ts +3 -0
  222. package/dist/forms/helpers/createHasShipmentOptionWatcher.d.ts +3 -0
  223. package/dist/forms/helpers/createLabel.d.ts +1 -0
  224. package/dist/forms/helpers/defineFormField.d.ts +2 -0
  225. package/dist/forms/helpers/getCarrier.d.ts +3 -0
  226. package/dist/forms/helpers/getDeliveryTypes.d.ts +3 -0
  227. package/dist/forms/helpers/getFieldLabel.d.ts +2 -0
  228. package/dist/forms/helpers/getFormCarrierName.d.ts +2 -0
  229. package/dist/forms/helpers/getInsuranceOptions.d.ts +3 -0
  230. package/dist/forms/helpers/getPackageTypes.d.ts +3 -0
  231. package/dist/forms/helpers/hasPostNlAgeCheck.d.ts +2 -0
  232. package/dist/forms/helpers/hasShipmentOption.d.ts +3 -0
  233. package/dist/forms/helpers/index.d.ts +20 -0
  234. package/dist/forms/helpers/isPackageTypePackage.d.ts +2 -0
  235. package/dist/forms/helpers/isPackageTypePackageOrSmall.d.ts +2 -0
  236. package/dist/forms/helpers/isPackageTypeSmallPackage.d.ts +2 -0
  237. package/dist/forms/helpers/resolveFormComponent.d.ts +3 -0
  238. package/dist/forms/helpers/setFieldProp.d.ts +8 -0
  239. package/dist/forms/helpers/setPostNlAgeCheckSubtext.d.ts +2 -0
  240. package/dist/forms/helpers/triStateFieldIsEnabled.d.ts +2 -0
  241. package/dist/forms/helpers/updateFieldsDefaults.d.ts +6 -0
  242. package/dist/forms/index.d.ts +6 -0
  243. package/dist/forms/pluginSettings/createFormTab.d.ts +3 -0
  244. package/dist/forms/pluginSettings/createPluginSettingsForm.d.ts +4 -0
  245. package/dist/forms/pluginSettings/createPluginSettingsTabs.d.ts +4 -0
  246. package/dist/forms/pluginSettings/createPluginSettingsTabsComponent.d.ts +4 -0
  247. package/dist/forms/pluginSettings/generateFormFields.d.ts +8 -0
  248. package/dist/forms/pluginSettings/index.d.ts +6 -0
  249. package/dist/forms/pluginSettings/types.d.ts +13 -0
  250. package/dist/forms/shipmentOptions/createShipmentOptionsForm.d.ts +4 -0
  251. package/dist/forms/shipmentOptions/field.d.ts +34 -0
  252. package/dist/forms/shipmentOptions/fields/createAgeCheckField.d.ts +3 -0
  253. package/dist/forms/shipmentOptions/fields/createCarrierField.d.ts +4 -0
  254. package/dist/forms/shipmentOptions/fields/createDeliveryTypeField.d.ts +3 -0
  255. package/dist/forms/shipmentOptions/fields/createDigitalStampRangeField.d.ts +3 -0
  256. package/dist/forms/shipmentOptions/fields/createDirectReturnField.d.ts +3 -0
  257. package/dist/forms/shipmentOptions/fields/createHideSenderField.d.ts +3 -0
  258. package/dist/forms/shipmentOptions/fields/createInsuranceField.d.ts +3 -0
  259. package/dist/forms/shipmentOptions/fields/createLabelAmountField.d.ts +3 -0
  260. package/dist/forms/shipmentOptions/fields/createLargeFormatField.d.ts +3 -0
  261. package/dist/forms/shipmentOptions/fields/createOnlyRecipientField.d.ts +3 -0
  262. package/dist/forms/shipmentOptions/fields/createPackageTypeField.d.ts +3 -0
  263. package/dist/forms/shipmentOptions/fields/createReceiptCodeField.d.ts +3 -0
  264. package/dist/forms/shipmentOptions/fields/createRef.d.ts +3 -0
  265. package/dist/forms/shipmentOptions/fields/createSameDayDeliveryField.d.ts +3 -0
  266. package/dist/forms/shipmentOptions/fields/createShipmentOptionField.d.ts +4 -0
  267. package/dist/forms/shipmentOptions/fields/createSignatureField.d.ts +3 -0
  268. package/dist/forms/shipmentOptions/fields/index.d.ts +14 -0
  269. package/dist/forms/shipmentOptions/index.d.ts +4 -0
  270. package/dist/forms/shipmentOptions/types.d.ts +2 -0
  271. package/dist/index.d.ts +19 -0
  272. package/dist/pdk/PdkAdmin.d.ts +18 -0
  273. package/dist/pdk/boot.d.ts +3 -0
  274. package/dist/pdk/createAdminConfig.d.ts +2 -0
  275. package/dist/pdk/createPdkAdmin.d.ts +8 -0
  276. package/dist/pdk/createPdkAdminPlugin.d.ts +3 -0
  277. package/dist/pdk/fillShipmentsQueryData.d.ts +4 -0
  278. package/dist/pdk/index.d.ts +11 -0
  279. package/dist/pdk/instance/createInstanceContext.d.ts +5 -0
  280. package/dist/pdk/instance/createQueryClient.d.ts +2 -0
  281. package/dist/pdk/instance/index.d.ts +3 -0
  282. package/dist/pdk/instance/plugins/createContextPlugin.d.ts +2 -0
  283. package/dist/pdk/instance/plugins/createLoggerPlugin.d.ts +2 -0
  284. package/dist/pdk/instance/plugins/createRegisterComponentsPlugin.d.ts +5 -0
  285. package/dist/pdk/instance/plugins/createStorePlugin.d.ts +2 -0
  286. package/dist/pdk/instance/plugins/createVueQueryPlugin.d.ts +5 -0
  287. package/dist/pdk/instance/plugins/index.d.ts +6 -0
  288. package/dist/pdk/instance/plugins/plugins.types.d.ts +3 -0
  289. package/dist/pdk/renderMap.d.ts +3 -0
  290. package/dist/pdk/sendBootEvent.d.ts +3 -0
  291. package/dist/pdk/setupAdminApp.d.ts +3 -0
  292. package/dist/pdk/testIdDirective.d.ts +5 -0
  293. package/dist/sdk/PdkFetchClient.d.ts +11 -0
  294. package/dist/sdk/composables/api/index.d.ts +1 -0
  295. package/dist/sdk/composables/api/useFetchCarrier.d.ts +2 -0
  296. package/dist/sdk/composables/index.d.ts +3 -0
  297. package/dist/sdk/composables/useMyParcelApi.d.ts +5 -0
  298. package/dist/sdk/composables/usePdkAdminApi.d.ts +6 -0
  299. package/dist/sdk/endpoints/abstractPdkEndpoint.d.ts +7 -0
  300. package/dist/sdk/endpoints/index.d.ts +1 -0
  301. package/dist/sdk/index.d.ts +3 -0
  302. package/dist/services/actions/createAction.d.ts +4 -0
  303. package/dist/services/actions/createActionContext.d.ts +3 -0
  304. package/dist/services/actions/downloadFile.d.ts +4 -0
  305. package/dist/services/actions/getActionIdentifier.d.ts +2 -0
  306. package/dist/services/actions/index.d.ts +4 -0
  307. package/dist/services/addErrorToNotifications.d.ts +2 -0
  308. package/dist/services/context/getElementContext.d.ts +2 -0
  309. package/dist/services/context/index.d.ts +1 -0
  310. package/dist/services/createNotification.d.ts +5 -0
  311. package/dist/services/index.d.ts +9 -0
  312. package/dist/services/instantiateAction.d.ts +2 -0
  313. package/dist/services/instantiateActions.d.ts +8 -0
  314. package/dist/services/logger.d.ts +19 -0
  315. package/dist/services/mutations/getCallbackForMutationMode.d.ts +4 -0
  316. package/dist/services/mutations/getModalMutationOptions.d.ts +2 -0
  317. package/dist/services/mutations/index.d.ts +3 -0
  318. package/dist/services/mutations/mutationMode.d.ts +4 -0
  319. package/dist/services/print/index.d.ts +1 -0
  320. package/dist/services/print/openPdfInNewWindow.d.ts +4 -0
  321. package/dist/stores/createQueryCacheKey.d.ts +3 -0
  322. package/dist/stores/index.d.ts +6 -0
  323. package/dist/stores/types.d.ts +13 -0
  324. package/dist/stores/useActionStore.d.ts +25 -0
  325. package/dist/stores/useModalStore.d.ts +16 -0
  326. package/dist/stores/useNotificationStore.d.ts +60 -0
  327. package/dist/stores/useQueryStore.d.ts +77 -0
  328. package/dist/symbols.d.ts +5 -0
  329. package/dist/testing.d.ts +1 -0
  330. package/dist/types/actions/actions.types.d.ts +31 -0
  331. package/dist/types/actions/endpoints.types.d.ts +9 -0
  332. package/dist/types/actions/index.d.ts +4 -0
  333. package/dist/types/actions/parameters.types.d.ts +55 -0
  334. package/dist/types/actions/response.types.d.ts +7 -0
  335. package/dist/types/actions.types.d.ts +45 -0
  336. package/dist/types/admin.types.d.ts +26 -0
  337. package/dist/types/common.types.d.ts +53 -0
  338. package/dist/types/components-form.types.d.ts +107 -0
  339. package/dist/types/components.types.d.ts +273 -0
  340. package/dist/types/configuration.types.d.ts +95 -0
  341. package/dist/types/context.types.d.ts +20 -0
  342. package/dist/types/endpoints.types.d.ts +7 -0
  343. package/dist/types/form.types.d.ts +39 -0
  344. package/dist/types/index.d.ts +12 -0
  345. package/dist/types/language.types.d.ts +9 -0
  346. package/dist/types/sdk.types.d.ts +155 -0
  347. package/dist/utils/booleanToTriState.d.ts +2 -0
  348. package/dist/utils/convertDotNotationToObject.d.ts +1 -0
  349. package/dist/utils/createAssetUrl.d.ts +1 -0
  350. package/dist/utils/createClasses.d.ts +8 -0
  351. package/dist/utils/createObjectWithKeys.d.ts +3 -0
  352. package/dist/utils/decodeHtmlEntities.d.ts +7 -0
  353. package/dist/utils/downloadBlob.d.ts +1 -0
  354. package/dist/utils/downloadFileFromUrl.d.ts +1 -0
  355. package/dist/utils/encodeArrayParameter.d.ts +2 -0
  356. package/dist/utils/extendAdminInstance.d.ts +2 -0
  357. package/dist/utils/fakeLinkClick.d.ts +4 -0
  358. package/dist/utils/forms/createFormElement.d.ts +3 -0
  359. package/dist/utils/forms/createShipmentFormName.d.ts +1 -0
  360. package/dist/utils/forms/formToBody.d.ts +2 -0
  361. package/dist/utils/forms/generateFieldId.d.ts +3 -0
  362. package/dist/utils/forms/index.d.ts +4 -0
  363. package/dist/utils/generateLabelFilename.d.ts +3 -0
  364. package/dist/utils/getOrderId.d.ts +3 -0
  365. package/dist/utils/getOrderShipmentIds.d.ts +2 -0
  366. package/dist/utils/index.d.ts +22 -0
  367. package/dist/utils/openUrlInNewTab.d.ts +1 -0
  368. package/dist/utils/prefixComponent.d.ts +3 -0
  369. package/dist/utils/query/index.d.ts +3 -0
  370. package/dist/utils/query/setQueryData.d.ts +2 -0
  371. package/dist/utils/query/setQueryOrder.d.ts +10 -0
  372. package/dist/utils/query/setQueryShipment.d.ts +3 -0
  373. package/dist/utils/resolveCarrier.d.ts +1 -0
  374. package/dist/utils/translations/getDeliveryTypeTranslation.d.ts +2 -0
  375. package/dist/utils/translations/getDynamicTranslation.d.ts +1 -0
  376. package/dist/utils/translations/getPackageTypeTranslation.d.ts +2 -0
  377. package/dist/utils/translations/index.d.ts +4 -0
  378. package/dist/utils/translations/translateSelectOption.d.ts +3 -0
  379. package/dist/utils/triStateToBoolean.d.ts +2 -0
  380. package/dist/utils/unprefixComponent.d.ts +3 -0
  381. package/dist/utils/validateId.d.ts +2 -0
  382. package/dist/views/ChildProductSettings.vue.d.ts +2 -0
  383. package/dist/views/Modals.vue.d.ts +2 -0
  384. package/dist/views/Notifications.vue.d.ts +2 -0
  385. package/dist/views/OrderBox.vue.d.ts +2 -0
  386. package/dist/views/OrderListItem.vue.d.ts +2 -0
  387. package/dist/views/PluginSettings.vue.d.ts +2 -0
  388. package/dist/views/ProductSettings.vue.d.ts +35 -0
  389. package/dist/views/integrated/OrderBoxView.vue.d.ts +12 -0
  390. package/dist/views/integrated/OrderListItemView.vue.d.ts +12 -0
  391. package/dist/views/integrated/index.d.ts +7 -0
  392. package/package.json +70 -0
  393. package/src/__tests__/__snapshots__/exports.spec.ts.snap +195 -0
  394. package/src/__tests__/doComponentTestSetup.ts +54 -0
  395. package/src/__tests__/doComponentTestTeardown.ts +6 -0
  396. package/src/__tests__/exports.spec.ts +13 -0
  397. package/src/__tests__/getElementContext.spec.ts +18 -0
  398. package/src/__tests__/index.ts +3 -0
  399. package/src/__tests__/mocks/index.ts +14 -0
  400. package/src/__tests__/mocks/mockDefaultAccount.ts +18 -0
  401. package/src/__tests__/mocks/mockDefaultAppConfig.ts +21 -0
  402. package/src/__tests__/mocks/mockDefaultAppInfo.ts +12 -0
  403. package/src/__tests__/mocks/mockDefaultCarriers.ts +4 -0
  404. package/src/__tests__/mocks/mockDefaultConfig.ts +11 -0
  405. package/src/__tests__/mocks/mockDefaultDynamicContext.ts +17 -0
  406. package/src/__tests__/mocks/mockDefaultEndpoints.ts +19 -0
  407. package/src/__tests__/mocks/mockDefaultGlobalContext.ts +21 -0
  408. package/src/__tests__/mocks/mockDefaultLogger.ts +4 -0
  409. package/src/__tests__/mocks/mockDefaultPlatform.ts +14 -0
  410. package/src/__tests__/mocks/mockDefaultPluginSettings.ts +15 -0
  411. package/src/__tests__/mocks/mockDefaultPrintOptionsView.ts +13 -0
  412. package/src/__tests__/mocks/mockDefaultShop.ts +20 -0
  413. package/src/__tests__/mocks/mockDefaultTranslations.ts +4 -0
  414. package/src/__tests__/render.spec.ts +53 -0
  415. package/src/__tests__/utils/mockLinkElement.ts +20 -0
  416. package/src/actions/composables/index.ts +2 -0
  417. package/src/actions/composables/mutations/account/index.ts +2 -0
  418. package/src/actions/composables/mutations/account/useDeleteAccountMutation.ts +30 -0
  419. package/src/actions/composables/mutations/account/useUpdateAccountMutation.ts +60 -0
  420. package/src/actions/composables/mutations/debug/index.ts +3 -0
  421. package/src/actions/composables/mutations/debug/useDownloadLogsMutation.ts +8 -0
  422. package/src/actions/composables/mutations/debug/useSwitchToAcceptanceApiMutation.ts +10 -0
  423. package/src/actions/composables/mutations/debug/useSwitchToProductionApiMutation.ts +10 -0
  424. package/src/actions/composables/mutations/index.ts +7 -0
  425. package/src/actions/composables/mutations/orders/index.ts +3 -0
  426. package/src/actions/composables/mutations/orders/useExportOrdersMutation.ts +51 -0
  427. package/src/actions/composables/mutations/orders/usePrintOrdersMutation.ts +23 -0
  428. package/src/actions/composables/mutations/orders/useUpdateOrdersMutation.ts +36 -0
  429. package/src/actions/composables/mutations/settings/index.ts +2 -0
  430. package/src/actions/composables/mutations/settings/useUpdatePluginSettingsMutation.ts +16 -0
  431. package/src/actions/composables/mutations/settings/useUpdateProductSettingsMutation.ts +22 -0
  432. package/src/actions/composables/mutations/shipments/index.ts +4 -0
  433. package/src/actions/composables/mutations/shipments/useDeleteShipmentsMutation.ts +65 -0
  434. package/src/actions/composables/mutations/shipments/useExportReturnMutation.ts +36 -0
  435. package/src/actions/composables/mutations/shipments/usePrintShipmentsMutation.ts +39 -0
  436. package/src/actions/composables/mutations/shipments/useUpdateShipmentsMutation.ts +36 -0
  437. package/src/actions/composables/mutations/usePdkMutation.ts +41 -0
  438. package/src/actions/composables/mutations/webhooks/index.ts +2 -0
  439. package/src/actions/composables/mutations/webhooks/useCreateWebhooksMutation.ts +20 -0
  440. package/src/actions/composables/mutations/webhooks/useDeleteWebhooksMutation.ts +20 -0
  441. package/src/actions/composables/queries/account/index.ts +1 -0
  442. package/src/actions/composables/queries/account/useFetchContextQuery.ts +43 -0
  443. package/src/actions/composables/queries/index.ts +6 -0
  444. package/src/actions/composables/queries/orders/index.ts +1 -0
  445. package/src/actions/composables/queries/orders/useFetchOrdersQuery.ts +35 -0
  446. package/src/actions/composables/queries/products/index.ts +1 -0
  447. package/src/actions/composables/queries/products/useFetchProductsQuery.ts +20 -0
  448. package/src/actions/composables/queries/queryKeys.ts +3 -0
  449. package/src/actions/composables/queries/shipments/index.ts +1 -0
  450. package/src/actions/composables/queries/shipments/useFetchShipmentsQuery.ts +44 -0
  451. package/src/actions/composables/queries/webhooks/index.ts +1 -0
  452. package/src/actions/composables/queries/webhooks/useFetchWebhooksQuery.ts +24 -0
  453. package/src/actions/defineAction.ts +10 -0
  454. package/src/actions/definitions/account.ts +39 -0
  455. package/src/actions/definitions/context.ts +17 -0
  456. package/src/actions/definitions/debug.ts +39 -0
  457. package/src/actions/definitions/index.ts +8 -0
  458. package/src/actions/definitions/modal.ts +32 -0
  459. package/src/actions/definitions/orders.ts +128 -0
  460. package/src/actions/definitions/settings.ts +11 -0
  461. package/src/actions/definitions/shipments.ts +61 -0
  462. package/src/actions/definitions/webhooks.ts +25 -0
  463. package/src/actions/executors/createHandlerWithParameters.ts +29 -0
  464. package/src/actions/executors/createMutationHandler.ts +10 -0
  465. package/src/actions/executors/createOrdersMutationHandler.ts +12 -0
  466. package/src/actions/executors/createQueryHandler.ts +19 -0
  467. package/src/actions/executors/createShipmentsMutationHandler.ts +12 -0
  468. package/src/actions/executors/doMutate.ts +16 -0
  469. package/src/actions/executors/executeAction.ts +35 -0
  470. package/src/actions/executors/executeAfterHandle.ts +23 -0
  471. package/src/actions/executors/executeBeforeHandle.ts +29 -0
  472. package/src/actions/executors/executeHandler.ts +34 -0
  473. package/src/actions/executors/executeNextAction.ts +34 -0
  474. package/src/actions/executors/index.ts +14 -0
  475. package/src/actions/executors/resolveOrderParameters.ts +19 -0
  476. package/src/actions/executors/resolveQuerySuffix.ts +10 -0
  477. package/src/actions/executors/types.ts +45 -0
  478. package/src/actions/index.ts +6 -0
  479. package/src/actions/print/index.ts +3 -0
  480. package/src/actions/print/openOrPrintPdf.ts +16 -0
  481. package/src/actions/print/resolvePrintParameters.ts +24 -0
  482. package/src/actions/print/waitForLabelPrompt.ts +39 -0
  483. package/src/actions/stopActionHandler.ts +1 -0
  484. package/src/components/OrderBox/OrderShipmentsTable.vue +53 -0
  485. package/src/components/OrderBox/OrderShipmentsTableRow.vue +81 -0
  486. package/src/components/OrderBox/ShipmentOptionsBox.vue +74 -0
  487. package/src/components/OrderBox/ShipmentTableBox.vue +51 -0
  488. package/src/components/OrderListItem/OrderModeOrderListItem.vue +45 -0
  489. package/src/components/OrderListItem/ShipmentLabel.vue +44 -0
  490. package/src/components/OrderListItem/ShipmentModeOrderListItem.vue +67 -0
  491. package/src/components/PluginSettings/AccountSettings.vue +81 -0
  492. package/src/components/PluginSettings/DebugOptions.vue +89 -0
  493. package/src/components/PluginSettings/EditApiKeyForm.vue +89 -0
  494. package/src/components/PluginSettings/PluginSettingsForms.vue +56 -0
  495. package/src/components/PluginSettings/WebhooksStatus.vue +73 -0
  496. package/src/components/PluginSettings/createUpdateAccountSettingsValidator.ts +21 -0
  497. package/src/components/common/ActionButton.vue +53 -0
  498. package/src/components/common/BulkSelectCheckbox.vue +46 -0
  499. package/src/components/common/CarrierLogo.vue +14 -0
  500. package/src/components/common/DateRelative.vue +20 -0
  501. package/src/components/common/DeliveryOptionsDeliveryType.vue +23 -0
  502. package/src/components/common/DeliveryOptionsExcerpt.vue +39 -0
  503. package/src/components/common/DeliveryOptionsExcerptCarrierName.vue +21 -0
  504. package/src/components/common/DeliveryOptionsPackageType.vue +30 -0
  505. package/src/components/common/DigitalStampWeightRange.vue +14 -0
  506. package/src/components/common/NotificationContainer.vue +35 -0
  507. package/src/components/common/PackageType.vue +16 -0
  508. package/src/components/common/PlainElement.ts +8 -0
  509. package/src/components/common/ResetButton.vue +26 -0
  510. package/src/components/common/ReturnsForm.vue +31 -0
  511. package/src/components/common/ShipmentBarcode.vue +41 -0
  512. package/src/components/common/ShipmentOptionsForm.vue +22 -0
  513. package/src/components/common/ShipmentStatus.vue +23 -0
  514. package/src/components/common/StatusIndicator.vue +46 -0
  515. package/src/components/common/SubmitButton.vue +30 -0
  516. package/src/components/common/TabNavigation.vue +134 -0
  517. package/src/components/common/index.ts +39 -0
  518. package/src/components/index.ts +1 -0
  519. package/src/components/modals/PrintOptionsModal.vue +32 -0
  520. package/src/components/modals/PrintOptionsModalForm.vue +33 -0
  521. package/src/components/modals/ShipmentOptionsModal.vue +56 -0
  522. package/src/components/modals/ShipmentOptionsModalForm.vue +21 -0
  523. package/src/composables/components/index.ts +15 -0
  524. package/src/composables/components/useBulkSelectCheckbox.ts +39 -0
  525. package/src/composables/components/useCheckboxGroupContext.ts +10 -0
  526. package/src/composables/components/useDropOffInputContext.ts +74 -0
  527. package/src/composables/components/useDropdownButtonContext.ts +42 -0
  528. package/src/composables/components/useElementContext.ts +27 -0
  529. package/src/composables/components/useElementOptions.ts +48 -0
  530. package/src/composables/components/useInputWithOptionsContext.ts +46 -0
  531. package/src/composables/components/useModalElementContext.ts +27 -0
  532. package/src/composables/components/useMultiSelectInputContext.ts +11 -0
  533. package/src/composables/components/useRadioGroupContext.ts +56 -0
  534. package/src/composables/components/useSelectInputContext.ts +11 -0
  535. package/src/composables/components/useShippingMethodsInputContext.spec.ts +93 -0
  536. package/src/composables/components/useShippingMethodsInputContext.ts +130 -0
  537. package/src/composables/components/useTableContext.ts +17 -0
  538. package/src/composables/components/useToggleInputContext.ts +35 -0
  539. package/src/composables/components/useTriStateInputContext.ts +117 -0
  540. package/src/composables/context/index.ts +7 -0
  541. package/src/composables/context/useAppInfo.ts +6 -0
  542. package/src/composables/context/useContext.ts +18 -0
  543. package/src/composables/context/useGlobalContext.ts +7 -0
  544. package/src/composables/context/useInstanceContext.ts +15 -0
  545. package/src/composables/context/useModalContext.ts +52 -0
  546. package/src/composables/context/useModalOrder.ts +13 -0
  547. package/src/composables/context/usePluginSettings.ts +12 -0
  548. package/src/composables/formatter/default/createCurrencyFormat.ts +6 -0
  549. package/src/composables/formatter/default/createLongDateFormat.ts +7 -0
  550. package/src/composables/formatter/default/createRelativeTimeFormat.ts +5 -0
  551. package/src/composables/formatter/default/defaultCurrencyFormatters.ts +16 -0
  552. package/src/composables/formatter/default/defaultDateFormatters.ts +83 -0
  553. package/src/composables/formatter/default/index.ts +6 -0
  554. package/src/composables/formatter/default/parseDate.ts +12 -0
  555. package/src/composables/formatter/formatter.types.ts +32 -0
  556. package/src/composables/formatter/index.ts +4 -0
  557. package/src/composables/formatter/useFormatter.spec.ts +147 -0
  558. package/src/composables/formatter/useFormatter.ts +51 -0
  559. package/src/composables/formatter/useLocalizedFormatter.ts +11 -0
  560. package/src/composables/index.ts +17 -0
  561. package/src/composables/language/index.ts +4 -0
  562. package/src/composables/language/resolveTranslatedString.ts +30 -0
  563. package/src/composables/language/resolveTranslationKey.ts +5 -0
  564. package/src/composables/language/types.ts +1 -0
  565. package/src/composables/language/useLanguage.spec.ts +124 -0
  566. package/src/composables/language/useLanguage.ts +117 -0
  567. package/src/composables/orders/index.ts +3 -0
  568. package/src/composables/orders/useOrder.ts +8 -0
  569. package/src/composables/orders/useOrderData.ts +29 -0
  570. package/src/composables/orders/useOrdersData.ts +14 -0
  571. package/src/composables/products/index.ts +1 -0
  572. package/src/composables/products/useProductData.ts +23 -0
  573. package/src/composables/shipments/index.ts +3 -0
  574. package/src/composables/shipments/useShipment.ts +7 -0
  575. package/src/composables/shipments/useShipmentData.ts +52 -0
  576. package/src/composables/shipments/useShipmentsData.ts +5 -0
  577. package/src/composables/useAdminConfig.ts +8 -0
  578. package/src/composables/useAdminInstance.ts +13 -0
  579. package/src/composables/useDigitalStampRanges.ts +38 -0
  580. package/src/composables/useGlobalPdkAdmin.ts +13 -0
  581. package/src/composables/useLoadMore.spec.ts +69 -0
  582. package/src/composables/useLoadMore.ts +46 -0
  583. package/src/composables/useLoading.spec.ts +20 -0
  584. package/src/composables/useLoading.ts +18 -0
  585. package/src/composables/useLogger.ts +8 -0
  586. package/src/composables/useStoreContextQuery.ts +9 -0
  587. package/src/composables/useStoreQuery.ts +9 -0
  588. package/src/composables/useWeekdays.ts +24 -0
  589. package/src/data/components.ts +289 -0
  590. package/src/data/constants.ts +76 -0
  591. package/src/data/endpoints.ts +28 -0
  592. package/src/data/index.ts +4 -0
  593. package/src/data/view.ts +9 -0
  594. package/src/deprecated.ts +9 -0
  595. package/src/forms/createReturnsForm.ts +8 -0
  596. package/src/forms/form-builder/builders/buildAfterUpdate.spec.ts +48 -0
  597. package/src/forms/form-builder/builders/buildAfterUpdate.ts +26 -0
  598. package/src/forms/form-builder/builders/buildFormStateWatcher.spec.ts +206 -0
  599. package/src/forms/form-builder/builders/buildFormStateWatcher.ts +15 -0
  600. package/src/forms/form-builder/builders/index.ts +2 -0
  601. package/src/forms/form-builder/conditions/index.ts +3 -0
  602. package/src/forms/form-builder/conditions/validateIfCondition.spec.ts +69 -0
  603. package/src/forms/form-builder/conditions/validateIfCondition.ts +43 -0
  604. package/src/forms/form-builder/conditions/validateIfConditions.spec.ts +238 -0
  605. package/src/forms/form-builder/conditions/validateIfConditions.ts +31 -0
  606. package/src/forms/form-builder/conditions/validateIsTruthy.ts +15 -0
  607. package/src/forms/form-builder/index.ts +5 -0
  608. package/src/forms/form-builder/operations/executeCustomOperationHandlers.ts +18 -0
  609. package/src/forms/form-builder/operations/executeOperation.ts +27 -0
  610. package/src/forms/form-builder/operations/executeOperations.spec.ts +63 -0
  611. package/src/forms/form-builder/operations/executeOperations.ts +10 -0
  612. package/src/forms/form-builder/operations/executeSetPropOperation.spec.ts +164 -0
  613. package/src/forms/form-builder/operations/executeSetPropOperation.ts +15 -0
  614. package/src/forms/form-builder/operations/executeSetValueOperation.spec.ts +203 -0
  615. package/src/forms/form-builder/operations/executeSetValueOperation.ts +15 -0
  616. package/src/forms/form-builder/operations/index.ts +5 -0
  617. package/src/forms/form-builder/operations/parseBuilders.spec.ts +70 -0
  618. package/src/forms/form-builder/operations/parseBuilders.ts +39 -0
  619. package/src/forms/form-builder/types/FormCondition.types.ts +57 -0
  620. package/src/forms/form-builder/types/FormOperations.types.ts +21 -0
  621. package/src/forms/form-builder/types/SubOperationBuilder.types.ts +18 -0
  622. package/src/forms/form-builder/types/common.types.ts +35 -0
  623. package/src/forms/form-builder/types/index.ts +4 -0
  624. package/src/forms/form-builder/utils/createPropSetter.ts +19 -0
  625. package/src/forms/form-builder/utils/createValueGetter.ts +16 -0
  626. package/src/forms/form-builder/utils/createValueSetter.ts +21 -0
  627. package/src/forms/form-builder/utils/index.ts +6 -0
  628. package/src/forms/formKeys.ts +28 -0
  629. package/src/forms/helpers/addBulkEditNotification.ts +21 -0
  630. package/src/forms/helpers/createDefaultOption.ts +12 -0
  631. package/src/forms/helpers/createHasShipmentOptionWatcher.ts +12 -0
  632. package/src/forms/helpers/createLabel.ts +3 -0
  633. package/src/forms/helpers/defineFormField.ts +19 -0
  634. package/src/forms/helpers/getCarrier.ts +11 -0
  635. package/src/forms/helpers/getDeliveryTypes.ts +19 -0
  636. package/src/forms/helpers/getFieldLabel.ts +6 -0
  637. package/src/forms/helpers/getFormCarrierName.ts +7 -0
  638. package/src/forms/helpers/getInsuranceOptions.ts +23 -0
  639. package/src/forms/helpers/getPackageTypes.ts +19 -0
  640. package/src/forms/helpers/hasPostNlAgeCheck.ts +11 -0
  641. package/src/forms/helpers/hasShipmentOption.ts +8 -0
  642. package/src/forms/helpers/index.ts +20 -0
  643. package/src/forms/helpers/isPackageTypePackage.ts +7 -0
  644. package/src/forms/helpers/isPackageTypePackageOrSmall.ts +7 -0
  645. package/src/forms/helpers/isPackageTypeSmallPackage.ts +7 -0
  646. package/src/forms/helpers/resolveFormComponent.ts +12 -0
  647. package/src/forms/helpers/setFieldProp.ts +32 -0
  648. package/src/forms/helpers/setPostNlAgeCheckSubtext.ts +17 -0
  649. package/src/forms/helpers/triStateFieldIsEnabled.ts +20 -0
  650. package/src/forms/helpers/updateFieldsDefaults.ts +26 -0
  651. package/src/forms/index.ts +6 -0
  652. package/src/forms/pluginSettings/__snapshots__/generateFormFields.spec.ts.snap +37 -0
  653. package/src/forms/pluginSettings/createFormTab.ts +19 -0
  654. package/src/forms/pluginSettings/createPluginSettingsForm.ts +39 -0
  655. package/src/forms/pluginSettings/createPluginSettingsTabs.ts +35 -0
  656. package/src/forms/pluginSettings/createPluginSettingsTabsComponent.ts +42 -0
  657. package/src/forms/pluginSettings/generateFormFields.spec.ts +54 -0
  658. package/src/forms/pluginSettings/generateFormFields.ts +50 -0
  659. package/src/forms/pluginSettings/index.ts +6 -0
  660. package/src/forms/pluginSettings/types.ts +15 -0
  661. package/src/forms/shipmentOptions/createShipmentOptionsForm.ts +83 -0
  662. package/src/forms/shipmentOptions/field.ts +90 -0
  663. package/src/forms/shipmentOptions/fields/createAgeCheckField.ts +33 -0
  664. package/src/forms/shipmentOptions/fields/createCarrierField.ts +83 -0
  665. package/src/forms/shipmentOptions/fields/createDeliveryTypeField.ts +18 -0
  666. package/src/forms/shipmentOptions/fields/createDigitalStampRangeField.ts +48 -0
  667. package/src/forms/shipmentOptions/fields/createDirectReturnField.ts +8 -0
  668. package/src/forms/shipmentOptions/fields/createHideSenderField.ts +8 -0
  669. package/src/forms/shipmentOptions/fields/createInsuranceField.ts +31 -0
  670. package/src/forms/shipmentOptions/fields/createLabelAmountField.ts +20 -0
  671. package/src/forms/shipmentOptions/fields/createLargeFormatField.ts +8 -0
  672. package/src/forms/shipmentOptions/fields/createOnlyRecipientField.ts +21 -0
  673. package/src/forms/shipmentOptions/fields/createPackageTypeField.ts +18 -0
  674. package/src/forms/shipmentOptions/fields/createReceiptCodeField.ts +21 -0
  675. package/src/forms/shipmentOptions/fields/createRef.ts +6 -0
  676. package/src/forms/shipmentOptions/fields/createSameDayDeliveryField.ts +8 -0
  677. package/src/forms/shipmentOptions/fields/createShipmentOptionField.ts +25 -0
  678. package/src/forms/shipmentOptions/fields/createSignatureField.ts +11 -0
  679. package/src/forms/shipmentOptions/fields/index.ts +14 -0
  680. package/src/forms/shipmentOptions/index.ts +4 -0
  681. package/src/forms/shipmentOptions/types.ts +3 -0
  682. package/src/index.ts +114 -0
  683. package/src/pdk/PdkAdmin.ts +82 -0
  684. package/src/pdk/boot.ts +14 -0
  685. package/src/pdk/createAdminConfig.ts +29 -0
  686. package/src/pdk/createPdkAdmin.ts +39 -0
  687. package/src/pdk/createPdkAdminPlugin.ts +18 -0
  688. package/src/pdk/fillShipmentsQueryData.ts +44 -0
  689. package/src/pdk/index.ts +11 -0
  690. package/src/pdk/instance/createInstanceContext.ts +23 -0
  691. package/src/pdk/instance/createQueryClient.ts +31 -0
  692. package/src/pdk/instance/index.ts +3 -0
  693. package/src/pdk/instance/plugins/createContextPlugin.ts +17 -0
  694. package/src/pdk/instance/plugins/createLoggerPlugin.ts +13 -0
  695. package/src/pdk/instance/plugins/createRegisterComponentsPlugin.spec.ts +58 -0
  696. package/src/pdk/instance/plugins/createRegisterComponentsPlugin.ts +87 -0
  697. package/src/pdk/instance/plugins/createStorePlugin.ts +23 -0
  698. package/src/pdk/instance/plugins/createVueQueryPlugin.ts +48 -0
  699. package/src/pdk/instance/plugins/index.ts +6 -0
  700. package/src/pdk/instance/plugins/plugins.types.ts +4 -0
  701. package/src/pdk/renderMap.ts +27 -0
  702. package/src/pdk/sendBootEvent.ts +12 -0
  703. package/src/pdk/setupAdminApp.ts +20 -0
  704. package/src/pdk/testIdDirective.spec.ts +42 -0
  705. package/src/pdk/testIdDirective.ts +28 -0
  706. package/src/sdk/PdkFetchClient.ts +70 -0
  707. package/src/sdk/composables/api/index.ts +1 -0
  708. package/src/sdk/composables/api/useFetchCarrier.ts +23 -0
  709. package/src/sdk/composables/index.ts +3 -0
  710. package/src/sdk/composables/useMyParcelApi.ts +18 -0
  711. package/src/sdk/composables/usePdkAdminApi.ts +34 -0
  712. package/src/sdk/endpoints/abstractPdkEndpoint.ts +10 -0
  713. package/src/sdk/endpoints/index.ts +1 -0
  714. package/src/sdk/index.ts +3 -0
  715. package/src/services/actions/createAction.ts +24 -0
  716. package/src/services/actions/createActionContext.ts +49 -0
  717. package/src/services/actions/downloadFile.ts +16 -0
  718. package/src/services/actions/getActionIdentifier.ts +7 -0
  719. package/src/services/actions/index.ts +4 -0
  720. package/src/services/addErrorToNotifications.ts +35 -0
  721. package/src/services/context/getElementContext.ts +17 -0
  722. package/src/services/context/index.ts +1 -0
  723. package/src/services/createNotification.ts +35 -0
  724. package/src/services/index.ts +9 -0
  725. package/src/services/instantiateAction.ts +11 -0
  726. package/src/services/instantiateActions.ts +14 -0
  727. package/src/services/logger.spec.ts +70 -0
  728. package/src/services/logger.ts +118 -0
  729. package/src/services/mutations/getCallbackForMutationMode.ts +18 -0
  730. package/src/services/mutations/getModalMutationOptions.ts +24 -0
  731. package/src/services/mutations/index.ts +3 -0
  732. package/src/services/mutations/mutationMode.ts +4 -0
  733. package/src/services/print/index.ts +1 -0
  734. package/src/services/print/openPdfInNewWindow.ts +11 -0
  735. package/src/stores/createQueryCacheKey.ts +6 -0
  736. package/src/stores/index.ts +6 -0
  737. package/src/stores/types.ts +35 -0
  738. package/src/stores/useActionStore.ts +94 -0
  739. package/src/stores/useModalStore.ts +65 -0
  740. package/src/stores/useNotificationStore.ts +65 -0
  741. package/src/stores/useQueryStore.ts +184 -0
  742. package/src/symbols.ts +7 -0
  743. package/src/testing.ts +1 -0
  744. package/src/types/actions/actions.types.ts +42 -0
  745. package/src/types/actions/endpoints.types.ts +32 -0
  746. package/src/types/actions/index.ts +4 -0
  747. package/src/types/actions/parameters.types.ts +80 -0
  748. package/src/types/actions/response.types.ts +12 -0
  749. package/src/types/actions.types.ts +57 -0
  750. package/src/types/admin.types.ts +47 -0
  751. package/src/types/common.types.ts +66 -0
  752. package/src/types/components-form.types.ts +183 -0
  753. package/src/types/components.types.ts +349 -0
  754. package/src/types/configuration.types.ts +116 -0
  755. package/src/types/context.types.ts +25 -0
  756. package/src/types/endpoints.types.ts +17 -0
  757. package/src/types/form.types.ts +65 -0
  758. package/src/types/index.ts +12 -0
  759. package/src/types/language.types.ts +12 -0
  760. package/src/types/sdk.types.ts +213 -0
  761. package/src/utils/booleanToTriState.spec.ts +13 -0
  762. package/src/utils/booleanToTriState.ts +5 -0
  763. package/src/utils/convertDotNotationToObject.ts +15 -0
  764. package/src/utils/createAssetUrl.ts +9 -0
  765. package/src/utils/createClasses.ts +18 -0
  766. package/src/utils/createObjectWithKeys.ts +10 -0
  767. package/src/utils/decodeHtmlEntities.ts +11 -0
  768. package/src/utils/downloadBlob.ts +9 -0
  769. package/src/utils/downloadFileFromUrl.spec.ts +29 -0
  770. package/src/utils/downloadFileFromUrl.ts +5 -0
  771. package/src/utils/encodeArrayParameter.ts +6 -0
  772. package/src/utils/extendAdminInstance.ts +10 -0
  773. package/src/utils/fakeLinkClick.ts +17 -0
  774. package/src/utils/forms/createFormElement.ts +20 -0
  775. package/src/utils/forms/createShipmentFormName.ts +9 -0
  776. package/src/utils/forms/formToBody.ts +16 -0
  777. package/src/utils/forms/generateFieldId.ts +17 -0
  778. package/src/utils/forms/index.ts +4 -0
  779. package/src/utils/generateLabelFilename.spec.ts +24 -0
  780. package/src/utils/generateLabelFilename.ts +26 -0
  781. package/src/utils/getOrderId.ts +12 -0
  782. package/src/utils/getOrderShipmentIds.ts +12 -0
  783. package/src/utils/index.ts +23 -0
  784. package/src/utils/openUrlInNewTab.spec.ts +29 -0
  785. package/src/utils/openUrlInNewTab.ts +5 -0
  786. package/src/utils/prefixComponent.spec.ts +15 -0
  787. package/src/utils/prefixComponent.ts +10 -0
  788. package/src/utils/query/index.ts +3 -0
  789. package/src/utils/query/setQueryData.ts +8 -0
  790. package/src/utils/query/setQueryOrder.ts +26 -0
  791. package/src/utils/query/setQueryShipment.ts +8 -0
  792. package/src/utils/resolveCarrier.spec.ts +11 -0
  793. package/src/utils/resolveCarrier.ts +3 -0
  794. package/src/utils/translations/getDeliveryTypeTranslation.ts +5 -0
  795. package/src/utils/translations/getDynamicTranslation.ts +7 -0
  796. package/src/utils/translations/getPackageTypeTranslation.ts +5 -0
  797. package/src/utils/translations/index.ts +4 -0
  798. package/src/utils/translations/translateSelectOption.ts +15 -0
  799. package/src/utils/triStateToBoolean.spec.ts +13 -0
  800. package/src/utils/triStateToBoolean.ts +5 -0
  801. package/src/utils/unprefixComponent.spec.ts +13 -0
  802. package/src/utils/unprefixComponent.ts +6 -0
  803. package/src/utils/validateId.spec.ts +20 -0
  804. package/src/utils/validateId.ts +16 -0
  805. package/src/views/ChildProductSettings.vue +14 -0
  806. package/src/views/Modals.vue +22 -0
  807. package/src/views/Notifications.vue +9 -0
  808. package/src/views/OrderBox.vue +32 -0
  809. package/src/views/OrderListItem.vue +52 -0
  810. package/src/views/PluginSettings.vue +43 -0
  811. package/src/views/ProductSettings.vue +76 -0
  812. package/src/views/integrated/OrderBoxView.vue +20 -0
  813. package/src/views/integrated/OrderListItemView.vue +20 -0
  814. package/src/views/integrated/index.ts +13 -0
  815. package/src/vue-form-builder.d.ts +14 -0
  816. package/src/vue.shims.d.ts +11 -0
@@ -0,0 +1,2 @@
1
+ import { type PdkAppPlugin } from './plugins.types';
2
+ export declare const createContextPlugin: PdkAppPlugin;
@@ -0,0 +1,2 @@
1
+ import { type PdkAppPlugin } from './plugins.types';
2
+ export declare const createLoggerPlugin: PdkAppPlugin;
@@ -0,0 +1,5 @@
1
+ import { type PdkAppPlugin } from './plugins.types';
2
+ /**
3
+ * Registers all replaceable vue components. They must all be provided, for tree shaking purposes.
4
+ */
5
+ export declare const createRegisterComponentsPlugin: PdkAppPlugin;
@@ -0,0 +1,2 @@
1
+ import { type PdkAppPlugin } from './plugins.types';
2
+ export declare const createStorePlugin: PdkAppPlugin;
@@ -0,0 +1,5 @@
1
+ import { type PdkAppPlugin } from './plugins.types';
2
+ /**
3
+ * Instantiate vue query client if it does not exist yet and provide it to the app.
4
+ */
5
+ export declare const createVueQueryPlugin: PdkAppPlugin;
@@ -0,0 +1,6 @@
1
+ export * from './createContextPlugin';
2
+ export * from './createLoggerPlugin';
3
+ export * from './createRegisterComponentsPlugin';
4
+ export * from './createStorePlugin';
5
+ export * from './createVueQueryPlugin';
6
+ export * from './plugins.types';
@@ -0,0 +1,3 @@
1
+ import { type Plugin } from 'vue';
2
+ import { type AdminAppConfig } from '../../../types';
3
+ export type PdkAppPlugin = (appConfig: AdminAppConfig) => Plugin;
@@ -0,0 +1,3 @@
1
+ import { type Component } from 'vue';
2
+ import { AdminView } from '../data';
3
+ export declare const renderViewComponent: (componentName: AdminView) => Promise<Component>;
@@ -0,0 +1,3 @@
1
+ import { type AdminContextObject } from '../types';
2
+ import { type PdkAdmin } from './PdkAdmin';
3
+ export declare const sendBootEvent: (pdkAdmin: PdkAdmin, context: AdminContextObject) => void;
@@ -0,0 +1,3 @@
1
+ import { type App } from 'vue';
2
+ import { type AdminAppConfig } from '../types';
3
+ export declare const setupAdminApp: (app: App<Element>, appConfig: AdminAppConfig) => void;
@@ -0,0 +1,5 @@
1
+ import { type Directive } from 'vue';
2
+ import { type FieldInstance } from '@myparcel-dev/vue-form-builder';
3
+ type TestIdBinding = string | string[] | [string, FieldInstance];
4
+ export declare const testIdDirective: Directive<Element, TestIdBinding>;
5
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type AbstractEndpoint, type EndpointResponse, FetchClient, type Options } from '@myparcel-dev/sdk';
2
+ export declare class PdkFetchClient extends FetchClient {
3
+ /**
4
+ * Prepare and execute the final request and handle the response.
5
+ */
6
+ doRequest<E extends AbstractEndpoint>(endpoint: E, options: Options<E>): Promise<EndpointResponse<E>>;
7
+ /**
8
+ * If the url already contains a query string, append the parameters with an ampersand instead.
9
+ */
10
+ protected createUrl<E extends AbstractEndpoint>(endpoint: E, options: Options<E>): string;
11
+ }
@@ -0,0 +1 @@
1
+ export * from './useFetchCarrier';
@@ -0,0 +1,2 @@
1
+ import { type CarrierName } from '@myparcel-dev/constants';
2
+ export declare const useFetchCarrier: (carrier?: CarrierName) => import("@tanstack/vue-query").UseQueryReturnType<import("@myparcel-dev/sdk").Carrier, unknown>;
@@ -0,0 +1,3 @@
1
+ export * from './api';
2
+ export * from './useMyParcelApi';
3
+ export * from './usePdkAdminApi';
@@ -0,0 +1,5 @@
1
+ import { GetCarrier, GetCarriers, type MyParcelSdk } from '@myparcel-dev/sdk';
2
+ /**
3
+ * @returns {MyParcelSdk<GetCarrier | GetCarriers>}
4
+ */
5
+ export declare const useMyParcelApi: () => MyParcelSdk<GetCarrier | GetCarriers>;
@@ -0,0 +1,6 @@
1
+ import { type MyParcelSdk } from '@myparcel-dev/sdk';
2
+ import { AbstractPdkEndpoint } from '../endpoints';
3
+ /**
4
+ * Do requests to the PDK admin Api.
5
+ */
6
+ export declare const usePdkAdminApi: () => MyParcelSdk<AbstractPdkEndpoint>;
@@ -0,0 +1,7 @@
1
+ import { type BackendEndpoint, type ExtractEndpointDefinition } from '@myparcel-dev/pdk-common';
2
+ import { AbstractEndpoint } from '@myparcel-dev/sdk';
3
+ import { type BackendEndpointDefinition } from '../../types';
4
+ export declare abstract class AbstractPdkEndpoint<N extends BackendEndpoint = BackendEndpoint> extends AbstractEndpoint<ExtractEndpointDefinition<N, BackendEndpointDefinition>> {
5
+ readonly name: N | `${N}}`;
6
+ readonly path: string;
7
+ }
@@ -0,0 +1 @@
1
+ export * from './abstractPdkEndpoint';
@@ -0,0 +1,3 @@
1
+ export * from './PdkFetchClient';
2
+ export * from './composables';
3
+ export * from './endpoints';
@@ -0,0 +1,4 @@
1
+ import { type AnyActionDefinition, type ResolvedAction } from '../../types';
2
+ type CreateAction = (action: AnyActionDefinition) => ResolvedAction;
3
+ export declare const createAction: CreateAction;
4
+ export {};
@@ -0,0 +1,3 @@
1
+ import { type ActionParameters, type AdminInstance, type AnyActionDefinition, type MaybeAdminAction } from '../../types';
2
+ import { type ActionContext } from '../../actions';
3
+ export declare const createActionContext: <A extends MaybeAdminAction>(action: AnyActionDefinition<A>, parameters?: ActionParameters<A>, existingInstance?: AdminInstance) => ActionContext<A>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Try to get a file from an url. An error means the file is not ready yet. Retry until it is.
3
+ */
4
+ export declare function downloadFile(url: string, filename: string): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { type AnyActionDefinition } from '../../types';
2
+ export declare const getActionIdentifier: (action: AnyActionDefinition) => string;
@@ -0,0 +1,4 @@
1
+ export * from './createAction';
2
+ export * from './createActionContext';
3
+ export * from './downloadFile';
4
+ export * from './getActionIdentifier';
@@ -0,0 +1,2 @@
1
+ import { type NotificationCategory } from '../data';
2
+ export declare const addErrorToNotifications: (error: unknown, category: NotificationCategory, timeout?: boolean | number) => void;
@@ -0,0 +1,2 @@
1
+ import { type AdminContextObject } from '../../types';
2
+ export declare const getElementContext: (selector: string) => AdminContextObject;
@@ -0,0 +1 @@
1
+ export * from './getElementContext';
@@ -0,0 +1,5 @@
1
+ import { type Variant } from '@myparcel-dev/pdk-common';
2
+ import { type PdkNotification } from '../types';
3
+ export declare const createNotification: (variant: Variant, options?: Partial<PdkNotification> & {
4
+ identifier?: string;
5
+ }) => undefined | PdkNotification;
@@ -0,0 +1,9 @@
1
+ export * from './actions';
2
+ export * from './addErrorToNotifications';
3
+ export * from './context';
4
+ export * from './createNotification';
5
+ export * from './instantiateAction';
6
+ export * from './instantiateActions';
7
+ export * from './logger';
8
+ export * from './mutations';
9
+ export * from './print';
@@ -0,0 +1,2 @@
1
+ import { type ActionDefinition, type ActionParameters, type AnyActionDefinition, type MaybeAdminAction } from '../types';
2
+ export declare const instantiateAction: <A extends MaybeAdminAction>(action: AnyActionDefinition<A>, parameters?: ActionParameters<A>) => ActionDefinition<A>;
@@ -0,0 +1,8 @@
1
+ import { type ActionDefinition, type ActionParameters, type AnyActionDefinition } from '../types';
2
+ import { type AdminAction } from '../data';
3
+ type InstantiateActions = {
4
+ (action: AnyActionDefinition, parameters?: ActionParameters<AdminAction>): ActionDefinition[];
5
+ (actions: AnyActionDefinition[], parameters?: ActionParameters<AdminAction>): ActionDefinition[];
6
+ };
7
+ export declare const instantiateActions: InstantiateActions;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ export declare enum LogLevel {
2
+ Debug = 1,
3
+ Info = 2,
4
+ Warn = 3,
5
+ Error = 4,
6
+ Off = 5
7
+ }
8
+ export interface PdkLogger {
9
+ level: LogLevel;
10
+ scope: string | null;
11
+ debug(...messages: any[]): void;
12
+ error(...messages: any[]): void;
13
+ info(...messages: any[]): void;
14
+ log(level: LogLevel, ...messages: any[]): void;
15
+ setScope(scope: string | null): void;
16
+ warn(...messages: any[]): void;
17
+ }
18
+ export declare const globalLogger: PdkLogger;
19
+ export declare const createLogger: (scope?: string | null, logLevel?: LogLevel | null) => PdkLogger;
@@ -0,0 +1,4 @@
1
+ import { MutationMode } from './mutationMode';
2
+ type Callback = (() => void) | undefined;
3
+ export declare const getCallbackForMutationMode: (mode: MutationMode) => Callback;
4
+ export {};
@@ -0,0 +1,2 @@
1
+ import { type MutationOptions } from '@tanstack/vue-query';
2
+ export declare const getModalMutationOptions: <TData = unknown, TError = unknown, TVariables = void, TContext = unknown>() => MutationOptions<TData, TError, TVariables, TContext>;
@@ -0,0 +1,3 @@
1
+ export * from './getCallbackForMutationMode';
2
+ export * from './getModalMutationOptions';
3
+ export * from './mutationMode';
@@ -0,0 +1,4 @@
1
+ export declare enum MutationMode {
2
+ Modal = "modal",
3
+ Default = "default"
4
+ }
@@ -0,0 +1 @@
1
+ export * from './openPdfInNewWindow';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Opens a new window with the given base64 encoded pdf.
3
+ */
4
+ export declare const openPdfInNewWindow: (pdf: string) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { type BackendEndpoint } from '@myparcel-dev/pdk-common';
2
+ import { type PlainModifier } from '../actions';
3
+ export declare const createQueryCacheKey: <E extends BackendEndpoint>(endpoint: E, modifier?: PlainModifier) => string;
@@ -0,0 +1,6 @@
1
+ export * from './createQueryCacheKey';
2
+ export * from './types';
3
+ export * from './useActionStore';
4
+ export * from './useModalStore';
5
+ export * from './useNotificationStore';
6
+ export * from './useQueryStore';
@@ -0,0 +1,13 @@
1
+ import { type UseMutationReturnType, type UseQueryReturnType } from '@tanstack/vue-query';
2
+ import { type AdminContextKey, type BackendEndpoint } from '@myparcel-dev/pdk-common';
3
+ import { type ApiException } from '@myparcel-dev/sdk';
4
+ import { type ActionInput, type AdminContext, type BackendEndpointResponse, type BackendMutationEndpoints, type BackendQueryEndpoints } from '../types';
5
+ import { type QueryModifier } from '../actions';
6
+ type EndpointQuery<E extends BackendEndpoint> = E extends BackendMutationEndpoints ? UseMutationReturnType<BackendEndpointResponse<E>, ApiException, ActionInput<E>, unknown> : E extends BackendQueryEndpoints ? UseQueryReturnType<BackendEndpointResponse<E>, ApiException> : never;
7
+ export type ContextQuery<C extends AdminContextKey = AdminContextKey.Dynamic> = UseQueryReturnType<AdminContext<C>, ApiException>;
8
+ export type ResolvedQuery<E extends BackendEndpoint = BackendEndpoint> = E extends BackendEndpoint ? EndpointQuery<E> : never;
9
+ export type RegisterQuery = {
10
+ <E extends BackendEndpoint, Q extends ResolvedQuery<E> = ResolvedQuery<E>>(endpoint: E, query: Q, arg3?: never): Q;
11
+ <E extends BackendEndpoint, Q extends ResolvedQuery<E> = ResolvedQuery<E>>(endpoint: E, modifier: QueryModifier<E>, query: Q): Q;
12
+ };
13
+ export {};
@@ -0,0 +1,25 @@
1
+ import { type OneOrMore, type PromiseOr } from '@myparcel-dev/ts-utils';
2
+ import { type ActionParameters, type AnyActionDefinition, type ResolvedAction } from '../types';
3
+ import { type AdminAction } from '../data';
4
+ export declare const useActionStore: import("pinia").StoreDefinition<"actions", import("pinia")._UnwrapAll<Pick<{
5
+ get: (action: string | AdminAction) => ResolvedAction | undefined;
6
+ register: (action: OneOrMore<AnyActionDefinition>) => void;
7
+ dispatch: <A extends string>(action: A, parameters?: ActionParameters<A>) => PromiseOr<void>;
8
+ registerOrderActions: () => void;
9
+ registerModalActions: () => void;
10
+ registerWebhookActions: () => void;
11
+ }, never>>, Pick<{
12
+ get: (action: string | AdminAction) => ResolvedAction | undefined;
13
+ register: (action: OneOrMore<AnyActionDefinition>) => void;
14
+ dispatch: <A extends string>(action: A, parameters?: ActionParameters<A>) => PromiseOr<void>;
15
+ registerOrderActions: () => void;
16
+ registerModalActions: () => void;
17
+ registerWebhookActions: () => void;
18
+ }, never>, Pick<{
19
+ get: (action: string | AdminAction) => ResolvedAction | undefined;
20
+ register: (action: OneOrMore<AnyActionDefinition>) => void;
21
+ dispatch: <A extends string>(action: A, parameters?: ActionParameters<A>) => PromiseOr<void>;
22
+ registerOrderActions: () => void;
23
+ registerModalActions: () => void;
24
+ registerWebhookActions: () => void;
25
+ }, "get" | "register" | "dispatch" | "registerOrderActions" | "registerModalActions" | "registerWebhookActions">>;
@@ -0,0 +1,16 @@
1
+ import { type Ref, type UnwrapNestedRefs } from 'vue';
2
+ import { type AdminModalContext } from '../types';
3
+ import { type AdminModalKey } from '../data';
4
+ type ModalOpenFn = <K extends AdminModalKey>(modal: K, context?: AdminModalContext<K>) => void;
5
+ type ModalCloseFn = <K extends AdminModalKey>(modal: K) => void;
6
+ type ModalStore = {
7
+ loading: Ref<boolean>;
8
+ opened: Ref<AdminModalKey | null>;
9
+ context: Ref<UnwrapNestedRefs<AdminModalContext>>;
10
+ onOpen(callback: ModalOpenFn): void;
11
+ onClose(callback: ModalCloseFn): void;
12
+ open<K extends AdminModalKey>(modal: K, newContext?: AdminModalContext<K>): void;
13
+ close(): void;
14
+ };
15
+ export declare const useModalStore: import("pinia").StoreDefinition<"modal", import("pinia")._UnwrapAll<Pick<ModalStore, "context" | "loading" | "opened">>, Pick<ModalStore, never>, Pick<ModalStore, "open" | "close" | "onOpen" | "onClose">>;
16
+ export {};
@@ -0,0 +1,60 @@
1
+ import { type NotificationId, type PdkNotification } from '../types';
2
+ import { NotificationSource } from '../data';
3
+ export declare const useNotificationStore: import("pinia").StoreDefinition<"notifications", import("pinia")._UnwrapAll<Pick<{
4
+ notifications: import("vue").Ref<{
5
+ category?: import("../data").NotificationCategory | undefined;
6
+ content?: import("@myparcel-dev/ts-utils").OneOrMore<string> | undefined;
7
+ dismissible: boolean;
8
+ id: string | number;
9
+ tags?: Record<string, string> | undefined;
10
+ timeout: number | boolean;
11
+ title?: string | undefined;
12
+ variant: import("@myparcel-dev/pdk-common").Variant;
13
+ }[]>;
14
+ /**
15
+ * Add a notification to the store.
16
+ */
17
+ add(notification: PdkNotification, tags?: object | Record<string, string>): void;
18
+ /**
19
+ * Remove one or more notifications from the store by tag or id.
20
+ */
21
+ remove(input: NotificationId | NotificationSource): void;
22
+ }, "notifications">>, Pick<{
23
+ notifications: import("vue").Ref<{
24
+ category?: import("../data").NotificationCategory | undefined;
25
+ content?: import("@myparcel-dev/ts-utils").OneOrMore<string> | undefined;
26
+ dismissible: boolean;
27
+ id: string | number;
28
+ tags?: Record<string, string> | undefined;
29
+ timeout: number | boolean;
30
+ title?: string | undefined;
31
+ variant: import("@myparcel-dev/pdk-common").Variant;
32
+ }[]>;
33
+ /**
34
+ * Add a notification to the store.
35
+ */
36
+ add(notification: PdkNotification, tags?: object | Record<string, string>): void;
37
+ /**
38
+ * Remove one or more notifications from the store by tag or id.
39
+ */
40
+ remove(input: NotificationId | NotificationSource): void;
41
+ }, never>, Pick<{
42
+ notifications: import("vue").Ref<{
43
+ category?: import("../data").NotificationCategory | undefined;
44
+ content?: import("@myparcel-dev/ts-utils").OneOrMore<string> | undefined;
45
+ dismissible: boolean;
46
+ id: string | number;
47
+ tags?: Record<string, string> | undefined;
48
+ timeout: number | boolean;
49
+ title?: string | undefined;
50
+ variant: import("@myparcel-dev/pdk-common").Variant;
51
+ }[]>;
52
+ /**
53
+ * Add a notification to the store.
54
+ */
55
+ add(notification: PdkNotification, tags?: object | Record<string, string>): void;
56
+ /**
57
+ * Remove one or more notifications from the store by tag or id.
58
+ */
59
+ remove(input: NotificationId | NotificationSource): void;
60
+ }, "add" | "remove">>;
@@ -0,0 +1,77 @@
1
+ import { type ComputedRef } from 'vue';
2
+ import { type MaybeRef } from '@vueuse/core';
3
+ import { AdminContextKey, BackendEndpoint } from '@myparcel-dev/pdk-common';
4
+ import { type OneOrMore } from '@myparcel-dev/ts-utils';
5
+ import { MutationMode } from '../services';
6
+ import { type PlainModifier } from '../actions';
7
+ import { type RegisterQuery, type ResolvedQuery } from './types';
8
+ export declare const useQueryStore: import("pinia").StoreDefinition<"query", import("pinia")._UnwrapAll<Pick<{
9
+ get: <E extends BackendEndpoint>(endpoint: E, modifier?: PlainModifier) => ResolvedQuery<E>;
10
+ has: <E_1 extends BackendEndpoint>(endpoint: E_1, modifier?: PlainModifier) => boolean;
11
+ register: RegisterQuery;
12
+ registerShipmentQueries: (shipmentIds: MaybeRef<OneOrMore<number>>, orderIds?: MaybeRef<OneOrMore<string>>) => void;
13
+ /**
14
+ * Register queries needed to render any order related component.
15
+ */
16
+ registerOrderQueries: (orderId?: string | undefined, mode?: MutationMode) => void;
17
+ registerProductQueries: (productId?: string | undefined) => void;
18
+ /**
19
+ * Register context queries. Always includes global and dynamic context.
20
+ */
21
+ registerContextQueries: <C extends AdminContextKey.OrderData | AdminContextKey.PluginSettingsView | AdminContextKey.ProductData | AdminContextKey.ProductSettingsView | AdminContextKey.Instance>(...keys: C[]) => void;
22
+ getQueriesForShipment(id: number): ComputedRef<Record<BackendEndpoint, ResolvedQuery>>;
23
+ getQueriesForOrder(externalIdentifier: string): ComputedRef<Record<BackendEndpoint, ResolvedQuery>>;
24
+ registerWebhookQueries: () => {
25
+ fetchWebhooks: import("@tanstack/vue-query").UseQueryReturnType<import("..").WebhookDefinition[], import("@myparcel-dev/sdk").ApiException>;
26
+ createWebhooks: import("@tanstack/vue-query").UseMutationReturnType<any, any, any, any>;
27
+ deleteWebhooks: import("@tanstack/vue-query").UseMutationReturnType<import("..").WebhookDefinition[], import("@myparcel-dev/sdk").ApiException, {
28
+ hooks: OneOrMore<string>;
29
+ }, unknown>;
30
+ };
31
+ }, never>>, Pick<{
32
+ get: <E extends BackendEndpoint>(endpoint: E, modifier?: PlainModifier) => ResolvedQuery<E>;
33
+ has: <E_1 extends BackendEndpoint>(endpoint: E_1, modifier?: PlainModifier) => boolean;
34
+ register: RegisterQuery;
35
+ registerShipmentQueries: (shipmentIds: MaybeRef<OneOrMore<number>>, orderIds?: MaybeRef<OneOrMore<string>>) => void;
36
+ /**
37
+ * Register queries needed to render any order related component.
38
+ */
39
+ registerOrderQueries: (orderId?: string | undefined, mode?: MutationMode) => void;
40
+ registerProductQueries: (productId?: string | undefined) => void;
41
+ /**
42
+ * Register context queries. Always includes global and dynamic context.
43
+ */
44
+ registerContextQueries: <C extends AdminContextKey.OrderData | AdminContextKey.PluginSettingsView | AdminContextKey.ProductData | AdminContextKey.ProductSettingsView | AdminContextKey.Instance>(...keys: C[]) => void;
45
+ getQueriesForShipment(id: number): ComputedRef<Record<BackendEndpoint, ResolvedQuery>>;
46
+ getQueriesForOrder(externalIdentifier: string): ComputedRef<Record<BackendEndpoint, ResolvedQuery>>;
47
+ registerWebhookQueries: () => {
48
+ fetchWebhooks: import("@tanstack/vue-query").UseQueryReturnType<import("..").WebhookDefinition[], import("@myparcel-dev/sdk").ApiException>;
49
+ createWebhooks: import("@tanstack/vue-query").UseMutationReturnType<any, any, any, any>;
50
+ deleteWebhooks: import("@tanstack/vue-query").UseMutationReturnType<import("..").WebhookDefinition[], import("@myparcel-dev/sdk").ApiException, {
51
+ hooks: OneOrMore<string>;
52
+ }, unknown>;
53
+ };
54
+ }, never>, Pick<{
55
+ get: <E extends BackendEndpoint>(endpoint: E, modifier?: PlainModifier) => ResolvedQuery<E>;
56
+ has: <E_1 extends BackendEndpoint>(endpoint: E_1, modifier?: PlainModifier) => boolean;
57
+ register: RegisterQuery;
58
+ registerShipmentQueries: (shipmentIds: MaybeRef<OneOrMore<number>>, orderIds?: MaybeRef<OneOrMore<string>>) => void;
59
+ /**
60
+ * Register queries needed to render any order related component.
61
+ */
62
+ registerOrderQueries: (orderId?: string | undefined, mode?: MutationMode) => void;
63
+ registerProductQueries: (productId?: string | undefined) => void;
64
+ /**
65
+ * Register context queries. Always includes global and dynamic context.
66
+ */
67
+ registerContextQueries: <C extends AdminContextKey.OrderData | AdminContextKey.PluginSettingsView | AdminContextKey.ProductData | AdminContextKey.ProductSettingsView | AdminContextKey.Instance>(...keys: C[]) => void;
68
+ getQueriesForShipment(id: number): ComputedRef<Record<BackendEndpoint, ResolvedQuery>>;
69
+ getQueriesForOrder(externalIdentifier: string): ComputedRef<Record<BackendEndpoint, ResolvedQuery>>;
70
+ registerWebhookQueries: () => {
71
+ fetchWebhooks: import("@tanstack/vue-query").UseQueryReturnType<import("..").WebhookDefinition[], import("@myparcel-dev/sdk").ApiException>;
72
+ createWebhooks: import("@tanstack/vue-query").UseMutationReturnType<any, any, any, any>;
73
+ deleteWebhooks: import("@tanstack/vue-query").UseMutationReturnType<import("..").WebhookDefinition[], import("@myparcel-dev/sdk").ApiException, {
74
+ hooks: OneOrMore<string>;
75
+ }, unknown>;
76
+ };
77
+ }, "get" | "has" | "register" | "registerShipmentQueries" | "registerOrderQueries" | "registerProductQueries" | "registerContextQueries" | "getQueriesForShipment" | "getQueriesForOrder" | "registerWebhookQueries">>;
@@ -0,0 +1,5 @@
1
+ import { type InjectionKey } from 'vue';
2
+ import { type AdminInstance } from './types';
3
+ import { type PdkAdmin } from './pdk';
4
+ export declare const INJECT_ADMIN_INSTANCE: InjectionKey<AdminInstance>;
5
+ export declare const INJECT_GLOBAL_PDK_ADMIN: InjectionKey<PdkAdmin>;
@@ -0,0 +1 @@
1
+ export * from './__tests__';
@@ -0,0 +1,31 @@
1
+ import { type BackendEndpoint } from '@myparcel-dev/pdk-common';
2
+ import { type ReverseMap } from '@myparcel-dev/ts-utils';
3
+ import { type AdminAction } from '../../data';
4
+ export type MaybeAdminAction = AdminAction | undefined;
5
+ export type PrintAction = AdminAction.ShipmentsPrint | AdminAction.OrdersPrint;
6
+ export type OrderAction = AdminAction.OrdersEdit | AdminAction.OrdersExport | AdminAction.OrdersExportPrint | AdminAction.OrdersFetch | AdminAction.OrdersPrint | AdminAction.OrdersUpdate;
7
+ export interface AdminActionEndpointMap extends Record<AdminAction, BackendEndpoint> {
8
+ [AdminAction.AccountDelete]: BackendEndpoint.DeleteAccount;
9
+ [AdminAction.AccountUpdate]: BackendEndpoint.UpdateAccount;
10
+ [AdminAction.ContextFetch]: BackendEndpoint.FetchContext;
11
+ [AdminAction.DownloadLogs]: BackendEndpoint.DownloadLogs;
12
+ [AdminAction.SwitchToAcceptanceApi]: BackendEndpoint.SwitchToAcceptanceApi;
13
+ [AdminAction.SwitchToProductionApi]: BackendEndpoint.SwitchToProductionApi;
14
+ [AdminAction.OrdersEdit]: BackendEndpoint.UpdateOrders;
15
+ [AdminAction.OrdersExportPrint]: BackendEndpoint.ExportOrders;
16
+ [AdminAction.OrdersExport]: BackendEndpoint.ExportOrders;
17
+ [AdminAction.OrdersFetch]: BackendEndpoint.FetchOrders;
18
+ [AdminAction.OrdersPrint]: BackendEndpoint.PrintOrders;
19
+ [AdminAction.OrdersUpdate]: BackendEndpoint.UpdateOrders;
20
+ [AdminAction.PluginSettingsUpdate]: BackendEndpoint.UpdatePluginSettings;
21
+ [AdminAction.ProductSettingsUpdate]: BackendEndpoint.UpdateProductSettings;
22
+ [AdminAction.ShipmentsDelete]: BackendEndpoint.DeleteShipments;
23
+ [AdminAction.ShipmentsExportReturn]: BackendEndpoint.ExportReturn;
24
+ [AdminAction.ShipmentsFetch]: BackendEndpoint.FetchShipments;
25
+ [AdminAction.ShipmentsPrint]: BackendEndpoint.PrintShipments;
26
+ [AdminAction.ShipmentsUpdate]: BackendEndpoint.UpdateShipments;
27
+ [AdminAction.WebhooksCreate]: BackendEndpoint.CreateWebhooks;
28
+ [AdminAction.WebhooksDelete]: BackendEndpoint.DeleteWebhooks;
29
+ [AdminAction.WebhooksFetch]: BackendEndpoint.FetchWebhooks;
30
+ }
31
+ export type EndpointAdminActionMap = ReverseMap<AdminActionEndpointMap>;
@@ -0,0 +1,9 @@
1
+ import { type BackendEndpoint } from '@myparcel-dev/pdk-common';
2
+ /**
3
+ * All backend endpoints that are mutations.
4
+ */
5
+ export type BackendMutationEndpoints = BackendEndpoint.CreateWebhooks | BackendEndpoint.DownloadLogs | BackendEndpoint.SwitchToAcceptanceApi | BackendEndpoint.SwitchToProductionApi | BackendEndpoint.DeleteAccount | BackendEndpoint.DeleteShipments | BackendEndpoint.DeleteWebhooks | BackendEndpoint.ExportOrders | BackendEndpoint.ExportReturn | BackendEndpoint.PrintOrders | BackendEndpoint.PrintShipments | BackendEndpoint.UpdateAccount | BackendEndpoint.UpdateOrders | BackendEndpoint.UpdatePluginSettings | BackendEndpoint.UpdateProductSettings | BackendEndpoint.UpdateShipments;
6
+ /**
7
+ * All backend endpoints that are queries.
8
+ */
9
+ export type BackendQueryEndpoints = BackendEndpoint.FetchContext | BackendEndpoint.FetchOrders | BackendEndpoint.FetchProducts | BackendEndpoint.FetchShipments | BackendEndpoint.FetchWebhooks;
@@ -0,0 +1,4 @@
1
+ export * from './actions.types';
2
+ export * from './endpoints.types';
3
+ export * from './parameters.types';
4
+ export * from './response.types';
@@ -0,0 +1,55 @@
1
+ import { type AdminContextKey, type BackendEndpoint, type LabelFormat, type LabelOutput, type LabelPosition } from '@myparcel-dev/pdk-common';
2
+ import { type FormInstance } from '@myparcel-dev/vue-form-builder';
3
+ import { type OneOrMore } from '@myparcel-dev/ts-utils';
4
+ import { type OrderIds, type ShipmentIds } from '../common.types';
5
+ import { type AdminAction } from '../../data';
6
+ import { type AdminActionEndpointMap, type MaybeAdminAction } from './actions.types';
7
+ type LabelParameters = {
8
+ output?: LabelOutput;
9
+ format?: LabelFormat;
10
+ position?: OneOrMore<LabelPosition>;
11
+ };
12
+ type OrderIdParameters = {
13
+ orderIds?: OrderIds;
14
+ };
15
+ interface ShipmentIdParameters {
16
+ shipmentIds?: ShipmentIds;
17
+ }
18
+ type FormParameters = {
19
+ form: FormInstance;
20
+ };
21
+ type OptionalFormParameters = {
22
+ form?: false | FormInstance;
23
+ };
24
+ type ProductIdParameters = {
25
+ productIds?: OneOrMore<string>;
26
+ };
27
+ type HooksParameters = {
28
+ hooks: OneOrMore<string>;
29
+ };
30
+ type ContextParameters = {
31
+ context?: OneOrMore<AdminContextKey>;
32
+ };
33
+ export interface EndpointMutationInputMap extends Record<BackendEndpoint, object> {
34
+ [BackendEndpoint.FetchContext]: ContextParameters;
35
+ [BackendEndpoint.UpdateAccount]: OptionalFormParameters;
36
+ [BackendEndpoint.ExportOrders]: OrderIdParameters & OptionalFormParameters;
37
+ [BackendEndpoint.FetchOrders]: OrderIdParameters;
38
+ [BackendEndpoint.PrintOrders]: OrderIdParameters & LabelParameters & OptionalFormParameters;
39
+ [BackendEndpoint.UpdateOrders]: OrderIdParameters & FormParameters;
40
+ [BackendEndpoint.DeleteShipments]: OrderIdParameters & ShipmentIdParameters;
41
+ [BackendEndpoint.ExportReturn]: OrderIdParameters & ShipmentIdParameters;
42
+ [BackendEndpoint.FetchShipments]: OrderIdParameters & ShipmentIdParameters;
43
+ [BackendEndpoint.UpdateShipments]: OrderIdParameters & ShipmentIdParameters;
44
+ [BackendEndpoint.PrintShipments]: OrderIdParameters & ShipmentIdParameters & OptionalFormParameters & LabelParameters;
45
+ [BackendEndpoint.FetchProducts]: ProductIdParameters;
46
+ [BackendEndpoint.UpdatePluginSettings]: FormParameters;
47
+ [BackendEndpoint.UpdateProductSettings]: ProductIdParameters & FormParameters;
48
+ [BackendEndpoint.CreateWebhooks]: HooksParameters;
49
+ [BackendEndpoint.DeleteWebhooks]: HooksParameters;
50
+ [BackendEndpoint.FetchWebhooks]: never;
51
+ }
52
+ export type ActionInput<E extends BackendEndpoint> = EndpointMutationInputMap[E];
53
+ export type ActionParameters<A extends string | MaybeAdminAction> = A extends AdminAction ? ActionInput<AdminActionEndpointMap[A]> : object;
54
+ export type MaybeActionParameters<A extends MaybeAdminAction> = ActionParameters<A> | void;
55
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type BackendEndpoint, type PdkEndpointResponse } from '@myparcel-dev/pdk-common';
2
+ import { type BackendEndpointDefinition } from '../sdk.types';
3
+ import { type AdminAction } from '../../data';
4
+ import { type AdminActionEndpointMap, type MaybeAdminAction } from './actions.types';
5
+ export type BackendEndpointResponse<E extends BackendEndpoint> = PdkEndpointResponse<E, BackendEndpointDefinition>;
6
+ export type ActionResponse<A extends MaybeAdminAction> = A extends AdminAction ? BackendEndpointResponse<AdminActionEndpointMap[A]> : void;
7
+ export type MaybeActionResponse<A extends MaybeAdminAction> = ActionResponse<A> | void;