@unified-api/typescript-sdk 2.10.0 → 2.10.2

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 (130) 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/accountingaccount.d.ts +23 -9
  6. package/sdk/models/shared/accountingaccount.d.ts.map +1 -1
  7. package/sdk/models/shared/accountingaccount.js +28 -3
  8. package/sdk/models/shared/accountingaccount.js.map +1 -1
  9. package/sdk/models/shared/accountingcontact.d.ts +23 -6
  10. package/sdk/models/shared/accountingcontact.d.ts.map +1 -1
  11. package/sdk/models/shared/accountingcontact.js +26 -3
  12. package/sdk/models/shared/accountingcontact.js.map +1 -1
  13. package/sdk/models/shared/accountinginvoice.d.ts +23 -6
  14. package/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
  15. package/sdk/models/shared/accountinginvoice.js +26 -3
  16. package/sdk/models/shared/accountinginvoice.js.map +1 -1
  17. package/sdk/models/shared/accountingjournal.d.ts +23 -6
  18. package/sdk/models/shared/accountingjournal.d.ts.map +1 -1
  19. package/sdk/models/shared/accountingjournal.js +26 -3
  20. package/sdk/models/shared/accountingjournal.js.map +1 -1
  21. package/sdk/models/shared/accountingorder.d.ts +23 -6
  22. package/sdk/models/shared/accountingorder.d.ts.map +1 -1
  23. package/sdk/models/shared/accountingorder.js +26 -3
  24. package/sdk/models/shared/accountingorder.js.map +1 -1
  25. package/sdk/models/shared/accountingorganization.d.ts +23 -6
  26. package/sdk/models/shared/accountingorganization.d.ts.map +1 -1
  27. package/sdk/models/shared/accountingorganization.js +26 -3
  28. package/sdk/models/shared/accountingorganization.js.map +1 -1
  29. package/sdk/models/shared/accountingtaxrate.d.ts +23 -6
  30. package/sdk/models/shared/accountingtaxrate.d.ts.map +1 -1
  31. package/sdk/models/shared/accountingtaxrate.js +26 -3
  32. package/sdk/models/shared/accountingtaxrate.js.map +1 -1
  33. package/sdk/models/shared/accountingtransaction.d.ts +23 -6
  34. package/sdk/models/shared/accountingtransaction.d.ts.map +1 -1
  35. package/sdk/models/shared/accountingtransaction.js +26 -3
  36. package/sdk/models/shared/accountingtransaction.js.map +1 -1
  37. package/sdk/models/shared/accountingtransactioncontact.d.ts +10 -2
  38. package/sdk/models/shared/accountingtransactioncontact.d.ts.map +1 -1
  39. package/sdk/models/shared/accountingtransactioncontact.js +21 -2
  40. package/sdk/models/shared/accountingtransactioncontact.js.map +1 -1
  41. package/sdk/models/shared/atsactivity.d.ts +15 -15
  42. package/sdk/models/shared/atsactivity.d.ts.map +1 -1
  43. package/sdk/models/shared/atsactivity.js +18 -20
  44. package/sdk/models/shared/atsactivity.js.map +1 -1
  45. package/sdk/models/shared/atsoffer.d.ts +85 -2
  46. package/sdk/models/shared/atsoffer.d.ts.map +1 -1
  47. package/sdk/models/shared/atsoffer.js +103 -3
  48. package/sdk/models/shared/atsoffer.js.map +1 -1
  49. package/sdk/models/shared/crmcompany.d.ts +26 -9
  50. package/sdk/models/shared/crmcompany.d.ts.map +1 -1
  51. package/sdk/models/shared/crmcompany.js +26 -3
  52. package/sdk/models/shared/crmcompany.js.map +1 -1
  53. package/sdk/models/shared/crmcontact.d.ts +26 -9
  54. package/sdk/models/shared/crmcontact.d.ts.map +1 -1
  55. package/sdk/models/shared/crmcontact.js +26 -3
  56. package/sdk/models/shared/crmcontact.js.map +1 -1
  57. package/sdk/models/shared/crmdeal.d.ts +27 -9
  58. package/sdk/models/shared/crmdeal.d.ts.map +1 -1
  59. package/sdk/models/shared/crmdeal.js +34 -3
  60. package/sdk/models/shared/crmdeal.js.map +1 -1
  61. package/sdk/models/shared/crmevent.d.ts +23 -9
  62. package/sdk/models/shared/crmevent.d.ts.map +1 -1
  63. package/sdk/models/shared/crmevent.js +26 -3
  64. package/sdk/models/shared/crmevent.js.map +1 -1
  65. package/sdk/models/shared/crmeventformfield.d.ts +3 -0
  66. package/sdk/models/shared/crmeventformfield.d.ts.map +1 -1
  67. package/sdk/models/shared/crmeventformfield.js +1 -0
  68. package/sdk/models/shared/crmeventformfield.js.map +1 -1
  69. package/sdk/models/shared/crmlead.d.ts +23 -6
  70. package/sdk/models/shared/crmlead.d.ts.map +1 -1
  71. package/sdk/models/shared/crmlead.js +26 -3
  72. package/sdk/models/shared/crmlead.js.map +1 -1
  73. package/sdk/models/shared/crmpipeline.d.ts +23 -6
  74. package/sdk/models/shared/crmpipeline.d.ts.map +1 -1
  75. package/sdk/models/shared/crmpipeline.js +26 -3
  76. package/sdk/models/shared/crmpipeline.js.map +1 -1
  77. package/sdk/models/shared/hriscompany.d.ts +23 -6
  78. package/sdk/models/shared/hriscompany.d.ts.map +1 -1
  79. package/sdk/models/shared/hriscompany.js +26 -3
  80. package/sdk/models/shared/hriscompany.js.map +1 -1
  81. package/sdk/models/shared/hrisemployee.d.ts +23 -6
  82. package/sdk/models/shared/hrisemployee.d.ts.map +1 -1
  83. package/sdk/models/shared/hrisemployee.js +26 -3
  84. package/sdk/models/shared/hrisemployee.js.map +1 -1
  85. package/sdk/models/shared/hrisgroup.d.ts +23 -6
  86. package/sdk/models/shared/hrisgroup.d.ts.map +1 -1
  87. package/sdk/models/shared/hrisgroup.js +26 -3
  88. package/sdk/models/shared/hrisgroup.js.map +1 -1
  89. package/sdk/models/shared/hrislocation.d.ts +23 -6
  90. package/sdk/models/shared/hrislocation.d.ts.map +1 -1
  91. package/sdk/models/shared/hrislocation.js +26 -3
  92. package/sdk/models/shared/hrislocation.js.map +1 -1
  93. package/sdk/models/shared/hrispayslip.d.ts +27 -8
  94. package/sdk/models/shared/hrispayslip.d.ts.map +1 -1
  95. package/sdk/models/shared/hrispayslip.js +32 -5
  96. package/sdk/models/shared/hrispayslip.js.map +1 -1
  97. package/sdk/models/shared/hristimeoff.d.ts +27 -8
  98. package/sdk/models/shared/hristimeoff.d.ts.map +1 -1
  99. package/sdk/models/shared/hristimeoff.js +32 -5
  100. package/sdk/models/shared/hristimeoff.js.map +1 -1
  101. package/sdk/models/shared/webhook.d.ts +42 -2
  102. package/sdk/models/shared/webhook.d.ts.map +1 -1
  103. package/sdk/models/shared/webhook.js +38 -3
  104. package/sdk/models/shared/webhook.js.map +1 -1
  105. package/src/lib/config.ts +2 -2
  106. package/src/sdk/models/shared/accountingaccount.ts +44 -7
  107. package/src/sdk/models/shared/accountingcontact.ts +54 -4
  108. package/src/sdk/models/shared/accountinginvoice.ts +54 -4
  109. package/src/sdk/models/shared/accountingjournal.ts +54 -4
  110. package/src/sdk/models/shared/accountingorder.ts +54 -4
  111. package/src/sdk/models/shared/accountingorganization.ts +54 -4
  112. package/src/sdk/models/shared/accountingtaxrate.ts +54 -4
  113. package/src/sdk/models/shared/accountingtransaction.ts +54 -4
  114. package/src/sdk/models/shared/accountingtransactioncontact.ts +31 -4
  115. package/src/sdk/models/shared/atsactivity.ts +29 -23
  116. package/src/sdk/models/shared/atsoffer.ts +170 -4
  117. package/src/sdk/models/shared/crmcompany.ts +53 -7
  118. package/src/sdk/models/shared/crmcontact.ts +53 -7
  119. package/src/sdk/models/shared/crmdeal.ts +62 -7
  120. package/src/sdk/models/shared/crmevent.ts +50 -7
  121. package/src/sdk/models/shared/crmeventformfield.ts +1 -0
  122. package/src/sdk/models/shared/crmlead.ts +50 -4
  123. package/src/sdk/models/shared/crmpipeline.ts +50 -4
  124. package/src/sdk/models/shared/hriscompany.ts +50 -4
  125. package/src/sdk/models/shared/hrisemployee.ts +52 -4
  126. package/src/sdk/models/shared/hrisgroup.ts +50 -4
  127. package/src/sdk/models/shared/hrislocation.ts +52 -4
  128. package/src/sdk/models/shared/hrispayslip.ts +60 -8
  129. package/src/sdk/models/shared/hristimeoff.ts +60 -8
  130. package/src/sdk/models/shared/webhook.ts +50 -4
@@ -21,7 +21,7 @@ import {
21
21
  PropertyAtsActivityFrom$outboundSchema,
22
22
  } from "./propertyatsactivityfrom.js";
23
23
 
24
- export type Raw = {};
24
+ export type AtsActivityRaw = {};
25
25
 
26
26
  export const AtsActivityType = {
27
27
  Note: "NOTE",
@@ -43,7 +43,7 @@ export type AtsActivity = {
43
43
  interviewId?: string | undefined;
44
44
  isPrivate?: boolean | undefined;
45
45
  jobId?: string | undefined;
46
- raw?: Raw | undefined;
46
+ raw?: AtsActivityRaw | undefined;
47
47
  subType?: string | undefined;
48
48
  title?: string | undefined;
49
49
  to?: Array<AtsEmail> | undefined;
@@ -56,40 +56,46 @@ export type AtsActivity = {
56
56
  };
57
57
 
58
58
  /** @internal */
59
- export const Raw$inboundSchema: z.ZodType<Raw, z.ZodTypeDef, unknown> = z
60
- .object({});
59
+ export const AtsActivityRaw$inboundSchema: z.ZodType<
60
+ AtsActivityRaw,
61
+ z.ZodTypeDef,
62
+ unknown
63
+ > = z.object({});
61
64
 
62
65
  /** @internal */
63
- export type Raw$Outbound = {};
66
+ export type AtsActivityRaw$Outbound = {};
64
67
 
65
68
  /** @internal */
66
- export const Raw$outboundSchema: z.ZodType<Raw$Outbound, z.ZodTypeDef, Raw> = z
67
- .object({});
69
+ export const AtsActivityRaw$outboundSchema: z.ZodType<
70
+ AtsActivityRaw$Outbound,
71
+ z.ZodTypeDef,
72
+ AtsActivityRaw
73
+ > = z.object({});
68
74
 
69
75
  /**
70
76
  * @internal
71
77
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
72
78
  */
73
- export namespace Raw$ {
74
- /** @deprecated use `Raw$inboundSchema` instead. */
75
- export const inboundSchema = Raw$inboundSchema;
76
- /** @deprecated use `Raw$outboundSchema` instead. */
77
- export const outboundSchema = Raw$outboundSchema;
78
- /** @deprecated use `Raw$Outbound` instead. */
79
- export type Outbound = Raw$Outbound;
79
+ export namespace AtsActivityRaw$ {
80
+ /** @deprecated use `AtsActivityRaw$inboundSchema` instead. */
81
+ export const inboundSchema = AtsActivityRaw$inboundSchema;
82
+ /** @deprecated use `AtsActivityRaw$outboundSchema` instead. */
83
+ export const outboundSchema = AtsActivityRaw$outboundSchema;
84
+ /** @deprecated use `AtsActivityRaw$Outbound` instead. */
85
+ export type Outbound = AtsActivityRaw$Outbound;
80
86
  }
81
87
 
82
- export function rawToJSON(raw: Raw): string {
83
- return JSON.stringify(Raw$outboundSchema.parse(raw));
88
+ export function atsActivityRawToJSON(atsActivityRaw: AtsActivityRaw): string {
89
+ return JSON.stringify(AtsActivityRaw$outboundSchema.parse(atsActivityRaw));
84
90
  }
85
91
 
86
- export function rawFromJSON(
92
+ export function atsActivityRawFromJSON(
87
93
  jsonString: string,
88
- ): SafeParseResult<Raw, SDKValidationError> {
94
+ ): SafeParseResult<AtsActivityRaw, SDKValidationError> {
89
95
  return safeParse(
90
96
  jsonString,
91
- (x) => Raw$inboundSchema.parse(JSON.parse(x)),
92
- `Failed to parse 'Raw' from JSON`,
97
+ (x) => AtsActivityRaw$inboundSchema.parse(JSON.parse(x)),
98
+ `Failed to parse 'AtsActivityRaw' from JSON`,
93
99
  );
94
100
  }
95
101
 
@@ -133,7 +139,7 @@ export const AtsActivity$inboundSchema: z.ZodType<
133
139
  interview_id: z.string().optional(),
134
140
  is_private: z.boolean().optional(),
135
141
  job_id: z.string().optional(),
136
- raw: z.lazy(() => Raw$inboundSchema).optional(),
142
+ raw: z.lazy(() => AtsActivityRaw$inboundSchema).optional(),
137
143
  sub_type: z.string().optional(),
138
144
  title: z.string().optional(),
139
145
  to: z.array(AtsEmail$inboundSchema).optional(),
@@ -170,7 +176,7 @@ export type AtsActivity$Outbound = {
170
176
  interview_id?: string | undefined;
171
177
  is_private?: boolean | undefined;
172
178
  job_id?: string | undefined;
173
- raw?: Raw$Outbound | undefined;
179
+ raw?: AtsActivityRaw$Outbound | undefined;
174
180
  sub_type?: string | undefined;
175
181
  title?: string | undefined;
176
182
  to?: Array<AtsEmail$Outbound> | undefined;
@@ -197,7 +203,7 @@ export const AtsActivity$outboundSchema: z.ZodType<
197
203
  interviewId: z.string().optional(),
198
204
  isPrivate: z.boolean().optional(),
199
205
  jobId: z.string().optional(),
200
- raw: z.lazy(() => Raw$outboundSchema).optional(),
206
+ raw: z.lazy(() => AtsActivityRaw$outboundSchema).optional(),
201
207
  subType: z.string().optional(),
202
208
  title: z.string().optional(),
203
209
  to: z.array(AtsEmail$outboundSchema).optional(),
@@ -3,28 +3,194 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
6
7
  import { safeParse } from "../../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
7
9
  import { Result as SafeParseResult } from "../../types/fp.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ AtsCompensation,
13
+ AtsCompensation$inboundSchema,
14
+ AtsCompensation$Outbound,
15
+ AtsCompensation$outboundSchema,
16
+ } from "./atscompensation.js";
9
17
 
10
- export type AtsOffer = {};
18
+ export type AtsOfferRaw = {};
19
+
20
+ export const AtsOfferStatus = {
21
+ Created: "CREATED",
22
+ Sent: "SENT",
23
+ Accepted: "ACCEPTED",
24
+ Rejected: "REJECTED",
25
+ } as const;
26
+ export type AtsOfferStatus = ClosedEnum<typeof AtsOfferStatus>;
27
+
28
+ export type AtsOffer = {
29
+ acceptedAt?: Date | undefined;
30
+ /**
31
+ * compensation details for the offer
32
+ */
33
+ compensation?: Array<AtsCompensation> | undefined;
34
+ createdAt?: Date | undefined;
35
+ creatorUserId?: string | undefined;
36
+ employeeUserId?: string | undefined;
37
+ id?: string | undefined;
38
+ raw?: AtsOfferRaw | undefined;
39
+ rejectedAt?: Date | undefined;
40
+ sentAt?: Date | undefined;
41
+ startAt?: Date | undefined;
42
+ status?: AtsOfferStatus | undefined;
43
+ updatedAt?: Date | undefined;
44
+ };
45
+
46
+ /** @internal */
47
+ export const AtsOfferRaw$inboundSchema: z.ZodType<
48
+ AtsOfferRaw,
49
+ z.ZodTypeDef,
50
+ unknown
51
+ > = z.object({});
52
+
53
+ /** @internal */
54
+ export type AtsOfferRaw$Outbound = {};
55
+
56
+ /** @internal */
57
+ export const AtsOfferRaw$outboundSchema: z.ZodType<
58
+ AtsOfferRaw$Outbound,
59
+ z.ZodTypeDef,
60
+ AtsOfferRaw
61
+ > = z.object({});
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace AtsOfferRaw$ {
68
+ /** @deprecated use `AtsOfferRaw$inboundSchema` instead. */
69
+ export const inboundSchema = AtsOfferRaw$inboundSchema;
70
+ /** @deprecated use `AtsOfferRaw$outboundSchema` instead. */
71
+ export const outboundSchema = AtsOfferRaw$outboundSchema;
72
+ /** @deprecated use `AtsOfferRaw$Outbound` instead. */
73
+ export type Outbound = AtsOfferRaw$Outbound;
74
+ }
75
+
76
+ export function atsOfferRawToJSON(atsOfferRaw: AtsOfferRaw): string {
77
+ return JSON.stringify(AtsOfferRaw$outboundSchema.parse(atsOfferRaw));
78
+ }
79
+
80
+ export function atsOfferRawFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<AtsOfferRaw, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => AtsOfferRaw$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'AtsOfferRaw' from JSON`,
87
+ );
88
+ }
89
+
90
+ /** @internal */
91
+ export const AtsOfferStatus$inboundSchema: z.ZodNativeEnum<
92
+ typeof AtsOfferStatus
93
+ > = z.nativeEnum(AtsOfferStatus);
94
+
95
+ /** @internal */
96
+ export const AtsOfferStatus$outboundSchema: z.ZodNativeEnum<
97
+ typeof AtsOfferStatus
98
+ > = AtsOfferStatus$inboundSchema;
99
+
100
+ /**
101
+ * @internal
102
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
103
+ */
104
+ export namespace AtsOfferStatus$ {
105
+ /** @deprecated use `AtsOfferStatus$inboundSchema` instead. */
106
+ export const inboundSchema = AtsOfferStatus$inboundSchema;
107
+ /** @deprecated use `AtsOfferStatus$outboundSchema` instead. */
108
+ export const outboundSchema = AtsOfferStatus$outboundSchema;
109
+ }
11
110
 
12
111
  /** @internal */
13
112
  export const AtsOffer$inboundSchema: z.ZodType<
14
113
  AtsOffer,
15
114
  z.ZodTypeDef,
16
115
  unknown
17
- > = z.object({});
116
+ > = z.object({
117
+ accepted_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
118
+ .optional(),
119
+ compensation: z.array(AtsCompensation$inboundSchema).optional(),
120
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
121
+ .optional(),
122
+ creator_user_id: z.string().optional(),
123
+ employee_user_id: z.string().optional(),
124
+ id: z.string().optional(),
125
+ raw: z.lazy(() => AtsOfferRaw$inboundSchema).optional(),
126
+ rejected_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
127
+ .optional(),
128
+ sent_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
129
+ .optional(),
130
+ start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
131
+ .optional(),
132
+ status: AtsOfferStatus$inboundSchema.optional(),
133
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
134
+ .optional(),
135
+ }).transform((v) => {
136
+ return remap$(v, {
137
+ "accepted_at": "acceptedAt",
138
+ "created_at": "createdAt",
139
+ "creator_user_id": "creatorUserId",
140
+ "employee_user_id": "employeeUserId",
141
+ "rejected_at": "rejectedAt",
142
+ "sent_at": "sentAt",
143
+ "start_at": "startAt",
144
+ "updated_at": "updatedAt",
145
+ });
146
+ });
18
147
 
19
148
  /** @internal */
20
- export type AtsOffer$Outbound = {};
149
+ export type AtsOffer$Outbound = {
150
+ accepted_at?: string | undefined;
151
+ compensation?: Array<AtsCompensation$Outbound> | undefined;
152
+ created_at?: string | undefined;
153
+ creator_user_id?: string | undefined;
154
+ employee_user_id?: string | undefined;
155
+ id?: string | undefined;
156
+ raw?: AtsOfferRaw$Outbound | undefined;
157
+ rejected_at?: string | undefined;
158
+ sent_at?: string | undefined;
159
+ start_at?: string | undefined;
160
+ status?: string | undefined;
161
+ updated_at?: string | undefined;
162
+ };
21
163
 
22
164
  /** @internal */
23
165
  export const AtsOffer$outboundSchema: z.ZodType<
24
166
  AtsOffer$Outbound,
25
167
  z.ZodTypeDef,
26
168
  AtsOffer
27
- > = z.object({});
169
+ > = z.object({
170
+ acceptedAt: z.date().transform(v => v.toISOString()).optional(),
171
+ compensation: z.array(AtsCompensation$outboundSchema).optional(),
172
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
173
+ creatorUserId: z.string().optional(),
174
+ employeeUserId: z.string().optional(),
175
+ id: z.string().optional(),
176
+ raw: z.lazy(() => AtsOfferRaw$outboundSchema).optional(),
177
+ rejectedAt: z.date().transform(v => v.toISOString()).optional(),
178
+ sentAt: z.date().transform(v => v.toISOString()).optional(),
179
+ startAt: z.date().transform(v => v.toISOString()).optional(),
180
+ status: AtsOfferStatus$outboundSchema.optional(),
181
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
182
+ }).transform((v) => {
183
+ return remap$(v, {
184
+ acceptedAt: "accepted_at",
185
+ createdAt: "created_at",
186
+ creatorUserId: "creator_user_id",
187
+ employeeUserId: "employee_user_id",
188
+ rejectedAt: "rejected_at",
189
+ sentAt: "sent_at",
190
+ startAt: "start_at",
191
+ updatedAt: "updated_at",
192
+ });
193
+ });
28
194
 
29
195
  /**
30
196
  * @internal
@@ -26,6 +26,8 @@ import {
26
26
  PropertyCrmCompanyAddress$outboundSchema,
27
27
  } from "./propertycrmcompanyaddress.js";
28
28
 
29
+ export type CrmCompanyRaw = {};
30
+
29
31
  /**
30
32
  * A company represents an organization that optionally is associated with a deal and/or contacts
31
33
  */
@@ -46,12 +48,12 @@ export type CrmCompany = {
46
48
  id?: string | undefined;
47
49
  industry?: string | undefined;
48
50
  isActive?: boolean | undefined;
49
- linkUrls?: Array<string> | undefined;
50
- name?: string | undefined;
51
51
  /**
52
- * The raw data returned by the integration for this company
52
+ * Additional URLs associated with the contact e.g., LinkedIn, website, etc
53
53
  */
54
- raw?: { [k: string]: any } | undefined;
54
+ linkUrls?: Array<string> | undefined;
55
+ name?: string | undefined;
56
+ raw?: CrmCompanyRaw | undefined;
55
57
  tags?: Array<string> | undefined;
56
58
  telephones?: Array<CrmTelephone> | undefined;
57
59
  timezone?: string | undefined;
@@ -60,6 +62,50 @@ export type CrmCompany = {
60
62
  websites?: Array<string> | undefined;
61
63
  };
62
64
 
65
+ /** @internal */
66
+ export const CrmCompanyRaw$inboundSchema: z.ZodType<
67
+ CrmCompanyRaw,
68
+ z.ZodTypeDef,
69
+ unknown
70
+ > = z.object({});
71
+
72
+ /** @internal */
73
+ export type CrmCompanyRaw$Outbound = {};
74
+
75
+ /** @internal */
76
+ export const CrmCompanyRaw$outboundSchema: z.ZodType<
77
+ CrmCompanyRaw$Outbound,
78
+ z.ZodTypeDef,
79
+ CrmCompanyRaw
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 CrmCompanyRaw$ {
87
+ /** @deprecated use `CrmCompanyRaw$inboundSchema` instead. */
88
+ export const inboundSchema = CrmCompanyRaw$inboundSchema;
89
+ /** @deprecated use `CrmCompanyRaw$outboundSchema` instead. */
90
+ export const outboundSchema = CrmCompanyRaw$outboundSchema;
91
+ /** @deprecated use `CrmCompanyRaw$Outbound` instead. */
92
+ export type Outbound = CrmCompanyRaw$Outbound;
93
+ }
94
+
95
+ export function crmCompanyRawToJSON(crmCompanyRaw: CrmCompanyRaw): string {
96
+ return JSON.stringify(CrmCompanyRaw$outboundSchema.parse(crmCompanyRaw));
97
+ }
98
+
99
+ export function crmCompanyRawFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<CrmCompanyRaw, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => CrmCompanyRaw$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'CrmCompanyRaw' from JSON`,
106
+ );
107
+ }
108
+
63
109
  /** @internal */
64
110
  export const CrmCompany$inboundSchema: z.ZodType<
65
111
  CrmCompany,
@@ -79,7 +125,7 @@ export const CrmCompany$inboundSchema: z.ZodType<
79
125
  is_active: z.boolean().optional(),
80
126
  link_urls: z.array(z.string()).optional(),
81
127
  name: z.string().optional(),
82
- raw: z.record(z.any()).optional(),
128
+ raw: z.lazy(() => CrmCompanyRaw$inboundSchema).optional(),
83
129
  tags: z.array(z.string()).optional(),
84
130
  telephones: z.array(CrmTelephone$inboundSchema).optional(),
85
131
  timezone: z.string().optional(),
@@ -113,7 +159,7 @@ export type CrmCompany$Outbound = {
113
159
  is_active?: boolean | undefined;
114
160
  link_urls?: Array<string> | undefined;
115
161
  name?: string | undefined;
116
- raw?: { [k: string]: any } | undefined;
162
+ raw?: CrmCompanyRaw$Outbound | undefined;
117
163
  tags?: Array<string> | undefined;
118
164
  telephones?: Array<CrmTelephone$Outbound> | undefined;
119
165
  timezone?: string | undefined;
@@ -140,7 +186,7 @@ export const CrmCompany$outboundSchema: z.ZodType<
140
186
  isActive: z.boolean().optional(),
141
187
  linkUrls: z.array(z.string()).optional(),
142
188
  name: z.string().optional(),
143
- raw: z.record(z.any()).optional(),
189
+ raw: z.lazy(() => CrmCompanyRaw$outboundSchema).optional(),
144
190
  tags: z.array(z.string()).optional(),
145
191
  telephones: z.array(CrmTelephone$outboundSchema).optional(),
146
192
  timezone: z.string().optional(),
@@ -26,6 +26,8 @@ import {
26
26
  PropertyCrmContactAddress$outboundSchema,
27
27
  } from "./propertycrmcontactaddress.js";
28
28
 
29
+ export type CrmContactRaw = {};
30
+
29
31
  /**
30
32
  * A contact represents a person that optionally is associated with a deal and/or a company
31
33
  */
@@ -46,12 +48,12 @@ export type CrmContact = {
46
48
  */
47
49
  emails?: Array<CrmEmail> | undefined;
48
50
  id?: string | undefined;
49
- linkUrls?: Array<string> | undefined;
50
- name?: string | undefined;
51
51
  /**
52
- * The raw data returned by the integration for this contact
52
+ * Additional URLs associated with the contact e.g., LinkedIn, website, etc
53
53
  */
54
- raw?: { [k: string]: any } | undefined;
54
+ linkUrls?: Array<string> | undefined;
55
+ name?: string | undefined;
56
+ raw?: CrmContactRaw | undefined;
55
57
  /**
56
58
  * An array of telephones for this contact
57
59
  */
@@ -61,6 +63,50 @@ export type CrmContact = {
61
63
  userId?: string | undefined;
62
64
  };
63
65
 
66
+ /** @internal */
67
+ export const CrmContactRaw$inboundSchema: z.ZodType<
68
+ CrmContactRaw,
69
+ z.ZodTypeDef,
70
+ unknown
71
+ > = z.object({});
72
+
73
+ /** @internal */
74
+ export type CrmContactRaw$Outbound = {};
75
+
76
+ /** @internal */
77
+ export const CrmContactRaw$outboundSchema: z.ZodType<
78
+ CrmContactRaw$Outbound,
79
+ z.ZodTypeDef,
80
+ CrmContactRaw
81
+ > = z.object({});
82
+
83
+ /**
84
+ * @internal
85
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
86
+ */
87
+ export namespace CrmContactRaw$ {
88
+ /** @deprecated use `CrmContactRaw$inboundSchema` instead. */
89
+ export const inboundSchema = CrmContactRaw$inboundSchema;
90
+ /** @deprecated use `CrmContactRaw$outboundSchema` instead. */
91
+ export const outboundSchema = CrmContactRaw$outboundSchema;
92
+ /** @deprecated use `CrmContactRaw$Outbound` instead. */
93
+ export type Outbound = CrmContactRaw$Outbound;
94
+ }
95
+
96
+ export function crmContactRawToJSON(crmContactRaw: CrmContactRaw): string {
97
+ return JSON.stringify(CrmContactRaw$outboundSchema.parse(crmContactRaw));
98
+ }
99
+
100
+ export function crmContactRawFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<CrmContactRaw, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => CrmContactRaw$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'CrmContactRaw' from JSON`,
107
+ );
108
+ }
109
+
64
110
  /** @internal */
65
111
  export const CrmContact$inboundSchema: z.ZodType<
66
112
  CrmContact,
@@ -77,7 +123,7 @@ export const CrmContact$inboundSchema: z.ZodType<
77
123
  id: z.string().optional(),
78
124
  link_urls: z.array(z.string()).optional(),
79
125
  name: z.string().optional(),
80
- raw: z.record(z.any()).optional(),
126
+ raw: z.lazy(() => CrmContactRaw$inboundSchema).optional(),
81
127
  telephones: z.array(CrmTelephone$inboundSchema).optional(),
82
128
  title: z.string().optional(),
83
129
  updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
@@ -105,7 +151,7 @@ export type CrmContact$Outbound = {
105
151
  id?: string | undefined;
106
152
  link_urls?: Array<string> | undefined;
107
153
  name?: string | undefined;
108
- raw?: { [k: string]: any } | undefined;
154
+ raw?: CrmContactRaw$Outbound | undefined;
109
155
  telephones?: Array<CrmTelephone$Outbound> | undefined;
110
156
  title?: string | undefined;
111
157
  updated_at?: string | undefined;
@@ -127,7 +173,7 @@ export const CrmContact$outboundSchema: z.ZodType<
127
173
  id: z.string().optional(),
128
174
  linkUrls: z.array(z.string()).optional(),
129
175
  name: z.string().optional(),
130
- raw: z.record(z.any()).optional(),
176
+ raw: z.lazy(() => CrmContactRaw$outboundSchema).optional(),
131
177
  telephones: z.array(CrmTelephone$outboundSchema).optional(),
132
178
  title: z.string().optional(),
133
179
  updatedAt: z.date().transform(v => v.toISOString()).optional(),
@@ -8,12 +8,16 @@ 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 CrmDealRaw = {};
12
+
11
13
  /**
12
14
  * A deal represents an opportunity with companies and/or contacts
13
15
  */
14
16
  export type CrmDeal = {
15
17
  amount?: number | undefined;
16
18
  closedAt?: Date | undefined;
19
+ companyIds?: Array<string> | undefined;
20
+ contactIds?: Array<string> | undefined;
17
21
  createdAt?: Date | undefined;
18
22
  currency?: string | undefined;
19
23
  id?: string | undefined;
@@ -22,10 +26,7 @@ export type CrmDeal = {
22
26
  pipeline?: string | undefined;
23
27
  pipelineId?: string | undefined;
24
28
  probability?: number | undefined;
25
- /**
26
- * The raw data returned by the integration for this deal
27
- */
28
- raw?: { [k: string]: any } | undefined;
29
+ raw?: CrmDealRaw | undefined;
29
30
  source?: string | undefined;
30
31
  stage?: string | undefined;
31
32
  stageId?: string | undefined;
@@ -35,12 +36,58 @@ export type CrmDeal = {
35
36
  wonReason?: string | undefined;
36
37
  };
37
38
 
39
+ /** @internal */
40
+ export const CrmDealRaw$inboundSchema: z.ZodType<
41
+ CrmDealRaw,
42
+ z.ZodTypeDef,
43
+ unknown
44
+ > = z.object({});
45
+
46
+ /** @internal */
47
+ export type CrmDealRaw$Outbound = {};
48
+
49
+ /** @internal */
50
+ export const CrmDealRaw$outboundSchema: z.ZodType<
51
+ CrmDealRaw$Outbound,
52
+ z.ZodTypeDef,
53
+ CrmDealRaw
54
+ > = z.object({});
55
+
56
+ /**
57
+ * @internal
58
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
59
+ */
60
+ export namespace CrmDealRaw$ {
61
+ /** @deprecated use `CrmDealRaw$inboundSchema` instead. */
62
+ export const inboundSchema = CrmDealRaw$inboundSchema;
63
+ /** @deprecated use `CrmDealRaw$outboundSchema` instead. */
64
+ export const outboundSchema = CrmDealRaw$outboundSchema;
65
+ /** @deprecated use `CrmDealRaw$Outbound` instead. */
66
+ export type Outbound = CrmDealRaw$Outbound;
67
+ }
68
+
69
+ export function crmDealRawToJSON(crmDealRaw: CrmDealRaw): string {
70
+ return JSON.stringify(CrmDealRaw$outboundSchema.parse(crmDealRaw));
71
+ }
72
+
73
+ export function crmDealRawFromJSON(
74
+ jsonString: string,
75
+ ): SafeParseResult<CrmDealRaw, SDKValidationError> {
76
+ return safeParse(
77
+ jsonString,
78
+ (x) => CrmDealRaw$inboundSchema.parse(JSON.parse(x)),
79
+ `Failed to parse 'CrmDealRaw' from JSON`,
80
+ );
81
+ }
82
+
38
83
  /** @internal */
39
84
  export const CrmDeal$inboundSchema: z.ZodType<CrmDeal, z.ZodTypeDef, unknown> =
40
85
  z.object({
41
86
  amount: z.number().optional(),
42
87
  closed_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
43
88
  .optional(),
89
+ company_ids: z.array(z.string()).optional(),
90
+ contact_ids: z.array(z.string()).optional(),
44
91
  created_at: z.string().datetime({ offset: true }).transform(v =>
45
92
  new Date(v)
46
93
  ).optional(),
@@ -51,7 +98,7 @@ export const CrmDeal$inboundSchema: z.ZodType<CrmDeal, z.ZodTypeDef, unknown> =
51
98
  pipeline: z.string().optional(),
52
99
  pipeline_id: z.string().optional(),
53
100
  probability: z.number().optional(),
54
- raw: z.record(z.any()).optional(),
101
+ raw: z.lazy(() => CrmDealRaw$inboundSchema).optional(),
55
102
  source: z.string().optional(),
56
103
  stage: z.string().optional(),
57
104
  stage_id: z.string().optional(),
@@ -64,6 +111,8 @@ export const CrmDeal$inboundSchema: z.ZodType<CrmDeal, z.ZodTypeDef, unknown> =
64
111
  }).transform((v) => {
65
112
  return remap$(v, {
66
113
  "closed_at": "closedAt",
114
+ "company_ids": "companyIds",
115
+ "contact_ids": "contactIds",
67
116
  "created_at": "createdAt",
68
117
  "lost_reason": "lostReason",
69
118
  "pipeline_id": "pipelineId",
@@ -78,6 +127,8 @@ export const CrmDeal$inboundSchema: z.ZodType<CrmDeal, z.ZodTypeDef, unknown> =
78
127
  export type CrmDeal$Outbound = {
79
128
  amount?: number | undefined;
80
129
  closed_at?: string | undefined;
130
+ company_ids?: Array<string> | undefined;
131
+ contact_ids?: Array<string> | undefined;
81
132
  created_at?: string | undefined;
82
133
  currency?: string | undefined;
83
134
  id?: string | undefined;
@@ -86,7 +137,7 @@ export type CrmDeal$Outbound = {
86
137
  pipeline?: string | undefined;
87
138
  pipeline_id?: string | undefined;
88
139
  probability?: number | undefined;
89
- raw?: { [k: string]: any } | undefined;
140
+ raw?: CrmDealRaw$Outbound | undefined;
90
141
  source?: string | undefined;
91
142
  stage?: string | undefined;
92
143
  stage_id?: string | undefined;
@@ -104,6 +155,8 @@ export const CrmDeal$outboundSchema: z.ZodType<
104
155
  > = z.object({
105
156
  amount: z.number().optional(),
106
157
  closedAt: z.date().transform(v => v.toISOString()).optional(),
158
+ companyIds: z.array(z.string()).optional(),
159
+ contactIds: z.array(z.string()).optional(),
107
160
  createdAt: z.date().transform(v => v.toISOString()).optional(),
108
161
  currency: z.string().optional(),
109
162
  id: z.string().optional(),
@@ -112,7 +165,7 @@ export const CrmDeal$outboundSchema: z.ZodType<
112
165
  pipeline: z.string().optional(),
113
166
  pipelineId: z.string().optional(),
114
167
  probability: z.number().optional(),
115
- raw: z.record(z.any()).optional(),
168
+ raw: z.lazy(() => CrmDealRaw$outboundSchema).optional(),
116
169
  source: z.string().optional(),
117
170
  stage: z.string().optional(),
118
171
  stageId: z.string().optional(),
@@ -123,6 +176,8 @@ export const CrmDeal$outboundSchema: z.ZodType<
123
176
  }).transform((v) => {
124
177
  return remap$(v, {
125
178
  closedAt: "closed_at",
179
+ companyIds: "company_ids",
180
+ contactIds: "contact_ids",
126
181
  createdAt: "created_at",
127
182
  lostReason: "lost_reason",
128
183
  pipelineId: "pipeline_id",