@leonardo-ai/sdk 4.19.4 → 4.19.6
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/README.md +9 -0
- package/RUNTIMES.md +27 -1
- package/docs/sdks/elements/README.md +73 -0
- package/docs/sdks/models/README.md +73 -0
- package/docs/sdks/styles/README.md +79 -0
- package/funcs/datasetCreateDataset.d.ts.map +1 -1
- package/funcs/datasetCreateDataset.js +6 -5
- package/funcs/datasetCreateDataset.js.map +1 -1
- package/funcs/datasetDeleteDatasetById.d.ts.map +1 -1
- package/funcs/datasetDeleteDatasetById.js +6 -5
- package/funcs/datasetDeleteDatasetById.js.map +1 -1
- package/funcs/datasetGetDatasetById.d.ts.map +1 -1
- package/funcs/datasetGetDatasetById.js +6 -5
- package/funcs/datasetGetDatasetById.js.map +1 -1
- package/funcs/datasetUploadDatasetImage.d.ts.map +1 -1
- package/funcs/datasetUploadDatasetImage.js +6 -5
- package/funcs/datasetUploadDatasetImage.js.map +1 -1
- package/funcs/datasetUploadDatasetImageFromGen.d.ts.map +1 -1
- package/funcs/datasetUploadDatasetImageFromGen.js +6 -5
- package/funcs/datasetUploadDatasetImageFromGen.js.map +1 -1
- package/funcs/elementsCreateElement.d.ts.map +1 -1
- package/funcs/elementsCreateElement.js +6 -5
- package/funcs/elementsCreateElement.js.map +1 -1
- package/funcs/elementsDeleteElementById.d.ts.map +1 -1
- package/funcs/elementsDeleteElementById.js +6 -5
- package/funcs/elementsDeleteElementById.js.map +1 -1
- package/funcs/elementsGetCustomElementsByUserId.d.ts +15 -0
- package/funcs/elementsGetCustomElementsByUserId.d.ts.map +1 -0
- package/funcs/elementsGetCustomElementsByUserId.js +114 -0
- package/funcs/elementsGetCustomElementsByUserId.js.map +1 -0
- package/funcs/elementsGetElementById.d.ts.map +1 -1
- package/funcs/elementsGetElementById.js +6 -5
- package/funcs/elementsGetElementById.js.map +1 -1
- package/funcs/elementsListElements.d.ts.map +1 -1
- package/funcs/elementsListElements.js +6 -5
- package/funcs/elementsListElements.js.map +1 -1
- package/funcs/imageCreateGeneration.d.ts.map +1 -1
- package/funcs/imageCreateGeneration.js +6 -5
- package/funcs/imageCreateGeneration.js.map +1 -1
- package/funcs/imageDeleteGenerationById.d.ts.map +1 -1
- package/funcs/imageDeleteGenerationById.js +6 -5
- package/funcs/imageDeleteGenerationById.js.map +1 -1
- package/funcs/imageGetGenerationById.d.ts.map +1 -1
- package/funcs/imageGetGenerationById.js +6 -5
- package/funcs/imageGetGenerationById.js.map +1 -1
- package/funcs/imageGetGenerationsByUserId.d.ts.map +1 -1
- package/funcs/imageGetGenerationsByUserId.js +6 -5
- package/funcs/imageGetGenerationsByUserId.js.map +1 -1
- package/funcs/initImagesDeleteInitImageById.d.ts.map +1 -1
- package/funcs/initImagesDeleteInitImageById.js +6 -5
- package/funcs/initImagesDeleteInitImageById.js.map +1 -1
- package/funcs/initImagesGetInitImageById.d.ts.map +1 -1
- package/funcs/initImagesGetInitImageById.js +6 -5
- package/funcs/initImagesGetInitImageById.js.map +1 -1
- package/funcs/initImagesUploadCanvasInitImage.d.ts.map +1 -1
- package/funcs/initImagesUploadCanvasInitImage.js +6 -5
- package/funcs/initImagesUploadCanvasInitImage.js.map +1 -1
- package/funcs/initImagesUploadInitImage.d.ts.map +1 -1
- package/funcs/initImagesUploadInitImage.js +6 -5
- package/funcs/initImagesUploadInitImage.js.map +1 -1
- package/funcs/modelsCreateModel.d.ts.map +1 -1
- package/funcs/modelsCreateModel.js +6 -5
- package/funcs/modelsCreateModel.js.map +1 -1
- package/funcs/modelsDeleteModelById.d.ts.map +1 -1
- package/funcs/modelsDeleteModelById.js +6 -5
- package/funcs/modelsDeleteModelById.js.map +1 -1
- package/funcs/modelsGetCustomModelsByUserId.d.ts +15 -0
- package/funcs/modelsGetCustomModelsByUserId.d.ts.map +1 -0
- package/funcs/modelsGetCustomModelsByUserId.js +114 -0
- package/funcs/modelsGetCustomModelsByUserId.js.map +1 -0
- package/funcs/modelsGetModelById.d.ts.map +1 -1
- package/funcs/modelsGetModelById.js +6 -5
- package/funcs/modelsGetModelById.js.map +1 -1
- package/funcs/modelsListPlatformModels.d.ts.map +1 -1
- package/funcs/modelsListPlatformModels.js +6 -5
- package/funcs/modelsListPlatformModels.js.map +1 -1
- package/funcs/motionCreateSVDMotionGeneration.d.ts.map +1 -1
- package/funcs/motionCreateSVDMotionGeneration.js +6 -5
- package/funcs/motionCreateSVDMotionGeneration.js.map +1 -1
- package/funcs/pricingCalculatorPricingCalculator.d.ts.map +1 -1
- package/funcs/pricingCalculatorPricingCalculator.js +6 -5
- package/funcs/pricingCalculatorPricingCalculator.js.map +1 -1
- package/funcs/promptPromptImprove.d.ts.map +1 -1
- package/funcs/promptPromptImprove.js +6 -5
- package/funcs/promptPromptImprove.js.map +1 -1
- package/funcs/promptPromptRandom.d.ts.map +1 -1
- package/funcs/promptPromptRandom.js +6 -5
- package/funcs/promptPromptRandom.js.map +1 -1
- package/funcs/realtimeCanvasCreateLCMGeneration.d.ts.map +1 -1
- package/funcs/realtimeCanvasCreateLCMGeneration.js +6 -5
- package/funcs/realtimeCanvasCreateLCMGeneration.js.map +1 -1
- package/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.d.ts.map +1 -1
- package/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.js +6 -5
- package/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.js.map +1 -1
- package/funcs/realtimeCanvasPerformInpaintingLCM.d.ts.map +1 -1
- package/funcs/realtimeCanvasPerformInpaintingLCM.js +6 -5
- package/funcs/realtimeCanvasPerformInpaintingLCM.js.map +1 -1
- package/funcs/realtimeCanvasPerformInstantRefine.d.ts.map +1 -1
- package/funcs/realtimeCanvasPerformInstantRefine.js +6 -5
- package/funcs/realtimeCanvasPerformInstantRefine.js.map +1 -1
- package/funcs/stylesListPlatformStyles.d.ts +15 -0
- package/funcs/stylesListPlatformStyles.d.ts.map +1 -0
- package/funcs/stylesListPlatformStyles.js +96 -0
- package/funcs/stylesListPlatformStyles.js.map +1 -0
- package/funcs/textureCreateTextureGeneration.d.ts.map +1 -1
- package/funcs/textureCreateTextureGeneration.js +6 -5
- package/funcs/textureCreateTextureGeneration.js.map +1 -1
- package/funcs/textureDeleteTextureGenerationById.d.ts.map +1 -1
- package/funcs/textureDeleteTextureGenerationById.js +6 -5
- package/funcs/textureDeleteTextureGenerationById.js.map +1 -1
- package/funcs/threeDModelAssetsDelete3DModelById.d.ts.map +1 -1
- package/funcs/threeDModelAssetsDelete3DModelById.js +6 -5
- package/funcs/threeDModelAssetsDelete3DModelById.js.map +1 -1
- package/funcs/threeDModelAssetsUploadModelAsset.d.ts.map +1 -1
- package/funcs/threeDModelAssetsUploadModelAsset.js +6 -5
- package/funcs/threeDModelAssetsUploadModelAsset.js.map +1 -1
- package/funcs/userGetUserSelf.d.ts.map +1 -1
- package/funcs/userGetUserSelf.js +6 -5
- package/funcs/userGetUserSelf.js.map +1 -1
- package/funcs/variationCreateUniversalUpscalerJob.d.ts.map +1 -1
- package/funcs/variationCreateUniversalUpscalerJob.js +6 -5
- package/funcs/variationCreateUniversalUpscalerJob.js.map +1 -1
- package/funcs/variationCreateVariationNoBG.d.ts.map +1 -1
- package/funcs/variationCreateVariationNoBG.js +6 -5
- package/funcs/variationCreateVariationNoBG.js.map +1 -1
- package/funcs/variationCreateVariationUnzoom.d.ts.map +1 -1
- package/funcs/variationCreateVariationUnzoom.js +6 -5
- package/funcs/variationCreateVariationUnzoom.js.map +1 -1
- package/funcs/variationCreateVariationUpscale.d.ts.map +1 -1
- package/funcs/variationCreateVariationUpscale.js +6 -5
- package/funcs/variationCreateVariationUpscale.js.map +1 -1
- package/funcs/variationGetVariationById.d.ts.map +1 -1
- package/funcs/variationGetVariationById.js +6 -5
- package/funcs/variationGetVariationById.js.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +4 -5
- package/lib/config.js.map +1 -1
- package/lib/encodings.js +18 -19
- package/lib/encodings.js.map +1 -1
- package/lib/http.js +1 -2
- package/lib/http.js.map +1 -1
- package/lib/matchers.js +5 -6
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.js +1 -1
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +3 -4
- package/lib/retries.js.map +1 -1
- package/lib/sdks.d.ts +5 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +16 -16
- package/lib/sdks.js.map +1 -1
- package/lib/security.js +2 -2
- package/lib/security.js.map +1 -1
- package/lib/url.js +1 -1
- package/lib/url.js.map +1 -1
- package/package.json +1 -1
- package/sdk/elements.d.ts +7 -0
- package/sdk/elements.d.ts.map +1 -1
- package/sdk/elements.js +10 -0
- package/sdk/elements.js.map +1 -1
- package/sdk/models/errors/httpclienterrors.js +2 -2
- package/sdk/models/errors/httpclienterrors.js.map +1 -1
- package/sdk/models/operations/creategeneration.d.ts +2 -0
- package/sdk/models/operations/creategeneration.d.ts.map +1 -1
- package/sdk/models/operations/creategeneration.js +4 -0
- package/sdk/models/operations/creategeneration.js.map +1 -1
- package/sdk/models/operations/getcustomelementsbyuserid.d.ts +159 -0
- package/sdk/models/operations/getcustomelementsbyuserid.d.ts.map +1 -0
- package/sdk/models/operations/getcustomelementsbyuserid.js +196 -0
- package/sdk/models/operations/getcustomelementsbyuserid.js.map +1 -0
- package/sdk/models/operations/getcustommodelsbyuserid.d.ts +163 -0
- package/sdk/models/operations/getcustommodelsbyuserid.d.ts.map +1 -0
- package/sdk/models/operations/getcustommodelsbyuserid.js +194 -0
- package/sdk/models/operations/getcustommodelsbyuserid.js.map +1 -0
- package/sdk/models/operations/index.d.ts +3 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +3 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listplatformstyles.d.ts +107 -0
- package/sdk/models/operations/listplatformstyles.d.ts.map +1 -0
- package/sdk/models/operations/listplatformstyles.js +140 -0
- package/sdk/models/operations/listplatformstyles.js.map +1 -0
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/userelementsinput.d.ts +37 -0
- package/sdk/models/shared/userelementsinput.d.ts.map +1 -0
- package/sdk/models/shared/userelementsinput.js +61 -0
- package/sdk/models/shared/userelementsinput.js.map +1 -0
- package/sdk/models.d.ts +7 -0
- package/sdk/models.d.ts.map +1 -1
- package/sdk/models.js +10 -0
- package/sdk/models.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +17 -26
- package/sdk/sdk.js.map +1 -1
- package/sdk/styles.d.ts +12 -0
- package/sdk/styles.d.ts.map +1 -0
- package/sdk/styles.js +22 -0
- package/sdk/styles.js.map +1 -0
- package/src/funcs/datasetCreateDataset.ts +1 -0
- package/src/funcs/datasetDeleteDatasetById.ts +1 -0
- package/src/funcs/datasetGetDatasetById.ts +1 -0
- package/src/funcs/datasetUploadDatasetImage.ts +1 -0
- package/src/funcs/datasetUploadDatasetImageFromGen.ts +1 -0
- package/src/funcs/elementsCreateElement.ts +1 -0
- package/src/funcs/elementsDeleteElementById.ts +1 -0
- package/src/funcs/elementsGetCustomElementsByUserId.ts +144 -0
- package/src/funcs/elementsGetElementById.ts +1 -0
- package/src/funcs/elementsListElements.ts +1 -0
- package/src/funcs/imageCreateGeneration.ts +1 -0
- package/src/funcs/imageDeleteGenerationById.ts +1 -0
- package/src/funcs/imageGetGenerationById.ts +1 -0
- package/src/funcs/imageGetGenerationsByUserId.ts +1 -0
- package/src/funcs/initImagesDeleteInitImageById.ts +1 -0
- package/src/funcs/initImagesGetInitImageById.ts +1 -0
- package/src/funcs/initImagesUploadCanvasInitImage.ts +1 -0
- package/src/funcs/initImagesUploadInitImage.ts +1 -0
- package/src/funcs/modelsCreateModel.ts +1 -0
- package/src/funcs/modelsDeleteModelById.ts +1 -0
- package/src/funcs/modelsGetCustomModelsByUserId.ts +144 -0
- package/src/funcs/modelsGetModelById.ts +1 -0
- package/src/funcs/modelsListPlatformModels.ts +1 -0
- package/src/funcs/motionCreateSVDMotionGeneration.ts +1 -0
- package/src/funcs/pricingCalculatorPricingCalculator.ts +1 -0
- package/src/funcs/promptPromptImprove.ts +1 -0
- package/src/funcs/promptPromptRandom.ts +1 -0
- package/src/funcs/realtimeCanvasCreateLCMGeneration.ts +1 -0
- package/src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts +1 -0
- package/src/funcs/realtimeCanvasPerformInpaintingLCM.ts +1 -0
- package/src/funcs/realtimeCanvasPerformInstantRefine.ts +1 -0
- package/src/funcs/stylesListPlatformStyles.ts +117 -0
- package/src/funcs/textureCreateTextureGeneration.ts +1 -0
- package/src/funcs/textureDeleteTextureGenerationById.ts +1 -0
- package/src/funcs/threeDModelAssetsDelete3DModelById.ts +1 -0
- package/src/funcs/threeDModelAssetsUploadModelAsset.ts +1 -0
- package/src/funcs/userGetUserSelf.ts +1 -0
- package/src/funcs/variationCreateUniversalUpscalerJob.ts +1 -0
- package/src/funcs/variationCreateVariationNoBG.ts +1 -0
- package/src/funcs/variationCreateVariationUnzoom.ts +1 -0
- package/src/funcs/variationCreateVariationUpscale.ts +1 -0
- package/src/funcs/variationGetVariationById.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +6 -1
- package/src/lib/security.ts +1 -1
- package/src/sdk/elements.ts +18 -0
- package/src/sdk/models/operations/creategeneration.ts +6 -0
- package/src/sdk/models/operations/getcustomelementsbyuserid.ts +371 -0
- package/src/sdk/models/operations/getcustommodelsbyuserid.ts +377 -0
- package/src/sdk/models/operations/index.ts +3 -0
- package/src/sdk/models/operations/listplatformstyles.ts +231 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/userelementsinput.ts +76 -0
- package/src/sdk/models.ts +18 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/styles.ts +25 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import * as shared from "../shared/index.js";
|
|
11
|
+
|
|
12
|
+
export type GetCustomModelsByUserIdRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The ID of the user to return.
|
|
15
|
+
*/
|
|
16
|
+
userId: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* columns and relationships of "custom_models"
|
|
21
|
+
*/
|
|
22
|
+
export type GetCustomModelsByUserIdCustomModels = {
|
|
23
|
+
createdAt?: string | undefined;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
id?: string | null | undefined;
|
|
26
|
+
instancePrompt?: string | null | undefined;
|
|
27
|
+
modelHeight?: number | undefined;
|
|
28
|
+
modelWidth?: number | undefined;
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
public?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models
|
|
33
|
+
*/
|
|
34
|
+
sdVersion?: shared.SdVersions | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The status of the current task.
|
|
37
|
+
*/
|
|
38
|
+
status?: shared.JobStatus | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The category the most accurately reflects the model.
|
|
41
|
+
*/
|
|
42
|
+
type?: shared.CustomModelType | undefined;
|
|
43
|
+
updatedAt?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Responses for GET /models/user/{userId}
|
|
48
|
+
*/
|
|
49
|
+
export type GetCustomModelsByUserIdResponseBody = {
|
|
50
|
+
customModels?: Array<GetCustomModelsByUserIdCustomModels> | null | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type GetCustomModelsByUserIdResponse = {
|
|
54
|
+
/**
|
|
55
|
+
* HTTP response content type for this operation
|
|
56
|
+
*/
|
|
57
|
+
contentType: string;
|
|
58
|
+
/**
|
|
59
|
+
* HTTP response status code for this operation
|
|
60
|
+
*/
|
|
61
|
+
statusCode: number;
|
|
62
|
+
/**
|
|
63
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
64
|
+
*/
|
|
65
|
+
rawResponse: Response;
|
|
66
|
+
/**
|
|
67
|
+
* Responses for GET /models/user/{userId}
|
|
68
|
+
*/
|
|
69
|
+
object?: GetCustomModelsByUserIdResponseBody | undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const GetCustomModelsByUserIdRequest$inboundSchema: z.ZodType<
|
|
74
|
+
GetCustomModelsByUserIdRequest,
|
|
75
|
+
z.ZodTypeDef,
|
|
76
|
+
unknown
|
|
77
|
+
> = z.object({
|
|
78
|
+
userId: z.string(),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export type GetCustomModelsByUserIdRequest$Outbound = {
|
|
83
|
+
userId: string;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const GetCustomModelsByUserIdRequest$outboundSchema: z.ZodType<
|
|
88
|
+
GetCustomModelsByUserIdRequest$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
GetCustomModelsByUserIdRequest
|
|
91
|
+
> = z.object({
|
|
92
|
+
userId: z.string(),
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
|
+
*/
|
|
99
|
+
export namespace GetCustomModelsByUserIdRequest$ {
|
|
100
|
+
/** @deprecated use `GetCustomModelsByUserIdRequest$inboundSchema` instead. */
|
|
101
|
+
export const inboundSchema = GetCustomModelsByUserIdRequest$inboundSchema;
|
|
102
|
+
/** @deprecated use `GetCustomModelsByUserIdRequest$outboundSchema` instead. */
|
|
103
|
+
export const outboundSchema = GetCustomModelsByUserIdRequest$outboundSchema;
|
|
104
|
+
/** @deprecated use `GetCustomModelsByUserIdRequest$Outbound` instead. */
|
|
105
|
+
export type Outbound = GetCustomModelsByUserIdRequest$Outbound;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function getCustomModelsByUserIdRequestToJSON(
|
|
109
|
+
getCustomModelsByUserIdRequest: GetCustomModelsByUserIdRequest,
|
|
110
|
+
): string {
|
|
111
|
+
return JSON.stringify(
|
|
112
|
+
GetCustomModelsByUserIdRequest$outboundSchema.parse(
|
|
113
|
+
getCustomModelsByUserIdRequest,
|
|
114
|
+
),
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function getCustomModelsByUserIdRequestFromJSON(
|
|
119
|
+
jsonString: string,
|
|
120
|
+
): SafeParseResult<GetCustomModelsByUserIdRequest, SDKValidationError> {
|
|
121
|
+
return safeParse(
|
|
122
|
+
jsonString,
|
|
123
|
+
(x) => GetCustomModelsByUserIdRequest$inboundSchema.parse(JSON.parse(x)),
|
|
124
|
+
`Failed to parse 'GetCustomModelsByUserIdRequest' from JSON`,
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const GetCustomModelsByUserIdCustomModels$inboundSchema: z.ZodType<
|
|
130
|
+
GetCustomModelsByUserIdCustomModels,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
unknown
|
|
133
|
+
> = z.object({
|
|
134
|
+
createdAt: z.string().optional(),
|
|
135
|
+
description: z.string().optional(),
|
|
136
|
+
id: z.nullable(z.string()).optional(),
|
|
137
|
+
instancePrompt: z.nullable(z.string()).optional(),
|
|
138
|
+
modelHeight: z.number().int().optional(),
|
|
139
|
+
modelWidth: z.number().int().optional(),
|
|
140
|
+
name: z.string().optional(),
|
|
141
|
+
public: z.boolean().optional(),
|
|
142
|
+
sdVersion: shared.SdVersions$inboundSchema.optional(),
|
|
143
|
+
status: shared.JobStatus$inboundSchema.optional(),
|
|
144
|
+
type: shared.CustomModelType$inboundSchema.default(
|
|
145
|
+
shared.CustomModelType.General,
|
|
146
|
+
),
|
|
147
|
+
updatedAt: z.string().optional(),
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export type GetCustomModelsByUserIdCustomModels$Outbound = {
|
|
152
|
+
createdAt?: string | undefined;
|
|
153
|
+
description?: string | undefined;
|
|
154
|
+
id?: string | null | undefined;
|
|
155
|
+
instancePrompt?: string | null | undefined;
|
|
156
|
+
modelHeight?: number | undefined;
|
|
157
|
+
modelWidth?: number | undefined;
|
|
158
|
+
name?: string | undefined;
|
|
159
|
+
public?: boolean | undefined;
|
|
160
|
+
sdVersion?: string | undefined;
|
|
161
|
+
status?: string | undefined;
|
|
162
|
+
type: string;
|
|
163
|
+
updatedAt?: string | undefined;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const GetCustomModelsByUserIdCustomModels$outboundSchema: z.ZodType<
|
|
168
|
+
GetCustomModelsByUserIdCustomModels$Outbound,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
GetCustomModelsByUserIdCustomModels
|
|
171
|
+
> = z.object({
|
|
172
|
+
createdAt: z.string().optional(),
|
|
173
|
+
description: z.string().optional(),
|
|
174
|
+
id: z.nullable(z.string()).optional(),
|
|
175
|
+
instancePrompt: z.nullable(z.string()).optional(),
|
|
176
|
+
modelHeight: z.number().int().optional(),
|
|
177
|
+
modelWidth: z.number().int().optional(),
|
|
178
|
+
name: z.string().optional(),
|
|
179
|
+
public: z.boolean().optional(),
|
|
180
|
+
sdVersion: shared.SdVersions$outboundSchema.optional(),
|
|
181
|
+
status: shared.JobStatus$outboundSchema.optional(),
|
|
182
|
+
type: shared.CustomModelType$outboundSchema.default(
|
|
183
|
+
shared.CustomModelType.General,
|
|
184
|
+
),
|
|
185
|
+
updatedAt: z.string().optional(),
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @internal
|
|
190
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
191
|
+
*/
|
|
192
|
+
export namespace GetCustomModelsByUserIdCustomModels$ {
|
|
193
|
+
/** @deprecated use `GetCustomModelsByUserIdCustomModels$inboundSchema` instead. */
|
|
194
|
+
export const inboundSchema =
|
|
195
|
+
GetCustomModelsByUserIdCustomModels$inboundSchema;
|
|
196
|
+
/** @deprecated use `GetCustomModelsByUserIdCustomModels$outboundSchema` instead. */
|
|
197
|
+
export const outboundSchema =
|
|
198
|
+
GetCustomModelsByUserIdCustomModels$outboundSchema;
|
|
199
|
+
/** @deprecated use `GetCustomModelsByUserIdCustomModels$Outbound` instead. */
|
|
200
|
+
export type Outbound = GetCustomModelsByUserIdCustomModels$Outbound;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function getCustomModelsByUserIdCustomModelsToJSON(
|
|
204
|
+
getCustomModelsByUserIdCustomModels: GetCustomModelsByUserIdCustomModels,
|
|
205
|
+
): string {
|
|
206
|
+
return JSON.stringify(
|
|
207
|
+
GetCustomModelsByUserIdCustomModels$outboundSchema.parse(
|
|
208
|
+
getCustomModelsByUserIdCustomModels,
|
|
209
|
+
),
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function getCustomModelsByUserIdCustomModelsFromJSON(
|
|
214
|
+
jsonString: string,
|
|
215
|
+
): SafeParseResult<GetCustomModelsByUserIdCustomModels, SDKValidationError> {
|
|
216
|
+
return safeParse(
|
|
217
|
+
jsonString,
|
|
218
|
+
(x) =>
|
|
219
|
+
GetCustomModelsByUserIdCustomModels$inboundSchema.parse(JSON.parse(x)),
|
|
220
|
+
`Failed to parse 'GetCustomModelsByUserIdCustomModels' from JSON`,
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** @internal */
|
|
225
|
+
export const GetCustomModelsByUserIdResponseBody$inboundSchema: z.ZodType<
|
|
226
|
+
GetCustomModelsByUserIdResponseBody,
|
|
227
|
+
z.ZodTypeDef,
|
|
228
|
+
unknown
|
|
229
|
+
> = z.object({
|
|
230
|
+
custom_models: z.nullable(
|
|
231
|
+
z.array(z.lazy(() => GetCustomModelsByUserIdCustomModels$inboundSchema)),
|
|
232
|
+
).optional(),
|
|
233
|
+
}).transform((v) => {
|
|
234
|
+
return remap$(v, {
|
|
235
|
+
"custom_models": "customModels",
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
/** @internal */
|
|
240
|
+
export type GetCustomModelsByUserIdResponseBody$Outbound = {
|
|
241
|
+
custom_models?:
|
|
242
|
+
| Array<GetCustomModelsByUserIdCustomModels$Outbound>
|
|
243
|
+
| null
|
|
244
|
+
| undefined;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/** @internal */
|
|
248
|
+
export const GetCustomModelsByUserIdResponseBody$outboundSchema: z.ZodType<
|
|
249
|
+
GetCustomModelsByUserIdResponseBody$Outbound,
|
|
250
|
+
z.ZodTypeDef,
|
|
251
|
+
GetCustomModelsByUserIdResponseBody
|
|
252
|
+
> = z.object({
|
|
253
|
+
customModels: z.nullable(
|
|
254
|
+
z.array(z.lazy(() => GetCustomModelsByUserIdCustomModels$outboundSchema)),
|
|
255
|
+
).optional(),
|
|
256
|
+
}).transform((v) => {
|
|
257
|
+
return remap$(v, {
|
|
258
|
+
customModels: "custom_models",
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @internal
|
|
264
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
265
|
+
*/
|
|
266
|
+
export namespace GetCustomModelsByUserIdResponseBody$ {
|
|
267
|
+
/** @deprecated use `GetCustomModelsByUserIdResponseBody$inboundSchema` instead. */
|
|
268
|
+
export const inboundSchema =
|
|
269
|
+
GetCustomModelsByUserIdResponseBody$inboundSchema;
|
|
270
|
+
/** @deprecated use `GetCustomModelsByUserIdResponseBody$outboundSchema` instead. */
|
|
271
|
+
export const outboundSchema =
|
|
272
|
+
GetCustomModelsByUserIdResponseBody$outboundSchema;
|
|
273
|
+
/** @deprecated use `GetCustomModelsByUserIdResponseBody$Outbound` instead. */
|
|
274
|
+
export type Outbound = GetCustomModelsByUserIdResponseBody$Outbound;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export function getCustomModelsByUserIdResponseBodyToJSON(
|
|
278
|
+
getCustomModelsByUserIdResponseBody: GetCustomModelsByUserIdResponseBody,
|
|
279
|
+
): string {
|
|
280
|
+
return JSON.stringify(
|
|
281
|
+
GetCustomModelsByUserIdResponseBody$outboundSchema.parse(
|
|
282
|
+
getCustomModelsByUserIdResponseBody,
|
|
283
|
+
),
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function getCustomModelsByUserIdResponseBodyFromJSON(
|
|
288
|
+
jsonString: string,
|
|
289
|
+
): SafeParseResult<GetCustomModelsByUserIdResponseBody, SDKValidationError> {
|
|
290
|
+
return safeParse(
|
|
291
|
+
jsonString,
|
|
292
|
+
(x) =>
|
|
293
|
+
GetCustomModelsByUserIdResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
294
|
+
`Failed to parse 'GetCustomModelsByUserIdResponseBody' from JSON`,
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** @internal */
|
|
299
|
+
export const GetCustomModelsByUserIdResponse$inboundSchema: z.ZodType<
|
|
300
|
+
GetCustomModelsByUserIdResponse,
|
|
301
|
+
z.ZodTypeDef,
|
|
302
|
+
unknown
|
|
303
|
+
> = z.object({
|
|
304
|
+
ContentType: z.string(),
|
|
305
|
+
StatusCode: z.number().int(),
|
|
306
|
+
RawResponse: z.instanceof(Response),
|
|
307
|
+
object: z.lazy(() => GetCustomModelsByUserIdResponseBody$inboundSchema)
|
|
308
|
+
.optional(),
|
|
309
|
+
}).transform((v) => {
|
|
310
|
+
return remap$(v, {
|
|
311
|
+
"ContentType": "contentType",
|
|
312
|
+
"StatusCode": "statusCode",
|
|
313
|
+
"RawResponse": "rawResponse",
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
/** @internal */
|
|
318
|
+
export type GetCustomModelsByUserIdResponse$Outbound = {
|
|
319
|
+
ContentType: string;
|
|
320
|
+
StatusCode: number;
|
|
321
|
+
RawResponse: never;
|
|
322
|
+
object?: GetCustomModelsByUserIdResponseBody$Outbound | undefined;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
/** @internal */
|
|
326
|
+
export const GetCustomModelsByUserIdResponse$outboundSchema: z.ZodType<
|
|
327
|
+
GetCustomModelsByUserIdResponse$Outbound,
|
|
328
|
+
z.ZodTypeDef,
|
|
329
|
+
GetCustomModelsByUserIdResponse
|
|
330
|
+
> = z.object({
|
|
331
|
+
contentType: z.string(),
|
|
332
|
+
statusCode: z.number().int(),
|
|
333
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
334
|
+
throw new Error("Response cannot be serialized");
|
|
335
|
+
}),
|
|
336
|
+
object: z.lazy(() => GetCustomModelsByUserIdResponseBody$outboundSchema)
|
|
337
|
+
.optional(),
|
|
338
|
+
}).transform((v) => {
|
|
339
|
+
return remap$(v, {
|
|
340
|
+
contentType: "ContentType",
|
|
341
|
+
statusCode: "StatusCode",
|
|
342
|
+
rawResponse: "RawResponse",
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @internal
|
|
348
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
349
|
+
*/
|
|
350
|
+
export namespace GetCustomModelsByUserIdResponse$ {
|
|
351
|
+
/** @deprecated use `GetCustomModelsByUserIdResponse$inboundSchema` instead. */
|
|
352
|
+
export const inboundSchema = GetCustomModelsByUserIdResponse$inboundSchema;
|
|
353
|
+
/** @deprecated use `GetCustomModelsByUserIdResponse$outboundSchema` instead. */
|
|
354
|
+
export const outboundSchema = GetCustomModelsByUserIdResponse$outboundSchema;
|
|
355
|
+
/** @deprecated use `GetCustomModelsByUserIdResponse$Outbound` instead. */
|
|
356
|
+
export type Outbound = GetCustomModelsByUserIdResponse$Outbound;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export function getCustomModelsByUserIdResponseToJSON(
|
|
360
|
+
getCustomModelsByUserIdResponse: GetCustomModelsByUserIdResponse,
|
|
361
|
+
): string {
|
|
362
|
+
return JSON.stringify(
|
|
363
|
+
GetCustomModelsByUserIdResponse$outboundSchema.parse(
|
|
364
|
+
getCustomModelsByUserIdResponse,
|
|
365
|
+
),
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export function getCustomModelsByUserIdResponseFromJSON(
|
|
370
|
+
jsonString: string,
|
|
371
|
+
): SafeParseResult<GetCustomModelsByUserIdResponse, SDKValidationError> {
|
|
372
|
+
return safeParse(
|
|
373
|
+
jsonString,
|
|
374
|
+
(x) => GetCustomModelsByUserIdResponse$inboundSchema.parse(JSON.parse(x)),
|
|
375
|
+
`Failed to parse 'GetCustomModelsByUserIdResponse' from JSON`,
|
|
376
|
+
);
|
|
377
|
+
}
|
|
@@ -20,6 +20,8 @@ export * from "./deletegenerationbyid.js";
|
|
|
20
20
|
export * from "./deleteinitimagebyid.js";
|
|
21
21
|
export * from "./deletemodelbyid.js";
|
|
22
22
|
export * from "./deletetexturegenerationbyid.js";
|
|
23
|
+
export * from "./getcustomelementsbyuserid.js";
|
|
24
|
+
export * from "./getcustommodelsbyuserid.js";
|
|
23
25
|
export * from "./getdatasetbyid.js";
|
|
24
26
|
export * from "./getelementbyid.js";
|
|
25
27
|
export * from "./getgenerationbyid.js";
|
|
@@ -30,6 +32,7 @@ export * from "./getuserself.js";
|
|
|
30
32
|
export * from "./getvariationbyid.js";
|
|
31
33
|
export * from "./listelements.js";
|
|
32
34
|
export * from "./listplatformmodels.js";
|
|
35
|
+
export * from "./listplatformstyles.js";
|
|
33
36
|
export * from "./performalchemyupscalelcm.js";
|
|
34
37
|
export * from "./performinpaintinglcm.js";
|
|
35
38
|
export * from "./performinstantrefine.js";
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* columns and relationships of "style"
|
|
13
|
+
*/
|
|
14
|
+
export type Style = {
|
|
15
|
+
akUUID?: string | null | undefined;
|
|
16
|
+
description?: string | null | undefined;
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Responses for GET /api/rest/v1/platform-styles
|
|
22
|
+
*/
|
|
23
|
+
export type ListPlatformStylesResponseBody = {
|
|
24
|
+
style?: Array<Style> | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type ListPlatformStylesResponse = {
|
|
28
|
+
/**
|
|
29
|
+
* HTTP response content type for this operation
|
|
30
|
+
*/
|
|
31
|
+
contentType: string;
|
|
32
|
+
/**
|
|
33
|
+
* HTTP response status code for this operation
|
|
34
|
+
*/
|
|
35
|
+
statusCode: number;
|
|
36
|
+
/**
|
|
37
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
38
|
+
*/
|
|
39
|
+
rawResponse: Response;
|
|
40
|
+
/**
|
|
41
|
+
* Responses for GET /api/rest/v1/platform-styles
|
|
42
|
+
*/
|
|
43
|
+
object?: ListPlatformStylesResponseBody | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const Style$inboundSchema: z.ZodType<Style, z.ZodTypeDef, unknown> = z
|
|
48
|
+
.object({
|
|
49
|
+
akUUID: z.nullable(z.string()).optional(),
|
|
50
|
+
description: z.nullable(z.string()).optional(),
|
|
51
|
+
name: z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type Style$Outbound = {
|
|
56
|
+
akUUID?: string | null | undefined;
|
|
57
|
+
description?: string | null | undefined;
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const Style$outboundSchema: z.ZodType<
|
|
63
|
+
Style$Outbound,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
Style
|
|
66
|
+
> = z.object({
|
|
67
|
+
akUUID: z.nullable(z.string()).optional(),
|
|
68
|
+
description: z.nullable(z.string()).optional(),
|
|
69
|
+
name: z.string().optional(),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export namespace Style$ {
|
|
77
|
+
/** @deprecated use `Style$inboundSchema` instead. */
|
|
78
|
+
export const inboundSchema = Style$inboundSchema;
|
|
79
|
+
/** @deprecated use `Style$outboundSchema` instead. */
|
|
80
|
+
export const outboundSchema = Style$outboundSchema;
|
|
81
|
+
/** @deprecated use `Style$Outbound` instead. */
|
|
82
|
+
export type Outbound = Style$Outbound;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function styleToJSON(style: Style): string {
|
|
86
|
+
return JSON.stringify(Style$outboundSchema.parse(style));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function styleFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<Style, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) => Style$inboundSchema.parse(JSON.parse(x)),
|
|
95
|
+
`Failed to parse 'Style' from JSON`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const ListPlatformStylesResponseBody$inboundSchema: z.ZodType<
|
|
101
|
+
ListPlatformStylesResponseBody,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
unknown
|
|
104
|
+
> = z.object({
|
|
105
|
+
style: z.array(z.lazy(() => Style$inboundSchema)).optional(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type ListPlatformStylesResponseBody$Outbound = {
|
|
110
|
+
style?: Array<Style$Outbound> | undefined;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const ListPlatformStylesResponseBody$outboundSchema: z.ZodType<
|
|
115
|
+
ListPlatformStylesResponseBody$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
ListPlatformStylesResponseBody
|
|
118
|
+
> = z.object({
|
|
119
|
+
style: z.array(z.lazy(() => Style$outboundSchema)).optional(),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
125
|
+
*/
|
|
126
|
+
export namespace ListPlatformStylesResponseBody$ {
|
|
127
|
+
/** @deprecated use `ListPlatformStylesResponseBody$inboundSchema` instead. */
|
|
128
|
+
export const inboundSchema = ListPlatformStylesResponseBody$inboundSchema;
|
|
129
|
+
/** @deprecated use `ListPlatformStylesResponseBody$outboundSchema` instead. */
|
|
130
|
+
export const outboundSchema = ListPlatformStylesResponseBody$outboundSchema;
|
|
131
|
+
/** @deprecated use `ListPlatformStylesResponseBody$Outbound` instead. */
|
|
132
|
+
export type Outbound = ListPlatformStylesResponseBody$Outbound;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function listPlatformStylesResponseBodyToJSON(
|
|
136
|
+
listPlatformStylesResponseBody: ListPlatformStylesResponseBody,
|
|
137
|
+
): string {
|
|
138
|
+
return JSON.stringify(
|
|
139
|
+
ListPlatformStylesResponseBody$outboundSchema.parse(
|
|
140
|
+
listPlatformStylesResponseBody,
|
|
141
|
+
),
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function listPlatformStylesResponseBodyFromJSON(
|
|
146
|
+
jsonString: string,
|
|
147
|
+
): SafeParseResult<ListPlatformStylesResponseBody, SDKValidationError> {
|
|
148
|
+
return safeParse(
|
|
149
|
+
jsonString,
|
|
150
|
+
(x) => ListPlatformStylesResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
151
|
+
`Failed to parse 'ListPlatformStylesResponseBody' from JSON`,
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const ListPlatformStylesResponse$inboundSchema: z.ZodType<
|
|
157
|
+
ListPlatformStylesResponse,
|
|
158
|
+
z.ZodTypeDef,
|
|
159
|
+
unknown
|
|
160
|
+
> = z.object({
|
|
161
|
+
ContentType: z.string(),
|
|
162
|
+
StatusCode: z.number().int(),
|
|
163
|
+
RawResponse: z.instanceof(Response),
|
|
164
|
+
object: z.lazy(() => ListPlatformStylesResponseBody$inboundSchema).optional(),
|
|
165
|
+
}).transform((v) => {
|
|
166
|
+
return remap$(v, {
|
|
167
|
+
"ContentType": "contentType",
|
|
168
|
+
"StatusCode": "statusCode",
|
|
169
|
+
"RawResponse": "rawResponse",
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export type ListPlatformStylesResponse$Outbound = {
|
|
175
|
+
ContentType: string;
|
|
176
|
+
StatusCode: number;
|
|
177
|
+
RawResponse: never;
|
|
178
|
+
object?: ListPlatformStylesResponseBody$Outbound | undefined;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/** @internal */
|
|
182
|
+
export const ListPlatformStylesResponse$outboundSchema: z.ZodType<
|
|
183
|
+
ListPlatformStylesResponse$Outbound,
|
|
184
|
+
z.ZodTypeDef,
|
|
185
|
+
ListPlatformStylesResponse
|
|
186
|
+
> = z.object({
|
|
187
|
+
contentType: z.string(),
|
|
188
|
+
statusCode: z.number().int(),
|
|
189
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
190
|
+
throw new Error("Response cannot be serialized");
|
|
191
|
+
}),
|
|
192
|
+
object: z.lazy(() => ListPlatformStylesResponseBody$outboundSchema)
|
|
193
|
+
.optional(),
|
|
194
|
+
}).transform((v) => {
|
|
195
|
+
return remap$(v, {
|
|
196
|
+
contentType: "ContentType",
|
|
197
|
+
statusCode: "StatusCode",
|
|
198
|
+
rawResponse: "RawResponse",
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
205
|
+
*/
|
|
206
|
+
export namespace ListPlatformStylesResponse$ {
|
|
207
|
+
/** @deprecated use `ListPlatformStylesResponse$inboundSchema` instead. */
|
|
208
|
+
export const inboundSchema = ListPlatformStylesResponse$inboundSchema;
|
|
209
|
+
/** @deprecated use `ListPlatformStylesResponse$outboundSchema` instead. */
|
|
210
|
+
export const outboundSchema = ListPlatformStylesResponse$outboundSchema;
|
|
211
|
+
/** @deprecated use `ListPlatformStylesResponse$Outbound` instead. */
|
|
212
|
+
export type Outbound = ListPlatformStylesResponse$Outbound;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function listPlatformStylesResponseToJSON(
|
|
216
|
+
listPlatformStylesResponse: ListPlatformStylesResponse,
|
|
217
|
+
): string {
|
|
218
|
+
return JSON.stringify(
|
|
219
|
+
ListPlatformStylesResponse$outboundSchema.parse(listPlatformStylesResponse),
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function listPlatformStylesResponseFromJSON(
|
|
224
|
+
jsonString: string,
|
|
225
|
+
): SafeParseResult<ListPlatformStylesResponse, SDKValidationError> {
|
|
226
|
+
return safeParse(
|
|
227
|
+
jsonString,
|
|
228
|
+
(x) => ListPlatformStylesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
229
|
+
`Failed to parse 'ListPlatformStylesResponse' from JSON`,
|
|
230
|
+
);
|
|
231
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type UserElementsInput = {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for user custom element.
|
|
13
|
+
*/
|
|
14
|
+
userLoraId?: number | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Weight for the element
|
|
17
|
+
*/
|
|
18
|
+
weight?: number | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const UserElementsInput$inboundSchema: z.ZodType<
|
|
23
|
+
UserElementsInput,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
userLoraId: z.nullable(z.number()).optional(),
|
|
28
|
+
weight: z.nullable(z.number()).optional(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type UserElementsInput$Outbound = {
|
|
33
|
+
userLoraId?: number | null | undefined;
|
|
34
|
+
weight?: number | null | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const UserElementsInput$outboundSchema: z.ZodType<
|
|
39
|
+
UserElementsInput$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
UserElementsInput
|
|
42
|
+
> = z.object({
|
|
43
|
+
userLoraId: z.nullable(z.number()).optional(),
|
|
44
|
+
weight: z.nullable(z.number()).optional(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace UserElementsInput$ {
|
|
52
|
+
/** @deprecated use `UserElementsInput$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = UserElementsInput$inboundSchema;
|
|
54
|
+
/** @deprecated use `UserElementsInput$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = UserElementsInput$outboundSchema;
|
|
56
|
+
/** @deprecated use `UserElementsInput$Outbound` instead. */
|
|
57
|
+
export type Outbound = UserElementsInput$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function userElementsInputToJSON(
|
|
61
|
+
userElementsInput: UserElementsInput,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
UserElementsInput$outboundSchema.parse(userElementsInput),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function userElementsInputFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<UserElementsInput, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => UserElementsInput$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'UserElementsInput' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|