@unified-api/typescript-sdk 2.9.13 → 2.9.14

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 (41) hide show
  1. package/lib/config.d.ts +2 -2
  2. package/lib/config.js +2 -2
  3. package/package.json +1 -1
  4. package/sdk/models/shared/crmevent.d.ts +18 -0
  5. package/sdk/models/shared/crmevent.d.ts.map +1 -1
  6. package/sdk/models/shared/crmevent.js +16 -0
  7. package/sdk/models/shared/crmevent.js.map +1 -1
  8. package/sdk/models/shared/crmeventformfield.d.ts +95 -0
  9. package/sdk/models/shared/crmeventformfield.d.ts.map +1 -0
  10. package/sdk/models/shared/crmeventformfield.js +96 -0
  11. package/sdk/models/shared/crmeventformfield.js.map +1 -0
  12. package/sdk/models/shared/crmeventformoption.d.ts +31 -0
  13. package/sdk/models/shared/crmeventformoption.d.ts.map +1 -0
  14. package/sdk/models/shared/crmeventformoption.js +61 -0
  15. package/sdk/models/shared/crmeventformoption.js.map +1 -0
  16. package/sdk/models/shared/index.d.ts +5 -0
  17. package/sdk/models/shared/index.d.ts.map +1 -1
  18. package/sdk/models/shared/index.js +5 -0
  19. package/sdk/models/shared/index.js.map +1 -1
  20. package/sdk/models/shared/propertycrmeventemail.d.ts +2 -2
  21. package/sdk/models/shared/propertycrmeventform.d.ts +36 -0
  22. package/sdk/models/shared/propertycrmeventform.d.ts.map +1 -0
  23. package/sdk/models/shared/propertycrmeventform.js +78 -0
  24. package/sdk/models/shared/propertycrmeventform.js.map +1 -0
  25. package/sdk/models/shared/propertycrmeventmarketingemail.d.ts +47 -0
  26. package/sdk/models/shared/propertycrmeventmarketingemail.d.ts.map +1 -0
  27. package/sdk/models/shared/propertycrmeventmarketingemail.js +80 -0
  28. package/sdk/models/shared/propertycrmeventmarketingemail.js.map +1 -0
  29. package/sdk/models/shared/propertycrmeventpageview.d.ts +33 -0
  30. package/sdk/models/shared/propertycrmeventpageview.d.ts.map +1 -0
  31. package/sdk/models/shared/propertycrmeventpageview.js +63 -0
  32. package/sdk/models/shared/propertycrmeventpageview.js.map +1 -0
  33. package/src/lib/config.ts +2 -2
  34. package/src/sdk/models/shared/crmevent.ts +37 -0
  35. package/src/sdk/models/shared/crmeventformfield.ts +123 -0
  36. package/src/sdk/models/shared/crmeventformoption.ts +70 -0
  37. package/src/sdk/models/shared/index.ts +5 -0
  38. package/src/sdk/models/shared/propertycrmeventemail.ts +2 -2
  39. package/src/sdk/models/shared/propertycrmeventform.ts +96 -0
  40. package/src/sdk/models/shared/propertycrmeventmarketingemail.ts +107 -0
  41. package/src/sdk/models/shared/propertycrmeventpageview.ts +74 -0
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type CrmEventFormOption = {
11
+ label?: string | undefined;
12
+ value?: string | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const CrmEventFormOption$inboundSchema: z.ZodType<
17
+ CrmEventFormOption,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ label: z.string().optional(),
22
+ value: z.string().optional(),
23
+ });
24
+
25
+ /** @internal */
26
+ export type CrmEventFormOption$Outbound = {
27
+ label?: string | undefined;
28
+ value?: string | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const CrmEventFormOption$outboundSchema: z.ZodType<
33
+ CrmEventFormOption$Outbound,
34
+ z.ZodTypeDef,
35
+ CrmEventFormOption
36
+ > = z.object({
37
+ label: z.string().optional(),
38
+ value: z.string().optional(),
39
+ });
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 CrmEventFormOption$ {
46
+ /** @deprecated use `CrmEventFormOption$inboundSchema` instead. */
47
+ export const inboundSchema = CrmEventFormOption$inboundSchema;
48
+ /** @deprecated use `CrmEventFormOption$outboundSchema` instead. */
49
+ export const outboundSchema = CrmEventFormOption$outboundSchema;
50
+ /** @deprecated use `CrmEventFormOption$Outbound` instead. */
51
+ export type Outbound = CrmEventFormOption$Outbound;
52
+ }
53
+
54
+ export function crmEventFormOptionToJSON(
55
+ crmEventFormOption: CrmEventFormOption,
56
+ ): string {
57
+ return JSON.stringify(
58
+ CrmEventFormOption$outboundSchema.parse(crmEventFormOption),
59
+ );
60
+ }
61
+
62
+ export function crmEventFormOptionFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<CrmEventFormOption, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => CrmEventFormOption$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'CrmEventFormOption' from JSON`,
69
+ );
70
+ }
@@ -50,6 +50,8 @@ export * from "./crmcontact.js";
50
50
  export * from "./crmdeal.js";
51
51
  export * from "./crmemail.js";
52
52
  export * from "./crmevent.js";
53
+ export * from "./crmeventformfield.js";
54
+ export * from "./crmeventformoption.js";
53
55
  export * from "./crmlead.js";
54
56
  export * from "./crmpipeline.js";
55
57
  export * from "./crmstage.js";
@@ -114,8 +116,11 @@ export * from "./propertycrmcompanyaddress.js";
114
116
  export * from "./propertycrmcontactaddress.js";
115
117
  export * from "./propertycrmeventcall.js";
116
118
  export * from "./propertycrmeventemail.js";
119
+ export * from "./propertycrmeventform.js";
120
+ export * from "./propertycrmeventmarketingemail.js";
117
121
  export * from "./propertycrmeventmeeting.js";
118
122
  export * from "./propertycrmeventnote.js";
123
+ export * from "./propertycrmeventpageview.js";
119
124
  export * from "./propertycrmeventtask.js";
120
125
  export * from "./propertycrmleadaddress.js";
121
126
  export * from "./propertyenrichcompanyaddress.js";
@@ -15,13 +15,13 @@ export type PropertyCrmEventEmail = {
15
15
  attachmentFileIds?: Array<string> | undefined;
16
16
  body?: string | undefined;
17
17
  /**
18
- * The event email's cc name & email (name <test@test.com>)
18
+ * The event email's cc name & email (name )
19
19
  */
20
20
  cc?: Array<string> | undefined;
21
21
  from?: string | undefined;
22
22
  subject?: string | undefined;
23
23
  /**
24
- * The event email's "to" name & email (name <test@test.com>)
24
+ * The event email's "to" name & email (name )
25
25
  */
26
26
  to?: Array<string> | undefined;
27
27
  };
@@ -0,0 +1,96 @@
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
+ import {
11
+ CrmEventFormField,
12
+ CrmEventFormField$inboundSchema,
13
+ CrmEventFormField$Outbound,
14
+ CrmEventFormField$outboundSchema,
15
+ } from "./crmeventformfield.js";
16
+
17
+ export type PropertyCrmEventForm = {
18
+ archivedAt?: Date | undefined;
19
+ fields?: Array<CrmEventFormField> | undefined;
20
+ name?: string | undefined;
21
+ redirectUrl?: string | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const PropertyCrmEventForm$inboundSchema: z.ZodType<
26
+ PropertyCrmEventForm,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ archived_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
31
+ .optional(),
32
+ fields: z.array(CrmEventFormField$inboundSchema).optional(),
33
+ name: z.string().optional(),
34
+ redirect_url: z.string().optional(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "archived_at": "archivedAt",
38
+ "redirect_url": "redirectUrl",
39
+ });
40
+ });
41
+
42
+ /** @internal */
43
+ export type PropertyCrmEventForm$Outbound = {
44
+ archived_at?: string | undefined;
45
+ fields?: Array<CrmEventFormField$Outbound> | undefined;
46
+ name?: string | undefined;
47
+ redirect_url?: string | undefined;
48
+ };
49
+
50
+ /** @internal */
51
+ export const PropertyCrmEventForm$outboundSchema: z.ZodType<
52
+ PropertyCrmEventForm$Outbound,
53
+ z.ZodTypeDef,
54
+ PropertyCrmEventForm
55
+ > = z.object({
56
+ archivedAt: z.date().transform(v => v.toISOString()).optional(),
57
+ fields: z.array(CrmEventFormField$outboundSchema).optional(),
58
+ name: z.string().optional(),
59
+ redirectUrl: z.string().optional(),
60
+ }).transform((v) => {
61
+ return remap$(v, {
62
+ archivedAt: "archived_at",
63
+ redirectUrl: "redirect_url",
64
+ });
65
+ });
66
+
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 namespace PropertyCrmEventForm$ {
72
+ /** @deprecated use `PropertyCrmEventForm$inboundSchema` instead. */
73
+ export const inboundSchema = PropertyCrmEventForm$inboundSchema;
74
+ /** @deprecated use `PropertyCrmEventForm$outboundSchema` instead. */
75
+ export const outboundSchema = PropertyCrmEventForm$outboundSchema;
76
+ /** @deprecated use `PropertyCrmEventForm$Outbound` instead. */
77
+ export type Outbound = PropertyCrmEventForm$Outbound;
78
+ }
79
+
80
+ export function propertyCrmEventFormToJSON(
81
+ propertyCrmEventForm: PropertyCrmEventForm,
82
+ ): string {
83
+ return JSON.stringify(
84
+ PropertyCrmEventForm$outboundSchema.parse(propertyCrmEventForm),
85
+ );
86
+ }
87
+
88
+ export function propertyCrmEventFormFromJSON(
89
+ jsonString: string,
90
+ ): SafeParseResult<PropertyCrmEventForm, SDKValidationError> {
91
+ return safeParse(
92
+ jsonString,
93
+ (x) => PropertyCrmEventForm$inboundSchema.parse(JSON.parse(x)),
94
+ `Failed to parse 'PropertyCrmEventForm' from JSON`,
95
+ );
96
+ }
@@ -0,0 +1,107 @@
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 PropertyCrmEventMarketingEmail = {
12
+ attachmentFileIds?: Array<string> | undefined;
13
+ body?: string | undefined;
14
+ /**
15
+ * The event email's cc name & email (name <test@test.com>)
16
+ */
17
+ cc?: Array<string> | undefined;
18
+ from?: string | undefined;
19
+ name?: string | undefined;
20
+ subject?: string | undefined;
21
+ /**
22
+ * The event email's "to" name & email (name <test@test.com>)
23
+ */
24
+ to?: Array<string> | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const PropertyCrmEventMarketingEmail$inboundSchema: z.ZodType<
29
+ PropertyCrmEventMarketingEmail,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.object({
33
+ attachment_file_ids: z.array(z.string()).optional(),
34
+ body: z.string().optional(),
35
+ cc: z.array(z.string()).optional(),
36
+ from: z.string().optional(),
37
+ name: z.string().optional(),
38
+ subject: z.string().optional(),
39
+ to: z.array(z.string()).optional(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ "attachment_file_ids": "attachmentFileIds",
43
+ });
44
+ });
45
+
46
+ /** @internal */
47
+ export type PropertyCrmEventMarketingEmail$Outbound = {
48
+ attachment_file_ids?: Array<string> | undefined;
49
+ body?: string | undefined;
50
+ cc?: Array<string> | undefined;
51
+ from?: string | undefined;
52
+ name?: string | undefined;
53
+ subject?: string | undefined;
54
+ to?: Array<string> | undefined;
55
+ };
56
+
57
+ /** @internal */
58
+ export const PropertyCrmEventMarketingEmail$outboundSchema: z.ZodType<
59
+ PropertyCrmEventMarketingEmail$Outbound,
60
+ z.ZodTypeDef,
61
+ PropertyCrmEventMarketingEmail
62
+ > = z.object({
63
+ attachmentFileIds: z.array(z.string()).optional(),
64
+ body: z.string().optional(),
65
+ cc: z.array(z.string()).optional(),
66
+ from: z.string().optional(),
67
+ name: z.string().optional(),
68
+ subject: z.string().optional(),
69
+ to: z.array(z.string()).optional(),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ attachmentFileIds: "attachment_file_ids",
73
+ });
74
+ });
75
+
76
+ /**
77
+ * @internal
78
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
79
+ */
80
+ export namespace PropertyCrmEventMarketingEmail$ {
81
+ /** @deprecated use `PropertyCrmEventMarketingEmail$inboundSchema` instead. */
82
+ export const inboundSchema = PropertyCrmEventMarketingEmail$inboundSchema;
83
+ /** @deprecated use `PropertyCrmEventMarketingEmail$outboundSchema` instead. */
84
+ export const outboundSchema = PropertyCrmEventMarketingEmail$outboundSchema;
85
+ /** @deprecated use `PropertyCrmEventMarketingEmail$Outbound` instead. */
86
+ export type Outbound = PropertyCrmEventMarketingEmail$Outbound;
87
+ }
88
+
89
+ export function propertyCrmEventMarketingEmailToJSON(
90
+ propertyCrmEventMarketingEmail: PropertyCrmEventMarketingEmail,
91
+ ): string {
92
+ return JSON.stringify(
93
+ PropertyCrmEventMarketingEmail$outboundSchema.parse(
94
+ propertyCrmEventMarketingEmail,
95
+ ),
96
+ );
97
+ }
98
+
99
+ export function propertyCrmEventMarketingEmailFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<PropertyCrmEventMarketingEmail, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => PropertyCrmEventMarketingEmail$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'PropertyCrmEventMarketingEmail' from JSON`,
106
+ );
107
+ }
@@ -0,0 +1,74 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type PropertyCrmEventPageView = {
11
+ average?: number | undefined;
12
+ count?: number | undefined;
13
+ url?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const PropertyCrmEventPageView$inboundSchema: z.ZodType<
18
+ PropertyCrmEventPageView,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ average: z.number().optional(),
23
+ count: z.number().optional(),
24
+ url: z.string().optional(),
25
+ });
26
+
27
+ /** @internal */
28
+ export type PropertyCrmEventPageView$Outbound = {
29
+ average?: number | undefined;
30
+ count?: number | undefined;
31
+ url?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const PropertyCrmEventPageView$outboundSchema: z.ZodType<
36
+ PropertyCrmEventPageView$Outbound,
37
+ z.ZodTypeDef,
38
+ PropertyCrmEventPageView
39
+ > = z.object({
40
+ average: z.number().optional(),
41
+ count: z.number().optional(),
42
+ url: z.string().optional(),
43
+ });
44
+
45
+ /**
46
+ * @internal
47
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
+ */
49
+ export namespace PropertyCrmEventPageView$ {
50
+ /** @deprecated use `PropertyCrmEventPageView$inboundSchema` instead. */
51
+ export const inboundSchema = PropertyCrmEventPageView$inboundSchema;
52
+ /** @deprecated use `PropertyCrmEventPageView$outboundSchema` instead. */
53
+ export const outboundSchema = PropertyCrmEventPageView$outboundSchema;
54
+ /** @deprecated use `PropertyCrmEventPageView$Outbound` instead. */
55
+ export type Outbound = PropertyCrmEventPageView$Outbound;
56
+ }
57
+
58
+ export function propertyCrmEventPageViewToJSON(
59
+ propertyCrmEventPageView: PropertyCrmEventPageView,
60
+ ): string {
61
+ return JSON.stringify(
62
+ PropertyCrmEventPageView$outboundSchema.parse(propertyCrmEventPageView),
63
+ );
64
+ }
65
+
66
+ export function propertyCrmEventPageViewFromJSON(
67
+ jsonString: string,
68
+ ): SafeParseResult<PropertyCrmEventPageView, SDKValidationError> {
69
+ return safeParse(
70
+ jsonString,
71
+ (x) => PropertyCrmEventPageView$inboundSchema.parse(JSON.parse(x)),
72
+ `Failed to parse 'PropertyCrmEventPageView' from JSON`,
73
+ );
74
+ }