@unified-api/typescript-sdk 2.9.25 → 2.9.26
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/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/retries.js +0 -1
- package/lib/retries.js.map +1 -1
- package/package.json +6 -7
- package/sdk/models/shared/commercecollection.d.ts +23 -6
- package/sdk/models/shared/commercecollection.d.ts.map +1 -1
- package/sdk/models/shared/commercecollection.js +28 -3
- package/sdk/models/shared/commercecollection.js.map +1 -1
- package/sdk/models/shared/commerceinventory.d.ts +23 -6
- package/sdk/models/shared/commerceinventory.d.ts.map +1 -1
- package/sdk/models/shared/commerceinventory.js +26 -3
- package/sdk/models/shared/commerceinventory.js.map +1 -1
- package/sdk/models/shared/commerceitem.d.ts +23 -6
- package/sdk/models/shared/commerceitem.d.ts.map +1 -1
- package/sdk/models/shared/commerceitem.js +26 -3
- package/sdk/models/shared/commerceitem.js.map +1 -1
- package/sdk/models/shared/commerceitemmetadata.d.ts +46 -12
- package/sdk/models/shared/commerceitemmetadata.d.ts.map +1 -1
- package/sdk/models/shared/commerceitemmetadata.js +52 -5
- package/sdk/models/shared/commerceitemmetadata.js.map +1 -1
- package/sdk/models/shared/commercelocation.d.ts +23 -6
- package/sdk/models/shared/commercelocation.d.ts.map +1 -1
- package/sdk/models/shared/commercelocation.js +26 -3
- package/sdk/models/shared/commercelocation.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/retries.ts +0 -1
- package/src/sdk/models/shared/commercecollection.ts +44 -4
- package/src/sdk/models/shared/commerceinventory.ts +54 -4
- package/src/sdk/models/shared/commerceitem.ts +52 -4
- package/src/sdk/models/shared/commerceitemmetadata.ts +97 -8
- package/src/sdk/models/shared/commercelocation.ts +54 -4
|
@@ -8,27 +8,116 @@ import { safeParse } from "../../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
+
export type ExtraData = {};
|
|
12
|
+
|
|
13
|
+
export type Value = {};
|
|
14
|
+
|
|
11
15
|
export type CommerceItemMetadata = {
|
|
12
|
-
extraData?:
|
|
16
|
+
extraData?: ExtraData | undefined;
|
|
13
17
|
id?: string | undefined;
|
|
14
18
|
key: string;
|
|
15
19
|
namespace?: string | undefined;
|
|
16
20
|
type?: string | undefined;
|
|
17
|
-
value?:
|
|
21
|
+
value?: Value | undefined;
|
|
18
22
|
};
|
|
19
23
|
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ExtraData$inboundSchema: z.ZodType<
|
|
26
|
+
ExtraData,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ExtraData$Outbound = {};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ExtraData$outboundSchema: z.ZodType<
|
|
36
|
+
ExtraData$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
ExtraData
|
|
39
|
+
> = z.object({});
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
+
*/
|
|
45
|
+
export namespace ExtraData$ {
|
|
46
|
+
/** @deprecated use `ExtraData$inboundSchema` instead. */
|
|
47
|
+
export const inboundSchema = ExtraData$inboundSchema;
|
|
48
|
+
/** @deprecated use `ExtraData$outboundSchema` instead. */
|
|
49
|
+
export const outboundSchema = ExtraData$outboundSchema;
|
|
50
|
+
/** @deprecated use `ExtraData$Outbound` instead. */
|
|
51
|
+
export type Outbound = ExtraData$Outbound;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function extraDataToJSON(extraData: ExtraData): string {
|
|
55
|
+
return JSON.stringify(ExtraData$outboundSchema.parse(extraData));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function extraDataFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<ExtraData, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => ExtraData$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'ExtraData' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
|
|
70
|
+
.object({});
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type Value$Outbound = {};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const Value$outboundSchema: z.ZodType<
|
|
77
|
+
Value$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
Value
|
|
80
|
+
> = z.object({});
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
+
*/
|
|
86
|
+
export namespace Value$ {
|
|
87
|
+
/** @deprecated use `Value$inboundSchema` instead. */
|
|
88
|
+
export const inboundSchema = Value$inboundSchema;
|
|
89
|
+
/** @deprecated use `Value$outboundSchema` instead. */
|
|
90
|
+
export const outboundSchema = Value$outboundSchema;
|
|
91
|
+
/** @deprecated use `Value$Outbound` instead. */
|
|
92
|
+
export type Outbound = Value$Outbound;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function valueToJSON(value: Value): string {
|
|
96
|
+
return JSON.stringify(Value$outboundSchema.parse(value));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function valueFromJSON(
|
|
100
|
+
jsonString: string,
|
|
101
|
+
): SafeParseResult<Value, SDKValidationError> {
|
|
102
|
+
return safeParse(
|
|
103
|
+
jsonString,
|
|
104
|
+
(x) => Value$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'Value' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
20
109
|
/** @internal */
|
|
21
110
|
export const CommerceItemMetadata$inboundSchema: z.ZodType<
|
|
22
111
|
CommerceItemMetadata,
|
|
23
112
|
z.ZodTypeDef,
|
|
24
113
|
unknown
|
|
25
114
|
> = z.object({
|
|
26
|
-
extra_data: z.
|
|
115
|
+
extra_data: z.lazy(() => ExtraData$inboundSchema).optional(),
|
|
27
116
|
id: z.string().optional(),
|
|
28
117
|
key: z.string(),
|
|
29
118
|
namespace: z.string().optional(),
|
|
30
119
|
type: z.string().optional(),
|
|
31
|
-
value: z.
|
|
120
|
+
value: z.lazy(() => Value$inboundSchema).optional(),
|
|
32
121
|
}).transform((v) => {
|
|
33
122
|
return remap$(v, {
|
|
34
123
|
"extra_data": "extraData",
|
|
@@ -37,12 +126,12 @@ export const CommerceItemMetadata$inboundSchema: z.ZodType<
|
|
|
37
126
|
|
|
38
127
|
/** @internal */
|
|
39
128
|
export type CommerceItemMetadata$Outbound = {
|
|
40
|
-
extra_data?:
|
|
129
|
+
extra_data?: ExtraData$Outbound | undefined;
|
|
41
130
|
id?: string | undefined;
|
|
42
131
|
key: string;
|
|
43
132
|
namespace?: string | undefined;
|
|
44
133
|
type?: string | undefined;
|
|
45
|
-
value?:
|
|
134
|
+
value?: Value$Outbound | undefined;
|
|
46
135
|
};
|
|
47
136
|
|
|
48
137
|
/** @internal */
|
|
@@ -51,12 +140,12 @@ export const CommerceItemMetadata$outboundSchema: z.ZodType<
|
|
|
51
140
|
z.ZodTypeDef,
|
|
52
141
|
CommerceItemMetadata
|
|
53
142
|
> = z.object({
|
|
54
|
-
extraData: z.
|
|
143
|
+
extraData: z.lazy(() => ExtraData$outboundSchema).optional(),
|
|
55
144
|
id: z.string().optional(),
|
|
56
145
|
key: z.string(),
|
|
57
146
|
namespace: z.string().optional(),
|
|
58
147
|
type: z.string().optional(),
|
|
59
|
-
value: z.
|
|
148
|
+
value: z.lazy(() => Value$outboundSchema).optional(),
|
|
60
149
|
}).transform((v) => {
|
|
61
150
|
return remap$(v, {
|
|
62
151
|
extraData: "extra_data",
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
PropertyCommerceLocationAddress$outboundSchema,
|
|
15
15
|
} from "./propertycommercelocationaddress.js";
|
|
16
16
|
|
|
17
|
+
export type CommerceLocationRaw = {};
|
|
18
|
+
|
|
17
19
|
export type CommerceLocation = {
|
|
18
20
|
address?: PropertyCommerceLocationAddress | undefined;
|
|
19
21
|
createdAt?: Date | undefined;
|
|
@@ -21,10 +23,58 @@ export type CommerceLocation = {
|
|
|
21
23
|
id?: string | undefined;
|
|
22
24
|
isActive?: boolean | undefined;
|
|
23
25
|
name: string;
|
|
24
|
-
raw?:
|
|
26
|
+
raw?: CommerceLocationRaw | undefined;
|
|
25
27
|
updatedAt?: Date | undefined;
|
|
26
28
|
};
|
|
27
29
|
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const CommerceLocationRaw$inboundSchema: z.ZodType<
|
|
32
|
+
CommerceLocationRaw,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CommerceLocationRaw$Outbound = {};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const CommerceLocationRaw$outboundSchema: z.ZodType<
|
|
42
|
+
CommerceLocationRaw$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
CommerceLocationRaw
|
|
45
|
+
> = z.object({});
|
|
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 CommerceLocationRaw$ {
|
|
52
|
+
/** @deprecated use `CommerceLocationRaw$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = CommerceLocationRaw$inboundSchema;
|
|
54
|
+
/** @deprecated use `CommerceLocationRaw$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = CommerceLocationRaw$outboundSchema;
|
|
56
|
+
/** @deprecated use `CommerceLocationRaw$Outbound` instead. */
|
|
57
|
+
export type Outbound = CommerceLocationRaw$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function commerceLocationRawToJSON(
|
|
61
|
+
commerceLocationRaw: CommerceLocationRaw,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
CommerceLocationRaw$outboundSchema.parse(commerceLocationRaw),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function commerceLocationRawFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<CommerceLocationRaw, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => CommerceLocationRaw$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'CommerceLocationRaw' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
28
78
|
/** @internal */
|
|
29
79
|
export const CommerceLocation$inboundSchema: z.ZodType<
|
|
30
80
|
CommerceLocation,
|
|
@@ -38,7 +88,7 @@ export const CommerceLocation$inboundSchema: z.ZodType<
|
|
|
38
88
|
id: z.string().optional(),
|
|
39
89
|
is_active: z.boolean().optional(),
|
|
40
90
|
name: z.string(),
|
|
41
|
-
raw: z.
|
|
91
|
+
raw: z.lazy(() => CommerceLocationRaw$inboundSchema).optional(),
|
|
42
92
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
43
93
|
.optional(),
|
|
44
94
|
}).transform((v) => {
|
|
@@ -57,7 +107,7 @@ export type CommerceLocation$Outbound = {
|
|
|
57
107
|
id?: string | undefined;
|
|
58
108
|
is_active?: boolean | undefined;
|
|
59
109
|
name: string;
|
|
60
|
-
raw?:
|
|
110
|
+
raw?: CommerceLocationRaw$Outbound | undefined;
|
|
61
111
|
updated_at?: string | undefined;
|
|
62
112
|
};
|
|
63
113
|
|
|
@@ -73,7 +123,7 @@ export const CommerceLocation$outboundSchema: z.ZodType<
|
|
|
73
123
|
id: z.string().optional(),
|
|
74
124
|
isActive: z.boolean().optional(),
|
|
75
125
|
name: z.string(),
|
|
76
|
-
raw: z.
|
|
126
|
+
raw: z.lazy(() => CommerceLocationRaw$outboundSchema).optional(),
|
|
77
127
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
78
128
|
}).transform((v) => {
|
|
79
129
|
return remap$(v, {
|