@picteus/extension-sdk 0.20.2 → 0.22.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 (278) hide show
  1. package/dist/generated/frontEndIntents.d.ts +147 -106
  2. package/dist/generated/frontEndIntents.js +22 -0
  3. package/dist/generated/viewKit.d.ts +103 -79
  4. package/dist/generated/viewKit.js +87 -54
  5. package/dist/picteus-ws-client/apis/AdministrationApi.d.ts +1 -1
  6. package/dist/picteus-ws-client/apis/AdministrationApi.js +1 -1
  7. package/dist/picteus-ws-client/apis/ApiSecretApi.d.ts +1 -1
  8. package/dist/picteus-ws-client/apis/ApiSecretApi.js +1 -1
  9. package/dist/picteus-ws-client/apis/CollectionApi.d.ts +1 -1
  10. package/dist/picteus-ws-client/apis/CollectionApi.js +1 -1
  11. package/dist/picteus-ws-client/apis/ExtensionApi.d.ts +78 -16
  12. package/dist/picteus-ws-client/apis/ExtensionApi.js +82 -9
  13. package/dist/picteus-ws-client/apis/ImageApi.d.ts +38 -5
  14. package/dist/picteus-ws-client/apis/ImageApi.js +53 -9
  15. package/dist/picteus-ws-client/apis/ImageAttachmentApi.d.ts +1 -1
  16. package/dist/picteus-ws-client/apis/ImageAttachmentApi.js +1 -1
  17. package/dist/picteus-ws-client/apis/MarketplaceApi.d.ts +140 -0
  18. package/dist/picteus-ws-client/apis/MarketplaceApi.js +155 -0
  19. package/dist/picteus-ws-client/apis/MiscellaneousApi.d.ts +1 -1
  20. package/dist/picteus-ws-client/apis/MiscellaneousApi.js +1 -1
  21. package/dist/picteus-ws-client/apis/RepositoryApi.d.ts +43 -47
  22. package/dist/picteus-ws-client/apis/RepositoryApi.js +52 -54
  23. package/dist/picteus-ws-client/apis/SettingsApi.d.ts +1 -1
  24. package/dist/picteus-ws-client/apis/SettingsApi.js +1 -1
  25. package/dist/picteus-ws-client/apis/index.d.ts +1 -0
  26. package/dist/picteus-ws-client/apis/index.js +1 -0
  27. package/dist/picteus-ws-client/models/AiModel.d.ts +8 -1
  28. package/dist/picteus-ws-client/models/AiModel.js +6 -1
  29. package/dist/picteus-ws-client/models/AiModelModality.d.ts +27 -0
  30. package/dist/picteus-ws-client/models/AiModelModality.js +45 -0
  31. package/dist/picteus-ws-client/models/ApiSecret.d.ts +1 -1
  32. package/dist/picteus-ws-client/models/ApiSecret.js +1 -1
  33. package/dist/picteus-ws-client/models/ApiSecretSummary.d.ts +1 -1
  34. package/dist/picteus-ws-client/models/ApiSecretSummary.js +1 -1
  35. package/dist/picteus-ws-client/models/ApiSecretType.d.ts +1 -1
  36. package/dist/picteus-ws-client/models/ApiSecretType.js +1 -1
  37. package/dist/picteus-ws-client/models/ApplicationConfiguration.d.ts +1 -1
  38. package/dist/picteus-ws-client/models/ApplicationConfiguration.js +1 -1
  39. package/dist/picteus-ws-client/models/ApplicationMetadata.d.ts +1 -1
  40. package/dist/picteus-ws-client/models/ApplicationMetadata.js +1 -1
  41. package/dist/picteus-ws-client/models/ApplicationMetadataItem.d.ts +1 -1
  42. package/dist/picteus-ws-client/models/ApplicationMetadataItem.js +1 -1
  43. package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.d.ts +1 -1
  44. package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.js +1 -1
  45. package/dist/picteus-ws-client/models/ApplicationSettings.d.ts +1 -1
  46. package/dist/picteus-ws-client/models/ApplicationSettings.js +1 -1
  47. package/dist/picteus-ws-client/models/CaptionInstruction.d.ts +7 -7
  48. package/dist/picteus-ws-client/models/CaptionInstruction.js +5 -5
  49. package/dist/picteus-ws-client/models/Collection.d.ts +1 -1
  50. package/dist/picteus-ws-client/models/Collection.js +1 -1
  51. package/dist/picteus-ws-client/models/CommandEntity.d.ts +1 -1
  52. package/dist/picteus-ws-client/models/CommandEntity.js +1 -1
  53. package/dist/picteus-ws-client/models/ComputedImageFormat.d.ts +1 -1
  54. package/dist/picteus-ws-client/models/ComputedImageFormat.js +1 -1
  55. package/dist/picteus-ws-client/models/ConfigurationCapability.d.ts +1 -1
  56. package/dist/picteus-ws-client/models/ConfigurationCapability.js +1 -1
  57. package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.d.ts +1 -1
  58. package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.js +1 -1
  59. package/dist/picteus-ws-client/models/ConstantsRegistry.d.ts +1 -1
  60. package/dist/picteus-ws-client/models/ConstantsRegistry.js +1 -1
  61. package/dist/picteus-ws-client/models/Dates.d.ts +1 -1
  62. package/dist/picteus-ws-client/models/Dates.js +1 -1
  63. package/dist/picteus-ws-client/models/EligibleTagsInstruction.d.ts +7 -7
  64. package/dist/picteus-ws-client/models/EligibleTagsInstruction.js +5 -5
  65. package/dist/picteus-ws-client/models/EmbeddingInstruction.d.ts +44 -0
  66. package/dist/picteus-ws-client/models/{ExtensionEligibleTags.js → EmbeddingInstruction.js} +12 -12
  67. package/dist/picteus-ws-client/models/Extension.d.ts +1 -1
  68. package/dist/picteus-ws-client/models/Extension.js +1 -1
  69. package/dist/picteus-ws-client/models/ExtensionActivity.d.ts +1 -1
  70. package/dist/picteus-ws-client/models/ExtensionActivity.js +1 -1
  71. package/dist/picteus-ws-client/models/ExtensionActivityState.d.ts +1 -1
  72. package/dist/picteus-ws-client/models/ExtensionActivityState.js +1 -1
  73. package/dist/picteus-ws-client/models/ExtensionAiModel.d.ts +8 -1
  74. package/dist/picteus-ws-client/models/ExtensionAiModel.js +6 -1
  75. package/dist/picteus-ws-client/models/ExtensionAndManual.d.ts +1 -1
  76. package/dist/picteus-ws-client/models/ExtensionAndManual.js +1 -1
  77. package/dist/picteus-ws-client/models/ExtensionCategory.d.ts +1 -1
  78. package/dist/picteus-ws-client/models/ExtensionCategory.js +1 -1
  79. package/dist/picteus-ws-client/models/ExtensionGenerationOptions.d.ts +1 -1
  80. package/dist/picteus-ws-client/models/ExtensionGenerationOptions.js +1 -1
  81. package/dist/picteus-ws-client/models/ExtensionIdImageEmbeddingName.d.ts +1 -1
  82. package/dist/picteus-ws-client/models/ExtensionIdImageEmbeddingName.js +1 -1
  83. package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.d.ts +1 -1
  84. package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.js +1 -1
  85. package/dist/picteus-ws-client/models/ExtensionImageFeature.d.ts +1 -1
  86. package/dist/picteus-ws-client/models/ExtensionImageFeature.js +1 -1
  87. package/dist/picteus-ws-client/models/ExtensionImageFeatureName.d.ts +1 -1
  88. package/dist/picteus-ws-client/models/ExtensionImageFeatureName.js +1 -1
  89. package/dist/picteus-ws-client/models/ExtensionImageFeaturesAttribute.d.ts +1 -1
  90. package/dist/picteus-ws-client/models/ExtensionImageFeaturesAttribute.js +1 -1
  91. package/dist/picteus-ws-client/models/ExtensionImageTag.d.ts +1 -1
  92. package/dist/picteus-ws-client/models/ExtensionImageTag.js +1 -1
  93. package/dist/picteus-ws-client/models/ExtensionImageTagsAttribute.d.ts +1 -1
  94. package/dist/picteus-ws-client/models/ExtensionImageTagsAttribute.js +1 -1
  95. package/dist/picteus-ws-client/models/ExtensionManual.d.ts +1 -1
  96. package/dist/picteus-ws-client/models/ExtensionManual.js +1 -1
  97. package/dist/picteus-ws-client/models/ExtensionSettings.d.ts +1 -1
  98. package/dist/picteus-ws-client/models/ExtensionSettings.js +1 -1
  99. package/dist/picteus-ws-client/models/ExtensionState.d.ts +1 -1
  100. package/dist/picteus-ws-client/models/ExtensionState.js +1 -1
  101. package/dist/picteus-ws-client/models/ExtensionsConfiguration.d.ts +1 -1
  102. package/dist/picteus-ws-client/models/ExtensionsConfiguration.js +1 -1
  103. package/dist/picteus-ws-client/models/GenerationRecipe.d.ts +1 -1
  104. package/dist/picteus-ws-client/models/GenerationRecipe.js +1 -1
  105. package/dist/picteus-ws-client/models/GenerationRecipePrompt.d.ts +1 -1
  106. package/dist/picteus-ws-client/models/GenerationRecipePrompt.js +1 -1
  107. package/dist/picteus-ws-client/models/GenerationRecipeVersion.d.ts +1 -1
  108. package/dist/picteus-ws-client/models/GenerationRecipeVersion.js +1 -1
  109. package/dist/picteus-ws-client/models/Image.d.ts +1 -1
  110. package/dist/picteus-ws-client/models/Image.js +1 -1
  111. package/dist/picteus-ws-client/models/ImageDimensions.d.ts +1 -1
  112. package/dist/picteus-ws-client/models/ImageDimensions.js +1 -1
  113. package/dist/picteus-ws-client/models/ImageDistance.d.ts +1 -1
  114. package/dist/picteus-ws-client/models/ImageDistance.js +1 -1
  115. package/dist/picteus-ws-client/models/ImageEmbedding.d.ts +4 -4
  116. package/dist/picteus-ws-client/models/ImageEmbedding.js +4 -4
  117. package/dist/picteus-ws-client/models/ImageFeature.d.ts +1 -1
  118. package/dist/picteus-ws-client/models/ImageFeature.js +1 -1
  119. package/dist/picteus-ws-client/models/ImageFeatureFormat.d.ts +1 -1
  120. package/dist/picteus-ws-client/models/ImageFeatureFormat.js +1 -1
  121. package/dist/picteus-ws-client/models/ImageFeatureNullValue.d.ts +1 -1
  122. package/dist/picteus-ws-client/models/ImageFeatureNullValue.js +1 -1
  123. package/dist/picteus-ws-client/models/ImageFeatureType.d.ts +1 -1
  124. package/dist/picteus-ws-client/models/ImageFeatureType.js +1 -1
  125. package/dist/picteus-ws-client/models/ImageFeatureValue.d.ts +1 -1
  126. package/dist/picteus-ws-client/models/ImageFeatureValue.js +1 -1
  127. package/dist/picteus-ws-client/models/ImageFormat.d.ts +1 -1
  128. package/dist/picteus-ws-client/models/ImageFormat.js +1 -1
  129. package/dist/picteus-ws-client/models/ImageMediaUrl.d.ts +1 -1
  130. package/dist/picteus-ws-client/models/ImageMediaUrl.js +1 -1
  131. package/dist/picteus-ws-client/models/ImageMetadata.d.ts +1 -1
  132. package/dist/picteus-ws-client/models/ImageMetadata.js +1 -1
  133. package/dist/picteus-ws-client/models/ImageResizeRender.d.ts +1 -1
  134. package/dist/picteus-ws-client/models/ImageResizeRender.js +1 -1
  135. package/dist/picteus-ws-client/models/ImageSummary.d.ts +1 -1
  136. package/dist/picteus-ws-client/models/ImageSummary.js +1 -1
  137. package/dist/picteus-ws-client/models/InstructionsPrompt.d.ts +1 -1
  138. package/dist/picteus-ws-client/models/InstructionsPrompt.js +1 -1
  139. package/dist/picteus-ws-client/models/Manifest.d.ts +7 -1
  140. package/dist/picteus-ws-client/models/Manifest.js +5 -1
  141. package/dist/picteus-ws-client/models/ManifestAndManual.d.ts +40 -0
  142. package/dist/picteus-ws-client/models/ManifestAndManual.js +47 -0
  143. package/dist/picteus-ws-client/models/ManifestCapability.d.ts +1 -1
  144. package/dist/picteus-ws-client/models/ManifestCapability.js +1 -1
  145. package/dist/picteus-ws-client/models/ManifestCapabilityCaptionsDetails.d.ts +1 -1
  146. package/dist/picteus-ws-client/models/ManifestCapabilityCaptionsDetails.js +1 -1
  147. package/dist/picteus-ws-client/models/ManifestCapabilityEligibleTagsDetails.d.ts +1 -1
  148. package/dist/picteus-ws-client/models/ManifestCapabilityEligibleTagsDetails.js +1 -1
  149. package/dist/picteus-ws-client/models/ManifestCapabilityId.d.ts +1 -1
  150. package/dist/picteus-ws-client/models/ManifestCapabilityId.js +1 -1
  151. package/dist/picteus-ws-client/models/ManifestEmbeddingsCapability.d.ts +33 -0
  152. package/dist/picteus-ws-client/models/ManifestEmbeddingsCapability.js +44 -0
  153. package/dist/picteus-ws-client/models/ManifestEvent.d.ts +2 -1
  154. package/dist/picteus-ws-client/models/ManifestEvent.js +2 -1
  155. package/dist/picteus-ws-client/models/ManifestExecution.d.ts +1 -1
  156. package/dist/picteus-ws-client/models/ManifestExecution.js +1 -1
  157. package/dist/picteus-ws-client/models/ManifestExtensionCommand.d.ts +1 -1
  158. package/dist/picteus-ws-client/models/ManifestExtensionCommand.js +1 -1
  159. package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.d.ts +1 -1
  160. package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.js +1 -1
  161. package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.d.ts +1 -1
  162. package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.js +1 -1
  163. package/dist/picteus-ws-client/models/ManifestExtensionCommandUi.d.ts +1 -1
  164. package/dist/picteus-ws-client/models/ManifestExtensionCommandUi.js +1 -1
  165. package/dist/picteus-ws-client/models/ManifestImageFeaturesCapability.d.ts +1 -1
  166. package/dist/picteus-ws-client/models/ManifestImageFeaturesCapability.js +1 -1
  167. package/dist/picteus-ws-client/models/ManifestImageTagsCapability.d.ts +1 -1
  168. package/dist/picteus-ws-client/models/ManifestImageTagsCapability.js +1 -1
  169. package/dist/picteus-ws-client/models/ManifestInstructions.d.ts +1 -1
  170. package/dist/picteus-ws-client/models/ManifestInstructions.js +1 -1
  171. package/dist/picteus-ws-client/models/ManifestInstructionsCapabilitiesInner.d.ts +4 -4
  172. package/dist/picteus-ws-client/models/ManifestInstructionsCapabilitiesInner.js +6 -6
  173. package/dist/picteus-ws-client/models/ManifestInterfaceElement.d.ts +1 -1
  174. package/dist/picteus-ws-client/models/ManifestInterfaceElement.js +1 -1
  175. package/dist/picteus-ws-client/models/ManifestInterfaceElementIntegration.d.ts +1 -1
  176. package/dist/picteus-ws-client/models/ManifestInterfaceElementIntegration.js +1 -1
  177. package/dist/picteus-ws-client/models/ManifestRuntime.d.ts +1 -1
  178. package/dist/picteus-ws-client/models/ManifestRuntime.js +1 -1
  179. package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.d.ts +1 -1
  180. package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.js +1 -1
  181. package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.d.ts +1 -1
  182. package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.js +1 -1
  183. package/dist/picteus-ws-client/models/ManifestUserInterface.d.ts +1 -1
  184. package/dist/picteus-ws-client/models/ManifestUserInterface.js +1 -1
  185. package/dist/picteus-ws-client/models/MarketplaceExtension.d.ts +39 -0
  186. package/dist/picteus-ws-client/models/MarketplaceExtension.js +46 -0
  187. package/dist/picteus-ws-client/models/MarketplaceExtensionDetails.d.ts +46 -0
  188. package/dist/picteus-ws-client/models/MarketplaceExtensionDetails.js +49 -0
  189. package/dist/picteus-ws-client/models/PromptKind.d.ts +1 -1
  190. package/dist/picteus-ws-client/models/PromptKind.js +1 -1
  191. package/dist/picteus-ws-client/models/Repository.d.ts +20 -7
  192. package/dist/picteus-ws-client/models/Repository.js +12 -3
  193. package/dist/picteus-ws-client/models/RepositoryActivity.d.ts +1 -1
  194. package/dist/picteus-ws-client/models/RepositoryActivity.js +1 -1
  195. package/dist/picteus-ws-client/models/RepositoryActivityKind.d.ts +1 -1
  196. package/dist/picteus-ws-client/models/RepositoryActivityKind.js +1 -1
  197. package/dist/picteus-ws-client/models/RepositoryLocationType.d.ts +1 -1
  198. package/dist/picteus-ws-client/models/RepositoryLocationType.js +1 -1
  199. package/dist/picteus-ws-client/models/RepositoryMode.d.ts +26 -0
  200. package/dist/picteus-ws-client/models/RepositoryMode.js +44 -0
  201. package/dist/picteus-ws-client/models/RepositoryState.d.ts +4 -5
  202. package/dist/picteus-ws-client/models/RepositoryState.js +4 -5
  203. package/dist/picteus-ws-client/models/RunCommandParameters.d.ts +1 -1
  204. package/dist/picteus-ws-client/models/RunCommandParameters.js +1 -1
  205. package/dist/picteus-ws-client/models/SearchCriteria.d.ts +1 -1
  206. package/dist/picteus-ws-client/models/SearchCriteria.js +1 -1
  207. package/dist/picteus-ws-client/models/SearchFeatureComparisonOperator.d.ts +1 -1
  208. package/dist/picteus-ws-client/models/SearchFeatureComparisonOperator.js +1 -1
  209. package/dist/picteus-ws-client/models/SearchFeatureCondition.d.ts +1 -1
  210. package/dist/picteus-ws-client/models/SearchFeatureCondition.js +1 -1
  211. package/dist/picteus-ws-client/models/SearchFeatureConditionValue.d.ts +1 -1
  212. package/dist/picteus-ws-client/models/SearchFeatureConditionValue.js +1 -1
  213. package/dist/picteus-ws-client/models/SearchFeatureLogicalOperator.d.ts +1 -1
  214. package/dist/picteus-ws-client/models/SearchFeatureLogicalOperator.js +1 -1
  215. package/dist/picteus-ws-client/models/SearchFeatures.d.ts +1 -1
  216. package/dist/picteus-ws-client/models/SearchFeatures.js +1 -1
  217. package/dist/picteus-ws-client/models/SearchFeaturesResult.d.ts +1 -1
  218. package/dist/picteus-ws-client/models/SearchFeaturesResult.js +1 -1
  219. package/dist/picteus-ws-client/models/SearchFilter.d.ts +1 -1
  220. package/dist/picteus-ws-client/models/SearchFilter.js +1 -1
  221. package/dist/picteus-ws-client/models/SearchFilterOrigin.d.ts +1 -1
  222. package/dist/picteus-ws-client/models/SearchFilterOrigin.js +1 -1
  223. package/dist/picteus-ws-client/models/SearchImageIdResult.d.ts +1 -1
  224. package/dist/picteus-ws-client/models/SearchImageIdResult.js +1 -1
  225. package/dist/picteus-ws-client/models/SearchImageResult.d.ts +1 -1
  226. package/dist/picteus-ws-client/models/SearchImageResult.js +1 -1
  227. package/dist/picteus-ws-client/models/SearchImageSummaryResult.d.ts +1 -1
  228. package/dist/picteus-ws-client/models/SearchImageSummaryResult.js +1 -1
  229. package/dist/picteus-ws-client/models/SearchImagesOrigin.d.ts +1 -1
  230. package/dist/picteus-ws-client/models/SearchImagesOrigin.js +1 -1
  231. package/dist/picteus-ws-client/models/SearchKeyword.d.ts +1 -1
  232. package/dist/picteus-ws-client/models/SearchKeyword.js +1 -1
  233. package/dist/picteus-ws-client/models/SearchMediaUrlResult.d.ts +1 -1
  234. package/dist/picteus-ws-client/models/SearchMediaUrlResult.js +1 -1
  235. package/dist/picteus-ws-client/models/SearchOriginNature.d.ts +1 -1
  236. package/dist/picteus-ws-client/models/SearchOriginNature.js +1 -1
  237. package/dist/picteus-ws-client/models/SearchParameters.d.ts +1 -1
  238. package/dist/picteus-ws-client/models/SearchParameters.js +1 -1
  239. package/dist/picteus-ws-client/models/SearchProperties.d.ts +1 -1
  240. package/dist/picteus-ws-client/models/SearchProperties.js +1 -1
  241. package/dist/picteus-ws-client/models/SearchPropertyRange.d.ts +1 -1
  242. package/dist/picteus-ws-client/models/SearchPropertyRange.js +1 -1
  243. package/dist/picteus-ws-client/models/SearchRange.d.ts +1 -1
  244. package/dist/picteus-ws-client/models/SearchRange.js +1 -1
  245. package/dist/picteus-ws-client/models/SearchRepositoriesOrigin.d.ts +1 -1
  246. package/dist/picteus-ws-client/models/SearchRepositoriesOrigin.js +1 -1
  247. package/dist/picteus-ws-client/models/SearchSorting.d.ts +1 -1
  248. package/dist/picteus-ws-client/models/SearchSorting.js +1 -1
  249. package/dist/picteus-ws-client/models/SearchSortingProperty.d.ts +1 -1
  250. package/dist/picteus-ws-client/models/SearchSortingProperty.js +1 -1
  251. package/dist/picteus-ws-client/models/SearchTags.d.ts +1 -1
  252. package/dist/picteus-ws-client/models/SearchTags.js +1 -1
  253. package/dist/picteus-ws-client/models/SearchTagsResult.d.ts +1 -1
  254. package/dist/picteus-ws-client/models/SearchTagsResult.js +1 -1
  255. package/dist/picteus-ws-client/models/Software.d.ts +1 -1
  256. package/dist/picteus-ws-client/models/Software.js +1 -1
  257. package/dist/picteus-ws-client/models/TagsPlaceholder.d.ts +1 -1
  258. package/dist/picteus-ws-client/models/TagsPlaceholder.js +1 -1
  259. package/dist/picteus-ws-client/models/TextualPrompt.d.ts +1 -1
  260. package/dist/picteus-ws-client/models/TextualPrompt.js +1 -1
  261. package/dist/picteus-ws-client/models/UserInterfaceAnchor.d.ts +1 -1
  262. package/dist/picteus-ws-client/models/UserInterfaceAnchor.js +1 -1
  263. package/dist/picteus-ws-client/models/UserInterfaceSidebarIntegration.d.ts +1 -1
  264. package/dist/picteus-ws-client/models/UserInterfaceSidebarIntegration.js +1 -1
  265. package/dist/picteus-ws-client/models/UserInterfaceWindowIntegration.d.ts +1 -1
  266. package/dist/picteus-ws-client/models/UserInterfaceWindowIntegration.js +1 -1
  267. package/dist/picteus-ws-client/models/index.d.ts +6 -0
  268. package/dist/picteus-ws-client/models/index.js +6 -0
  269. package/dist/picteus-ws-client/runtime.d.ts +1 -1
  270. package/dist/picteus-ws-client/runtime.js +2 -2
  271. package/dist/picteusExtension.d.ts +7 -2
  272. package/dist/picteusExtension.js +13 -4
  273. package/package.json +1 -1
  274. package/dist/generated/intentValidator.d.ts +0 -49
  275. package/dist/generated/intentValidator.js +0 -363
  276. package/dist/picteus-ws-client/models/ExtensionCaption.d.ts +0 -44
  277. package/dist/picteus-ws-client/models/ExtensionCaption.js +0 -51
  278. package/dist/picteus-ws-client/models/ExtensionEligibleTags.d.ts +0 -44
@@ -1,363 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // Auto-generated by @picteus/specification-factory. Do not edit directly.
3
- // ---------------------------------------------------------------------------
4
- import { INTENT_SCHEMA_DESCRIPTION } from "./frontEndIntents.js";
5
- function isValidUrl(candidate) {
6
- try {
7
- new URL(candidate);
8
- return true;
9
- }
10
- catch {
11
- return false;
12
- }
13
- }
14
- function isByteBuffer(candidate) {
15
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(candidate)) {
16
- return true;
17
- }
18
- return candidate instanceof Uint8Array;
19
- }
20
- function collectModelProperties(modelName, schema) {
21
- const model = schema.models[modelName];
22
- if (!model) {
23
- return [];
24
- }
25
- const properties = [];
26
- if (model.baseModelName) {
27
- properties.push(...collectModelProperties(model.baseModelName, schema));
28
- }
29
- properties.push(...model.properties);
30
- return properties;
31
- }
32
- function validateValue(value, type, schema, path, propertyConstraints) {
33
- switch (type.kind) {
34
- case "string":
35
- {
36
- if (typeof value !== "string") {
37
- return [
38
- {
39
- path,
40
- message: `Expected string, received ${typeof value}`
41
- }
42
- ];
43
- }
44
- if (propertyConstraints?.format === "url" && isValidUrl(value) === false) {
45
- return [
46
- {
47
- path,
48
- message: `Invalid url: "${value}"`
49
- }
50
- ];
51
- }
52
- if (propertyConstraints?.minLength !== undefined && value.length < propertyConstraints.minLength) {
53
- return [
54
- {
55
- path,
56
- message: `String must contain at least ${propertyConstraints.minLength} character(s)`
57
- }
58
- ];
59
- }
60
- if (propertyConstraints?.maxLength !== undefined && value.length > propertyConstraints.maxLength) {
61
- return [
62
- {
63
- path,
64
- message: `String must contain at most ${propertyConstraints.maxLength} character(s)`
65
- }
66
- ];
67
- }
68
- if (propertyConstraints?.pattern !== undefined) {
69
- const regularExpression = new RegExp(propertyConstraints.pattern);
70
- if (regularExpression.test(value) === false) {
71
- return [
72
- {
73
- path,
74
- message: `String does not match required pattern "${propertyConstraints.pattern}"`
75
- }
76
- ];
77
- }
78
- }
79
- return [];
80
- }
81
- case "number":
82
- {
83
- if (typeof value !== "number" || Number.isNaN(value) === true) {
84
- return [
85
- {
86
- path,
87
- message: `Expected number, received ${typeof value}`
88
- }
89
- ];
90
- }
91
- if ((type.name === "int32" || type.name === "integer" || type.name === "int64") && Number.isInteger(value) === false) {
92
- return [
93
- {
94
- path,
95
- message: `Expected integer for ${type.name}, received float ${value}`
96
- }
97
- ];
98
- }
99
- if (propertyConstraints?.minValue !== undefined && value < propertyConstraints.minValue) {
100
- return [
101
- {
102
- path,
103
- message: `Number must be greater than or equal to ${propertyConstraints.minValue}`
104
- }
105
- ];
106
- }
107
- if (propertyConstraints?.maxValue !== undefined && value > propertyConstraints.maxValue) {
108
- return [
109
- {
110
- path,
111
- message: `Number must be less than or equal to ${propertyConstraints.maxValue}`
112
- }
113
- ];
114
- }
115
- return [];
116
- }
117
- case "boolean":
118
- {
119
- if (typeof value !== "boolean") {
120
- return [
121
- {
122
- path,
123
- message: `Expected boolean, received ${typeof value}`
124
- }
125
- ];
126
- }
127
- return [];
128
- }
129
- case "bytes":
130
- {
131
- if (isByteBuffer(value) === false) {
132
- return [
133
- {
134
- path,
135
- message: `Expected Buffer or Uint8Array, received ${typeof value}`
136
- }
137
- ];
138
- }
139
- return [];
140
- }
141
- case "literal":
142
- {
143
- if (value !== type.literalValue) {
144
- return [
145
- {
146
- path,
147
- message: `Expected literal ${JSON.stringify(type.literalValue)}, received ${JSON.stringify(value)}`
148
- }
149
- ];
150
- }
151
- return [];
152
- }
153
- case "enum":
154
- {
155
- const allowedMembers = schema.enums[type.name];
156
- if (!allowedMembers) {
157
- return [
158
- {
159
- path,
160
- message: `Unknown enum "${type.name}" in schema`
161
- }
162
- ];
163
- }
164
- if (typeof value !== "string" || allowedMembers.includes(value) === false) {
165
- return [
166
- {
167
- path,
168
- message: `Invalid value ${JSON.stringify(value)} for enum ${type.name}. Expected one of: ${allowedMembers.map((member) => JSON.stringify(member)).join(", ")}`
169
- }
170
- ];
171
- }
172
- return [];
173
- }
174
- case "record":
175
- {
176
- if (typeof value !== "object" || value === null || Array.isArray(value) === true) {
177
- return [
178
- {
179
- path,
180
- message: `Expected object, received ${value === null ? "null" : Array.isArray(value) ? "array" : typeof value}`
181
- }
182
- ];
183
- }
184
- return [];
185
- }
186
- case "array":
187
- {
188
- if (Array.isArray(value) === false) {
189
- return [
190
- {
191
- path,
192
- message: `Expected array, received ${typeof value}`
193
- }
194
- ];
195
- }
196
- if (propertyConstraints?.minItems !== undefined && value.length < propertyConstraints.minItems) {
197
- return [
198
- {
199
- path,
200
- message: `Array must contain at least ${propertyConstraints.minItems} item(s)`
201
- }
202
- ];
203
- }
204
- if (propertyConstraints?.maxItems !== undefined && value.length > propertyConstraints.maxItems) {
205
- return [
206
- {
207
- path,
208
- message: `Array must contain at most ${propertyConstraints.maxItems} item(s)`
209
- }
210
- ];
211
- }
212
- if (type.elementType) {
213
- const collectedIssues = [];
214
- for (let itemIndex = 0; itemIndex < value.length; itemIndex++) {
215
- const itemPath = `${path}[${itemIndex}]`;
216
- const itemIssues = validateValue(value[itemIndex], type.elementType, schema, itemPath);
217
- collectedIssues.push(...itemIssues);
218
- }
219
- return collectedIssues;
220
- }
221
- return [];
222
- }
223
- case "union":
224
- {
225
- const variantTypes = type.unionTypes ?? [];
226
- let bestCandidateIssues = [];
227
- let hasMatchedVariant = false;
228
- for (const variant of variantTypes) {
229
- const variantIssues = validateValue(value, variant, schema, path);
230
- if (variantIssues.length === 0) {
231
- hasMatchedVariant = true;
232
- break;
233
- }
234
- if (bestCandidateIssues.length === 0 || variantIssues.length < bestCandidateIssues.length) {
235
- bestCandidateIssues = variantIssues;
236
- }
237
- }
238
- if (hasMatchedVariant === false) {
239
- const failureDetail = bestCandidateIssues[0]?.message ?? "no variant matched";
240
- return [
241
- {
242
- path,
243
- message: `Value does not match any union variant for "${type.name}". Reason: ${failureDetail}`
244
- }
245
- ];
246
- }
247
- return [];
248
- }
249
- case "model":
250
- {
251
- if (schema.unions[type.name]) {
252
- const namedUnionVariants = schema.unions[type.name];
253
- return validateValue(value, {
254
- kind: "union",
255
- name: type.name,
256
- unionTypes: namedUnionVariants
257
- }, schema, path);
258
- }
259
- const model = schema.models[type.name];
260
- if (!model) {
261
- return [
262
- {
263
- path,
264
- message: `Unknown model "${type.name}" in schema`
265
- }
266
- ];
267
- }
268
- if (typeof value !== "object" || value === null || Array.isArray(value) === true) {
269
- return [
270
- {
271
- path,
272
- message: `Expected object for model "${type.name}", received ${value === null ? "null" : Array.isArray(value) ? "array" : typeof value}`
273
- }
274
- ];
275
- }
276
- const recordValue = value;
277
- const allProperties = collectModelProperties(type.name, schema);
278
- const modelIssues = [];
279
- for (const property of allProperties) {
280
- const propertyPath = path.length > 0 ? `${path}.${property.name}` : property.name;
281
- const propertyValue = recordValue[property.name];
282
- if (propertyValue === undefined) {
283
- if (property.optional === false) {
284
- modelIssues.push({
285
- path: propertyPath,
286
- message: `Missing required property "${property.name}"`
287
- });
288
- }
289
- continue;
290
- }
291
- const propertyIssues = validateValue(propertyValue, property.type, schema, propertyPath, property);
292
- modelIssues.push(...propertyIssues);
293
- }
294
- return modelIssues;
295
- }
296
- }
297
- }
298
- function createValidationSuccess(data) {
299
- return {
300
- success: true,
301
- data
302
- };
303
- }
304
- function createValidationFailure(issues) {
305
- const firstIssueMessage = issues[0]?.message ?? "Validation failed";
306
- return {
307
- success: false,
308
- error: {
309
- message: firstIssueMessage,
310
- issues
311
- },
312
- issues
313
- };
314
- }
315
- export function validateModel(value, modelName, schema = INTENT_SCHEMA_DESCRIPTION) {
316
- const issues = validateValue(value, { kind: "model", name: modelName }, schema, "");
317
- if (issues.length === 0) {
318
- return createValidationSuccess(value);
319
- }
320
- return createValidationFailure(issues);
321
- }
322
- export function validateIntent(value, schema = INTENT_SCHEMA_DESCRIPTION) {
323
- if (typeof value !== "object" || value === null || Array.isArray(value) === true) {
324
- return createValidationFailure([
325
- {
326
- path: "",
327
- message: `Expected intent object, received ${value === null ? "null" : Array.isArray(value) ? "array" : typeof value}`
328
- }
329
- ]);
330
- }
331
- const recordValue = value;
332
- const candidateIntentNames = schema.intents.filter((candidateName) => {
333
- const model = schema.models[candidateName];
334
- if (!model) {
335
- return false;
336
- }
337
- return model.properties.some((property) => property.optional === false && property.name in recordValue);
338
- });
339
- if (candidateIntentNames.length === 0) {
340
- return createValidationFailure([
341
- {
342
- path: "",
343
- message: "Object does not match any recognized intent structure"
344
- }
345
- ]);
346
- }
347
- let bestFailureResult = null;
348
- for (const candidateName of candidateIntentNames) {
349
- const candidateResult = validateModel(value, candidateName, schema);
350
- if (candidateResult.success === true) {
351
- return candidateResult;
352
- }
353
- if (bestFailureResult === null || candidateResult.issues.length < bestFailureResult.issues.length) {
354
- bestFailureResult = candidateResult;
355
- }
356
- }
357
- return bestFailureResult ?? createValidationFailure([
358
- {
359
- path: "",
360
- message: "Intent validation failed"
361
- }
362
- ]);
363
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Picteus
3
- * The Picteus API
4
- *
5
- * The version of the OpenAPI document: 0.23.0
6
- * Contact: edouard@koppasoft.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- * A caption computation entry declared for an AI model
14
- * @export
15
- * @interface ExtensionCaption
16
- */
17
- export interface ExtensionCaption {
18
- /**
19
- * The technical identifier of the AI model to use
20
- * @type {string}
21
- * @memberof ExtensionCaption
22
- */
23
- aiModelTechnicalId: string;
24
- /**
25
- * The question submitted to the AI model to produce the caption
26
- * @type {string}
27
- * @memberof ExtensionCaption
28
- */
29
- question: string;
30
- /**
31
- * Whether this caption entry is active
32
- * @type {boolean}
33
- * @memberof ExtensionCaption
34
- */
35
- enabled: boolean;
36
- }
37
- /**
38
- * Check if a given object implements the ExtensionCaption interface.
39
- */
40
- export declare function instanceOfExtensionCaption(value: object): value is ExtensionCaption;
41
- export declare function ExtensionCaptionFromJSON(json: any): ExtensionCaption;
42
- export declare function ExtensionCaptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtensionCaption;
43
- export declare function ExtensionCaptionToJSON(json: any): ExtensionCaption;
44
- export declare function ExtensionCaptionToJSONTyped(value?: ExtensionCaption | null, ignoreDiscriminator?: boolean): any;
@@ -1,51 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Picteus
5
- * The Picteus API
6
- *
7
- * The version of the OpenAPI document: 0.23.0
8
- * Contact: edouard@koppasoft.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- /**
15
- * Check if a given object implements the ExtensionCaption interface.
16
- */
17
- export function instanceOfExtensionCaption(value) {
18
- if (!('aiModelTechnicalId' in value) || value['aiModelTechnicalId'] === undefined)
19
- return false;
20
- if (!('question' in value) || value['question'] === undefined)
21
- return false;
22
- if (!('enabled' in value) || value['enabled'] === undefined)
23
- return false;
24
- return true;
25
- }
26
- export function ExtensionCaptionFromJSON(json) {
27
- return ExtensionCaptionFromJSONTyped(json, false);
28
- }
29
- export function ExtensionCaptionFromJSONTyped(json, ignoreDiscriminator) {
30
- if (json == null) {
31
- return json;
32
- }
33
- return {
34
- 'aiModelTechnicalId': json['aiModelTechnicalId'],
35
- 'question': json['question'],
36
- 'enabled': json['enabled'],
37
- };
38
- }
39
- export function ExtensionCaptionToJSON(json) {
40
- return ExtensionCaptionToJSONTyped(json, false);
41
- }
42
- export function ExtensionCaptionToJSONTyped(value, ignoreDiscriminator = false) {
43
- if (value == null) {
44
- return value;
45
- }
46
- return {
47
- 'aiModelTechnicalId': value['aiModelTechnicalId'],
48
- 'question': value['question'],
49
- 'enabled': value['enabled'],
50
- };
51
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Picteus
3
- * The Picteus API
4
- *
5
- * The version of the OpenAPI document: 0.23.0
6
- * Contact: edouard@koppasoft.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- * An eligible tags computation entry declared for an AI model
14
- * @export
15
- * @interface ExtensionEligibleTags
16
- */
17
- export interface ExtensionEligibleTags {
18
- /**
19
- * The technical identifier of the AI model to use
20
- * @type {string}
21
- * @memberof ExtensionEligibleTags
22
- */
23
- aiModelTechnicalId: string;
24
- /**
25
- * The candidate tags the AI model picks from
26
- * @type {Array<string>}
27
- * @memberof ExtensionEligibleTags
28
- */
29
- tags: Array<string>;
30
- /**
31
- * Whether this eligible tags entry is active
32
- * @type {boolean}
33
- * @memberof ExtensionEligibleTags
34
- */
35
- enabled: boolean;
36
- }
37
- /**
38
- * Check if a given object implements the ExtensionEligibleTags interface.
39
- */
40
- export declare function instanceOfExtensionEligibleTags(value: object): value is ExtensionEligibleTags;
41
- export declare function ExtensionEligibleTagsFromJSON(json: any): ExtensionEligibleTags;
42
- export declare function ExtensionEligibleTagsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtensionEligibleTags;
43
- export declare function ExtensionEligibleTagsToJSON(json: any): ExtensionEligibleTags;
44
- export declare function ExtensionEligibleTagsToJSONTyped(value?: ExtensionEligibleTags | null, ignoreDiscriminator?: boolean): any;