@picteus/extension-sdk 0.5.3 → 0.6.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 (173) hide show
  1. package/dist/picteus-ws-client/apis/AdministrationApi.d.ts +1 -1
  2. package/dist/picteus-ws-client/apis/AdministrationApi.js +1 -1
  3. package/dist/picteus-ws-client/apis/ApiSecretApi.d.ts +1 -1
  4. package/dist/picteus-ws-client/apis/ApiSecretApi.js +1 -1
  5. package/dist/picteus-ws-client/apis/ExtensionApi.d.ts +1 -1
  6. package/dist/picteus-ws-client/apis/ExtensionApi.js +1 -1
  7. package/dist/picteus-ws-client/apis/ImageApi.d.ts +1 -1
  8. package/dist/picteus-ws-client/apis/ImageApi.js +1 -1
  9. package/dist/picteus-ws-client/apis/ImageAttachmentApi.d.ts +1 -1
  10. package/dist/picteus-ws-client/apis/ImageAttachmentApi.js +1 -1
  11. package/dist/picteus-ws-client/apis/MiscellaneousApi.d.ts +1 -1
  12. package/dist/picteus-ws-client/apis/MiscellaneousApi.js +1 -1
  13. package/dist/picteus-ws-client/apis/RepositoryApi.d.ts +36 -3
  14. package/dist/picteus-ws-client/apis/RepositoryApi.js +49 -3
  15. package/dist/picteus-ws-client/apis/SettingsApi.d.ts +1 -1
  16. package/dist/picteus-ws-client/apis/SettingsApi.js +1 -1
  17. package/dist/picteus-ws-client/models/ApiSecret.d.ts +1 -1
  18. package/dist/picteus-ws-client/models/ApiSecret.js +1 -1
  19. package/dist/picteus-ws-client/models/ApiSecretSummary.d.ts +1 -1
  20. package/dist/picteus-ws-client/models/ApiSecretSummary.js +1 -1
  21. package/dist/picteus-ws-client/models/ApiSecretType.d.ts +1 -1
  22. package/dist/picteus-ws-client/models/ApiSecretType.js +1 -1
  23. package/dist/picteus-ws-client/models/ApplicationMetadata.d.ts +1 -1
  24. package/dist/picteus-ws-client/models/ApplicationMetadata.js +1 -1
  25. package/dist/picteus-ws-client/models/ApplicationMetadataItem.d.ts +1 -1
  26. package/dist/picteus-ws-client/models/ApplicationMetadataItem.js +1 -1
  27. package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.d.ts +1 -1
  28. package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.js +1 -1
  29. package/dist/picteus-ws-client/models/Automatic1111Instruction.d.ts +1 -1
  30. package/dist/picteus-ws-client/models/Automatic1111Instruction.js +1 -1
  31. package/dist/picteus-ws-client/models/Automatic1111UserComment.d.ts +1 -1
  32. package/dist/picteus-ws-client/models/Automatic1111UserComment.js +1 -1
  33. package/dist/picteus-ws-client/models/ComfyUiPromptAndWorkflow.d.ts +1 -1
  34. package/dist/picteus-ws-client/models/ComfyUiPromptAndWorkflow.js +1 -1
  35. package/dist/picteus-ws-client/models/CommandEntity.d.ts +1 -1
  36. package/dist/picteus-ws-client/models/CommandEntity.js +1 -1
  37. package/dist/picteus-ws-client/models/ComputedImageFormat.d.ts +1 -1
  38. package/dist/picteus-ws-client/models/ComputedImageFormat.js +1 -1
  39. package/dist/picteus-ws-client/models/ConfigurationCapability.d.ts +1 -1
  40. package/dist/picteus-ws-client/models/ConfigurationCapability.js +1 -1
  41. package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.d.ts +1 -1
  42. package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.js +1 -1
  43. package/dist/picteus-ws-client/models/Dates.d.ts +1 -1
  44. package/dist/picteus-ws-client/models/Dates.js +1 -1
  45. package/dist/picteus-ws-client/models/Extension.d.ts +1 -1
  46. package/dist/picteus-ws-client/models/Extension.js +1 -1
  47. package/dist/picteus-ws-client/models/ExtensionActivity.d.ts +1 -1
  48. package/dist/picteus-ws-client/models/ExtensionActivity.js +1 -1
  49. package/dist/picteus-ws-client/models/ExtensionActivityKind.d.ts +1 -1
  50. package/dist/picteus-ws-client/models/ExtensionActivityKind.js +1 -1
  51. package/dist/picteus-ws-client/models/ExtensionAndManual.d.ts +1 -1
  52. package/dist/picteus-ws-client/models/ExtensionAndManual.js +1 -1
  53. package/dist/picteus-ws-client/models/ExtensionGenerationOptions.d.ts +1 -1
  54. package/dist/picteus-ws-client/models/ExtensionGenerationOptions.js +1 -1
  55. package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.d.ts +1 -1
  56. package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.js +1 -1
  57. package/dist/picteus-ws-client/models/ExtensionImageFeature.d.ts +1 -1
  58. package/dist/picteus-ws-client/models/ExtensionImageFeature.js +1 -1
  59. package/dist/picteus-ws-client/models/ExtensionImageTag.d.ts +1 -1
  60. package/dist/picteus-ws-client/models/ExtensionImageTag.js +1 -1
  61. package/dist/picteus-ws-client/models/ExtensionManual.d.ts +1 -1
  62. package/dist/picteus-ws-client/models/ExtensionManual.js +1 -1
  63. package/dist/picteus-ws-client/models/ExtensionSettings.d.ts +1 -1
  64. package/dist/picteus-ws-client/models/ExtensionSettings.js +1 -1
  65. package/dist/picteus-ws-client/models/ExtensionStatus.d.ts +1 -1
  66. package/dist/picteus-ws-client/models/ExtensionStatus.js +1 -1
  67. package/dist/picteus-ws-client/models/ExtensionsConfiguration.d.ts +1 -1
  68. package/dist/picteus-ws-client/models/ExtensionsConfiguration.js +1 -1
  69. package/dist/picteus-ws-client/models/GenerationRecipe.d.ts +1 -1
  70. package/dist/picteus-ws-client/models/GenerationRecipe.js +1 -1
  71. package/dist/picteus-ws-client/models/GenerationRecipePrompt.d.ts +7 -2
  72. package/dist/picteus-ws-client/models/GenerationRecipePrompt.js +17 -14
  73. package/dist/picteus-ws-client/models/Image.d.ts +4 -4
  74. package/dist/picteus-ws-client/models/Image.js +4 -4
  75. package/dist/picteus-ws-client/models/ImageDimensions.d.ts +1 -1
  76. package/dist/picteus-ws-client/models/ImageDimensions.js +1 -1
  77. package/dist/picteus-ws-client/models/ImageDistance.d.ts +1 -1
  78. package/dist/picteus-ws-client/models/ImageDistance.js +1 -1
  79. package/dist/picteus-ws-client/models/ImageEmbeddings.d.ts +1 -1
  80. package/dist/picteus-ws-client/models/ImageEmbeddings.js +1 -1
  81. package/dist/picteus-ws-client/models/ImageFeature.d.ts +1 -1
  82. package/dist/picteus-ws-client/models/ImageFeature.js +1 -1
  83. package/dist/picteus-ws-client/models/ImageFeatureFormat.d.ts +1 -1
  84. package/dist/picteus-ws-client/models/ImageFeatureFormat.js +1 -1
  85. package/dist/picteus-ws-client/models/ImageFeatureType.d.ts +1 -1
  86. package/dist/picteus-ws-client/models/ImageFeatureType.js +1 -1
  87. package/dist/picteus-ws-client/models/ImageFormat.d.ts +1 -1
  88. package/dist/picteus-ws-client/models/ImageFormat.js +1 -1
  89. package/dist/picteus-ws-client/models/ImageGenerator.d.ts +1 -1
  90. package/dist/picteus-ws-client/models/ImageGenerator.js +1 -1
  91. package/dist/picteus-ws-client/models/ImageMediaUrl.d.ts +1 -1
  92. package/dist/picteus-ws-client/models/ImageMediaUrl.js +1 -1
  93. package/dist/picteus-ws-client/models/ImageMetadata.d.ts +1 -1
  94. package/dist/picteus-ws-client/models/ImageMetadata.js +1 -1
  95. package/dist/picteus-ws-client/models/ImageResizeRender.d.ts +1 -1
  96. package/dist/picteus-ws-client/models/ImageResizeRender.js +1 -1
  97. package/dist/picteus-ws-client/models/ImageSummary.d.ts +1 -1
  98. package/dist/picteus-ws-client/models/ImageSummary.js +1 -1
  99. package/dist/picteus-ws-client/models/ImageSummaryList.d.ts +1 -1
  100. package/dist/picteus-ws-client/models/ImageSummaryList.js +1 -1
  101. package/dist/picteus-ws-client/models/InstructionsPrompt.d.ts +39 -0
  102. package/dist/picteus-ws-client/models/InstructionsPrompt.js +48 -0
  103. package/dist/picteus-ws-client/models/Manifest.d.ts +1 -1
  104. package/dist/picteus-ws-client/models/Manifest.js +1 -1
  105. package/dist/picteus-ws-client/models/ManifestCapability.d.ts +1 -1
  106. package/dist/picteus-ws-client/models/ManifestCapability.js +1 -1
  107. package/dist/picteus-ws-client/models/ManifestCapabilityId.d.ts +1 -1
  108. package/dist/picteus-ws-client/models/ManifestCapabilityId.js +1 -1
  109. package/dist/picteus-ws-client/models/ManifestEvent.d.ts +1 -1
  110. package/dist/picteus-ws-client/models/ManifestEvent.js +1 -1
  111. package/dist/picteus-ws-client/models/ManifestExecution.d.ts +1 -1
  112. package/dist/picteus-ws-client/models/ManifestExecution.js +1 -1
  113. package/dist/picteus-ws-client/models/ManifestExtensionCommand.d.ts +1 -1
  114. package/dist/picteus-ws-client/models/ManifestExtensionCommand.js +1 -1
  115. package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.d.ts +1 -1
  116. package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.js +1 -1
  117. package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.d.ts +1 -1
  118. package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.js +1 -1
  119. package/dist/picteus-ws-client/models/ManifestInstructions.d.ts +1 -1
  120. package/dist/picteus-ws-client/models/ManifestInstructions.js +1 -1
  121. package/dist/picteus-ws-client/models/ManifestInterfaceElement.d.ts +1 -1
  122. package/dist/picteus-ws-client/models/ManifestInterfaceElement.js +1 -1
  123. package/dist/picteus-ws-client/models/ManifestRuntime.d.ts +1 -1
  124. package/dist/picteus-ws-client/models/ManifestRuntime.js +1 -1
  125. package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.d.ts +1 -1
  126. package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.js +1 -1
  127. package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.d.ts +1 -1
  128. package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.js +1 -1
  129. package/dist/picteus-ws-client/models/ManifestUserInterface.d.ts +1 -1
  130. package/dist/picteus-ws-client/models/ManifestUserInterface.js +1 -1
  131. package/dist/picteus-ws-client/models/MidjourneyInstructions.d.ts +1 -1
  132. package/dist/picteus-ws-client/models/MidjourneyInstructions.js +1 -1
  133. package/dist/picteus-ws-client/models/PromptKind.d.ts +25 -0
  134. package/dist/picteus-ws-client/models/PromptKind.js +43 -0
  135. package/dist/picteus-ws-client/models/Repository.d.ts +1 -1
  136. package/dist/picteus-ws-client/models/Repository.js +1 -1
  137. package/dist/picteus-ws-client/models/RepositoryActivity.d.ts +1 -1
  138. package/dist/picteus-ws-client/models/RepositoryActivity.js +1 -1
  139. package/dist/picteus-ws-client/models/RepositoryActivityKind.d.ts +1 -1
  140. package/dist/picteus-ws-client/models/RepositoryActivityKind.js +1 -1
  141. package/dist/picteus-ws-client/models/RepositoryLocationType.d.ts +1 -1
  142. package/dist/picteus-ws-client/models/RepositoryLocationType.js +1 -1
  143. package/dist/picteus-ws-client/models/RepositoryStatus.d.ts +1 -1
  144. package/dist/picteus-ws-client/models/RepositoryStatus.js +1 -1
  145. package/dist/picteus-ws-client/models/SearchCriteria.d.ts +1 -1
  146. package/dist/picteus-ws-client/models/SearchCriteria.js +1 -1
  147. package/dist/picteus-ws-client/models/SearchKeyword.d.ts +1 -1
  148. package/dist/picteus-ws-client/models/SearchKeyword.js +1 -1
  149. package/dist/picteus-ws-client/models/SearchProperties.d.ts +1 -1
  150. package/dist/picteus-ws-client/models/SearchProperties.js +1 -1
  151. package/dist/picteus-ws-client/models/SearchPropertyRange.d.ts +1 -1
  152. package/dist/picteus-ws-client/models/SearchPropertyRange.js +1 -1
  153. package/dist/picteus-ws-client/models/SearchRange.d.ts +1 -1
  154. package/dist/picteus-ws-client/models/SearchRange.js +1 -1
  155. package/dist/picteus-ws-client/models/SearchSorting.d.ts +1 -1
  156. package/dist/picteus-ws-client/models/SearchSorting.js +1 -1
  157. package/dist/picteus-ws-client/models/SearchSortingProperty.d.ts +1 -1
  158. package/dist/picteus-ws-client/models/SearchSortingProperty.js +1 -1
  159. package/dist/picteus-ws-client/models/SearchTags.d.ts +1 -1
  160. package/dist/picteus-ws-client/models/SearchTags.js +1 -1
  161. package/dist/picteus-ws-client/models/Settings.d.ts +1 -1
  162. package/dist/picteus-ws-client/models/Settings.js +1 -1
  163. package/dist/picteus-ws-client/models/TextualPrompt.d.ts +9 -2
  164. package/dist/picteus-ws-client/models/TextualPrompt.js +6 -1
  165. package/dist/picteus-ws-client/models/UserInterfaceAnchor.d.ts +1 -1
  166. package/dist/picteus-ws-client/models/UserInterfaceAnchor.js +1 -1
  167. package/dist/picteus-ws-client/models/index.d.ts +2 -0
  168. package/dist/picteus-ws-client/models/index.js +2 -0
  169. package/dist/picteus-ws-client/runtime.d.ts +1 -1
  170. package/dist/picteus-ws-client/runtime.js +1 -1
  171. package/dist/picteusExtension.d.ts +9 -0
  172. package/dist/picteusExtension.js +20 -10
  173. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,19 +2,26 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { PromptKind } from './PromptKind.js';
12
13
  /**
13
- * The prompt of an AI-based generated image
14
+ * The textual prompt of an AI-based generated image
14
15
  * @export
15
16
  * @interface TextualPrompt
16
17
  */
17
18
  export interface TextualPrompt {
19
+ /**
20
+ * The kind of prompt
21
+ * @type {PromptKind}
22
+ * @memberof TextualPrompt
23
+ */
24
+ kind: PromptKind;
18
25
  /**
19
26
  * The textual prompt
20
27
  * @type {string}
@@ -4,17 +4,20 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { PromptKindFromJSON, PromptKindToJSON, } from './PromptKind.js';
14
15
  /**
15
16
  * Check if a given object implements the TextualPrompt interface.
16
17
  */
17
18
  export function instanceOfTextualPrompt(value) {
19
+ if (!('kind' in value) || value['kind'] === undefined)
20
+ return false;
18
21
  if (!('text' in value) || value['text'] === undefined)
19
22
  return false;
20
23
  return true;
@@ -27,6 +30,7 @@ export function TextualPromptFromJSONTyped(json, ignoreDiscriminator) {
27
30
  return json;
28
31
  }
29
32
  return {
33
+ 'kind': PromptKindFromJSON(json['kind']),
30
34
  'text': json['text'],
31
35
  };
32
36
  }
@@ -38,6 +42,7 @@ export function TextualPromptToJSONTyped(value, ignoreDiscriminator = false) {
38
42
  return value;
39
43
  }
40
44
  return {
45
+ 'kind': PromptKindToJSON(value['kind']),
41
46
  'text': value['text'],
42
47
  };
43
48
  }
@@ -2,7 +2,7 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -40,6 +40,7 @@ export * from './ImageMetadata.js';
40
40
  export * from './ImageResizeRender.js';
41
41
  export * from './ImageSummary.js';
42
42
  export * from './ImageSummaryList.js';
43
+ export * from './InstructionsPrompt.js';
43
44
  export * from './Manifest.js';
44
45
  export * from './ManifestCapability.js';
45
46
  export * from './ManifestCapabilityId.js';
@@ -55,6 +56,7 @@ export * from './ManifestRuntimeEnvironment.js';
55
56
  export * from './ManifestThrottlingPolicy.js';
56
57
  export * from './ManifestUserInterface.js';
57
58
  export * from './MidjourneyInstructions.js';
59
+ export * from './PromptKind.js';
58
60
  export * from './Repository.js';
59
61
  export * from './RepositoryActivity.js';
60
62
  export * from './RepositoryActivityKind.js';
@@ -42,6 +42,7 @@ export * from './ImageMetadata.js';
42
42
  export * from './ImageResizeRender.js';
43
43
  export * from './ImageSummary.js';
44
44
  export * from './ImageSummaryList.js';
45
+ export * from './InstructionsPrompt.js';
45
46
  export * from './Manifest.js';
46
47
  export * from './ManifestCapability.js';
47
48
  export * from './ManifestCapabilityId.js';
@@ -57,6 +58,7 @@ export * from './ManifestRuntimeEnvironment.js';
57
58
  export * from './ManifestThrottlingPolicy.js';
58
59
  export * from './ManifestUserInterface.js';
59
60
  export * from './MidjourneyInstructions.js';
61
+ export * from './PromptKind.js';
60
62
  export * from './Repository.js';
61
63
  export * from './RepositoryActivity.js';
62
64
  export * from './RepositoryActivityKind.js';
@@ -2,7 +2,7 @@
2
2
  * Picteus
3
3
  * The Picteus API
4
4
  *
5
- * The version of the OpenAPI document: 0.5.3
5
+ * The version of the OpenAPI document: 0.6.0
6
6
  * Contact: edouard@koppasoft.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Picteus
5
5
  * The Picteus API
6
6
  *
7
- * The version of the OpenAPI document: 0.5.3
7
+ * The version of the OpenAPI document: 0.6.0
8
8
  * Contact: edouard@koppasoft.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -81,6 +81,15 @@ export declare enum NotificationEvent {
81
81
  ImageRunCommand = "image.runCommand",
82
82
  TextComputeEmbeddings = "text.computeEmbeddings"
83
83
  }
84
+ export interface ApiCallErrorDetails {
85
+ status: number;
86
+ code: number;
87
+ message: string;
88
+ }
89
+ export declare class ApiCallError extends Error {
90
+ readonly details: ApiCallErrorDetails;
91
+ constructor(details: ApiCallErrorDetails);
92
+ }
84
93
  interface LeveledLogMethod {
85
94
  (message: string, ...meta: any[]): Logger;
86
95
  (message: any): Logger;
@@ -1,5 +1,6 @@
1
1
  import path from "node:path";
2
2
  import fs from "node:fs";
3
+ import { fileURLToPath } from "node:url";
3
4
  // We do not import the "process" package on purpose, otherwise we get the runtime error "process.on is not a function"
4
5
  import console from "node:console";
5
6
  import { io } from "socket.io-client";
@@ -48,6 +49,13 @@ export var NotificationEvent;
48
49
  NotificationEvent["TextComputeEmbeddings"] = "text.computeEmbeddings";
49
50
  })(NotificationEvent || (NotificationEvent = {}));
50
51
  const extensionSettingsEvent = "extension.settings";
52
+ export class ApiCallError extends Error {
53
+ details;
54
+ constructor(details) {
55
+ super();
56
+ this.details = details;
57
+ }
58
+ }
51
59
  const dateToString = (date) => {
52
60
  function padNumber(number, length) {
53
61
  return number.toString().padStart(length, "0");
@@ -154,7 +162,7 @@ export class PicteusExtension {
154
162
  return ManifestFromJSON(JSON.parse(fs.readFileSync(path.join(PicteusExtension.getExtensionHomeDirectoryPath(), "manifest.json"), { encoding: "utf8" })));
155
163
  }
156
164
  static getSdkVersion() {
157
- return JSON.parse(fs.readFileSync(path.join(PicteusExtension.getExtensionHomeDirectoryPath(), "package.json"), { encoding: "utf8" })).version;
165
+ return JSON.parse(fs.readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "package.json"), { encoding: "utf8" })).version;
158
166
  }
159
167
  static getCacheDirectoryPath() {
160
168
  return path.join(PicteusExtension.getExtensionHomeDirectoryPath(), ".cache");
@@ -320,19 +328,21 @@ export class PicteusExtension {
320
328
  }
321
329
  }
322
330
  getApiConfiguration() {
323
- // This enables to discard the warning log message, caused by the fact that we are issuing HTTPS request on the localhost exposing a self-served certificate
324
- process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
331
+ if (this.parameters.webServicesBaseUrl.startsWith("https://localhost") == true) {
332
+ // This enables to discard the warning log message, caused by the fact that we are issuing HTTPS request on the localhost exposing a self-served certificate
333
+ process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
334
+ }
325
335
  return new Configuration({
326
336
  basePath: this.webServicesBaseUrl,
327
337
  apiKey: this.apiKey,
328
- middleware: [
329
- {
330
- async onError(context) {
331
- this.log.error("The API request issued an error", context.error);
332
- return context.response;
333
- }
338
+ fetchApi: async (input, init) => {
339
+ const response = await fetch(input, init);
340
+ if (response.status < 400) {
341
+ return Promise.resolve(response);
334
342
  }
335
- ]
343
+ const json = await response.json();
344
+ return Promise.reject(new ApiCallError({ status: response.status, code: json.code, message: json.message }));
345
+ }
336
346
  });
337
347
  }
338
348
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picteus/extension-sdk",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "productName": "Picteus TypeScript SDK",
5
5
  "description": "The Picteus extension TypeScript SDK.",
6
6
  "keywords": [