@unified-api/typescript-sdk 2.38.0 → 2.40.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.
- package/docs/sdks/connection/README.md +14 -14
- package/docs/sdks/unified/README.md +18 -18
- package/docs/sdks/webhook/README.md +4 -4
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/sdk/models/shared/atsmetadata.d.ts +4 -2
- package/sdk/models/shared/atsmetadata.d.ts.map +1 -1
- package/sdk/models/shared/atsmetadata.js +4 -2
- package/sdk/models/shared/atsmetadata.js.map +1 -1
- package/sdk/models/shared/commercecollection.d.ts +3 -3
- package/sdk/models/shared/commercecollection.d.ts.map +1 -1
- package/sdk/models/shared/commercecollection.js +3 -3
- package/sdk/models/shared/commercecollection.js.map +1 -1
- package/sdk/models/shared/commerceitem.d.ts +3 -3
- package/sdk/models/shared/commerceitem.d.ts.map +1 -1
- package/sdk/models/shared/commerceitem.js +3 -3
- package/sdk/models/shared/commerceitem.js.map +1 -1
- package/sdk/models/shared/commerceitemmedia.d.ts +3 -3
- package/sdk/models/shared/commerceitemmedia.d.ts.map +1 -1
- package/sdk/models/shared/commerceitemmedia.js +3 -3
- package/sdk/models/shared/commerceitemmedia.js.map +1 -1
- package/sdk/models/shared/commerceitemvariant.d.ts +3 -3
- package/sdk/models/shared/commerceitemvariant.d.ts.map +1 -1
- package/sdk/models/shared/commerceitemvariant.js +3 -3
- package/sdk/models/shared/commerceitemvariant.js.map +1 -1
- package/sdk/models/shared/commercemetadata.d.ts +83 -0
- package/sdk/models/shared/commercemetadata.d.ts.map +1 -0
- package/sdk/models/shared/commercemetadata.js +126 -0
- package/sdk/models/shared/commercemetadata.js.map +1 -0
- package/sdk/models/shared/crmmetadata.d.ts +4 -2
- package/sdk/models/shared/crmmetadata.d.ts.map +1 -1
- package/sdk/models/shared/crmmetadata.js +4 -2
- package/sdk/models/shared/crmmetadata.js.map +1 -1
- package/sdk/models/shared/hrismetadata.d.ts +4 -2
- package/sdk/models/shared/hrismetadata.d.ts.map +1 -1
- package/sdk/models/shared/hrismetadata.js +4 -2
- package/sdk/models/shared/hrismetadata.js.map +1 -1
- package/sdk/models/shared/index.d.ts +1 -1
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -1
- package/sdk/models/shared/index.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/sdk/models/shared/atsmetadata.ts +8 -4
- package/src/sdk/models/shared/commercecollection.ts +9 -9
- package/src/sdk/models/shared/commerceitem.ts +10 -10
- package/src/sdk/models/shared/commerceitemmedia.ts +9 -9
- package/src/sdk/models/shared/commerceitemvariant.ts +10 -10
- package/src/sdk/models/shared/commercemetadata.ts +199 -0
- package/src/sdk/models/shared/crmmetadata.ts +8 -4
- package/src/sdk/models/shared/hrismetadata.ts +8 -4
- package/src/sdk/models/shared/index.ts +1 -1
- package/sdk/models/shared/commerceitemmetadata.d.ts +0 -81
- package/sdk/models/shared/commerceitemmetadata.d.ts.map +0 -1
- package/sdk/models/shared/commerceitemmetadata.js +0 -126
- package/sdk/models/shared/commerceitemmetadata.js.map +0 -1
- package/src/sdk/models/shared/commerceitemmetadata.ts +0 -199
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
CommerceItemMedia$outboundSchema,
|
|
16
16
|
} from "./commerceitemmedia.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./
|
|
18
|
+
CommerceMetadata,
|
|
19
|
+
CommerceMetadata$inboundSchema,
|
|
20
|
+
CommerceMetadata$Outbound,
|
|
21
|
+
CommerceMetadata$outboundSchema,
|
|
22
|
+
} from "./commercemetadata.js";
|
|
23
23
|
|
|
24
24
|
export type CommerceCollectionRaw = {};
|
|
25
25
|
|
|
@@ -41,7 +41,7 @@ export type CommerceCollection = {
|
|
|
41
41
|
isFeatured?: boolean | undefined;
|
|
42
42
|
isVisible?: boolean | undefined;
|
|
43
43
|
media?: Array<CommerceItemMedia> | undefined;
|
|
44
|
-
metadata?: Array<
|
|
44
|
+
metadata?: Array<CommerceMetadata> | undefined;
|
|
45
45
|
name: string;
|
|
46
46
|
parentId?: string | undefined;
|
|
47
47
|
publicDescription?: string | undefined;
|
|
@@ -135,7 +135,7 @@ export const CommerceCollection$inboundSchema: z.ZodType<
|
|
|
135
135
|
is_featured: z.boolean().optional(),
|
|
136
136
|
is_visible: z.boolean().optional(),
|
|
137
137
|
media: z.array(CommerceItemMedia$inboundSchema).optional(),
|
|
138
|
-
metadata: z.array(
|
|
138
|
+
metadata: z.array(CommerceMetadata$inboundSchema).optional(),
|
|
139
139
|
name: z.string(),
|
|
140
140
|
parent_id: z.string().optional(),
|
|
141
141
|
public_description: z.string().optional(),
|
|
@@ -167,7 +167,7 @@ export type CommerceCollection$Outbound = {
|
|
|
167
167
|
is_featured?: boolean | undefined;
|
|
168
168
|
is_visible?: boolean | undefined;
|
|
169
169
|
media?: Array<CommerceItemMedia$Outbound> | undefined;
|
|
170
|
-
metadata?: Array<
|
|
170
|
+
metadata?: Array<CommerceMetadata$Outbound> | undefined;
|
|
171
171
|
name: string;
|
|
172
172
|
parent_id?: string | undefined;
|
|
173
173
|
public_description?: string | undefined;
|
|
@@ -191,7 +191,7 @@ export const CommerceCollection$outboundSchema: z.ZodType<
|
|
|
191
191
|
isFeatured: z.boolean().optional(),
|
|
192
192
|
isVisible: z.boolean().optional(),
|
|
193
193
|
media: z.array(CommerceItemMedia$outboundSchema).optional(),
|
|
194
|
-
metadata: z.array(
|
|
194
|
+
metadata: z.array(CommerceMetadata$outboundSchema).optional(),
|
|
195
195
|
name: z.string(),
|
|
196
196
|
parentId: z.string().optional(),
|
|
197
197
|
publicDescription: z.string().optional(),
|
|
@@ -13,18 +13,18 @@ import {
|
|
|
13
13
|
CommerceItemMedia$Outbound,
|
|
14
14
|
CommerceItemMedia$outboundSchema,
|
|
15
15
|
} from "./commerceitemmedia.js";
|
|
16
|
-
import {
|
|
17
|
-
CommerceItemMetadata,
|
|
18
|
-
CommerceItemMetadata$inboundSchema,
|
|
19
|
-
CommerceItemMetadata$Outbound,
|
|
20
|
-
CommerceItemMetadata$outboundSchema,
|
|
21
|
-
} from "./commerceitemmetadata.js";
|
|
22
16
|
import {
|
|
23
17
|
CommerceItemVariant,
|
|
24
18
|
CommerceItemVariant$inboundSchema,
|
|
25
19
|
CommerceItemVariant$Outbound,
|
|
26
20
|
CommerceItemVariant$outboundSchema,
|
|
27
21
|
} from "./commerceitemvariant.js";
|
|
22
|
+
import {
|
|
23
|
+
CommerceMetadata,
|
|
24
|
+
CommerceMetadata$inboundSchema,
|
|
25
|
+
CommerceMetadata$Outbound,
|
|
26
|
+
CommerceMetadata$outboundSchema,
|
|
27
|
+
} from "./commercemetadata.js";
|
|
28
28
|
|
|
29
29
|
export type CommerceItemRaw = {};
|
|
30
30
|
|
|
@@ -37,7 +37,7 @@ export type CommerceItem = {
|
|
|
37
37
|
isActive?: boolean | undefined;
|
|
38
38
|
isTaxable?: boolean | undefined;
|
|
39
39
|
media?: Array<CommerceItemMedia> | undefined;
|
|
40
|
-
metadata?: Array<
|
|
40
|
+
metadata?: Array<CommerceMetadata> | undefined;
|
|
41
41
|
name?: string | undefined;
|
|
42
42
|
publicDescription?: string | undefined;
|
|
43
43
|
publicName?: string | undefined;
|
|
@@ -114,7 +114,7 @@ export const CommerceItem$inboundSchema: z.ZodType<
|
|
|
114
114
|
is_active: z.boolean().optional(),
|
|
115
115
|
is_taxable: z.boolean().optional(),
|
|
116
116
|
media: z.array(CommerceItemMedia$inboundSchema).optional(),
|
|
117
|
-
metadata: z.array(
|
|
117
|
+
metadata: z.array(CommerceMetadata$inboundSchema).optional(),
|
|
118
118
|
name: z.string().optional(),
|
|
119
119
|
public_description: z.string().optional(),
|
|
120
120
|
public_name: z.string().optional(),
|
|
@@ -150,7 +150,7 @@ export type CommerceItem$Outbound = {
|
|
|
150
150
|
is_active?: boolean | undefined;
|
|
151
151
|
is_taxable?: boolean | undefined;
|
|
152
152
|
media?: Array<CommerceItemMedia$Outbound> | undefined;
|
|
153
|
-
metadata?: Array<
|
|
153
|
+
metadata?: Array<CommerceMetadata$Outbound> | undefined;
|
|
154
154
|
name?: string | undefined;
|
|
155
155
|
public_description?: string | undefined;
|
|
156
156
|
public_name?: string | undefined;
|
|
@@ -177,7 +177,7 @@ export const CommerceItem$outboundSchema: z.ZodType<
|
|
|
177
177
|
isActive: z.boolean().optional(),
|
|
178
178
|
isTaxable: z.boolean().optional(),
|
|
179
179
|
media: z.array(CommerceItemMedia$outboundSchema).optional(),
|
|
180
|
-
metadata: z.array(
|
|
180
|
+
metadata: z.array(CommerceMetadata$outboundSchema).optional(),
|
|
181
181
|
name: z.string().optional(),
|
|
182
182
|
publicDescription: z.string().optional(),
|
|
183
183
|
publicName: z.string().optional(),
|
|
@@ -8,11 +8,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
CommerceMetadata,
|
|
12
|
+
CommerceMetadata$inboundSchema,
|
|
13
|
+
CommerceMetadata$Outbound,
|
|
14
|
+
CommerceMetadata$outboundSchema,
|
|
15
|
+
} from "./commercemetadata.js";
|
|
16
16
|
|
|
17
17
|
export const CommerceItemMediaType = {
|
|
18
18
|
Image: "image",
|
|
@@ -24,7 +24,7 @@ export type CommerceItemMedia = {
|
|
|
24
24
|
alt?: string | undefined;
|
|
25
25
|
height?: number | undefined;
|
|
26
26
|
id?: string | undefined;
|
|
27
|
-
metadata?: Array<
|
|
27
|
+
metadata?: Array<CommerceMetadata> | undefined;
|
|
28
28
|
position?: number | undefined;
|
|
29
29
|
type?: CommerceItemMediaType | undefined;
|
|
30
30
|
url: string;
|
|
@@ -61,7 +61,7 @@ export const CommerceItemMedia$inboundSchema: z.ZodType<
|
|
|
61
61
|
alt: z.string().optional(),
|
|
62
62
|
height: z.number().optional(),
|
|
63
63
|
id: z.string().optional(),
|
|
64
|
-
metadata: z.array(
|
|
64
|
+
metadata: z.array(CommerceMetadata$inboundSchema).optional(),
|
|
65
65
|
position: z.number().optional(),
|
|
66
66
|
type: CommerceItemMediaType$inboundSchema.optional(),
|
|
67
67
|
url: z.string(),
|
|
@@ -73,7 +73,7 @@ export type CommerceItemMedia$Outbound = {
|
|
|
73
73
|
alt?: string | undefined;
|
|
74
74
|
height?: number | undefined;
|
|
75
75
|
id?: string | undefined;
|
|
76
|
-
metadata?: Array<
|
|
76
|
+
metadata?: Array<CommerceMetadata$Outbound> | undefined;
|
|
77
77
|
position?: number | undefined;
|
|
78
78
|
type?: string | undefined;
|
|
79
79
|
url: string;
|
|
@@ -89,7 +89,7 @@ export const CommerceItemMedia$outboundSchema: z.ZodType<
|
|
|
89
89
|
alt: z.string().optional(),
|
|
90
90
|
height: z.number().optional(),
|
|
91
91
|
id: z.string().optional(),
|
|
92
|
-
metadata: z.array(
|
|
92
|
+
metadata: z.array(CommerceMetadata$outboundSchema).optional(),
|
|
93
93
|
position: z.number().optional(),
|
|
94
94
|
type: CommerceItemMediaType$outboundSchema.optional(),
|
|
95
95
|
url: z.string(),
|
|
@@ -14,12 +14,6 @@ import {
|
|
|
14
14
|
CommerceItemMedia$Outbound,
|
|
15
15
|
CommerceItemMedia$outboundSchema,
|
|
16
16
|
} from "./commerceitemmedia.js";
|
|
17
|
-
import {
|
|
18
|
-
CommerceItemMetadata,
|
|
19
|
-
CommerceItemMetadata$inboundSchema,
|
|
20
|
-
CommerceItemMetadata$Outbound,
|
|
21
|
-
CommerceItemMetadata$outboundSchema,
|
|
22
|
-
} from "./commerceitemmetadata.js";
|
|
23
17
|
import {
|
|
24
18
|
CommerceItemOption,
|
|
25
19
|
CommerceItemOption$inboundSchema,
|
|
@@ -32,6 +26,12 @@ import {
|
|
|
32
26
|
CommerceItemPrice$Outbound,
|
|
33
27
|
CommerceItemPrice$outboundSchema,
|
|
34
28
|
} from "./commerceitemprice.js";
|
|
29
|
+
import {
|
|
30
|
+
CommerceMetadata,
|
|
31
|
+
CommerceMetadata$inboundSchema,
|
|
32
|
+
CommerceMetadata$Outbound,
|
|
33
|
+
CommerceMetadata$outboundSchema,
|
|
34
|
+
} from "./commercemetadata.js";
|
|
35
35
|
|
|
36
36
|
export const SizeUnit = {
|
|
37
37
|
Cm: "cm",
|
|
@@ -58,7 +58,7 @@ export type CommerceItemVariant = {
|
|
|
58
58
|
isVisible?: boolean | undefined;
|
|
59
59
|
length?: number | undefined;
|
|
60
60
|
media?: Array<CommerceItemMedia> | undefined;
|
|
61
|
-
metadata?: Array<
|
|
61
|
+
metadata?: Array<CommerceMetadata> | undefined;
|
|
62
62
|
name?: string | undefined;
|
|
63
63
|
options?: Array<CommerceItemOption> | undefined;
|
|
64
64
|
prices?: Array<CommerceItemPrice> | undefined;
|
|
@@ -130,7 +130,7 @@ export const CommerceItemVariant$inboundSchema: z.ZodType<
|
|
|
130
130
|
is_visible: z.boolean().optional(),
|
|
131
131
|
length: z.number().optional(),
|
|
132
132
|
media: z.array(CommerceItemMedia$inboundSchema).optional(),
|
|
133
|
-
metadata: z.array(
|
|
133
|
+
metadata: z.array(CommerceMetadata$inboundSchema).optional(),
|
|
134
134
|
name: z.string().optional(),
|
|
135
135
|
options: z.array(CommerceItemOption$inboundSchema).optional(),
|
|
136
136
|
prices: z.array(CommerceItemPrice$inboundSchema).optional(),
|
|
@@ -172,7 +172,7 @@ export type CommerceItemVariant$Outbound = {
|
|
|
172
172
|
is_visible?: boolean | undefined;
|
|
173
173
|
length?: number | undefined;
|
|
174
174
|
media?: Array<CommerceItemMedia$Outbound> | undefined;
|
|
175
|
-
metadata?: Array<
|
|
175
|
+
metadata?: Array<CommerceMetadata$Outbound> | undefined;
|
|
176
176
|
name?: string | undefined;
|
|
177
177
|
options?: Array<CommerceItemOption$Outbound> | undefined;
|
|
178
178
|
prices?: Array<CommerceItemPrice$Outbound> | undefined;
|
|
@@ -204,7 +204,7 @@ export const CommerceItemVariant$outboundSchema: z.ZodType<
|
|
|
204
204
|
isVisible: z.boolean().optional(),
|
|
205
205
|
length: z.number().optional(),
|
|
206
206
|
media: z.array(CommerceItemMedia$outboundSchema).optional(),
|
|
207
|
-
metadata: z.array(
|
|
207
|
+
metadata: z.array(CommerceMetadata$outboundSchema).optional(),
|
|
208
208
|
name: z.string().optional(),
|
|
209
209
|
options: z.array(CommerceItemOption$outboundSchema).optional(),
|
|
210
210
|
prices: z.array(CommerceItemPrice$outboundSchema).optional(),
|
|
@@ -0,0 +1,199 @@
|
|
|
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
|
+
export type CommerceMetadataExtraData = {};
|
|
12
|
+
|
|
13
|
+
export type CommerceMetadataValue = {};
|
|
14
|
+
|
|
15
|
+
export type CommerceMetadata = {
|
|
16
|
+
extraData?: CommerceMetadataExtraData | undefined;
|
|
17
|
+
id?: string | undefined;
|
|
18
|
+
key?: string | undefined;
|
|
19
|
+
namespace?: string | undefined;
|
|
20
|
+
slug?: string | undefined;
|
|
21
|
+
type?: string | undefined;
|
|
22
|
+
value?: CommerceMetadataValue | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const CommerceMetadataExtraData$inboundSchema: z.ZodType<
|
|
27
|
+
CommerceMetadataExtraData,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({});
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type CommerceMetadataExtraData$Outbound = {};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const CommerceMetadataExtraData$outboundSchema: z.ZodType<
|
|
37
|
+
CommerceMetadataExtraData$Outbound,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
CommerceMetadataExtraData
|
|
40
|
+
> = z.object({});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
45
|
+
*/
|
|
46
|
+
export namespace CommerceMetadataExtraData$ {
|
|
47
|
+
/** @deprecated use `CommerceMetadataExtraData$inboundSchema` instead. */
|
|
48
|
+
export const inboundSchema = CommerceMetadataExtraData$inboundSchema;
|
|
49
|
+
/** @deprecated use `CommerceMetadataExtraData$outboundSchema` instead. */
|
|
50
|
+
export const outboundSchema = CommerceMetadataExtraData$outboundSchema;
|
|
51
|
+
/** @deprecated use `CommerceMetadataExtraData$Outbound` instead. */
|
|
52
|
+
export type Outbound = CommerceMetadataExtraData$Outbound;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function commerceMetadataExtraDataToJSON(
|
|
56
|
+
commerceMetadataExtraData: CommerceMetadataExtraData,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
CommerceMetadataExtraData$outboundSchema.parse(commerceMetadataExtraData),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function commerceMetadataExtraDataFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<CommerceMetadataExtraData, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => CommerceMetadataExtraData$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'CommerceMetadataExtraData' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const CommerceMetadataValue$inboundSchema: z.ZodType<
|
|
75
|
+
CommerceMetadataValue,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
unknown
|
|
78
|
+
> = z.object({});
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type CommerceMetadataValue$Outbound = {};
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const CommerceMetadataValue$outboundSchema: z.ZodType<
|
|
85
|
+
CommerceMetadataValue$Outbound,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
CommerceMetadataValue
|
|
88
|
+
> = z.object({});
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
93
|
+
*/
|
|
94
|
+
export namespace CommerceMetadataValue$ {
|
|
95
|
+
/** @deprecated use `CommerceMetadataValue$inboundSchema` instead. */
|
|
96
|
+
export const inboundSchema = CommerceMetadataValue$inboundSchema;
|
|
97
|
+
/** @deprecated use `CommerceMetadataValue$outboundSchema` instead. */
|
|
98
|
+
export const outboundSchema = CommerceMetadataValue$outboundSchema;
|
|
99
|
+
/** @deprecated use `CommerceMetadataValue$Outbound` instead. */
|
|
100
|
+
export type Outbound = CommerceMetadataValue$Outbound;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function commerceMetadataValueToJSON(
|
|
104
|
+
commerceMetadataValue: CommerceMetadataValue,
|
|
105
|
+
): string {
|
|
106
|
+
return JSON.stringify(
|
|
107
|
+
CommerceMetadataValue$outboundSchema.parse(commerceMetadataValue),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function commerceMetadataValueFromJSON(
|
|
112
|
+
jsonString: string,
|
|
113
|
+
): SafeParseResult<CommerceMetadataValue, SDKValidationError> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) => CommerceMetadataValue$inboundSchema.parse(JSON.parse(x)),
|
|
117
|
+
`Failed to parse 'CommerceMetadataValue' from JSON`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const CommerceMetadata$inboundSchema: z.ZodType<
|
|
123
|
+
CommerceMetadata,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
unknown
|
|
126
|
+
> = z.object({
|
|
127
|
+
extra_data: z.lazy(() => CommerceMetadataExtraData$inboundSchema).optional(),
|
|
128
|
+
id: z.string().optional(),
|
|
129
|
+
key: z.string().optional(),
|
|
130
|
+
namespace: z.string().optional(),
|
|
131
|
+
slug: z.string().optional(),
|
|
132
|
+
type: z.string().optional(),
|
|
133
|
+
value: z.lazy(() => CommerceMetadataValue$inboundSchema).optional(),
|
|
134
|
+
}).transform((v) => {
|
|
135
|
+
return remap$(v, {
|
|
136
|
+
"extra_data": "extraData",
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export type CommerceMetadata$Outbound = {
|
|
142
|
+
extra_data?: CommerceMetadataExtraData$Outbound | undefined;
|
|
143
|
+
id?: string | undefined;
|
|
144
|
+
key?: string | undefined;
|
|
145
|
+
namespace?: string | undefined;
|
|
146
|
+
slug?: string | undefined;
|
|
147
|
+
type?: string | undefined;
|
|
148
|
+
value?: CommerceMetadataValue$Outbound | undefined;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const CommerceMetadata$outboundSchema: z.ZodType<
|
|
153
|
+
CommerceMetadata$Outbound,
|
|
154
|
+
z.ZodTypeDef,
|
|
155
|
+
CommerceMetadata
|
|
156
|
+
> = z.object({
|
|
157
|
+
extraData: z.lazy(() => CommerceMetadataExtraData$outboundSchema).optional(),
|
|
158
|
+
id: z.string().optional(),
|
|
159
|
+
key: z.string().optional(),
|
|
160
|
+
namespace: z.string().optional(),
|
|
161
|
+
slug: z.string().optional(),
|
|
162
|
+
type: z.string().optional(),
|
|
163
|
+
value: z.lazy(() => CommerceMetadataValue$outboundSchema).optional(),
|
|
164
|
+
}).transform((v) => {
|
|
165
|
+
return remap$(v, {
|
|
166
|
+
extraData: "extra_data",
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @internal
|
|
172
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
173
|
+
*/
|
|
174
|
+
export namespace CommerceMetadata$ {
|
|
175
|
+
/** @deprecated use `CommerceMetadata$inboundSchema` instead. */
|
|
176
|
+
export const inboundSchema = CommerceMetadata$inboundSchema;
|
|
177
|
+
/** @deprecated use `CommerceMetadata$outboundSchema` instead. */
|
|
178
|
+
export const outboundSchema = CommerceMetadata$outboundSchema;
|
|
179
|
+
/** @deprecated use `CommerceMetadata$Outbound` instead. */
|
|
180
|
+
export type Outbound = CommerceMetadata$Outbound;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function commerceMetadataToJSON(
|
|
184
|
+
commerceMetadata: CommerceMetadata,
|
|
185
|
+
): string {
|
|
186
|
+
return JSON.stringify(
|
|
187
|
+
CommerceMetadata$outboundSchema.parse(commerceMetadata),
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export function commerceMetadataFromJSON(
|
|
192
|
+
jsonString: string,
|
|
193
|
+
): SafeParseResult<CommerceMetadata, SDKValidationError> {
|
|
194
|
+
return safeParse(
|
|
195
|
+
jsonString,
|
|
196
|
+
(x) => CommerceMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
197
|
+
`Failed to parse 'CommerceMetadata' from JSON`,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
@@ -15,8 +15,9 @@ export type CrmMetadataValue = {};
|
|
|
15
15
|
export type CrmMetadata = {
|
|
16
16
|
extraData?: CrmMetadataExtraData | undefined;
|
|
17
17
|
id?: string | undefined;
|
|
18
|
-
key
|
|
18
|
+
key?: string | undefined;
|
|
19
19
|
namespace?: string | undefined;
|
|
20
|
+
slug?: string | undefined;
|
|
20
21
|
type?: string | undefined;
|
|
21
22
|
value?: CrmMetadataValue | undefined;
|
|
22
23
|
};
|
|
@@ -125,8 +126,9 @@ export const CrmMetadata$inboundSchema: z.ZodType<
|
|
|
125
126
|
> = z.object({
|
|
126
127
|
extra_data: z.lazy(() => CrmMetadataExtraData$inboundSchema).optional(),
|
|
127
128
|
id: z.string().optional(),
|
|
128
|
-
key: z.string(),
|
|
129
|
+
key: z.string().optional(),
|
|
129
130
|
namespace: z.string().optional(),
|
|
131
|
+
slug: z.string().optional(),
|
|
130
132
|
type: z.string().optional(),
|
|
131
133
|
value: z.lazy(() => CrmMetadataValue$inboundSchema).optional(),
|
|
132
134
|
}).transform((v) => {
|
|
@@ -139,8 +141,9 @@ export const CrmMetadata$inboundSchema: z.ZodType<
|
|
|
139
141
|
export type CrmMetadata$Outbound = {
|
|
140
142
|
extra_data?: CrmMetadataExtraData$Outbound | undefined;
|
|
141
143
|
id?: string | undefined;
|
|
142
|
-
key
|
|
144
|
+
key?: string | undefined;
|
|
143
145
|
namespace?: string | undefined;
|
|
146
|
+
slug?: string | undefined;
|
|
144
147
|
type?: string | undefined;
|
|
145
148
|
value?: CrmMetadataValue$Outbound | undefined;
|
|
146
149
|
};
|
|
@@ -153,8 +156,9 @@ export const CrmMetadata$outboundSchema: z.ZodType<
|
|
|
153
156
|
> = z.object({
|
|
154
157
|
extraData: z.lazy(() => CrmMetadataExtraData$outboundSchema).optional(),
|
|
155
158
|
id: z.string().optional(),
|
|
156
|
-
key: z.string(),
|
|
159
|
+
key: z.string().optional(),
|
|
157
160
|
namespace: z.string().optional(),
|
|
161
|
+
slug: z.string().optional(),
|
|
158
162
|
type: z.string().optional(),
|
|
159
163
|
value: z.lazy(() => CrmMetadataValue$outboundSchema).optional(),
|
|
160
164
|
}).transform((v) => {
|
|
@@ -15,8 +15,9 @@ export type HrisMetadataValue = {};
|
|
|
15
15
|
export type HrisMetadata = {
|
|
16
16
|
extraData?: HrisMetadataExtraData | undefined;
|
|
17
17
|
id?: string | undefined;
|
|
18
|
-
key
|
|
18
|
+
key?: string | undefined;
|
|
19
19
|
namespace?: string | undefined;
|
|
20
|
+
slug?: string | undefined;
|
|
20
21
|
type?: string | undefined;
|
|
21
22
|
value?: HrisMetadataValue | undefined;
|
|
22
23
|
};
|
|
@@ -125,8 +126,9 @@ export const HrisMetadata$inboundSchema: z.ZodType<
|
|
|
125
126
|
> = z.object({
|
|
126
127
|
extra_data: z.lazy(() => HrisMetadataExtraData$inboundSchema).optional(),
|
|
127
128
|
id: z.string().optional(),
|
|
128
|
-
key: z.string(),
|
|
129
|
+
key: z.string().optional(),
|
|
129
130
|
namespace: z.string().optional(),
|
|
131
|
+
slug: z.string().optional(),
|
|
130
132
|
type: z.string().optional(),
|
|
131
133
|
value: z.lazy(() => HrisMetadataValue$inboundSchema).optional(),
|
|
132
134
|
}).transform((v) => {
|
|
@@ -139,8 +141,9 @@ export const HrisMetadata$inboundSchema: z.ZodType<
|
|
|
139
141
|
export type HrisMetadata$Outbound = {
|
|
140
142
|
extra_data?: HrisMetadataExtraData$Outbound | undefined;
|
|
141
143
|
id?: string | undefined;
|
|
142
|
-
key
|
|
144
|
+
key?: string | undefined;
|
|
143
145
|
namespace?: string | undefined;
|
|
146
|
+
slug?: string | undefined;
|
|
144
147
|
type?: string | undefined;
|
|
145
148
|
value?: HrisMetadataValue$Outbound | undefined;
|
|
146
149
|
};
|
|
@@ -153,8 +156,9 @@ export const HrisMetadata$outboundSchema: z.ZodType<
|
|
|
153
156
|
> = z.object({
|
|
154
157
|
extraData: z.lazy(() => HrisMetadataExtraData$outboundSchema).optional(),
|
|
155
158
|
id: z.string().optional(),
|
|
156
|
-
key: z.string(),
|
|
159
|
+
key: z.string().optional(),
|
|
157
160
|
namespace: z.string().optional(),
|
|
161
|
+
slug: z.string().optional(),
|
|
158
162
|
type: z.string().optional(),
|
|
159
163
|
value: z.lazy(() => HrisMetadataValue$outboundSchema).optional(),
|
|
160
164
|
}).transform((v) => {
|
|
@@ -53,11 +53,11 @@ export * from "./commercecollection.js";
|
|
|
53
53
|
export * from "./commerceinventory.js";
|
|
54
54
|
export * from "./commerceitem.js";
|
|
55
55
|
export * from "./commerceitemmedia.js";
|
|
56
|
-
export * from "./commerceitemmetadata.js";
|
|
57
56
|
export * from "./commerceitemoption.js";
|
|
58
57
|
export * from "./commerceitemprice.js";
|
|
59
58
|
export * from "./commerceitemvariant.js";
|
|
60
59
|
export * from "./commercelocation.js";
|
|
60
|
+
export * from "./commercemetadata.js";
|
|
61
61
|
export * from "./connection.js";
|
|
62
62
|
export * from "./crmcompany.js";
|
|
63
63
|
export * from "./crmcontact.js";
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type CommerceItemMetadataExtraData = {};
|
|
5
|
-
export type CommerceItemMetadataValue = {};
|
|
6
|
-
export type CommerceItemMetadata = {
|
|
7
|
-
extraData?: CommerceItemMetadataExtraData | undefined;
|
|
8
|
-
id?: string | undefined;
|
|
9
|
-
key: string;
|
|
10
|
-
namespace?: string | undefined;
|
|
11
|
-
type?: string | undefined;
|
|
12
|
-
value?: CommerceItemMetadataValue | undefined;
|
|
13
|
-
};
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare const CommerceItemMetadataExtraData$inboundSchema: z.ZodType<CommerceItemMetadataExtraData, z.ZodTypeDef, unknown>;
|
|
16
|
-
/** @internal */
|
|
17
|
-
export type CommerceItemMetadataExtraData$Outbound = {};
|
|
18
|
-
/** @internal */
|
|
19
|
-
export declare const CommerceItemMetadataExtraData$outboundSchema: z.ZodType<CommerceItemMetadataExtraData$Outbound, z.ZodTypeDef, CommerceItemMetadataExtraData>;
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
|
-
*/
|
|
24
|
-
export declare namespace CommerceItemMetadataExtraData$ {
|
|
25
|
-
/** @deprecated use `CommerceItemMetadataExtraData$inboundSchema` instead. */
|
|
26
|
-
const inboundSchema: z.ZodType<CommerceItemMetadataExtraData, z.ZodTypeDef, unknown>;
|
|
27
|
-
/** @deprecated use `CommerceItemMetadataExtraData$outboundSchema` instead. */
|
|
28
|
-
const outboundSchema: z.ZodType<CommerceItemMetadataExtraData$Outbound, z.ZodTypeDef, CommerceItemMetadataExtraData>;
|
|
29
|
-
/** @deprecated use `CommerceItemMetadataExtraData$Outbound` instead. */
|
|
30
|
-
type Outbound = CommerceItemMetadataExtraData$Outbound;
|
|
31
|
-
}
|
|
32
|
-
export declare function commerceItemMetadataExtraDataToJSON(commerceItemMetadataExtraData: CommerceItemMetadataExtraData): string;
|
|
33
|
-
export declare function commerceItemMetadataExtraDataFromJSON(jsonString: string): SafeParseResult<CommerceItemMetadataExtraData, SDKValidationError>;
|
|
34
|
-
/** @internal */
|
|
35
|
-
export declare const CommerceItemMetadataValue$inboundSchema: z.ZodType<CommerceItemMetadataValue, z.ZodTypeDef, unknown>;
|
|
36
|
-
/** @internal */
|
|
37
|
-
export type CommerceItemMetadataValue$Outbound = {};
|
|
38
|
-
/** @internal */
|
|
39
|
-
export declare const CommerceItemMetadataValue$outboundSchema: z.ZodType<CommerceItemMetadataValue$Outbound, z.ZodTypeDef, CommerceItemMetadataValue>;
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
-
*/
|
|
44
|
-
export declare namespace CommerceItemMetadataValue$ {
|
|
45
|
-
/** @deprecated use `CommerceItemMetadataValue$inboundSchema` instead. */
|
|
46
|
-
const inboundSchema: z.ZodType<CommerceItemMetadataValue, z.ZodTypeDef, unknown>;
|
|
47
|
-
/** @deprecated use `CommerceItemMetadataValue$outboundSchema` instead. */
|
|
48
|
-
const outboundSchema: z.ZodType<CommerceItemMetadataValue$Outbound, z.ZodTypeDef, CommerceItemMetadataValue>;
|
|
49
|
-
/** @deprecated use `CommerceItemMetadataValue$Outbound` instead. */
|
|
50
|
-
type Outbound = CommerceItemMetadataValue$Outbound;
|
|
51
|
-
}
|
|
52
|
-
export declare function commerceItemMetadataValueToJSON(commerceItemMetadataValue: CommerceItemMetadataValue): string;
|
|
53
|
-
export declare function commerceItemMetadataValueFromJSON(jsonString: string): SafeParseResult<CommerceItemMetadataValue, SDKValidationError>;
|
|
54
|
-
/** @internal */
|
|
55
|
-
export declare const CommerceItemMetadata$inboundSchema: z.ZodType<CommerceItemMetadata, z.ZodTypeDef, unknown>;
|
|
56
|
-
/** @internal */
|
|
57
|
-
export type CommerceItemMetadata$Outbound = {
|
|
58
|
-
extra_data?: CommerceItemMetadataExtraData$Outbound | undefined;
|
|
59
|
-
id?: string | undefined;
|
|
60
|
-
key: string;
|
|
61
|
-
namespace?: string | undefined;
|
|
62
|
-
type?: string | undefined;
|
|
63
|
-
value?: CommerceItemMetadataValue$Outbound | undefined;
|
|
64
|
-
};
|
|
65
|
-
/** @internal */
|
|
66
|
-
export declare const CommerceItemMetadata$outboundSchema: z.ZodType<CommerceItemMetadata$Outbound, z.ZodTypeDef, CommerceItemMetadata>;
|
|
67
|
-
/**
|
|
68
|
-
* @internal
|
|
69
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
-
*/
|
|
71
|
-
export declare namespace CommerceItemMetadata$ {
|
|
72
|
-
/** @deprecated use `CommerceItemMetadata$inboundSchema` instead. */
|
|
73
|
-
const inboundSchema: z.ZodType<CommerceItemMetadata, z.ZodTypeDef, unknown>;
|
|
74
|
-
/** @deprecated use `CommerceItemMetadata$outboundSchema` instead. */
|
|
75
|
-
const outboundSchema: z.ZodType<CommerceItemMetadata$Outbound, z.ZodTypeDef, CommerceItemMetadata>;
|
|
76
|
-
/** @deprecated use `CommerceItemMetadata$Outbound` instead. */
|
|
77
|
-
type Outbound = CommerceItemMetadata$Outbound;
|
|
78
|
-
}
|
|
79
|
-
export declare function commerceItemMetadataToJSON(commerceItemMetadata: CommerceItemMetadata): string;
|
|
80
|
-
export declare function commerceItemMetadataFromJSON(jsonString: string): SafeParseResult<CommerceItemMetadata, SDKValidationError>;
|
|
81
|
-
//# sourceMappingURL=commerceitemmetadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commerceitemmetadata.d.ts","sourceRoot":"","sources":["../../../src/sdk/models/shared/commerceitemmetadata.ts"],"names":[],"mappings":"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"}
|