@picteus/extension-sdk 0.3.3 → 0.3.4
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.
- package/dist/picteus-ws-client/apis/AdministrationApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/AdministrationApi.js +1 -1
- package/dist/picteus-ws-client/apis/ExperimentApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ExperimentApi.js +1 -1
- package/dist/picteus-ws-client/apis/ExtensionApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ExtensionApi.js +1 -1
- package/dist/picteus-ws-client/apis/ImageApi.d.ts +68 -30
- package/dist/picteus-ws-client/apis/ImageApi.js +81 -24
- package/dist/picteus-ws-client/apis/ImageAttachmentApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ImageAttachmentApi.js +1 -1
- package/dist/picteus-ws-client/apis/PingApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/PingApi.js +1 -1
- package/dist/picteus-ws-client/apis/RepositoryApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/RepositoryApi.js +1 -1
- package/dist/picteus-ws-client/apis/SettingsApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/SettingsApi.js +1 -1
- package/dist/picteus-ws-client/models/Automatic1111Instruction.d.ts +1 -1
- package/dist/picteus-ws-client/models/Automatic1111Instruction.js +1 -1
- package/dist/picteus-ws-client/models/Automatic1111UserComment.d.ts +1 -1
- package/dist/picteus-ws-client/models/Automatic1111UserComment.js +1 -1
- package/dist/picteus-ws-client/models/ComfyUiPromptAndWorkflow.d.ts +1 -1
- package/dist/picteus-ws-client/models/ComfyUiPromptAndWorkflow.js +1 -1
- package/dist/picteus-ws-client/models/CommandEntity.d.ts +1 -1
- package/dist/picteus-ws-client/models/CommandEntity.js +1 -1
- package/dist/picteus-ws-client/models/ComputedImageFormat.d.ts +33 -0
- package/dist/picteus-ws-client/models/ComputedImageFormat.js +44 -0
- package/dist/picteus-ws-client/models/ConfigurationCapability.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConfigurationCapability.js +1 -1
- package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.js +1 -1
- package/dist/picteus-ws-client/models/Dates.d.ts +1 -1
- package/dist/picteus-ws-client/models/Dates.js +1 -1
- package/dist/picteus-ws-client/models/Extension.d.ts +1 -1
- package/dist/picteus-ws-client/models/Extension.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivity.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivity.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivityKind.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivityKind.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionAndManual.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionAndManual.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionGenerationOptions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionGenerationOptions.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeature.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeature.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTag.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTag.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionManual.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionManual.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionSettings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionSettings.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionStatus.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionStatus.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionsConfiguration.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionsConfiguration.js +1 -1
- package/dist/picteus-ws-client/models/Image.d.ts +7 -1
- package/dist/picteus-ws-client/models/Image.js +5 -1
- package/dist/picteus-ws-client/models/ImageDimensions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageDimensions.js +1 -1
- package/dist/picteus-ws-client/models/ImageDistance.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageDistance.js +1 -1
- package/dist/picteus-ws-client/models/ImageEmbeddings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageEmbeddings.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeature.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeature.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureFormat.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureType.d.ts +2 -1
- package/dist/picteus-ws-client/models/ImageFeatureType.js +2 -1
- package/dist/picteus-ws-client/models/ImageFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFormat.js +1 -1
- package/dist/picteus-ws-client/models/ImageGenerator.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageGenerator.js +1 -1
- package/dist/picteus-ws-client/models/ImageMediaUrl.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageMediaUrl.js +1 -1
- package/dist/picteus-ws-client/models/ImageMetadata.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageMetadata.js +1 -1
- package/dist/picteus-ws-client/models/ImageResizeRender.d.ts +25 -0
- package/dist/picteus-ws-client/models/ImageResizeRender.js +43 -0
- package/dist/picteus-ws-client/models/ImageSummary.d.ts +7 -1
- package/dist/picteus-ws-client/models/ImageSummary.js +5 -1
- package/dist/picteus-ws-client/models/ImageSummaryList.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageSummaryList.js +1 -1
- package/dist/picteus-ws-client/models/Manifest.d.ts +1 -1
- package/dist/picteus-ws-client/models/Manifest.js +1 -1
- package/dist/picteus-ws-client/models/ManifestCapability.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestCapability.js +1 -1
- package/dist/picteus-ws-client/models/ManifestCapabilityId.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestCapabilityId.js +1 -1
- package/dist/picteus-ws-client/models/ManifestEvent.d.ts +2 -1
- package/dist/picteus-ws-client/models/ManifestEvent.js +2 -1
- package/dist/picteus-ws-client/models/ManifestExecution.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExecution.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommand.d.ts +6 -6
- package/dist/picteus-ws-client/models/ManifestExtensionCommand.js +6 -8
- package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.d.ts +44 -0
- package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.js +51 -0
- package/dist/picteus-ws-client/models/ManifestInstructions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInstructions.js +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElement.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElement.js +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntime.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntime.js +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.js +1 -1
- package/dist/picteus-ws-client/models/ManifestUserInterface.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestUserInterface.js +1 -1
- package/dist/picteus-ws-client/models/MidjourneyInstructions.d.ts +1 -1
- package/dist/picteus-ws-client/models/MidjourneyInstructions.js +1 -1
- package/dist/picteus-ws-client/models/Repository.d.ts +1 -1
- package/dist/picteus-ws-client/models/Repository.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivity.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivity.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivityKind.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivityKind.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryLocationType.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryLocationType.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryStatus.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryStatus.js +1 -1
- package/dist/picteus-ws-client/models/SearchCriteria.d.ts +16 -2
- package/dist/picteus-ws-client/models/SearchCriteria.js +7 -1
- package/dist/picteus-ws-client/models/SearchKeyword.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchKeyword.js +1 -1
- package/dist/picteus-ws-client/models/SearchProperties.d.ts +57 -0
- package/dist/picteus-ws-client/models/SearchProperties.js +50 -0
- package/dist/picteus-ws-client/models/SearchPropertyRange.d.ts +38 -0
- package/dist/picteus-ws-client/models/SearchPropertyRange.js +43 -0
- package/dist/picteus-ws-client/models/SearchRange.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchRange.js +1 -1
- package/dist/picteus-ws-client/models/SearchSorting.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchSorting.js +1 -1
- package/dist/picteus-ws-client/models/SearchSortingProperty.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchSortingProperty.js +1 -1
- package/dist/picteus-ws-client/models/SearchTags.d.ts +32 -0
- package/dist/picteus-ws-client/models/SearchTags.js +43 -0
- package/dist/picteus-ws-client/models/Settings.d.ts +1 -1
- package/dist/picteus-ws-client/models/Settings.js +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceAnchor.d.ts +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceAnchor.js +1 -1
- package/dist/picteus-ws-client/models/index.d.ts +6 -1
- package/dist/picteus-ws-client/models/index.js +6 -1
- package/dist/picteus-ws-client/runtime.d.ts +1 -1
- package/dist/picteus-ws-client/runtime.js +1 -1
- package/dist/picteusExtension.d.ts +4 -2
- package/dist/picteusExtension.js +24 -8
- package/package.json +1 -1
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
* Picteus
|
|
5
5
|
* The Picteus API
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.3.
|
|
7
|
+
* The version of the OpenAPI document: 0.3.5
|
|
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 { SearchPropertiesFromJSON, SearchPropertiesToJSON, } from './SearchProperties.js';
|
|
15
|
+
import { SearchTagsFromJSON, SearchTagsToJSON, } from './SearchTags.js';
|
|
14
16
|
import { ImageGeneratorFromJSON, ImageGeneratorToJSON, } from './ImageGenerator.js';
|
|
15
17
|
import { SearchKeywordFromJSON, SearchKeywordToJSON, } from './SearchKeyword.js';
|
|
16
18
|
import { ImageFormatFromJSON, ImageFormatToJSON, } from './ImageFormat.js';
|
|
@@ -30,6 +32,8 @@ export function SearchCriteriaFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
32
|
return {
|
|
31
33
|
'formats': json['formats'] == null ? undefined : (json['formats'].map(ImageFormatFromJSON)),
|
|
32
34
|
'keyword': json['keyword'] == null ? undefined : SearchKeywordFromJSON(json['keyword']),
|
|
35
|
+
'tags': json['tags'] == null ? undefined : SearchTagsFromJSON(json['tags']),
|
|
36
|
+
'properties': json['properties'] == null ? undefined : SearchPropertiesFromJSON(json['properties']),
|
|
33
37
|
'generator': json['generator'] == null ? undefined : ImageGeneratorFromJSON(json['generator']),
|
|
34
38
|
};
|
|
35
39
|
}
|
|
@@ -43,6 +47,8 @@ export function SearchCriteriaToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
43
47
|
return {
|
|
44
48
|
'formats': value['formats'] == null ? undefined : (value['formats'].map(ImageFormatToJSON)),
|
|
45
49
|
'keyword': SearchKeywordToJSON(value['keyword']),
|
|
50
|
+
'tags': SearchTagsToJSON(value['tags']),
|
|
51
|
+
'properties': SearchPropertiesToJSON(value['properties']),
|
|
46
52
|
'generator': ImageGeneratorToJSON(value['generator']),
|
|
47
53
|
};
|
|
48
54
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picteus
|
|
3
|
+
* The Picteus API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.5
|
|
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
|
+
import type { SearchPropertyRange } from './SearchPropertyRange.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SearchProperties
|
|
17
|
+
*/
|
|
18
|
+
export interface SearchProperties {
|
|
19
|
+
/**
|
|
20
|
+
* The range of the image width
|
|
21
|
+
* @type {SearchPropertyRange}
|
|
22
|
+
* @memberof SearchProperties
|
|
23
|
+
*/
|
|
24
|
+
width?: SearchPropertyRange;
|
|
25
|
+
/**
|
|
26
|
+
* The range of the image height
|
|
27
|
+
* @type {SearchPropertyRange}
|
|
28
|
+
* @memberof SearchProperties
|
|
29
|
+
*/
|
|
30
|
+
height?: SearchPropertyRange;
|
|
31
|
+
/**
|
|
32
|
+
* The range of the image binary weight
|
|
33
|
+
* @type {SearchPropertyRange}
|
|
34
|
+
* @memberof SearchProperties
|
|
35
|
+
*/
|
|
36
|
+
weightInBytes?: SearchPropertyRange;
|
|
37
|
+
/**
|
|
38
|
+
* The range of the image creation dates, expressed in milliseconds from 1970, January 1st
|
|
39
|
+
* @type {SearchPropertyRange}
|
|
40
|
+
* @memberof SearchProperties
|
|
41
|
+
*/
|
|
42
|
+
creationDate?: SearchPropertyRange;
|
|
43
|
+
/**
|
|
44
|
+
* The range of the image modification dates, expressed in milliseconds from 1970, January 1st
|
|
45
|
+
* @type {SearchPropertyRange}
|
|
46
|
+
* @memberof SearchProperties
|
|
47
|
+
*/
|
|
48
|
+
modificationDate?: SearchPropertyRange;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the SearchProperties interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfSearchProperties(value: object): value is SearchProperties;
|
|
54
|
+
export declare function SearchPropertiesFromJSON(json: any): SearchProperties;
|
|
55
|
+
export declare function SearchPropertiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchProperties;
|
|
56
|
+
export declare function SearchPropertiesToJSON(json: any): SearchProperties;
|
|
57
|
+
export declare function SearchPropertiesToJSONTyped(value?: SearchProperties | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Picteus
|
|
5
|
+
* The Picteus API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.5
|
|
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
|
+
import { SearchPropertyRangeFromJSON, SearchPropertyRangeToJSON, } from './SearchPropertyRange.js';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the SearchProperties interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfSearchProperties(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function SearchPropertiesFromJSON(json) {
|
|
22
|
+
return SearchPropertiesFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function SearchPropertiesFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'width': json['width'] == null ? undefined : SearchPropertyRangeFromJSON(json['width']),
|
|
30
|
+
'height': json['height'] == null ? undefined : SearchPropertyRangeFromJSON(json['height']),
|
|
31
|
+
'weightInBytes': json['weightInBytes'] == null ? undefined : SearchPropertyRangeFromJSON(json['weightInBytes']),
|
|
32
|
+
'creationDate': json['creationDate'] == null ? undefined : SearchPropertyRangeFromJSON(json['creationDate']),
|
|
33
|
+
'modificationDate': json['modificationDate'] == null ? undefined : SearchPropertyRangeFromJSON(json['modificationDate']),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function SearchPropertiesToJSON(json) {
|
|
37
|
+
return SearchPropertiesToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function SearchPropertiesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'width': SearchPropertyRangeToJSON(value['width']),
|
|
45
|
+
'height': SearchPropertyRangeToJSON(value['height']),
|
|
46
|
+
'weightInBytes': SearchPropertyRangeToJSON(value['weightInBytes']),
|
|
47
|
+
'creationDate': SearchPropertyRangeToJSON(value['creationDate']),
|
|
48
|
+
'modificationDate': SearchPropertyRangeToJSON(value['modificationDate']),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picteus
|
|
3
|
+
* The Picteus API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.5
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SearchPropertyRange
|
|
16
|
+
*/
|
|
17
|
+
export interface SearchPropertyRange {
|
|
18
|
+
/**
|
|
19
|
+
* The minimal value
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof SearchPropertyRange
|
|
22
|
+
*/
|
|
23
|
+
minimum?: number;
|
|
24
|
+
/**
|
|
25
|
+
* The maximal value
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof SearchPropertyRange
|
|
28
|
+
*/
|
|
29
|
+
maximum?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the SearchPropertyRange interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfSearchPropertyRange(value: object): value is SearchPropertyRange;
|
|
35
|
+
export declare function SearchPropertyRangeFromJSON(json: any): SearchPropertyRange;
|
|
36
|
+
export declare function SearchPropertyRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchPropertyRange;
|
|
37
|
+
export declare function SearchPropertyRangeToJSON(json: any): SearchPropertyRange;
|
|
38
|
+
export declare function SearchPropertyRangeToJSONTyped(value?: SearchPropertyRange | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Picteus
|
|
5
|
+
* The Picteus API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.5
|
|
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 SearchPropertyRange interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfSearchPropertyRange(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function SearchPropertyRangeFromJSON(json) {
|
|
21
|
+
return SearchPropertyRangeFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function SearchPropertyRangeFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'minimum': json['minimum'] == null ? undefined : json['minimum'],
|
|
29
|
+
'maximum': json['maximum'] == null ? undefined : json['maximum'],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function SearchPropertyRangeToJSON(json) {
|
|
33
|
+
return SearchPropertyRangeToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function SearchPropertyRangeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'minimum': value['minimum'],
|
|
41
|
+
'maximum': value['maximum'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picteus
|
|
3
|
+
* The Picteus API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.5
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SearchTags
|
|
16
|
+
*/
|
|
17
|
+
export interface SearchTags {
|
|
18
|
+
/**
|
|
19
|
+
* The tags to search for
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof SearchTags
|
|
22
|
+
*/
|
|
23
|
+
values: Array<string>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the SearchTags interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfSearchTags(value: object): value is SearchTags;
|
|
29
|
+
export declare function SearchTagsFromJSON(json: any): SearchTags;
|
|
30
|
+
export declare function SearchTagsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchTags;
|
|
31
|
+
export declare function SearchTagsToJSON(json: any): SearchTags;
|
|
32
|
+
export declare function SearchTagsToJSONTyped(value?: SearchTags | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Picteus
|
|
5
|
+
* The Picteus API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.5
|
|
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 SearchTags interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfSearchTags(value) {
|
|
18
|
+
if (!('values' in value) || value['values'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function SearchTagsFromJSON(json) {
|
|
23
|
+
return SearchTagsFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function SearchTagsFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'values': json['values'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function SearchTagsToJSON(json) {
|
|
34
|
+
return SearchTagsToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function SearchTagsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'values': value['values'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from './Automatic1111Instruction.js';
|
|
|
2
2
|
export * from './Automatic1111UserComment.js';
|
|
3
3
|
export * from './ComfyUiPromptAndWorkflow.js';
|
|
4
4
|
export * from './CommandEntity.js';
|
|
5
|
+
export * from './ComputedImageFormat.js';
|
|
5
6
|
export * from './ConfigurationCapability.js';
|
|
6
7
|
export * from './ConfigurationExtensionCommand.js';
|
|
7
8
|
export * from './Dates.js';
|
|
@@ -28,6 +29,7 @@ export * from './ImageFormat.js';
|
|
|
28
29
|
export * from './ImageGenerator.js';
|
|
29
30
|
export * from './ImageMediaUrl.js';
|
|
30
31
|
export * from './ImageMetadata.js';
|
|
32
|
+
export * from './ImageResizeRender.js';
|
|
31
33
|
export * from './ImageSummary.js';
|
|
32
34
|
export * from './ImageSummaryList.js';
|
|
33
35
|
export * from './Manifest.js';
|
|
@@ -36,8 +38,8 @@ export * from './ManifestCapabilityId.js';
|
|
|
36
38
|
export * from './ManifestEvent.js';
|
|
37
39
|
export * from './ManifestExecution.js';
|
|
38
40
|
export * from './ManifestExtensionCommand.js';
|
|
39
|
-
export * from './ManifestExtensionCommandLabel.js';
|
|
40
41
|
export * from './ManifestExtensionCommandOn.js';
|
|
42
|
+
export * from './ManifestExtensionCommandSpecification.js';
|
|
41
43
|
export * from './ManifestInstructions.js';
|
|
42
44
|
export * from './ManifestInterfaceElement.js';
|
|
43
45
|
export * from './ManifestRuntime.js';
|
|
@@ -51,8 +53,11 @@ export * from './RepositoryLocationType.js';
|
|
|
51
53
|
export * from './RepositoryStatus.js';
|
|
52
54
|
export * from './SearchCriteria.js';
|
|
53
55
|
export * from './SearchKeyword.js';
|
|
56
|
+
export * from './SearchProperties.js';
|
|
57
|
+
export * from './SearchPropertyRange.js';
|
|
54
58
|
export * from './SearchRange.js';
|
|
55
59
|
export * from './SearchSorting.js';
|
|
56
60
|
export * from './SearchSortingProperty.js';
|
|
61
|
+
export * from './SearchTags.js';
|
|
57
62
|
export * from './Settings.js';
|
|
58
63
|
export * from './UserInterfaceAnchor.js';
|
|
@@ -4,6 +4,7 @@ export * from './Automatic1111Instruction.js';
|
|
|
4
4
|
export * from './Automatic1111UserComment.js';
|
|
5
5
|
export * from './ComfyUiPromptAndWorkflow.js';
|
|
6
6
|
export * from './CommandEntity.js';
|
|
7
|
+
export * from './ComputedImageFormat.js';
|
|
7
8
|
export * from './ConfigurationCapability.js';
|
|
8
9
|
export * from './ConfigurationExtensionCommand.js';
|
|
9
10
|
export * from './Dates.js';
|
|
@@ -30,6 +31,7 @@ export * from './ImageFormat.js';
|
|
|
30
31
|
export * from './ImageGenerator.js';
|
|
31
32
|
export * from './ImageMediaUrl.js';
|
|
32
33
|
export * from './ImageMetadata.js';
|
|
34
|
+
export * from './ImageResizeRender.js';
|
|
33
35
|
export * from './ImageSummary.js';
|
|
34
36
|
export * from './ImageSummaryList.js';
|
|
35
37
|
export * from './Manifest.js';
|
|
@@ -38,8 +40,8 @@ export * from './ManifestCapabilityId.js';
|
|
|
38
40
|
export * from './ManifestEvent.js';
|
|
39
41
|
export * from './ManifestExecution.js';
|
|
40
42
|
export * from './ManifestExtensionCommand.js';
|
|
41
|
-
export * from './ManifestExtensionCommandLabel.js';
|
|
42
43
|
export * from './ManifestExtensionCommandOn.js';
|
|
44
|
+
export * from './ManifestExtensionCommandSpecification.js';
|
|
43
45
|
export * from './ManifestInstructions.js';
|
|
44
46
|
export * from './ManifestInterfaceElement.js';
|
|
45
47
|
export * from './ManifestRuntime.js';
|
|
@@ -53,8 +55,11 @@ export * from './RepositoryLocationType.js';
|
|
|
53
55
|
export * from './RepositoryStatus.js';
|
|
54
56
|
export * from './SearchCriteria.js';
|
|
55
57
|
export * from './SearchKeyword.js';
|
|
58
|
+
export * from './SearchProperties.js';
|
|
59
|
+
export * from './SearchPropertyRange.js';
|
|
56
60
|
export * from './SearchRange.js';
|
|
57
61
|
export * from './SearchSorting.js';
|
|
58
62
|
export * from './SearchSortingProperty.js';
|
|
63
|
+
export * from './SearchTags.js';
|
|
59
64
|
export * from './Settings.js';
|
|
60
65
|
export * from './UserInterfaceAnchor.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Socket } from "socket.io-client";
|
|
2
|
-
import { Configuration, ImageApi, ImageAttachmentApi, Json, RepositoryApi } from "./index.js";
|
|
2
|
+
import { Configuration, ImageApi, ImageAttachmentApi, Json, Manifest, RepositoryApi } from "./index.js";
|
|
3
3
|
export type NotificationValue = Record<string, any>;
|
|
4
4
|
export declare enum NotificationReturnedErrorCause {
|
|
5
5
|
Cancel = 0,
|
|
@@ -102,7 +102,7 @@ declare class MessageSender {
|
|
|
102
102
|
private readonly logger;
|
|
103
103
|
private readonly parameters;
|
|
104
104
|
private readonly socket;
|
|
105
|
-
|
|
105
|
+
readonly toString: () => string;
|
|
106
106
|
private readonly contextId?;
|
|
107
107
|
constructor(logger: Logger, parameters: ExtensionParameters, socket: Socket, toString: () => string, contextId?: string);
|
|
108
108
|
sendMessage(channel: string, body: Record<string, any>, callback?: (result: any) => Promise<void>): void;
|
|
@@ -118,8 +118,10 @@ export declare class Communicator {
|
|
|
118
118
|
}
|
|
119
119
|
export type SettingsValue = Record<string, any>;
|
|
120
120
|
export declare class PicteusExtension {
|
|
121
|
+
static getManifest(): Manifest;
|
|
121
122
|
static getSdkVersion(): string;
|
|
122
123
|
static getCacheDirectoryPath(): string;
|
|
124
|
+
private static getRootDirectoryPath;
|
|
123
125
|
protected readonly logger: Logger;
|
|
124
126
|
protected readonly parameters: ExtensionParameters;
|
|
125
127
|
protected readonly extensionId: string;
|
package/dist/picteusExtension.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import path
|
|
1
|
+
import path from "node:path";
|
|
2
2
|
import fs from "node:fs";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
3
|
// We do not import the "process" package on purpose, otherwise we get the runtime error "process.on is not a function"
|
|
5
4
|
import console from "node:console";
|
|
6
5
|
import { io } from "socket.io-client";
|
|
7
|
-
import { Configuration, ExtensionApi, ImageApi, ImageAttachmentApi, RepositoryApi } from "./index.js";
|
|
6
|
+
import { Configuration, ExtensionApi, ImageApi, ImageAttachmentApi, ManifestFromJSON, RepositoryApi } from "./index.js";
|
|
8
7
|
export var NotificationReturnedErrorCause;
|
|
9
8
|
(function (NotificationReturnedErrorCause) {
|
|
10
9
|
NotificationReturnedErrorCause[NotificationReturnedErrorCause["Cancel"] = 0] = "Cancel";
|
|
@@ -133,7 +132,7 @@ export class Communicator {
|
|
|
133
132
|
async launchIntent(intent) {
|
|
134
133
|
return await new Promise((resolve, reject) => {
|
|
135
134
|
this.sendMessage(notificationsChannel, { intent }, async ({ value, cancel, error }) => {
|
|
136
|
-
this.logger.debug(`Received a result related to the intent '${JSON.stringify(intent)}' for ${this.toString()}`);
|
|
135
|
+
this.logger.debug(`Received a result related to the intent '${JSON.stringify(intent)}' for ${this.sender.toString()}`);
|
|
137
136
|
if (cancel !== undefined) {
|
|
138
137
|
reject(new NotificationReturnedError(cancel, NotificationReturnedErrorCause.Cancel));
|
|
139
138
|
}
|
|
@@ -151,11 +150,17 @@ export class Communicator {
|
|
|
151
150
|
}
|
|
152
151
|
}
|
|
153
152
|
export class PicteusExtension {
|
|
153
|
+
static getManifest() {
|
|
154
|
+
return ManifestFromJSON(JSON.parse(fs.readFileSync(path.join(PicteusExtension.getRootDirectoryPath(), "manifest.json"), { encoding: "utf8" })));
|
|
155
|
+
}
|
|
154
156
|
static getSdkVersion() {
|
|
155
|
-
return JSON.parse(fs.readFileSync(path.join(
|
|
157
|
+
return JSON.parse(fs.readFileSync(path.join(PicteusExtension.getRootDirectoryPath(), "package.json"), { encoding: "utf8" })).version;
|
|
156
158
|
}
|
|
157
159
|
static getCacheDirectoryPath() {
|
|
158
|
-
return path.join(
|
|
160
|
+
return path.join(PicteusExtension.getRootDirectoryPath(), ".cache");
|
|
161
|
+
}
|
|
162
|
+
static getRootDirectoryPath() {
|
|
163
|
+
return path.resolve(process.cwd());
|
|
159
164
|
}
|
|
160
165
|
logger = new Logger();
|
|
161
166
|
parameters;
|
|
@@ -241,7 +246,7 @@ export class PicteusExtension {
|
|
|
241
246
|
return (await new ExtensionApi(this.configuration).extensionGetSettings({ id: this.extensionId })).value;
|
|
242
247
|
}
|
|
243
248
|
getParameters() {
|
|
244
|
-
return JSON.parse(fs.readFileSync(path.join(
|
|
249
|
+
return JSON.parse(fs.readFileSync(path.join(PicteusExtension.getRootDirectoryPath(), "parameters.json"), { encoding: "utf8" }));
|
|
245
250
|
}
|
|
246
251
|
connectSocket() {
|
|
247
252
|
this.logger.info(`Connecting the ${this.toString()} to the server`);
|
|
@@ -308,6 +313,17 @@ export class PicteusExtension {
|
|
|
308
313
|
getApiConfiguration() {
|
|
309
314
|
// 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
|
|
310
315
|
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
|
|
311
|
-
return new Configuration({
|
|
316
|
+
return new Configuration({
|
|
317
|
+
basePath: this.webServicesBaseUrl,
|
|
318
|
+
apiKey: this.apiKey,
|
|
319
|
+
middleware: [
|
|
320
|
+
{
|
|
321
|
+
async onError(context) {
|
|
322
|
+
this.log.error("The API request issued an error", context.error);
|
|
323
|
+
return context.response;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
});
|
|
312
328
|
}
|
|
313
329
|
}
|