@moovio/sdk 0.16.5 → 0.17.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 (108) hide show
  1. package/README.md +60 -45
  2. package/bin/mcp-server.js +1167 -551
  3. package/bin/mcp-server.js.map +23 -12
  4. package/docs/sdks/images/README.md +190 -0
  5. package/docs/sdks/products/README.md +32 -8
  6. package/examples/package-lock.json +1 -1
  7. package/funcs/imagesUpdate.d.ts +19 -0
  8. package/funcs/imagesUpdate.d.ts.map +1 -0
  9. package/funcs/imagesUpdate.js +170 -0
  10. package/funcs/imagesUpdate.js.map +1 -0
  11. package/funcs/imagesUpload.d.ts +16 -0
  12. package/funcs/imagesUpload.d.ts.map +1 -0
  13. package/funcs/imagesUpload.js +161 -0
  14. package/funcs/imagesUpload.js.map +1 -0
  15. package/jsr.json +1 -1
  16. package/lib/config.d.ts +3 -3
  17. package/lib/config.js +3 -3
  18. package/lib/config.js.map +1 -1
  19. package/mcp-server/mcp-server.js +1 -1
  20. package/mcp-server/server.d.ts.map +1 -1
  21. package/mcp-server/server.js +5 -1
  22. package/mcp-server/server.js.map +1 -1
  23. package/mcp-server/tools/imagesUpdate.d.ts +8 -0
  24. package/mcp-server/tools/imagesUpdate.d.ts.map +1 -0
  25. package/mcp-server/tools/imagesUpdate.js +66 -0
  26. package/mcp-server/tools/imagesUpdate.js.map +1 -0
  27. package/mcp-server/tools/imagesUpload.d.ts +8 -0
  28. package/mcp-server/tools/imagesUpload.d.ts.map +1 -0
  29. package/mcp-server/tools/imagesUpload.js +63 -0
  30. package/mcp-server/tools/imagesUpload.js.map +1 -0
  31. package/models/components/createproductoption.d.ts +3 -2
  32. package/models/components/createproductoption.d.ts.map +1 -1
  33. package/models/components/createproductoption.js +3 -2
  34. package/models/components/createproductoption.js.map +1 -1
  35. package/models/components/imagemetadatarequest.d.ts +35 -0
  36. package/models/components/imagemetadatarequest.d.ts.map +1 -0
  37. package/models/components/imagemetadatarequest.js +69 -0
  38. package/models/components/imagemetadatarequest.js.map +1 -0
  39. package/models/components/imagemetadatavalidationerror.d.ts +29 -0
  40. package/models/components/imagemetadatavalidationerror.d.ts.map +1 -0
  41. package/models/components/imagemetadatavalidationerror.js +69 -0
  42. package/models/components/imagemetadatavalidationerror.js.map +1 -0
  43. package/models/components/imageupdaterequestmultipart.d.ts +103 -0
  44. package/models/components/imageupdaterequestmultipart.d.ts.map +1 -0
  45. package/models/components/imageupdaterequestmultipart.js +139 -0
  46. package/models/components/imageupdaterequestmultipart.js.map +1 -0
  47. package/models/components/imageuploadrequestmultipart.d.ts +65 -0
  48. package/models/components/imageuploadrequestmultipart.d.ts.map +1 -0
  49. package/models/components/imageuploadrequestmultipart.js +113 -0
  50. package/models/components/imageuploadrequestmultipart.js.map +1 -0
  51. package/models/components/index.d.ts +4 -0
  52. package/models/components/index.d.ts.map +1 -1
  53. package/models/components/index.js +4 -0
  54. package/models/components/index.js.map +1 -1
  55. package/models/components/productoption.d.ts +3 -2
  56. package/models/components/productoption.d.ts.map +1 -1
  57. package/models/components/productoption.js +3 -2
  58. package/models/components/productoption.js.map +1 -1
  59. package/models/components/productoptionvalidationerror.d.ts +3 -2
  60. package/models/components/productoptionvalidationerror.d.ts.map +1 -1
  61. package/models/components/productoptionvalidationerror.js +3 -2
  62. package/models/components/productoptionvalidationerror.js.map +1 -1
  63. package/models/errors/imagerequestvalidationerror.d.ts +40 -0
  64. package/models/errors/imagerequestvalidationerror.d.ts.map +1 -0
  65. package/models/errors/imagerequestvalidationerror.js +91 -0
  66. package/models/errors/imagerequestvalidationerror.js.map +1 -0
  67. package/models/errors/index.d.ts +1 -0
  68. package/models/errors/index.d.ts.map +1 -1
  69. package/models/errors/index.js +1 -0
  70. package/models/errors/index.js.map +1 -1
  71. package/models/operations/index.d.ts +2 -0
  72. package/models/operations/index.d.ts.map +1 -1
  73. package/models/operations/index.js +2 -0
  74. package/models/operations/index.js.map +1 -1
  75. package/models/operations/updateimage.d.ts +103 -0
  76. package/models/operations/updateimage.d.ts.map +1 -0
  77. package/models/operations/updateimage.js +157 -0
  78. package/models/operations/updateimage.js.map +1 -0
  79. package/models/operations/uploadimage.d.ts +101 -0
  80. package/models/operations/uploadimage.d.ts.map +1 -0
  81. package/models/operations/uploadimage.js +155 -0
  82. package/models/operations/uploadimage.js.map +1 -0
  83. package/package.json +1 -1
  84. package/sdk/images.d.ts +13 -0
  85. package/sdk/images.d.ts.map +1 -1
  86. package/sdk/images.js +19 -0
  87. package/sdk/images.js.map +1 -1
  88. package/src/funcs/imagesUpdate.ts +258 -0
  89. package/src/funcs/imagesUpload.ts +249 -0
  90. package/src/lib/config.ts +3 -3
  91. package/src/mcp-server/mcp-server.ts +1 -1
  92. package/src/mcp-server/server.ts +5 -1
  93. package/src/mcp-server/tools/imagesUpdate.ts +39 -0
  94. package/src/mcp-server/tools/imagesUpload.ts +36 -0
  95. package/src/models/components/createproductoption.ts +10 -4
  96. package/src/models/components/imagemetadatarequest.ts +72 -0
  97. package/src/models/components/imagemetadatavalidationerror.ts +68 -0
  98. package/src/models/components/imageupdaterequestmultipart.ts +224 -0
  99. package/src/models/components/imageuploadrequestmultipart.ts +150 -0
  100. package/src/models/components/index.ts +4 -0
  101. package/src/models/components/productoption.ts +10 -4
  102. package/src/models/components/productoptionvalidationerror.ts +10 -4
  103. package/src/models/errors/imagerequestvalidationerror.ts +86 -0
  104. package/src/models/errors/index.ts +1 -0
  105. package/src/models/operations/index.ts +2 -0
  106. package/src/models/operations/updateimage.ts +237 -0
  107. package/src/models/operations/uploadimage.ts +233 -0
  108. package/src/sdk/images.ts +35 -0
@@ -0,0 +1,72 @@
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
+ /**
11
+ * Request body for creating or updating image metadata.
12
+ */
13
+ export type ImageMetadataRequest = {
14
+ /**
15
+ * Alternative text for the image.
16
+ */
17
+ altText?: string | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const ImageMetadataRequest$inboundSchema: z.ZodType<
22
+ ImageMetadataRequest,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ altText: z.string().optional(),
27
+ });
28
+
29
+ /** @internal */
30
+ export type ImageMetadataRequest$Outbound = {
31
+ altText?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const ImageMetadataRequest$outboundSchema: z.ZodType<
36
+ ImageMetadataRequest$Outbound,
37
+ z.ZodTypeDef,
38
+ ImageMetadataRequest
39
+ > = z.object({
40
+ altText: z.string().optional(),
41
+ });
42
+
43
+ /**
44
+ * @internal
45
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
46
+ */
47
+ export namespace ImageMetadataRequest$ {
48
+ /** @deprecated use `ImageMetadataRequest$inboundSchema` instead. */
49
+ export const inboundSchema = ImageMetadataRequest$inboundSchema;
50
+ /** @deprecated use `ImageMetadataRequest$outboundSchema` instead. */
51
+ export const outboundSchema = ImageMetadataRequest$outboundSchema;
52
+ /** @deprecated use `ImageMetadataRequest$Outbound` instead. */
53
+ export type Outbound = ImageMetadataRequest$Outbound;
54
+ }
55
+
56
+ export function imageMetadataRequestToJSON(
57
+ imageMetadataRequest: ImageMetadataRequest,
58
+ ): string {
59
+ return JSON.stringify(
60
+ ImageMetadataRequest$outboundSchema.parse(imageMetadataRequest),
61
+ );
62
+ }
63
+
64
+ export function imageMetadataRequestFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<ImageMetadataRequest, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => ImageMetadataRequest$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'ImageMetadataRequest' from JSON`,
71
+ );
72
+ }
@@ -0,0 +1,68 @@
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 ImageMetadataValidationError = {
11
+ altText?: string | undefined;
12
+ };
13
+
14
+ /** @internal */
15
+ export const ImageMetadataValidationError$inboundSchema: z.ZodType<
16
+ ImageMetadataValidationError,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ altText: z.string().optional(),
21
+ });
22
+
23
+ /** @internal */
24
+ export type ImageMetadataValidationError$Outbound = {
25
+ altText?: string | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const ImageMetadataValidationError$outboundSchema: z.ZodType<
30
+ ImageMetadataValidationError$Outbound,
31
+ z.ZodTypeDef,
32
+ ImageMetadataValidationError
33
+ > = z.object({
34
+ altText: z.string().optional(),
35
+ });
36
+
37
+ /**
38
+ * @internal
39
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
+ */
41
+ export namespace ImageMetadataValidationError$ {
42
+ /** @deprecated use `ImageMetadataValidationError$inboundSchema` instead. */
43
+ export const inboundSchema = ImageMetadataValidationError$inboundSchema;
44
+ /** @deprecated use `ImageMetadataValidationError$outboundSchema` instead. */
45
+ export const outboundSchema = ImageMetadataValidationError$outboundSchema;
46
+ /** @deprecated use `ImageMetadataValidationError$Outbound` instead. */
47
+ export type Outbound = ImageMetadataValidationError$Outbound;
48
+ }
49
+
50
+ export function imageMetadataValidationErrorToJSON(
51
+ imageMetadataValidationError: ImageMetadataValidationError,
52
+ ): string {
53
+ return JSON.stringify(
54
+ ImageMetadataValidationError$outboundSchema.parse(
55
+ imageMetadataValidationError,
56
+ ),
57
+ );
58
+ }
59
+
60
+ export function imageMetadataValidationErrorFromJSON(
61
+ jsonString: string,
62
+ ): SafeParseResult<ImageMetadataValidationError, SDKValidationError> {
63
+ return safeParse(
64
+ jsonString,
65
+ (x) => ImageMetadataValidationError$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'ImageMetadataValidationError' from JSON`,
67
+ );
68
+ }
@@ -0,0 +1,224 @@
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 { blobLikeSchema } from "../../types/blobs.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type ImageUpdateRequestMultiPartImage = {
12
+ fileName: string;
13
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
14
+ };
15
+
16
+ /**
17
+ * JSON-encoded metadata to update for the image.
18
+ *
19
+ * @remarks
20
+ *
21
+ * Omit this field if not updating metadata, or send `null` to clear existing metadata.
22
+ */
23
+ export type Metadata = {
24
+ /**
25
+ * Alternative text for the image.
26
+ */
27
+ altText?: string | undefined;
28
+ };
29
+
30
+ /**
31
+ * Multipart request body for updating an image and/or its metadata.
32
+ */
33
+ export type ImageUpdateRequestMultiPart = {
34
+ image?: ImageUpdateRequestMultiPartImage | Blob | undefined;
35
+ /**
36
+ * JSON-encoded metadata to update for the image.
37
+ *
38
+ * @remarks
39
+ *
40
+ * Omit this field if not updating metadata, or send `null` to clear existing metadata.
41
+ */
42
+ metadata?: Metadata | null | undefined;
43
+ };
44
+
45
+ /** @internal */
46
+ export const ImageUpdateRequestMultiPartImage$inboundSchema: z.ZodType<
47
+ ImageUpdateRequestMultiPartImage,
48
+ z.ZodTypeDef,
49
+ unknown
50
+ > = z.object({
51
+ fileName: z.string(),
52
+ content: z.union([
53
+ z.instanceof(ReadableStream<Uint8Array>),
54
+ z.instanceof(Blob),
55
+ z.instanceof(ArrayBuffer),
56
+ z.instanceof(Uint8Array),
57
+ ]),
58
+ });
59
+
60
+ /** @internal */
61
+ export type ImageUpdateRequestMultiPartImage$Outbound = {
62
+ fileName: string;
63
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
64
+ };
65
+
66
+ /** @internal */
67
+ export const ImageUpdateRequestMultiPartImage$outboundSchema: z.ZodType<
68
+ ImageUpdateRequestMultiPartImage$Outbound,
69
+ z.ZodTypeDef,
70
+ ImageUpdateRequestMultiPartImage
71
+ > = z.object({
72
+ fileName: z.string(),
73
+ content: z.union([
74
+ z.instanceof(ReadableStream<Uint8Array>),
75
+ z.instanceof(Blob),
76
+ z.instanceof(ArrayBuffer),
77
+ z.instanceof(Uint8Array),
78
+ ]),
79
+ });
80
+
81
+ /**
82
+ * @internal
83
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
+ */
85
+ export namespace ImageUpdateRequestMultiPartImage$ {
86
+ /** @deprecated use `ImageUpdateRequestMultiPartImage$inboundSchema` instead. */
87
+ export const inboundSchema = ImageUpdateRequestMultiPartImage$inboundSchema;
88
+ /** @deprecated use `ImageUpdateRequestMultiPartImage$outboundSchema` instead. */
89
+ export const outboundSchema = ImageUpdateRequestMultiPartImage$outboundSchema;
90
+ /** @deprecated use `ImageUpdateRequestMultiPartImage$Outbound` instead. */
91
+ export type Outbound = ImageUpdateRequestMultiPartImage$Outbound;
92
+ }
93
+
94
+ export function imageUpdateRequestMultiPartImageToJSON(
95
+ imageUpdateRequestMultiPartImage: ImageUpdateRequestMultiPartImage,
96
+ ): string {
97
+ return JSON.stringify(
98
+ ImageUpdateRequestMultiPartImage$outboundSchema.parse(
99
+ imageUpdateRequestMultiPartImage,
100
+ ),
101
+ );
102
+ }
103
+
104
+ export function imageUpdateRequestMultiPartImageFromJSON(
105
+ jsonString: string,
106
+ ): SafeParseResult<ImageUpdateRequestMultiPartImage, SDKValidationError> {
107
+ return safeParse(
108
+ jsonString,
109
+ (x) => ImageUpdateRequestMultiPartImage$inboundSchema.parse(JSON.parse(x)),
110
+ `Failed to parse 'ImageUpdateRequestMultiPartImage' from JSON`,
111
+ );
112
+ }
113
+
114
+ /** @internal */
115
+ export const Metadata$inboundSchema: z.ZodType<
116
+ Metadata,
117
+ z.ZodTypeDef,
118
+ unknown
119
+ > = z.object({
120
+ altText: z.string().optional(),
121
+ });
122
+
123
+ /** @internal */
124
+ export type Metadata$Outbound = {
125
+ altText?: string | undefined;
126
+ };
127
+
128
+ /** @internal */
129
+ export const Metadata$outboundSchema: z.ZodType<
130
+ Metadata$Outbound,
131
+ z.ZodTypeDef,
132
+ Metadata
133
+ > = z.object({
134
+ altText: z.string().optional(),
135
+ });
136
+
137
+ /**
138
+ * @internal
139
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
140
+ */
141
+ export namespace Metadata$ {
142
+ /** @deprecated use `Metadata$inboundSchema` instead. */
143
+ export const inboundSchema = Metadata$inboundSchema;
144
+ /** @deprecated use `Metadata$outboundSchema` instead. */
145
+ export const outboundSchema = Metadata$outboundSchema;
146
+ /** @deprecated use `Metadata$Outbound` instead. */
147
+ export type Outbound = Metadata$Outbound;
148
+ }
149
+
150
+ export function metadataToJSON(metadata: Metadata): string {
151
+ return JSON.stringify(Metadata$outboundSchema.parse(metadata));
152
+ }
153
+
154
+ export function metadataFromJSON(
155
+ jsonString: string,
156
+ ): SafeParseResult<Metadata, SDKValidationError> {
157
+ return safeParse(
158
+ jsonString,
159
+ (x) => Metadata$inboundSchema.parse(JSON.parse(x)),
160
+ `Failed to parse 'Metadata' from JSON`,
161
+ );
162
+ }
163
+
164
+ /** @internal */
165
+ export const ImageUpdateRequestMultiPart$inboundSchema: z.ZodType<
166
+ ImageUpdateRequestMultiPart,
167
+ z.ZodTypeDef,
168
+ unknown
169
+ > = z.object({
170
+ image: z.lazy(() => ImageUpdateRequestMultiPartImage$inboundSchema)
171
+ .optional(),
172
+ metadata: z.nullable(z.lazy(() => Metadata$inboundSchema)).optional(),
173
+ });
174
+
175
+ /** @internal */
176
+ export type ImageUpdateRequestMultiPart$Outbound = {
177
+ image?: ImageUpdateRequestMultiPartImage$Outbound | Blob | undefined;
178
+ metadata?: Metadata$Outbound | null | undefined;
179
+ };
180
+
181
+ /** @internal */
182
+ export const ImageUpdateRequestMultiPart$outboundSchema: z.ZodType<
183
+ ImageUpdateRequestMultiPart$Outbound,
184
+ z.ZodTypeDef,
185
+ ImageUpdateRequestMultiPart
186
+ > = z.object({
187
+ image: z.lazy(() => ImageUpdateRequestMultiPartImage$outboundSchema).or(
188
+ blobLikeSchema,
189
+ ).optional(),
190
+ metadata: z.nullable(z.lazy(() => Metadata$outboundSchema)).optional(),
191
+ });
192
+
193
+ /**
194
+ * @internal
195
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
196
+ */
197
+ export namespace ImageUpdateRequestMultiPart$ {
198
+ /** @deprecated use `ImageUpdateRequestMultiPart$inboundSchema` instead. */
199
+ export const inboundSchema = ImageUpdateRequestMultiPart$inboundSchema;
200
+ /** @deprecated use `ImageUpdateRequestMultiPart$outboundSchema` instead. */
201
+ export const outboundSchema = ImageUpdateRequestMultiPart$outboundSchema;
202
+ /** @deprecated use `ImageUpdateRequestMultiPart$Outbound` instead. */
203
+ export type Outbound = ImageUpdateRequestMultiPart$Outbound;
204
+ }
205
+
206
+ export function imageUpdateRequestMultiPartToJSON(
207
+ imageUpdateRequestMultiPart: ImageUpdateRequestMultiPart,
208
+ ): string {
209
+ return JSON.stringify(
210
+ ImageUpdateRequestMultiPart$outboundSchema.parse(
211
+ imageUpdateRequestMultiPart,
212
+ ),
213
+ );
214
+ }
215
+
216
+ export function imageUpdateRequestMultiPartFromJSON(
217
+ jsonString: string,
218
+ ): SafeParseResult<ImageUpdateRequestMultiPart, SDKValidationError> {
219
+ return safeParse(
220
+ jsonString,
221
+ (x) => ImageUpdateRequestMultiPart$inboundSchema.parse(JSON.parse(x)),
222
+ `Failed to parse 'ImageUpdateRequestMultiPart' from JSON`,
223
+ );
224
+ }
@@ -0,0 +1,150 @@
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 { blobLikeSchema } from "../../types/blobs.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ImageMetadataRequest,
12
+ ImageMetadataRequest$inboundSchema,
13
+ ImageMetadataRequest$Outbound,
14
+ ImageMetadataRequest$outboundSchema,
15
+ } from "./imagemetadatarequest.js";
16
+
17
+ export type Image = {
18
+ fileName: string;
19
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
20
+ };
21
+
22
+ /**
23
+ * Multipart request body for uploading an image with optional metadata.
24
+ */
25
+ export type ImageUploadRequestMultiPart = {
26
+ image: Image | Blob;
27
+ /**
28
+ * Optional, json-encoded metadata to associate with the uploaded image.
29
+ */
30
+ metadata?: ImageMetadataRequest | undefined;
31
+ };
32
+
33
+ /** @internal */
34
+ export const Image$inboundSchema: z.ZodType<Image, z.ZodTypeDef, unknown> = z
35
+ .object({
36
+ fileName: z.string(),
37
+ content: z.union([
38
+ z.instanceof(ReadableStream<Uint8Array>),
39
+ z.instanceof(Blob),
40
+ z.instanceof(ArrayBuffer),
41
+ z.instanceof(Uint8Array),
42
+ ]),
43
+ });
44
+
45
+ /** @internal */
46
+ export type Image$Outbound = {
47
+ fileName: string;
48
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
49
+ };
50
+
51
+ /** @internal */
52
+ export const Image$outboundSchema: z.ZodType<
53
+ Image$Outbound,
54
+ z.ZodTypeDef,
55
+ Image
56
+ > = z.object({
57
+ fileName: z.string(),
58
+ content: z.union([
59
+ z.instanceof(ReadableStream<Uint8Array>),
60
+ z.instanceof(Blob),
61
+ z.instanceof(ArrayBuffer),
62
+ z.instanceof(Uint8Array),
63
+ ]),
64
+ });
65
+
66
+ /**
67
+ * @internal
68
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
69
+ */
70
+ export namespace Image$ {
71
+ /** @deprecated use `Image$inboundSchema` instead. */
72
+ export const inboundSchema = Image$inboundSchema;
73
+ /** @deprecated use `Image$outboundSchema` instead. */
74
+ export const outboundSchema = Image$outboundSchema;
75
+ /** @deprecated use `Image$Outbound` instead. */
76
+ export type Outbound = Image$Outbound;
77
+ }
78
+
79
+ export function imageToJSON(image: Image): string {
80
+ return JSON.stringify(Image$outboundSchema.parse(image));
81
+ }
82
+
83
+ export function imageFromJSON(
84
+ jsonString: string,
85
+ ): SafeParseResult<Image, SDKValidationError> {
86
+ return safeParse(
87
+ jsonString,
88
+ (x) => Image$inboundSchema.parse(JSON.parse(x)),
89
+ `Failed to parse 'Image' from JSON`,
90
+ );
91
+ }
92
+
93
+ /** @internal */
94
+ export const ImageUploadRequestMultiPart$inboundSchema: z.ZodType<
95
+ ImageUploadRequestMultiPart,
96
+ z.ZodTypeDef,
97
+ unknown
98
+ > = z.object({
99
+ image: z.lazy(() => Image$inboundSchema),
100
+ metadata: ImageMetadataRequest$inboundSchema.optional(),
101
+ });
102
+
103
+ /** @internal */
104
+ export type ImageUploadRequestMultiPart$Outbound = {
105
+ image: Image$Outbound | Blob;
106
+ metadata?: ImageMetadataRequest$Outbound | undefined;
107
+ };
108
+
109
+ /** @internal */
110
+ export const ImageUploadRequestMultiPart$outboundSchema: z.ZodType<
111
+ ImageUploadRequestMultiPart$Outbound,
112
+ z.ZodTypeDef,
113
+ ImageUploadRequestMultiPart
114
+ > = z.object({
115
+ image: z.lazy(() => Image$outboundSchema).or(blobLikeSchema),
116
+ metadata: ImageMetadataRequest$outboundSchema.optional(),
117
+ });
118
+
119
+ /**
120
+ * @internal
121
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
122
+ */
123
+ export namespace ImageUploadRequestMultiPart$ {
124
+ /** @deprecated use `ImageUploadRequestMultiPart$inboundSchema` instead. */
125
+ export const inboundSchema = ImageUploadRequestMultiPart$inboundSchema;
126
+ /** @deprecated use `ImageUploadRequestMultiPart$outboundSchema` instead. */
127
+ export const outboundSchema = ImageUploadRequestMultiPart$outboundSchema;
128
+ /** @deprecated use `ImageUploadRequestMultiPart$Outbound` instead. */
129
+ export type Outbound = ImageUploadRequestMultiPart$Outbound;
130
+ }
131
+
132
+ export function imageUploadRequestMultiPartToJSON(
133
+ imageUploadRequestMultiPart: ImageUploadRequestMultiPart,
134
+ ): string {
135
+ return JSON.stringify(
136
+ ImageUploadRequestMultiPart$outboundSchema.parse(
137
+ imageUploadRequestMultiPart,
138
+ ),
139
+ );
140
+ }
141
+
142
+ export function imageUploadRequestMultiPartFromJSON(
143
+ jsonString: string,
144
+ ): SafeParseResult<ImageUploadRequestMultiPart, SDKValidationError> {
145
+ return safeParse(
146
+ jsonString,
147
+ (x) => ImageUploadRequestMultiPart$inboundSchema.parse(JSON.parse(x)),
148
+ `Failed to parse 'ImageUploadRequestMultiPart' from JSON`,
149
+ );
150
+ }
@@ -224,6 +224,10 @@ export * from "./governmentiderror.js";
224
224
  export * from "./granttype.js";
225
225
  export * from "./guestprofile.js";
226
226
  export * from "./imagemetadata.js";
227
+ export * from "./imagemetadatarequest.js";
228
+ export * from "./imagemetadatavalidationerror.js";
229
+ export * from "./imageupdaterequestmultipart.js";
230
+ export * from "./imageuploadrequestmultipart.js";
227
231
  export * from "./incurredfee.js";
228
232
  export * from "./individualname.js";
229
233
  export * from "./individualnameerror.js";
@@ -6,6 +6,12 @@ import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ AmountDecimal,
11
+ AmountDecimal$inboundSchema,
12
+ AmountDecimal$Outbound,
13
+ AmountDecimal$outboundSchema,
14
+ } from "./amountdecimal.js";
9
15
  import {
10
16
  ProductImageMetadata,
11
17
  ProductImageMetadata$inboundSchema,
@@ -34,7 +40,7 @@ export type ProductOption = {
34
40
  /**
35
41
  * The adjustment applied to a product's base price by this option. Can be negative, positive, or zero.
36
42
  */
37
- priceModifier?: string | undefined;
43
+ priceModifier?: AmountDecimal | undefined;
38
44
  /**
39
45
  * The images associated with this option.
40
46
  */
@@ -49,7 +55,7 @@ export const ProductOption$inboundSchema: z.ZodType<
49
55
  > = z.object({
50
56
  name: z.string(),
51
57
  description: z.string().optional(),
52
- priceModifier: z.string().optional(),
58
+ priceModifier: AmountDecimal$inboundSchema.optional(),
53
59
  images: z.array(ProductImageMetadata$inboundSchema).optional(),
54
60
  });
55
61
 
@@ -57,7 +63,7 @@ export const ProductOption$inboundSchema: z.ZodType<
57
63
  export type ProductOption$Outbound = {
58
64
  name: string;
59
65
  description?: string | undefined;
60
- priceModifier?: string | undefined;
66
+ priceModifier?: AmountDecimal$Outbound | undefined;
61
67
  images?: Array<ProductImageMetadata$Outbound> | undefined;
62
68
  };
63
69
 
@@ -69,7 +75,7 @@ export const ProductOption$outboundSchema: z.ZodType<
69
75
  > = z.object({
70
76
  name: z.string(),
71
77
  description: z.string().optional(),
72
- priceModifier: z.string().optional(),
78
+ priceModifier: AmountDecimal$outboundSchema.optional(),
73
79
  images: z.array(ProductImageMetadata$outboundSchema).optional(),
74
80
  });
75
81
 
@@ -6,6 +6,12 @@ import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ AmountDecimalValidationError,
11
+ AmountDecimalValidationError$inboundSchema,
12
+ AmountDecimalValidationError$Outbound,
13
+ AmountDecimalValidationError$outboundSchema,
14
+ } from "./amountdecimalvalidationerror.js";
9
15
  import {
10
16
  AssignProductImageValidationError,
11
17
  AssignProductImageValidationError$inboundSchema,
@@ -16,7 +22,7 @@ import {
16
22
  export type ProductOptionValidationError = {
17
23
  name?: string | undefined;
18
24
  description?: string | undefined;
19
- priceModifier?: string | undefined;
25
+ priceModifier?: AmountDecimalValidationError | undefined;
20
26
  images?: { [k: string]: AssignProductImageValidationError } | undefined;
21
27
  };
22
28
 
@@ -28,7 +34,7 @@ export const ProductOptionValidationError$inboundSchema: z.ZodType<
28
34
  > = z.object({
29
35
  name: z.string().optional(),
30
36
  description: z.string().optional(),
31
- priceModifier: z.string().optional(),
37
+ priceModifier: AmountDecimalValidationError$inboundSchema.optional(),
32
38
  images: z.record(AssignProductImageValidationError$inboundSchema).optional(),
33
39
  });
34
40
 
@@ -36,7 +42,7 @@ export const ProductOptionValidationError$inboundSchema: z.ZodType<
36
42
  export type ProductOptionValidationError$Outbound = {
37
43
  name?: string | undefined;
38
44
  description?: string | undefined;
39
- priceModifier?: string | undefined;
45
+ priceModifier?: AmountDecimalValidationError$Outbound | undefined;
40
46
  images?:
41
47
  | { [k: string]: AssignProductImageValidationError$Outbound }
42
48
  | undefined;
@@ -50,7 +56,7 @@ export const ProductOptionValidationError$outboundSchema: z.ZodType<
50
56
  > = z.object({
51
57
  name: z.string().optional(),
52
58
  description: z.string().optional(),
53
- priceModifier: z.string().optional(),
59
+ priceModifier: AmountDecimalValidationError$outboundSchema.optional(),
54
60
  images: z.record(AssignProductImageValidationError$outboundSchema).optional(),
55
61
  });
56
62