@unified-api/typescript-sdk 2.28.0 → 2.32.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 (90) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/package.json +1 -1
  5. package/sdk/models/shared/accountinginvoice.d.ts +2 -0
  6. package/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
  7. package/sdk/models/shared/accountinginvoice.js +5 -0
  8. package/sdk/models/shared/accountinginvoice.js.map +1 -1
  9. package/sdk/models/shared/accountingjournal.d.ts +2 -0
  10. package/sdk/models/shared/accountingjournal.d.ts.map +1 -1
  11. package/sdk/models/shared/accountingjournal.js +5 -0
  12. package/sdk/models/shared/accountingjournal.js.map +1 -1
  13. package/sdk/models/shared/atsapplication.d.ts +3 -0
  14. package/sdk/models/shared/atsapplication.d.ts.map +1 -1
  15. package/sdk/models/shared/atsapplication.js +3 -0
  16. package/sdk/models/shared/atsapplication.js.map +1 -1
  17. package/sdk/models/shared/atscandidate.d.ts +3 -0
  18. package/sdk/models/shared/atscandidate.d.ts.map +1 -1
  19. package/sdk/models/shared/atscandidate.js +3 -0
  20. package/sdk/models/shared/atscandidate.js.map +1 -1
  21. package/sdk/models/shared/atscompany.d.ts +3 -0
  22. package/sdk/models/shared/atscompany.d.ts.map +1 -1
  23. package/sdk/models/shared/atscompany.js +3 -0
  24. package/sdk/models/shared/atscompany.js.map +1 -1
  25. package/sdk/models/shared/atsjob.d.ts +3 -0
  26. package/sdk/models/shared/atsjob.d.ts.map +1 -1
  27. package/sdk/models/shared/atsjob.js +3 -0
  28. package/sdk/models/shared/atsjob.js.map +1 -1
  29. package/sdk/models/shared/atsmetadata.d.ts +81 -0
  30. package/sdk/models/shared/atsmetadata.d.ts.map +1 -0
  31. package/sdk/models/shared/atsmetadata.js +125 -0
  32. package/sdk/models/shared/atsmetadata.js.map +1 -0
  33. package/sdk/models/shared/commerceitemmetadata.d.ts +30 -30
  34. package/sdk/models/shared/commerceitemmetadata.d.ts.map +1 -1
  35. package/sdk/models/shared/commerceitemmetadata.js +37 -36
  36. package/sdk/models/shared/commerceitemmetadata.js.map +1 -1
  37. package/sdk/models/shared/crmcompany.d.ts +3 -0
  38. package/sdk/models/shared/crmcompany.d.ts.map +1 -1
  39. package/sdk/models/shared/crmcompany.js +3 -0
  40. package/sdk/models/shared/crmcompany.js.map +1 -1
  41. package/sdk/models/shared/crmcontact.d.ts +3 -0
  42. package/sdk/models/shared/crmcontact.d.ts.map +1 -1
  43. package/sdk/models/shared/crmcontact.js +3 -0
  44. package/sdk/models/shared/crmcontact.js.map +1 -1
  45. package/sdk/models/shared/crmdeal.d.ts +3 -0
  46. package/sdk/models/shared/crmdeal.d.ts.map +1 -1
  47. package/sdk/models/shared/crmdeal.js +3 -0
  48. package/sdk/models/shared/crmdeal.js.map +1 -1
  49. package/sdk/models/shared/crmlead.d.ts +3 -0
  50. package/sdk/models/shared/crmlead.d.ts.map +1 -1
  51. package/sdk/models/shared/crmlead.js +3 -0
  52. package/sdk/models/shared/crmlead.js.map +1 -1
  53. package/sdk/models/shared/crmmetadata.d.ts +81 -0
  54. package/sdk/models/shared/crmmetadata.d.ts.map +1 -0
  55. package/sdk/models/shared/crmmetadata.js +124 -0
  56. package/sdk/models/shared/crmmetadata.js.map +1 -0
  57. package/sdk/models/shared/hrisemployee.d.ts +3 -0
  58. package/sdk/models/shared/hrisemployee.d.ts.map +1 -1
  59. package/sdk/models/shared/hrisemployee.js +3 -0
  60. package/sdk/models/shared/hrisemployee.js.map +1 -1
  61. package/sdk/models/shared/hrismetadata.d.ts +81 -0
  62. package/sdk/models/shared/hrismetadata.d.ts.map +1 -0
  63. package/sdk/models/shared/hrismetadata.js +124 -0
  64. package/sdk/models/shared/hrismetadata.js.map +1 -0
  65. package/sdk/models/shared/index.d.ts +3 -0
  66. package/sdk/models/shared/index.d.ts.map +1 -1
  67. package/sdk/models/shared/index.js +3 -0
  68. package/sdk/models/shared/index.js.map +1 -1
  69. package/sdk/models/shared/metadatametadata.d.ts +2 -2
  70. package/sdk/models/shared/metadatametadata.d.ts.map +1 -1
  71. package/sdk/models/shared/metadatametadata.js +2 -2
  72. package/sdk/models/shared/metadatametadata.js.map +1 -1
  73. package/src/lib/config.ts +2 -2
  74. package/src/sdk/models/shared/accountinginvoice.ts +7 -0
  75. package/src/sdk/models/shared/accountingjournal.ts +7 -0
  76. package/src/sdk/models/shared/atsapplication.ts +10 -0
  77. package/src/sdk/models/shared/atscandidate.ts +10 -0
  78. package/src/sdk/models/shared/atscompany.ts +10 -0
  79. package/src/sdk/models/shared/atsjob.ts +10 -0
  80. package/src/sdk/models/shared/atsmetadata.ts +180 -0
  81. package/src/sdk/models/shared/commerceitemmetadata.ts +63 -48
  82. package/src/sdk/models/shared/crmcompany.ts +10 -0
  83. package/src/sdk/models/shared/crmcontact.ts +10 -0
  84. package/src/sdk/models/shared/crmdeal.ts +10 -0
  85. package/src/sdk/models/shared/crmlead.ts +10 -0
  86. package/src/sdk/models/shared/crmmetadata.ts +191 -0
  87. package/src/sdk/models/shared/hrisemployee.ts +10 -0
  88. package/src/sdk/models/shared/hrismetadata.ts +191 -0
  89. package/src/sdk/models/shared/index.ts +3 -0
  90. package/src/sdk/models/shared/metadatametadata.ts +4 -4
@@ -7,6 +7,12 @@ import { remap as remap$ } from "../../../lib/primitives.js";
7
7
  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
+ import {
11
+ AtsMetadata,
12
+ AtsMetadata$inboundSchema,
13
+ AtsMetadata$Outbound,
14
+ AtsMetadata$outboundSchema,
15
+ } from "./atsmetadata.js";
10
16
  import {
11
17
  PropertyAtsCompanyAddress,
12
18
  PropertyAtsCompanyAddress$inboundSchema,
@@ -20,6 +26,7 @@ export type AtsCompany = {
20
26
  address?: PropertyAtsCompanyAddress | undefined;
21
27
  createdAt?: Date | undefined;
22
28
  id?: string | undefined;
29
+ metadata?: Array<AtsMetadata> | undefined;
23
30
  name: string;
24
31
  parentId?: string | undefined;
25
32
  phone?: string | undefined;
@@ -83,6 +90,7 @@ export const AtsCompany$inboundSchema: z.ZodType<
83
90
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
84
91
  .optional(),
85
92
  id: z.string().optional(),
93
+ metadata: z.array(AtsMetadata$inboundSchema).optional(),
86
94
  name: z.string(),
87
95
  parent_id: z.string().optional(),
88
96
  phone: z.string().optional(),
@@ -106,6 +114,7 @@ export type AtsCompany$Outbound = {
106
114
  address?: PropertyAtsCompanyAddress$Outbound | undefined;
107
115
  created_at?: string | undefined;
108
116
  id?: string | undefined;
117
+ metadata?: Array<AtsMetadata$Outbound> | undefined;
109
118
  name: string;
110
119
  parent_id?: string | undefined;
111
120
  phone?: string | undefined;
@@ -124,6 +133,7 @@ export const AtsCompany$outboundSchema: z.ZodType<
124
133
  address: PropertyAtsCompanyAddress$outboundSchema.optional(),
125
134
  createdAt: z.date().transform(v => v.toISOString()).optional(),
126
135
  id: z.string().optional(),
136
+ metadata: z.array(AtsMetadata$outboundSchema).optional(),
127
137
  name: z.string(),
128
138
  parentId: z.string().optional(),
129
139
  phone: z.string().optional(),
@@ -38,6 +38,12 @@ import {
38
38
  AtsJobQuestion$Outbound,
39
39
  AtsJobQuestion$outboundSchema,
40
40
  } from "./atsjobquestion.js";
41
+ import {
42
+ AtsMetadata,
43
+ AtsMetadata$inboundSchema,
44
+ AtsMetadata$Outbound,
45
+ AtsMetadata$outboundSchema,
46
+ } from "./atsmetadata.js";
41
47
 
42
48
  export const EmploymentType = {
43
49
  FullTime: "FULL_TIME",
@@ -83,6 +89,7 @@ export type AtsJob = {
83
89
  hiringManagerIds?: Array<string> | undefined;
84
90
  id?: string | undefined;
85
91
  languageLocale?: string | undefined;
92
+ metadata?: Array<AtsMetadata> | undefined;
86
93
  name?: string | undefined;
87
94
  numberOfOpenings?: number | undefined;
88
95
  /**
@@ -203,6 +210,7 @@ export const AtsJob$inboundSchema: z.ZodType<AtsJob, z.ZodTypeDef, unknown> = z
203
210
  hiring_manager_ids: z.array(z.string()).optional(),
204
211
  id: z.string().optional(),
205
212
  language_locale: z.string().optional(),
213
+ metadata: z.array(AtsMetadata$inboundSchema).optional(),
206
214
  name: z.string().optional(),
207
215
  number_of_openings: z.number().optional(),
208
216
  postings: z.array(AtsJobPosting$inboundSchema).optional(),
@@ -244,6 +252,7 @@ export type AtsJob$Outbound = {
244
252
  hiring_manager_ids?: Array<string> | undefined;
245
253
  id?: string | undefined;
246
254
  language_locale?: string | undefined;
255
+ metadata?: Array<AtsMetadata$Outbound> | undefined;
247
256
  name?: string | undefined;
248
257
  number_of_openings?: number | undefined;
249
258
  postings?: Array<AtsJobPosting$Outbound> | undefined;
@@ -274,6 +283,7 @@ export const AtsJob$outboundSchema: z.ZodType<
274
283
  hiringManagerIds: z.array(z.string()).optional(),
275
284
  id: z.string().optional(),
276
285
  languageLocale: z.string().optional(),
286
+ metadata: z.array(AtsMetadata$outboundSchema).optional(),
277
287
  name: z.string().optional(),
278
288
  numberOfOpenings: z.number().optional(),
279
289
  postings: z.array(AtsJobPosting$outboundSchema).optional(),
@@ -0,0 +1,180 @@
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 ExtraData = {};
12
+
13
+ export type Value = {};
14
+
15
+ export type AtsMetadata = {
16
+ extraData?: ExtraData | undefined;
17
+ id?: string | undefined;
18
+ key: string;
19
+ namespace?: string | undefined;
20
+ type?: string | undefined;
21
+ value?: Value | undefined;
22
+ };
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
+
109
+ /** @internal */
110
+ export const AtsMetadata$inboundSchema: z.ZodType<
111
+ AtsMetadata,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ extra_data: z.lazy(() => ExtraData$inboundSchema).optional(),
116
+ id: z.string().optional(),
117
+ key: z.string(),
118
+ namespace: z.string().optional(),
119
+ type: z.string().optional(),
120
+ value: z.lazy(() => Value$inboundSchema).optional(),
121
+ }).transform((v) => {
122
+ return remap$(v, {
123
+ "extra_data": "extraData",
124
+ });
125
+ });
126
+
127
+ /** @internal */
128
+ export type AtsMetadata$Outbound = {
129
+ extra_data?: ExtraData$Outbound | undefined;
130
+ id?: string | undefined;
131
+ key: string;
132
+ namespace?: string | undefined;
133
+ type?: string | undefined;
134
+ value?: Value$Outbound | undefined;
135
+ };
136
+
137
+ /** @internal */
138
+ export const AtsMetadata$outboundSchema: z.ZodType<
139
+ AtsMetadata$Outbound,
140
+ z.ZodTypeDef,
141
+ AtsMetadata
142
+ > = z.object({
143
+ extraData: z.lazy(() => ExtraData$outboundSchema).optional(),
144
+ id: z.string().optional(),
145
+ key: z.string(),
146
+ namespace: z.string().optional(),
147
+ type: z.string().optional(),
148
+ value: z.lazy(() => Value$outboundSchema).optional(),
149
+ }).transform((v) => {
150
+ return remap$(v, {
151
+ extraData: "extra_data",
152
+ });
153
+ });
154
+
155
+ /**
156
+ * @internal
157
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
158
+ */
159
+ export namespace AtsMetadata$ {
160
+ /** @deprecated use `AtsMetadata$inboundSchema` instead. */
161
+ export const inboundSchema = AtsMetadata$inboundSchema;
162
+ /** @deprecated use `AtsMetadata$outboundSchema` instead. */
163
+ export const outboundSchema = AtsMetadata$outboundSchema;
164
+ /** @deprecated use `AtsMetadata$Outbound` instead. */
165
+ export type Outbound = AtsMetadata$Outbound;
166
+ }
167
+
168
+ export function atsMetadataToJSON(atsMetadata: AtsMetadata): string {
169
+ return JSON.stringify(AtsMetadata$outboundSchema.parse(atsMetadata));
170
+ }
171
+
172
+ export function atsMetadataFromJSON(
173
+ jsonString: string,
174
+ ): SafeParseResult<AtsMetadata, SDKValidationError> {
175
+ return safeParse(
176
+ jsonString,
177
+ (x) => AtsMetadata$inboundSchema.parse(JSON.parse(x)),
178
+ `Failed to parse 'AtsMetadata' from JSON`,
179
+ );
180
+ }
@@ -8,101 +8,114 @@ 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 = {};
11
+ export type CommerceItemMetadataExtraData = {};
12
12
 
13
- export type Value = {};
13
+ export type CommerceItemMetadataValue = {};
14
14
 
15
15
  export type CommerceItemMetadata = {
16
- extraData?: ExtraData | undefined;
16
+ extraData?: CommerceItemMetadataExtraData | undefined;
17
17
  id?: string | undefined;
18
18
  key: string;
19
19
  namespace?: string | undefined;
20
20
  type?: string | undefined;
21
- value?: Value | undefined;
21
+ value?: CommerceItemMetadataValue | undefined;
22
22
  };
23
23
 
24
24
  /** @internal */
25
- export const ExtraData$inboundSchema: z.ZodType<
26
- ExtraData,
25
+ export const CommerceItemMetadataExtraData$inboundSchema: z.ZodType<
26
+ CommerceItemMetadataExtraData,
27
27
  z.ZodTypeDef,
28
28
  unknown
29
29
  > = z.object({});
30
30
 
31
31
  /** @internal */
32
- export type ExtraData$Outbound = {};
32
+ export type CommerceItemMetadataExtraData$Outbound = {};
33
33
 
34
34
  /** @internal */
35
- export const ExtraData$outboundSchema: z.ZodType<
36
- ExtraData$Outbound,
35
+ export const CommerceItemMetadataExtraData$outboundSchema: z.ZodType<
36
+ CommerceItemMetadataExtraData$Outbound,
37
37
  z.ZodTypeDef,
38
- ExtraData
38
+ CommerceItemMetadataExtraData
39
39
  > = z.object({});
40
40
 
41
41
  /**
42
42
  * @internal
43
43
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
44
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;
45
+ export namespace CommerceItemMetadataExtraData$ {
46
+ /** @deprecated use `CommerceItemMetadataExtraData$inboundSchema` instead. */
47
+ export const inboundSchema = CommerceItemMetadataExtraData$inboundSchema;
48
+ /** @deprecated use `CommerceItemMetadataExtraData$outboundSchema` instead. */
49
+ export const outboundSchema = CommerceItemMetadataExtraData$outboundSchema;
50
+ /** @deprecated use `CommerceItemMetadataExtraData$Outbound` instead. */
51
+ export type Outbound = CommerceItemMetadataExtraData$Outbound;
52
52
  }
53
53
 
54
- export function extraDataToJSON(extraData: ExtraData): string {
55
- return JSON.stringify(ExtraData$outboundSchema.parse(extraData));
54
+ export function commerceItemMetadataExtraDataToJSON(
55
+ commerceItemMetadataExtraData: CommerceItemMetadataExtraData,
56
+ ): string {
57
+ return JSON.stringify(
58
+ CommerceItemMetadataExtraData$outboundSchema.parse(
59
+ commerceItemMetadataExtraData,
60
+ ),
61
+ );
56
62
  }
57
63
 
58
- export function extraDataFromJSON(
64
+ export function commerceItemMetadataExtraDataFromJSON(
59
65
  jsonString: string,
60
- ): SafeParseResult<ExtraData, SDKValidationError> {
66
+ ): SafeParseResult<CommerceItemMetadataExtraData, SDKValidationError> {
61
67
  return safeParse(
62
68
  jsonString,
63
- (x) => ExtraData$inboundSchema.parse(JSON.parse(x)),
64
- `Failed to parse 'ExtraData' from JSON`,
69
+ (x) => CommerceItemMetadataExtraData$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'CommerceItemMetadataExtraData' from JSON`,
65
71
  );
66
72
  }
67
73
 
68
74
  /** @internal */
69
- export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
70
- .object({});
75
+ export const CommerceItemMetadataValue$inboundSchema: z.ZodType<
76
+ CommerceItemMetadataValue,
77
+ z.ZodTypeDef,
78
+ unknown
79
+ > = z.object({});
71
80
 
72
81
  /** @internal */
73
- export type Value$Outbound = {};
82
+ export type CommerceItemMetadataValue$Outbound = {};
74
83
 
75
84
  /** @internal */
76
- export const Value$outboundSchema: z.ZodType<
77
- Value$Outbound,
85
+ export const CommerceItemMetadataValue$outboundSchema: z.ZodType<
86
+ CommerceItemMetadataValue$Outbound,
78
87
  z.ZodTypeDef,
79
- Value
88
+ CommerceItemMetadataValue
80
89
  > = z.object({});
81
90
 
82
91
  /**
83
92
  * @internal
84
93
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
85
94
  */
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;
95
+ export namespace CommerceItemMetadataValue$ {
96
+ /** @deprecated use `CommerceItemMetadataValue$inboundSchema` instead. */
97
+ export const inboundSchema = CommerceItemMetadataValue$inboundSchema;
98
+ /** @deprecated use `CommerceItemMetadataValue$outboundSchema` instead. */
99
+ export const outboundSchema = CommerceItemMetadataValue$outboundSchema;
100
+ /** @deprecated use `CommerceItemMetadataValue$Outbound` instead. */
101
+ export type Outbound = CommerceItemMetadataValue$Outbound;
93
102
  }
94
103
 
95
- export function valueToJSON(value: Value): string {
96
- return JSON.stringify(Value$outboundSchema.parse(value));
104
+ export function commerceItemMetadataValueToJSON(
105
+ commerceItemMetadataValue: CommerceItemMetadataValue,
106
+ ): string {
107
+ return JSON.stringify(
108
+ CommerceItemMetadataValue$outboundSchema.parse(commerceItemMetadataValue),
109
+ );
97
110
  }
98
111
 
99
- export function valueFromJSON(
112
+ export function commerceItemMetadataValueFromJSON(
100
113
  jsonString: string,
101
- ): SafeParseResult<Value, SDKValidationError> {
114
+ ): SafeParseResult<CommerceItemMetadataValue, SDKValidationError> {
102
115
  return safeParse(
103
116
  jsonString,
104
- (x) => Value$inboundSchema.parse(JSON.parse(x)),
105
- `Failed to parse 'Value' from JSON`,
117
+ (x) => CommerceItemMetadataValue$inboundSchema.parse(JSON.parse(x)),
118
+ `Failed to parse 'CommerceItemMetadataValue' from JSON`,
106
119
  );
107
120
  }
108
121
 
@@ -112,12 +125,13 @@ export const CommerceItemMetadata$inboundSchema: z.ZodType<
112
125
  z.ZodTypeDef,
113
126
  unknown
114
127
  > = z.object({
115
- extra_data: z.lazy(() => ExtraData$inboundSchema).optional(),
128
+ extra_data: z.lazy(() => CommerceItemMetadataExtraData$inboundSchema)
129
+ .optional(),
116
130
  id: z.string().optional(),
117
131
  key: z.string(),
118
132
  namespace: z.string().optional(),
119
133
  type: z.string().optional(),
120
- value: z.lazy(() => Value$inboundSchema).optional(),
134
+ value: z.lazy(() => CommerceItemMetadataValue$inboundSchema).optional(),
121
135
  }).transform((v) => {
122
136
  return remap$(v, {
123
137
  "extra_data": "extraData",
@@ -126,12 +140,12 @@ export const CommerceItemMetadata$inboundSchema: z.ZodType<
126
140
 
127
141
  /** @internal */
128
142
  export type CommerceItemMetadata$Outbound = {
129
- extra_data?: ExtraData$Outbound | undefined;
143
+ extra_data?: CommerceItemMetadataExtraData$Outbound | undefined;
130
144
  id?: string | undefined;
131
145
  key: string;
132
146
  namespace?: string | undefined;
133
147
  type?: string | undefined;
134
- value?: Value$Outbound | undefined;
148
+ value?: CommerceItemMetadataValue$Outbound | undefined;
135
149
  };
136
150
 
137
151
  /** @internal */
@@ -140,12 +154,13 @@ export const CommerceItemMetadata$outboundSchema: z.ZodType<
140
154
  z.ZodTypeDef,
141
155
  CommerceItemMetadata
142
156
  > = z.object({
143
- extraData: z.lazy(() => ExtraData$outboundSchema).optional(),
157
+ extraData: z.lazy(() => CommerceItemMetadataExtraData$outboundSchema)
158
+ .optional(),
144
159
  id: z.string().optional(),
145
160
  key: z.string(),
146
161
  namespace: z.string().optional(),
147
162
  type: z.string().optional(),
148
- value: z.lazy(() => Value$outboundSchema).optional(),
163
+ value: z.lazy(() => CommerceItemMetadataValue$outboundSchema).optional(),
149
164
  }).transform((v) => {
150
165
  return remap$(v, {
151
166
  extraData: "extra_data",
@@ -13,6 +13,12 @@ import {
13
13
  CrmEmail$Outbound,
14
14
  CrmEmail$outboundSchema,
15
15
  } from "./crmemail.js";
16
+ import {
17
+ CrmMetadata,
18
+ CrmMetadata$inboundSchema,
19
+ CrmMetadata$Outbound,
20
+ CrmMetadata$outboundSchema,
21
+ } from "./crmmetadata.js";
16
22
  import {
17
23
  CrmTelephone,
18
24
  CrmTelephone$inboundSchema,
@@ -52,6 +58,7 @@ export type CrmCompany = {
52
58
  * Additional URLs associated with the contact e.g., LinkedIn, website, etc
53
59
  */
54
60
  linkUrls?: Array<string> | undefined;
61
+ metadata?: Array<CrmMetadata> | undefined;
55
62
  name?: string | undefined;
56
63
  raw?: CrmCompanyRaw | undefined;
57
64
  tags?: Array<string> | undefined;
@@ -124,6 +131,7 @@ export const CrmCompany$inboundSchema: z.ZodType<
124
131
  industry: z.string().optional(),
125
132
  is_active: z.boolean().optional(),
126
133
  link_urls: z.array(z.string()).optional(),
134
+ metadata: z.array(CrmMetadata$inboundSchema).optional(),
127
135
  name: z.string().optional(),
128
136
  raw: z.lazy(() => CrmCompanyRaw$inboundSchema).optional(),
129
137
  tags: z.array(z.string()).optional(),
@@ -158,6 +166,7 @@ export type CrmCompany$Outbound = {
158
166
  industry?: string | undefined;
159
167
  is_active?: boolean | undefined;
160
168
  link_urls?: Array<string> | undefined;
169
+ metadata?: Array<CrmMetadata$Outbound> | undefined;
161
170
  name?: string | undefined;
162
171
  raw?: CrmCompanyRaw$Outbound | undefined;
163
172
  tags?: Array<string> | undefined;
@@ -185,6 +194,7 @@ export const CrmCompany$outboundSchema: z.ZodType<
185
194
  industry: z.string().optional(),
186
195
  isActive: z.boolean().optional(),
187
196
  linkUrls: z.array(z.string()).optional(),
197
+ metadata: z.array(CrmMetadata$outboundSchema).optional(),
188
198
  name: z.string().optional(),
189
199
  raw: z.lazy(() => CrmCompanyRaw$outboundSchema).optional(),
190
200
  tags: z.array(z.string()).optional(),
@@ -13,6 +13,12 @@ import {
13
13
  CrmEmail$Outbound,
14
14
  CrmEmail$outboundSchema,
15
15
  } from "./crmemail.js";
16
+ import {
17
+ CrmMetadata,
18
+ CrmMetadata$inboundSchema,
19
+ CrmMetadata$Outbound,
20
+ CrmMetadata$outboundSchema,
21
+ } from "./crmmetadata.js";
16
22
  import {
17
23
  CrmTelephone,
18
24
  CrmTelephone$inboundSchema,
@@ -52,6 +58,7 @@ export type CrmContact = {
52
58
  * Additional URLs associated with the contact e.g., LinkedIn, website, etc
53
59
  */
54
60
  linkUrls?: Array<string> | undefined;
61
+ metadata?: Array<CrmMetadata> | undefined;
55
62
  name?: string | undefined;
56
63
  raw?: CrmContactRaw | undefined;
57
64
  /**
@@ -122,6 +129,7 @@ export const CrmContact$inboundSchema: z.ZodType<
122
129
  emails: z.array(CrmEmail$inboundSchema).optional(),
123
130
  id: z.string().optional(),
124
131
  link_urls: z.array(z.string()).optional(),
132
+ metadata: z.array(CrmMetadata$inboundSchema).optional(),
125
133
  name: z.string().optional(),
126
134
  raw: z.lazy(() => CrmContactRaw$inboundSchema).optional(),
127
135
  telephones: z.array(CrmTelephone$inboundSchema).optional(),
@@ -150,6 +158,7 @@ export type CrmContact$Outbound = {
150
158
  emails?: Array<CrmEmail$Outbound> | undefined;
151
159
  id?: string | undefined;
152
160
  link_urls?: Array<string> | undefined;
161
+ metadata?: Array<CrmMetadata$Outbound> | undefined;
153
162
  name?: string | undefined;
154
163
  raw?: CrmContactRaw$Outbound | undefined;
155
164
  telephones?: Array<CrmTelephone$Outbound> | undefined;
@@ -172,6 +181,7 @@ export const CrmContact$outboundSchema: z.ZodType<
172
181
  emails: z.array(CrmEmail$outboundSchema).optional(),
173
182
  id: z.string().optional(),
174
183
  linkUrls: z.array(z.string()).optional(),
184
+ metadata: z.array(CrmMetadata$outboundSchema).optional(),
175
185
  name: z.string().optional(),
176
186
  raw: z.lazy(() => CrmContactRaw$outboundSchema).optional(),
177
187
  telephones: z.array(CrmTelephone$outboundSchema).optional(),
@@ -7,6 +7,12 @@ import { remap as remap$ } from "../../../lib/primitives.js";
7
7
  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
+ import {
11
+ CrmMetadata,
12
+ CrmMetadata$inboundSchema,
13
+ CrmMetadata$Outbound,
14
+ CrmMetadata$outboundSchema,
15
+ } from "./crmmetadata.js";
10
16
 
11
17
  export type CrmDealRaw = {};
12
18
 
@@ -22,6 +28,7 @@ export type CrmDeal = {
22
28
  currency?: string | undefined;
23
29
  id?: string | undefined;
24
30
  lostReason?: string | undefined;
31
+ metadata?: Array<CrmMetadata> | undefined;
25
32
  name?: string | undefined;
26
33
  pipeline?: string | undefined;
27
34
  pipelineId?: string | undefined;
@@ -94,6 +101,7 @@ export const CrmDeal$inboundSchema: z.ZodType<CrmDeal, z.ZodTypeDef, unknown> =
94
101
  currency: z.string().optional(),
95
102
  id: z.string().optional(),
96
103
  lost_reason: z.string().optional(),
104
+ metadata: z.array(CrmMetadata$inboundSchema).optional(),
97
105
  name: z.string().optional(),
98
106
  pipeline: z.string().optional(),
99
107
  pipeline_id: z.string().optional(),
@@ -133,6 +141,7 @@ export type CrmDeal$Outbound = {
133
141
  currency?: string | undefined;
134
142
  id?: string | undefined;
135
143
  lost_reason?: string | undefined;
144
+ metadata?: Array<CrmMetadata$Outbound> | undefined;
136
145
  name?: string | undefined;
137
146
  pipeline?: string | undefined;
138
147
  pipeline_id?: string | undefined;
@@ -161,6 +170,7 @@ export const CrmDeal$outboundSchema: z.ZodType<
161
170
  currency: z.string().optional(),
162
171
  id: z.string().optional(),
163
172
  lostReason: z.string().optional(),
173
+ metadata: z.array(CrmMetadata$outboundSchema).optional(),
164
174
  name: z.string().optional(),
165
175
  pipeline: z.string().optional(),
166
176
  pipelineId: z.string().optional(),
@@ -13,6 +13,12 @@ import {
13
13
  CrmEmail$Outbound,
14
14
  CrmEmail$outboundSchema,
15
15
  } from "./crmemail.js";
16
+ import {
17
+ CrmMetadata,
18
+ CrmMetadata$inboundSchema,
19
+ CrmMetadata$Outbound,
20
+ CrmMetadata$outboundSchema,
21
+ } from "./crmmetadata.js";
16
22
  import {
17
23
  CrmTelephone,
18
24
  CrmTelephone$inboundSchema,
@@ -39,6 +45,7 @@ export type CrmLead = {
39
45
  id?: string | undefined;
40
46
  isActive?: boolean | undefined;
41
47
  linkUrls?: Array<string> | undefined;
48
+ metadata?: Array<CrmMetadata> | undefined;
42
49
  name?: string | undefined;
43
50
  raw?: CrmLeadRaw | undefined;
44
51
  source?: string | undefined;
@@ -107,6 +114,7 @@ export const CrmLead$inboundSchema: z.ZodType<CrmLead, z.ZodTypeDef, unknown> =
107
114
  id: z.string().optional(),
108
115
  is_active: z.boolean().optional(),
109
116
  link_urls: z.array(z.string()).optional(),
117
+ metadata: z.array(CrmMetadata$inboundSchema).optional(),
110
118
  name: z.string().optional(),
111
119
  raw: z.lazy(() => CrmLeadRaw$inboundSchema).optional(),
112
120
  source: z.string().optional(),
@@ -142,6 +150,7 @@ export type CrmLead$Outbound = {
142
150
  id?: string | undefined;
143
151
  is_active?: boolean | undefined;
144
152
  link_urls?: Array<string> | undefined;
153
+ metadata?: Array<CrmMetadata$Outbound> | undefined;
145
154
  name?: string | undefined;
146
155
  raw?: CrmLeadRaw$Outbound | undefined;
147
156
  source?: string | undefined;
@@ -167,6 +176,7 @@ export const CrmLead$outboundSchema: z.ZodType<
167
176
  id: z.string().optional(),
168
177
  isActive: z.boolean().optional(),
169
178
  linkUrls: z.array(z.string()).optional(),
179
+ metadata: z.array(CrmMetadata$outboundSchema).optional(),
170
180
  name: z.string().optional(),
171
181
  raw: z.lazy(() => CrmLeadRaw$outboundSchema).optional(),
172
182
  source: z.string().optional(),