@unified-api/typescript-sdk 2.86.0 → 2.86.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 (165) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/README.md +18 -12
  3. package/dist/commonjs/funcs/ucCreateUcCall.d.ts +18 -0
  4. package/dist/commonjs/funcs/ucCreateUcCall.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/ucCreateUcCall.js +126 -0
  6. package/dist/commonjs/funcs/ucCreateUcCall.js.map +1 -0
  7. package/dist/commonjs/funcs/ucPatchUcCall.d.ts +18 -0
  8. package/dist/commonjs/funcs/ucPatchUcCall.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/ucPatchUcCall.js +130 -0
  10. package/dist/commonjs/funcs/ucPatchUcCall.js.map +1 -0
  11. package/dist/commonjs/funcs/ucUpdateUcCall.d.ts +18 -0
  12. package/dist/commonjs/funcs/ucUpdateUcCall.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/ucUpdateUcCall.js +130 -0
  14. package/dist/commonjs/funcs/ucUpdateUcCall.js.map +1 -0
  15. package/dist/commonjs/lib/config.d.ts +3 -3
  16. package/dist/commonjs/lib/config.js +3 -3
  17. package/dist/commonjs/lib/config.js.map +1 -1
  18. package/dist/commonjs/sdk/call.d.ts +21 -0
  19. package/dist/commonjs/sdk/call.d.ts.map +1 -1
  20. package/dist/commonjs/sdk/call.js +30 -0
  21. package/dist/commonjs/sdk/call.js.map +1 -1
  22. package/dist/commonjs/sdk/models/operations/createuccall.d.ts +57 -0
  23. package/dist/commonjs/sdk/models/operations/createuccall.d.ts.map +1 -0
  24. package/dist/commonjs/sdk/models/operations/createuccall.js +86 -0
  25. package/dist/commonjs/sdk/models/operations/createuccall.js.map +1 -0
  26. package/dist/commonjs/sdk/models/operations/getuccall.d.ts +7 -0
  27. package/dist/commonjs/sdk/models/operations/getuccall.d.ts.map +1 -1
  28. package/dist/commonjs/sdk/models/operations/getuccall.js +7 -0
  29. package/dist/commonjs/sdk/models/operations/getuccall.js.map +1 -1
  30. package/dist/commonjs/sdk/models/operations/index.d.ts +3 -0
  31. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  32. package/dist/commonjs/sdk/models/operations/index.js +3 -0
  33. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  34. package/dist/commonjs/sdk/models/operations/listuccalls.d.ts +7 -0
  35. package/dist/commonjs/sdk/models/operations/listuccalls.d.ts.map +1 -1
  36. package/dist/commonjs/sdk/models/operations/listuccalls.js +7 -0
  37. package/dist/commonjs/sdk/models/operations/listuccalls.js.map +1 -1
  38. package/dist/commonjs/sdk/models/operations/patchuccall.d.ts +62 -0
  39. package/dist/commonjs/sdk/models/operations/patchuccall.d.ts.map +1 -0
  40. package/dist/commonjs/sdk/models/operations/patchuccall.js +87 -0
  41. package/dist/commonjs/sdk/models/operations/patchuccall.js.map +1 -0
  42. package/dist/commonjs/sdk/models/operations/updateuccall.d.ts +62 -0
  43. package/dist/commonjs/sdk/models/operations/updateuccall.d.ts.map +1 -0
  44. package/dist/commonjs/sdk/models/operations/updateuccall.js +87 -0
  45. package/dist/commonjs/sdk/models/operations/updateuccall.js.map +1 -0
  46. package/dist/commonjs/sdk/models/shared/index.d.ts +2 -0
  47. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  48. package/dist/commonjs/sdk/models/shared/index.js +2 -0
  49. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  50. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts +1 -0
  51. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  52. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js +1 -0
  53. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  54. package/dist/commonjs/sdk/models/shared/propertyuccallinstructiontelephone.d.ts +35 -0
  55. package/dist/commonjs/sdk/models/shared/propertyuccallinstructiontelephone.d.ts.map +1 -0
  56. package/dist/commonjs/sdk/models/shared/propertyuccallinstructiontelephone.js +72 -0
  57. package/dist/commonjs/sdk/models/shared/propertyuccallinstructiontelephone.js.map +1 -0
  58. package/dist/commonjs/sdk/models/shared/propertyuccalltelephone.d.ts +10 -0
  59. package/dist/commonjs/sdk/models/shared/propertyuccalltelephone.d.ts.map +1 -1
  60. package/dist/commonjs/sdk/models/shared/propertyuccalltelephone.js +12 -1
  61. package/dist/commonjs/sdk/models/shared/propertyuccalltelephone.js.map +1 -1
  62. package/dist/commonjs/sdk/models/shared/uccall.d.ts +87 -3
  63. package/dist/commonjs/sdk/models/shared/uccall.d.ts.map +1 -1
  64. package/dist/commonjs/sdk/models/shared/uccall.js +81 -1
  65. package/dist/commonjs/sdk/models/shared/uccall.js.map +1 -1
  66. package/dist/commonjs/sdk/models/shared/uccallinstruction.d.ts +71 -0
  67. package/dist/commonjs/sdk/models/shared/uccallinstruction.d.ts.map +1 -0
  68. package/dist/commonjs/sdk/models/shared/uccallinstruction.js +102 -0
  69. package/dist/commonjs/sdk/models/shared/uccallinstruction.js.map +1 -0
  70. package/dist/commonjs/sdk/uc.d.ts +21 -0
  71. package/dist/commonjs/sdk/uc.d.ts.map +1 -1
  72. package/dist/commonjs/sdk/uc.js +30 -0
  73. package/dist/commonjs/sdk/uc.js.map +1 -1
  74. package/dist/esm/funcs/ucCreateUcCall.d.ts +18 -0
  75. package/dist/esm/funcs/ucCreateUcCall.d.ts.map +1 -0
  76. package/dist/esm/funcs/ucCreateUcCall.js +90 -0
  77. package/dist/esm/funcs/ucCreateUcCall.js.map +1 -0
  78. package/dist/esm/funcs/ucPatchUcCall.d.ts +18 -0
  79. package/dist/esm/funcs/ucPatchUcCall.d.ts.map +1 -0
  80. package/dist/esm/funcs/ucPatchUcCall.js +94 -0
  81. package/dist/esm/funcs/ucPatchUcCall.js.map +1 -0
  82. package/dist/esm/funcs/ucUpdateUcCall.d.ts +18 -0
  83. package/dist/esm/funcs/ucUpdateUcCall.d.ts.map +1 -0
  84. package/dist/esm/funcs/ucUpdateUcCall.js +94 -0
  85. package/dist/esm/funcs/ucUpdateUcCall.js.map +1 -0
  86. package/dist/esm/lib/config.d.ts +3 -3
  87. package/dist/esm/lib/config.js +3 -3
  88. package/dist/esm/lib/config.js.map +1 -1
  89. package/dist/esm/sdk/call.d.ts +21 -0
  90. package/dist/esm/sdk/call.d.ts.map +1 -1
  91. package/dist/esm/sdk/call.js +30 -0
  92. package/dist/esm/sdk/call.js.map +1 -1
  93. package/dist/esm/sdk/models/operations/createuccall.d.ts +57 -0
  94. package/dist/esm/sdk/models/operations/createuccall.d.ts.map +1 -0
  95. package/dist/esm/sdk/models/operations/createuccall.js +49 -0
  96. package/dist/esm/sdk/models/operations/createuccall.js.map +1 -0
  97. package/dist/esm/sdk/models/operations/getuccall.d.ts +7 -0
  98. package/dist/esm/sdk/models/operations/getuccall.d.ts.map +1 -1
  99. package/dist/esm/sdk/models/operations/getuccall.js +7 -0
  100. package/dist/esm/sdk/models/operations/getuccall.js.map +1 -1
  101. package/dist/esm/sdk/models/operations/index.d.ts +3 -0
  102. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  103. package/dist/esm/sdk/models/operations/index.js +3 -0
  104. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  105. package/dist/esm/sdk/models/operations/listuccalls.d.ts +7 -0
  106. package/dist/esm/sdk/models/operations/listuccalls.d.ts.map +1 -1
  107. package/dist/esm/sdk/models/operations/listuccalls.js +7 -0
  108. package/dist/esm/sdk/models/operations/listuccalls.js.map +1 -1
  109. package/dist/esm/sdk/models/operations/patchuccall.d.ts +62 -0
  110. package/dist/esm/sdk/models/operations/patchuccall.d.ts.map +1 -0
  111. package/dist/esm/sdk/models/operations/patchuccall.js +50 -0
  112. package/dist/esm/sdk/models/operations/patchuccall.js.map +1 -0
  113. package/dist/esm/sdk/models/operations/updateuccall.d.ts +62 -0
  114. package/dist/esm/sdk/models/operations/updateuccall.d.ts.map +1 -0
  115. package/dist/esm/sdk/models/operations/updateuccall.js +50 -0
  116. package/dist/esm/sdk/models/operations/updateuccall.js.map +1 -0
  117. package/dist/esm/sdk/models/shared/index.d.ts +2 -0
  118. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  119. package/dist/esm/sdk/models/shared/index.js +2 -0
  120. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  121. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts +1 -0
  122. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  123. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js +1 -0
  124. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  125. package/dist/esm/sdk/models/shared/propertyuccallinstructiontelephone.d.ts +35 -0
  126. package/dist/esm/sdk/models/shared/propertyuccallinstructiontelephone.d.ts.map +1 -0
  127. package/dist/esm/sdk/models/shared/propertyuccallinstructiontelephone.js +34 -0
  128. package/dist/esm/sdk/models/shared/propertyuccallinstructiontelephone.js.map +1 -0
  129. package/dist/esm/sdk/models/shared/propertyuccalltelephone.d.ts +10 -0
  130. package/dist/esm/sdk/models/shared/propertyuccalltelephone.d.ts.map +1 -1
  131. package/dist/esm/sdk/models/shared/propertyuccalltelephone.js +10 -0
  132. package/dist/esm/sdk/models/shared/propertyuccalltelephone.js.map +1 -1
  133. package/dist/esm/sdk/models/shared/uccall.d.ts +87 -3
  134. package/dist/esm/sdk/models/shared/uccall.d.ts.map +1 -1
  135. package/dist/esm/sdk/models/shared/uccall.js +82 -3
  136. package/dist/esm/sdk/models/shared/uccall.js.map +1 -1
  137. package/dist/esm/sdk/models/shared/uccallinstruction.d.ts +71 -0
  138. package/dist/esm/sdk/models/shared/uccallinstruction.d.ts.map +1 -0
  139. package/dist/esm/sdk/models/shared/uccallinstruction.js +64 -0
  140. package/dist/esm/sdk/models/shared/uccallinstruction.js.map +1 -0
  141. package/dist/esm/sdk/uc.d.ts +21 -0
  142. package/dist/esm/sdk/uc.d.ts.map +1 -1
  143. package/dist/esm/sdk/uc.js +30 -0
  144. package/dist/esm/sdk/uc.js.map +1 -1
  145. package/examples/accountingCreateAccountingAccount.example.ts +2 -2
  146. package/jsr.json +1 -1
  147. package/package.json +1 -1
  148. package/src/funcs/ucCreateUcCall.ts +174 -0
  149. package/src/funcs/ucPatchUcCall.ts +178 -0
  150. package/src/funcs/ucUpdateUcCall.ts +178 -0
  151. package/src/lib/config.ts +3 -3
  152. package/src/sdk/call.ts +54 -0
  153. package/src/sdk/models/operations/createuccall.ts +91 -0
  154. package/src/sdk/models/operations/getuccall.ts +7 -0
  155. package/src/sdk/models/operations/index.ts +3 -0
  156. package/src/sdk/models/operations/listuccalls.ts +7 -0
  157. package/src/sdk/models/operations/patchuccall.ts +97 -0
  158. package/src/sdk/models/operations/updateuccall.ts +97 -0
  159. package/src/sdk/models/shared/index.ts +2 -0
  160. package/src/sdk/models/shared/propertyconnectionpermissions.ts +1 -0
  161. package/src/sdk/models/shared/propertyuccallinstructiontelephone.ts +87 -0
  162. package/src/sdk/models/shared/propertyuccalltelephone.ts +28 -0
  163. package/src/sdk/models/shared/uccall.ts +175 -2
  164. package/src/sdk/models/shared/uccallinstruction.ts +152 -0
  165. package/src/sdk/uc.ts +54 -0
@@ -23,6 +23,13 @@ export const GetUcCallQueryParamFields = {
23
23
  Metadata: "metadata",
24
24
  Raw: "raw",
25
25
  ConversationIdentifier: "conversation_identifier",
26
+ Status: "status",
27
+ AnswerAt: "answer_at",
28
+ DurationSeconds: "duration_seconds",
29
+ CostAmount: "cost_amount",
30
+ Currency: "currency",
31
+ ParentId: "parent_id",
32
+ Instructions: "instructions",
26
33
  } as const;
27
34
  export type GetUcCallQueryParamFields = ClosedEnum<
28
35
  typeof GetUcCallQueryParamFields
@@ -152,6 +152,7 @@ export * from "./createticketingcategory.js";
152
152
  export * from "./createticketingcustomer.js";
153
153
  export * from "./createticketingnote.js";
154
154
  export * from "./createticketingticket.js";
155
+ export * from "./createuccall.js";
155
156
  export * from "./createuccomment.js";
156
157
  export * from "./createuccontact.js";
157
158
  export * from "./createucrecording.js";
@@ -722,6 +723,7 @@ export * from "./patchticketingcategory.js";
722
723
  export * from "./patchticketingcustomer.js";
723
724
  export * from "./patchticketingnote.js";
724
725
  export * from "./patchticketingticket.js";
726
+ export * from "./patchuccall.js";
725
727
  export * from "./patchuccomment.js";
726
728
  export * from "./patchuccontact.js";
727
729
  export * from "./patchucrecording.js";
@@ -1018,6 +1020,7 @@ export * from "./updateticketingcategory.js";
1018
1020
  export * from "./updateticketingcustomer.js";
1019
1021
  export * from "./updateticketingnote.js";
1020
1022
  export * from "./updateticketingticket.js";
1023
+ export * from "./updateuccall.js";
1021
1024
  export * from "./updateuccomment.js";
1022
1025
  export * from "./updateuccontact.js";
1023
1026
  export * from "./updateucrecording.js";
@@ -23,6 +23,13 @@ export const ListUcCallsQueryParamFields = {
23
23
  Metadata: "metadata",
24
24
  Raw: "raw",
25
25
  ConversationIdentifier: "conversation_identifier",
26
+ Status: "status",
27
+ AnswerAt: "answer_at",
28
+ DurationSeconds: "duration_seconds",
29
+ CostAmount: "cost_amount",
30
+ Currency: "currency",
31
+ ParentId: "parent_id",
32
+ Instructions: "instructions",
26
33
  } as const;
27
34
  export type ListUcCallsQueryParamFields = ClosedEnum<
28
35
  typeof ListUcCallsQueryParamFields
@@ -0,0 +1,97 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import * as shared from "../shared/index.js";
9
+
10
+ export const PatchUcCallQueryParamFields = {
11
+ Id: "id",
12
+ CreatedAt: "created_at",
13
+ UpdatedAt: "updated_at",
14
+ ContactId: "contact_id",
15
+ Telephone: "telephone",
16
+ StartAt: "start_at",
17
+ EndAt: "end_at",
18
+ UserId: "user_id",
19
+ Contacts: "contacts",
20
+ IsPrivate: "is_private",
21
+ UserName: "user_name",
22
+ UserPhone: "user_phone",
23
+ Type: "type",
24
+ Metadata: "metadata",
25
+ Raw: "raw",
26
+ ConversationIdentifier: "conversation_identifier",
27
+ Status: "status",
28
+ AnswerAt: "answer_at",
29
+ DurationSeconds: "duration_seconds",
30
+ CostAmount: "cost_amount",
31
+ Currency: "currency",
32
+ ParentId: "parent_id",
33
+ Instructions: "instructions",
34
+ } as const;
35
+ export type PatchUcCallQueryParamFields = ClosedEnum<
36
+ typeof PatchUcCallQueryParamFields
37
+ >;
38
+
39
+ export type PatchUcCallRequest = {
40
+ ucCall: shared.UcCall;
41
+ /**
42
+ * ID of the connection
43
+ */
44
+ connectionId: string;
45
+ /**
46
+ * Fields to return
47
+ */
48
+ fields?: Array<PatchUcCallQueryParamFields> | undefined;
49
+ /**
50
+ * ID of the Call
51
+ */
52
+ id: string;
53
+ /**
54
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
55
+ */
56
+ raw?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const PatchUcCallQueryParamFields$outboundSchema: z.ZodNativeEnum<
61
+ typeof PatchUcCallQueryParamFields
62
+ > = z.nativeEnum(PatchUcCallQueryParamFields);
63
+
64
+ /** @internal */
65
+ export type PatchUcCallRequest$Outbound = {
66
+ UcCall: shared.UcCall$Outbound;
67
+ connection_id: string;
68
+ fields?: Array<string> | undefined;
69
+ id: string;
70
+ raw?: string | undefined;
71
+ };
72
+
73
+ /** @internal */
74
+ export const PatchUcCallRequest$outboundSchema: z.ZodType<
75
+ PatchUcCallRequest$Outbound,
76
+ z.ZodTypeDef,
77
+ PatchUcCallRequest
78
+ > = z.object({
79
+ ucCall: shared.UcCall$outboundSchema,
80
+ connectionId: z.string(),
81
+ fields: z.array(PatchUcCallQueryParamFields$outboundSchema).optional(),
82
+ id: z.string(),
83
+ raw: z.string().optional(),
84
+ }).transform((v) => {
85
+ return remap$(v, {
86
+ ucCall: "UcCall",
87
+ connectionId: "connection_id",
88
+ });
89
+ });
90
+
91
+ export function patchUcCallRequestToJSON(
92
+ patchUcCallRequest: PatchUcCallRequest,
93
+ ): string {
94
+ return JSON.stringify(
95
+ PatchUcCallRequest$outboundSchema.parse(patchUcCallRequest),
96
+ );
97
+ }
@@ -0,0 +1,97 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import * as shared from "../shared/index.js";
9
+
10
+ export const UpdateUcCallQueryParamFields = {
11
+ Id: "id",
12
+ CreatedAt: "created_at",
13
+ UpdatedAt: "updated_at",
14
+ ContactId: "contact_id",
15
+ Telephone: "telephone",
16
+ StartAt: "start_at",
17
+ EndAt: "end_at",
18
+ UserId: "user_id",
19
+ Contacts: "contacts",
20
+ IsPrivate: "is_private",
21
+ UserName: "user_name",
22
+ UserPhone: "user_phone",
23
+ Type: "type",
24
+ Metadata: "metadata",
25
+ Raw: "raw",
26
+ ConversationIdentifier: "conversation_identifier",
27
+ Status: "status",
28
+ AnswerAt: "answer_at",
29
+ DurationSeconds: "duration_seconds",
30
+ CostAmount: "cost_amount",
31
+ Currency: "currency",
32
+ ParentId: "parent_id",
33
+ Instructions: "instructions",
34
+ } as const;
35
+ export type UpdateUcCallQueryParamFields = ClosedEnum<
36
+ typeof UpdateUcCallQueryParamFields
37
+ >;
38
+
39
+ export type UpdateUcCallRequest = {
40
+ ucCall: shared.UcCall;
41
+ /**
42
+ * ID of the connection
43
+ */
44
+ connectionId: string;
45
+ /**
46
+ * Fields to return
47
+ */
48
+ fields?: Array<UpdateUcCallQueryParamFields> | undefined;
49
+ /**
50
+ * ID of the Call
51
+ */
52
+ id: string;
53
+ /**
54
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
55
+ */
56
+ raw?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const UpdateUcCallQueryParamFields$outboundSchema: z.ZodNativeEnum<
61
+ typeof UpdateUcCallQueryParamFields
62
+ > = z.nativeEnum(UpdateUcCallQueryParamFields);
63
+
64
+ /** @internal */
65
+ export type UpdateUcCallRequest$Outbound = {
66
+ UcCall: shared.UcCall$Outbound;
67
+ connection_id: string;
68
+ fields?: Array<string> | undefined;
69
+ id: string;
70
+ raw?: string | undefined;
71
+ };
72
+
73
+ /** @internal */
74
+ export const UpdateUcCallRequest$outboundSchema: z.ZodType<
75
+ UpdateUcCallRequest$Outbound,
76
+ z.ZodTypeDef,
77
+ UpdateUcCallRequest
78
+ > = z.object({
79
+ ucCall: shared.UcCall$outboundSchema,
80
+ connectionId: z.string(),
81
+ fields: z.array(UpdateUcCallQueryParamFields$outboundSchema).optional(),
82
+ id: z.string(),
83
+ raw: z.string().optional(),
84
+ }).transform((v) => {
85
+ return remap$(v, {
86
+ ucCall: "UcCall",
87
+ connectionId: "connection_id",
88
+ });
89
+ });
90
+
91
+ export function updateUcCallRequestToJSON(
92
+ updateUcCallRequest: UpdateUcCallRequest,
93
+ ): string {
94
+ return JSON.stringify(
95
+ UpdateUcCallRequest$outboundSchema.parse(updateUcCallRequest),
96
+ );
97
+ }
@@ -539,6 +539,7 @@ export * from "./propertysocialprofileaddress.js";
539
539
  export * from "./propertysocialprofilemetrics.js";
540
540
  export * from "./propertysocialreviewreply.js";
541
541
  export * from "./propertystoragepermissionroles.js";
542
+ export * from "./propertyuccallinstructiontelephone.js";
542
543
  export * from "./propertyuccalltelephone.js";
543
544
  export * from "./repobranch.js";
544
545
  export * from "./repocommit.js";
@@ -603,6 +604,7 @@ export * from "./ticketingnote.js";
603
604
  export * from "./ticketingtelephone.js";
604
605
  export * from "./ticketingticket.js";
605
606
  export * from "./uccall.js";
607
+ export * from "./uccallinstruction.js";
606
608
  export * from "./uccomment.js";
607
609
  export * from "./uccontact.js";
608
610
  export * from "./ucemail.js";
@@ -177,6 +177,7 @@ export const PropertyConnectionPermissions = {
177
177
  HrisEarningRead: "hris_earning_read",
178
178
  HrisEarningWrite: "hris_earning_write",
179
179
  UcCallRead: "uc_call_read",
180
+ UcCallWrite: "uc_call_write",
180
181
  UcContactRead: "uc_contact_read",
181
182
  UcContactWrite: "uc_contact_write",
182
183
  UcCommentRead: "uc_comment_read",
@@ -0,0 +1,87 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import * as openEnums from "../../types/enums.js";
8
+ import { OpenEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const PropertyUcCallInstructionTelephoneType = {
13
+ Work: "WORK",
14
+ Home: "HOME",
15
+ Other: "OTHER",
16
+ Fax: "FAX",
17
+ Mobile: "MOBILE",
18
+ } as const;
19
+ export type PropertyUcCallInstructionTelephoneType = OpenEnum<
20
+ typeof PropertyUcCallInstructionTelephoneType
21
+ >;
22
+
23
+ /**
24
+ * DIAL: number to dial and bridge
25
+ */
26
+ export type PropertyUcCallInstructionTelephone = {
27
+ telephone: string;
28
+ type?: PropertyUcCallInstructionTelephoneType | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const PropertyUcCallInstructionTelephoneType$inboundSchema: z.ZodType<
33
+ PropertyUcCallInstructionTelephoneType,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = openEnums.inboundSchema(PropertyUcCallInstructionTelephoneType);
37
+ /** @internal */
38
+ export const PropertyUcCallInstructionTelephoneType$outboundSchema: z.ZodType<
39
+ string,
40
+ z.ZodTypeDef,
41
+ PropertyUcCallInstructionTelephoneType
42
+ > = openEnums.outboundSchema(PropertyUcCallInstructionTelephoneType);
43
+
44
+ /** @internal */
45
+ export const PropertyUcCallInstructionTelephone$inboundSchema: z.ZodType<
46
+ PropertyUcCallInstructionTelephone,
47
+ z.ZodTypeDef,
48
+ unknown
49
+ > = z.object({
50
+ telephone: z.string(),
51
+ type: PropertyUcCallInstructionTelephoneType$inboundSchema.optional(),
52
+ });
53
+ /** @internal */
54
+ export type PropertyUcCallInstructionTelephone$Outbound = {
55
+ telephone: string;
56
+ type?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const PropertyUcCallInstructionTelephone$outboundSchema: z.ZodType<
61
+ PropertyUcCallInstructionTelephone$Outbound,
62
+ z.ZodTypeDef,
63
+ PropertyUcCallInstructionTelephone
64
+ > = z.object({
65
+ telephone: z.string(),
66
+ type: PropertyUcCallInstructionTelephoneType$outboundSchema.optional(),
67
+ });
68
+
69
+ export function propertyUcCallInstructionTelephoneToJSON(
70
+ propertyUcCallInstructionTelephone: PropertyUcCallInstructionTelephone,
71
+ ): string {
72
+ return JSON.stringify(
73
+ PropertyUcCallInstructionTelephone$outboundSchema.parse(
74
+ propertyUcCallInstructionTelephone,
75
+ ),
76
+ );
77
+ }
78
+ export function propertyUcCallInstructionTelephoneFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<PropertyUcCallInstructionTelephone, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) =>
84
+ PropertyUcCallInstructionTelephone$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'PropertyUcCallInstructionTelephone' from JSON`,
86
+ );
87
+ }
@@ -34,6 +34,12 @@ export const PropertyUcCallTelephoneType$inboundSchema: z.ZodType<
34
34
  z.ZodTypeDef,
35
35
  unknown
36
36
  > = openEnums.inboundSchema(PropertyUcCallTelephoneType);
37
+ /** @internal */
38
+ export const PropertyUcCallTelephoneType$outboundSchema: z.ZodType<
39
+ string,
40
+ z.ZodTypeDef,
41
+ PropertyUcCallTelephoneType
42
+ > = openEnums.outboundSchema(PropertyUcCallTelephoneType);
37
43
 
38
44
  /** @internal */
39
45
  export const PropertyUcCallTelephone$inboundSchema: z.ZodType<
@@ -44,7 +50,29 @@ export const PropertyUcCallTelephone$inboundSchema: z.ZodType<
44
50
  telephone: z.string(),
45
51
  type: PropertyUcCallTelephoneType$inboundSchema.optional(),
46
52
  });
53
+ /** @internal */
54
+ export type PropertyUcCallTelephone$Outbound = {
55
+ telephone: string;
56
+ type?: string | undefined;
57
+ };
47
58
 
59
+ /** @internal */
60
+ export const PropertyUcCallTelephone$outboundSchema: z.ZodType<
61
+ PropertyUcCallTelephone$Outbound,
62
+ z.ZodTypeDef,
63
+ PropertyUcCallTelephone
64
+ > = z.object({
65
+ telephone: z.string(),
66
+ type: PropertyUcCallTelephoneType$outboundSchema.optional(),
67
+ });
68
+
69
+ export function propertyUcCallTelephoneToJSON(
70
+ propertyUcCallTelephone: PropertyUcCallTelephone,
71
+ ): string {
72
+ return JSON.stringify(
73
+ PropertyUcCallTelephone$outboundSchema.parse(propertyUcCallTelephone),
74
+ );
75
+ }
48
76
  export function propertyUcCallTelephoneFromJSON(
49
77
  jsonString: string,
50
78
  ): SafeParseResult<PropertyUcCallTelephone, SDKValidationError> {
@@ -12,9 +12,46 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
  import {
13
13
  PropertyUcCallTelephone,
14
14
  PropertyUcCallTelephone$inboundSchema,
15
+ PropertyUcCallTelephone$Outbound,
16
+ PropertyUcCallTelephone$outboundSchema,
15
17
  } from "./propertyuccalltelephone.js";
16
- import { UcContact, UcContact$inboundSchema } from "./uccontact.js";
17
- import { UcMetadata, UcMetadata$inboundSchema } from "./ucmetadata.js";
18
+ import {
19
+ UcCallInstruction,
20
+ UcCallInstruction$inboundSchema,
21
+ UcCallInstruction$Outbound,
22
+ UcCallInstruction$outboundSchema,
23
+ } from "./uccallinstruction.js";
24
+ import {
25
+ UcContact,
26
+ UcContact$inboundSchema,
27
+ UcContact$Outbound,
28
+ UcContact$outboundSchema,
29
+ } from "./uccontact.js";
30
+ import {
31
+ UcMetadata,
32
+ UcMetadata$inboundSchema,
33
+ UcMetadata$Outbound,
34
+ UcMetadata$outboundSchema,
35
+ } from "./ucmetadata.js";
36
+
37
+ /**
38
+ * The current or final status of the call
39
+ */
40
+ export const UcCallStatus = {
41
+ Queued: "QUEUED",
42
+ Ringing: "RINGING",
43
+ InProgress: "IN_PROGRESS",
44
+ Completed: "COMPLETED",
45
+ Busy: "BUSY",
46
+ NoAnswer: "NO_ANSWER",
47
+ Failed: "FAILED",
48
+ Canceled: "CANCELED",
49
+ Other: "OTHER",
50
+ } as const;
51
+ /**
52
+ * The current or final status of the call
53
+ */
54
+ export type UcCallStatus = OpenEnum<typeof UcCallStatus>;
18
55
 
19
56
  export const UcCallType = {
20
57
  Inbound: "INBOUND",
@@ -23,6 +60,10 @@ export const UcCallType = {
23
60
  export type UcCallType = OpenEnum<typeof UcCallType>;
24
61
 
25
62
  export type UcCall = {
63
+ /**
64
+ * When the call was answered (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
65
+ */
66
+ answerAt?: Date | undefined;
26
67
  /**
27
68
  * The contact ID for call (reference to UcContact)
28
69
  */
@@ -32,10 +73,22 @@ export type UcCall = {
32
73
  * opaque identifier shared across legs of one interaction
33
74
  */
34
75
  conversationIdentifier?: string | undefined;
76
+ /**
77
+ * What the integration charged for the call
78
+ */
79
+ costAmount?: number | undefined;
35
80
  /**
36
81
  * The date that this call object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
37
82
  */
38
83
  createdAt?: Date | undefined;
84
+ /**
85
+ * ISO 4217 currency of cost_amount
86
+ */
87
+ currency?: string | undefined;
88
+ /**
89
+ * Call length in seconds
90
+ */
91
+ durationSeconds?: number | undefined;
39
92
  /**
40
93
  * The end time of the call (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
41
94
  */
@@ -44,8 +97,16 @@ export type UcCall = {
44
97
  * Unique identifier for this call object
45
98
  */
46
99
  id?: string | undefined;
100
+ /**
101
+ * Write-only: what the call does once answered (create/update only; never returned)
102
+ */
103
+ instructions?: Array<UcCallInstruction> | undefined;
47
104
  isPrivate?: boolean | undefined;
48
105
  metadata?: Array<UcMetadata> | undefined;
106
+ /**
107
+ * The parent call (leg) that this call belongs to
108
+ */
109
+ parentId?: string | undefined;
49
110
  /**
50
111
  * The raw data returned by the integration for this call
51
112
  */
@@ -54,6 +115,10 @@ export type UcCall = {
54
115
  * The start time of the call (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
55
116
  */
56
117
  startAt?: Date | undefined;
118
+ /**
119
+ * The current or final status of the call
120
+ */
121
+ status?: UcCallStatus | undefined;
57
122
  /**
58
123
  * The telephone number called
59
124
  */
@@ -71,30 +136,57 @@ export type UcCall = {
71
136
  userPhone?: string | undefined;
72
137
  };
73
138
 
139
+ /** @internal */
140
+ export const UcCallStatus$inboundSchema: z.ZodType<
141
+ UcCallStatus,
142
+ z.ZodTypeDef,
143
+ unknown
144
+ > = openEnums.inboundSchema(UcCallStatus);
145
+ /** @internal */
146
+ export const UcCallStatus$outboundSchema: z.ZodType<
147
+ string,
148
+ z.ZodTypeDef,
149
+ UcCallStatus
150
+ > = openEnums.outboundSchema(UcCallStatus);
151
+
74
152
  /** @internal */
75
153
  export const UcCallType$inboundSchema: z.ZodType<
76
154
  UcCallType,
77
155
  z.ZodTypeDef,
78
156
  unknown
79
157
  > = openEnums.inboundSchema(UcCallType);
158
+ /** @internal */
159
+ export const UcCallType$outboundSchema: z.ZodType<
160
+ string,
161
+ z.ZodTypeDef,
162
+ UcCallType
163
+ > = openEnums.outboundSchema(UcCallType);
80
164
 
81
165
  /** @internal */
82
166
  export const UcCall$inboundSchema: z.ZodType<UcCall, z.ZodTypeDef, unknown> = z
83
167
  .object({
168
+ answer_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
169
+ .optional(),
84
170
  contact_id: z.string().optional(),
85
171
  contacts: z.array(UcContact$inboundSchema).optional(),
86
172
  conversation_identifier: z.string().optional(),
173
+ cost_amount: z.number().optional(),
87
174
  created_at: z.string().datetime({ offset: true }).transform(v =>
88
175
  new Date(v)
89
176
  ).optional(),
177
+ currency: z.string().optional(),
178
+ duration_seconds: z.number().optional(),
90
179
  end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
91
180
  .optional(),
92
181
  id: z.string().optional(),
182
+ instructions: z.array(UcCallInstruction$inboundSchema).optional(),
93
183
  is_private: z.boolean().optional(),
94
184
  metadata: z.array(UcMetadata$inboundSchema).optional(),
185
+ parent_id: z.string().optional(),
95
186
  raw: z.record(z.any()).optional(),
96
187
  start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
97
188
  .optional(),
189
+ status: UcCallStatus$inboundSchema.optional(),
98
190
  telephone: PropertyUcCallTelephone$inboundSchema.optional(),
99
191
  type: UcCallType$inboundSchema.optional(),
100
192
  updated_at: z.string().datetime({ offset: true }).transform(v =>
@@ -105,11 +197,15 @@ export const UcCall$inboundSchema: z.ZodType<UcCall, z.ZodTypeDef, unknown> = z
105
197
  user_phone: z.string().optional(),
106
198
  }).transform((v) => {
107
199
  return remap$(v, {
200
+ "answer_at": "answerAt",
108
201
  "contact_id": "contactId",
109
202
  "conversation_identifier": "conversationIdentifier",
203
+ "cost_amount": "costAmount",
110
204
  "created_at": "createdAt",
205
+ "duration_seconds": "durationSeconds",
111
206
  "end_at": "endAt",
112
207
  "is_private": "isPrivate",
208
+ "parent_id": "parentId",
113
209
  "start_at": "startAt",
114
210
  "updated_at": "updatedAt",
115
211
  "user_id": "userId",
@@ -117,7 +213,84 @@ export const UcCall$inboundSchema: z.ZodType<UcCall, z.ZodTypeDef, unknown> = z
117
213
  "user_phone": "userPhone",
118
214
  });
119
215
  });
216
+ /** @internal */
217
+ export type UcCall$Outbound = {
218
+ answer_at?: string | undefined;
219
+ contact_id?: string | undefined;
220
+ contacts?: Array<UcContact$Outbound> | undefined;
221
+ conversation_identifier?: string | undefined;
222
+ cost_amount?: number | undefined;
223
+ created_at?: string | undefined;
224
+ currency?: string | undefined;
225
+ duration_seconds?: number | undefined;
226
+ end_at?: string | undefined;
227
+ id?: string | undefined;
228
+ instructions?: Array<UcCallInstruction$Outbound> | undefined;
229
+ is_private?: boolean | undefined;
230
+ metadata?: Array<UcMetadata$Outbound> | undefined;
231
+ parent_id?: string | undefined;
232
+ raw?: { [k: string]: any } | undefined;
233
+ start_at?: string | undefined;
234
+ status?: string | undefined;
235
+ telephone?: PropertyUcCallTelephone$Outbound | undefined;
236
+ type?: string | undefined;
237
+ updated_at?: string | undefined;
238
+ user_id?: string | undefined;
239
+ user_name?: string | undefined;
240
+ user_phone?: string | undefined;
241
+ };
120
242
 
243
+ /** @internal */
244
+ export const UcCall$outboundSchema: z.ZodType<
245
+ UcCall$Outbound,
246
+ z.ZodTypeDef,
247
+ UcCall
248
+ > = z.object({
249
+ answerAt: z.date().transform(v => v.toISOString()).optional(),
250
+ contactId: z.string().optional(),
251
+ contacts: z.array(UcContact$outboundSchema).optional(),
252
+ conversationIdentifier: z.string().optional(),
253
+ costAmount: z.number().optional(),
254
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
255
+ currency: z.string().optional(),
256
+ durationSeconds: z.number().optional(),
257
+ endAt: z.date().transform(v => v.toISOString()).optional(),
258
+ id: z.string().optional(),
259
+ instructions: z.array(UcCallInstruction$outboundSchema).optional(),
260
+ isPrivate: z.boolean().optional(),
261
+ metadata: z.array(UcMetadata$outboundSchema).optional(),
262
+ parentId: z.string().optional(),
263
+ raw: z.record(z.any()).optional(),
264
+ startAt: z.date().transform(v => v.toISOString()).optional(),
265
+ status: UcCallStatus$outboundSchema.optional(),
266
+ telephone: PropertyUcCallTelephone$outboundSchema.optional(),
267
+ type: UcCallType$outboundSchema.optional(),
268
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
269
+ userId: z.string().optional(),
270
+ userName: z.string().optional(),
271
+ userPhone: z.string().optional(),
272
+ }).transform((v) => {
273
+ return remap$(v, {
274
+ answerAt: "answer_at",
275
+ contactId: "contact_id",
276
+ conversationIdentifier: "conversation_identifier",
277
+ costAmount: "cost_amount",
278
+ createdAt: "created_at",
279
+ durationSeconds: "duration_seconds",
280
+ endAt: "end_at",
281
+ isPrivate: "is_private",
282
+ parentId: "parent_id",
283
+ startAt: "start_at",
284
+ updatedAt: "updated_at",
285
+ userId: "user_id",
286
+ userName: "user_name",
287
+ userPhone: "user_phone",
288
+ });
289
+ });
290
+
291
+ export function ucCallToJSON(ucCall: UcCall): string {
292
+ return JSON.stringify(UcCall$outboundSchema.parse(ucCall));
293
+ }
121
294
  export function ucCallFromJSON(
122
295
  jsonString: string,
123
296
  ): SafeParseResult<UcCall, SDKValidationError> {