@apideck/unify 0.43.11 → 0.44.1

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 (211) hide show
  1. package/README.md +8 -1
  2. package/funcs/accountingAttachmentsList.d.ts.map +1 -1
  3. package/funcs/accountingAttachmentsList.js +4 -2
  4. package/funcs/accountingAttachmentsList.js.map +1 -1
  5. package/funcs/accountingCategoriesList.js +1 -0
  6. package/funcs/accountingCategoriesList.js.map +1 -1
  7. package/funcs/accountingCompaniesList.d.ts.map +1 -1
  8. package/funcs/accountingCompaniesList.js +4 -2
  9. package/funcs/accountingCompaniesList.js.map +1 -1
  10. package/funcs/accountingDepartmentsList.js +1 -0
  11. package/funcs/accountingDepartmentsList.js.map +1 -1
  12. package/funcs/accountingEmployeesList.js +1 -0
  13. package/funcs/accountingEmployeesList.js.map +1 -1
  14. package/funcs/accountingExpenseCategoriesList.js +1 -0
  15. package/funcs/accountingExpenseCategoriesList.js.map +1 -1
  16. package/funcs/accountingExpenseReportsList.js +1 -0
  17. package/funcs/accountingExpenseReportsList.js.map +1 -1
  18. package/funcs/accountingExpensesList.js +1 -0
  19. package/funcs/accountingExpensesList.js.map +1 -1
  20. package/funcs/accountingLocationsList.js +1 -0
  21. package/funcs/accountingLocationsList.js.map +1 -1
  22. package/funcs/accountingQuotesList.js +1 -0
  23. package/funcs/accountingQuotesList.js.map +1 -1
  24. package/funcs/accountingSubsidiariesList.d.ts.map +1 -1
  25. package/funcs/accountingSubsidiariesList.js +4 -2
  26. package/funcs/accountingSubsidiariesList.js.map +1 -1
  27. package/funcs/crmListsGet.d.ts +18 -0
  28. package/funcs/crmListsGet.d.ts.map +1 -0
  29. package/funcs/crmListsGet.js +146 -0
  30. package/funcs/crmListsGet.js.map +1 -0
  31. package/funcs/crmListsList.d.ts +21 -0
  32. package/funcs/crmListsList.d.ts.map +1 -0
  33. package/funcs/crmListsList.js +168 -0
  34. package/funcs/crmListsList.js.map +1 -0
  35. package/jsr.json +1 -1
  36. package/lib/config.d.ts +4 -4
  37. package/lib/config.js +4 -4
  38. package/lib/config.js.map +1 -1
  39. package/lib/http.d.ts +1 -1
  40. package/lib/http.d.ts.map +1 -1
  41. package/lib/http.js +1 -1
  42. package/lib/http.js.map +1 -1
  43. package/lib/security.d.ts +5 -4
  44. package/lib/security.d.ts.map +1 -1
  45. package/lib/security.js +6 -7
  46. package/lib/security.js.map +1 -1
  47. package/models/components/billsfilter.d.ts +10 -0
  48. package/models/components/billsfilter.d.ts.map +1 -1
  49. package/models/components/billsfilter.js +4 -0
  50. package/models/components/billsfilter.js.map +1 -1
  51. package/models/components/connection.d.ts +33 -9
  52. package/models/components/connection.d.ts.map +1 -1
  53. package/models/components/connection.js +32 -3
  54. package/models/components/connection.js.map +1 -1
  55. package/models/components/connector.d.ts +5 -0
  56. package/models/components/connector.d.ts.map +1 -1
  57. package/models/components/connector.js +2 -0
  58. package/models/components/connector.js.map +1 -1
  59. package/models/components/connectoroverview.d.ts +188 -0
  60. package/models/components/connectoroverview.d.ts.map +1 -0
  61. package/models/components/connectoroverview.js +148 -0
  62. package/models/components/connectoroverview.js.map +1 -0
  63. package/models/components/consumerconnection.d.ts +16 -3
  64. package/models/components/consumerconnection.d.ts.map +1 -1
  65. package/models/components/consumerconnection.js +14 -2
  66. package/models/components/consumerconnection.js.map +1 -1
  67. package/models/components/expensereport.d.ts +9 -0
  68. package/models/components/expensereport.d.ts.map +1 -1
  69. package/models/components/expensereport.js +2 -0
  70. package/models/components/expensereport.js.map +1 -1
  71. package/models/components/getlistresponse.d.ts +45 -0
  72. package/models/components/getlistresponse.d.ts.map +1 -0
  73. package/models/components/getlistresponse.js +66 -0
  74. package/models/components/getlistresponse.js.map +1 -0
  75. package/models/components/getlistsresponse.d.ts +50 -0
  76. package/models/components/getlistsresponse.d.ts.map +1 -0
  77. package/models/components/getlistsresponse.js +68 -0
  78. package/models/components/getlistsresponse.js.map +1 -0
  79. package/models/components/index.d.ts +4 -0
  80. package/models/components/index.d.ts.map +1 -1
  81. package/models/components/index.js +4 -0
  82. package/models/components/index.js.map +1 -1
  83. package/models/components/list.d.ts +114 -0
  84. package/models/components/list.d.ts.map +1 -0
  85. package/models/components/list.js +110 -0
  86. package/models/components/list.js.map +1 -0
  87. package/models/components/webhookeventlogsfilter.d.ts +35 -0
  88. package/models/components/webhookeventlogsfilter.d.ts.map +1 -1
  89. package/models/components/webhookeventlogsfilter.js +13 -0
  90. package/models/components/webhookeventlogsfilter.js.map +1 -1
  91. package/models/components/webhookeventtype.d.ts +3 -0
  92. package/models/components/webhookeventtype.d.ts.map +1 -1
  93. package/models/components/webhookeventtype.js +3 -0
  94. package/models/components/webhookeventtype.js.map +1 -1
  95. package/models/operations/accountingattachmentsall.d.ts +9 -0
  96. package/models/operations/accountingattachmentsall.d.ts.map +1 -1
  97. package/models/operations/accountingattachmentsall.js +2 -0
  98. package/models/operations/accountingattachmentsall.js.map +1 -1
  99. package/models/operations/accountingcategoriesall.d.ts +9 -0
  100. package/models/operations/accountingcategoriesall.d.ts.map +1 -1
  101. package/models/operations/accountingcategoriesall.js +5 -0
  102. package/models/operations/accountingcategoriesall.js.map +1 -1
  103. package/models/operations/accountingcompaniesall.d.ts +9 -0
  104. package/models/operations/accountingcompaniesall.d.ts.map +1 -1
  105. package/models/operations/accountingcompaniesall.js +5 -0
  106. package/models/operations/accountingcompaniesall.js.map +1 -1
  107. package/models/operations/accountingdepartmentsall.d.ts +9 -0
  108. package/models/operations/accountingdepartmentsall.d.ts.map +1 -1
  109. package/models/operations/accountingdepartmentsall.js +5 -0
  110. package/models/operations/accountingdepartmentsall.js.map +1 -1
  111. package/models/operations/accountingemployeesall.d.ts +9 -0
  112. package/models/operations/accountingemployeesall.d.ts.map +1 -1
  113. package/models/operations/accountingemployeesall.js +5 -0
  114. package/models/operations/accountingemployeesall.js.map +1 -1
  115. package/models/operations/accountingexpensecategoriesall.d.ts +9 -0
  116. package/models/operations/accountingexpensecategoriesall.d.ts.map +1 -1
  117. package/models/operations/accountingexpensecategoriesall.js +5 -0
  118. package/models/operations/accountingexpensecategoriesall.js.map +1 -1
  119. package/models/operations/accountingexpensereportsall.d.ts +9 -0
  120. package/models/operations/accountingexpensereportsall.d.ts.map +1 -1
  121. package/models/operations/accountingexpensereportsall.js +5 -0
  122. package/models/operations/accountingexpensereportsall.js.map +1 -1
  123. package/models/operations/accountingexpensesall.d.ts +9 -0
  124. package/models/operations/accountingexpensesall.d.ts.map +1 -1
  125. package/models/operations/accountingexpensesall.js +5 -0
  126. package/models/operations/accountingexpensesall.js.map +1 -1
  127. package/models/operations/accountinglocationsall.d.ts +9 -0
  128. package/models/operations/accountinglocationsall.d.ts.map +1 -1
  129. package/models/operations/accountinglocationsall.js +5 -0
  130. package/models/operations/accountinglocationsall.js.map +1 -1
  131. package/models/operations/accountingquotesall.d.ts +9 -0
  132. package/models/operations/accountingquotesall.d.ts.map +1 -1
  133. package/models/operations/accountingquotesall.js +5 -0
  134. package/models/operations/accountingquotesall.js.map +1 -1
  135. package/models/operations/accountingsubsidiariesall.d.ts +9 -0
  136. package/models/operations/accountingsubsidiariesall.d.ts.map +1 -1
  137. package/models/operations/accountingsubsidiariesall.js +5 -0
  138. package/models/operations/accountingsubsidiariesall.js.map +1 -1
  139. package/models/operations/crmlistsall.d.ts +81 -0
  140. package/models/operations/crmlistsall.d.ts.map +1 -0
  141. package/models/operations/crmlistsall.js +80 -0
  142. package/models/operations/crmlistsall.js.map +1 -0
  143. package/models/operations/crmlistsone.d.ts +67 -0
  144. package/models/operations/crmlistsone.d.ts.map +1 -0
  145. package/models/operations/crmlistsone.js +74 -0
  146. package/models/operations/crmlistsone.js.map +1 -0
  147. package/models/operations/index.d.ts +2 -0
  148. package/models/operations/index.d.ts.map +1 -1
  149. package/models/operations/index.js +2 -0
  150. package/models/operations/index.js.map +1 -1
  151. package/package.json +1 -1
  152. package/sdk/crm.d.ts +3 -0
  153. package/sdk/crm.d.ts.map +1 -1
  154. package/sdk/crm.js +4 -0
  155. package/sdk/crm.js.map +1 -1
  156. package/sdk/lists.d.ts +22 -0
  157. package/sdk/lists.d.ts.map +1 -0
  158. package/sdk/lists.js +33 -0
  159. package/sdk/lists.js.map +1 -0
  160. package/src/__tests__/companies.test.ts +3 -0
  161. package/src/__tests__/connections.test.ts +48 -32
  162. package/src/__tests__/connectionsettings.test.ts +18 -12
  163. package/src/__tests__/consumers.test.ts +48 -32
  164. package/src/__tests__/employees.test.ts +3 -0
  165. package/src/__tests__/expensecategories.test.ts +3 -0
  166. package/src/__tests__/expensereports.test.ts +6 -0
  167. package/src/__tests__/quotes.test.ts +3 -0
  168. package/src/funcs/accountingAttachmentsList.ts +17 -7
  169. package/src/funcs/accountingCategoriesList.ts +1 -0
  170. package/src/funcs/accountingCompaniesList.ts +17 -7
  171. package/src/funcs/accountingDepartmentsList.ts +1 -0
  172. package/src/funcs/accountingEmployeesList.ts +1 -0
  173. package/src/funcs/accountingExpenseCategoriesList.ts +1 -0
  174. package/src/funcs/accountingExpenseReportsList.ts +1 -0
  175. package/src/funcs/accountingExpensesList.ts +1 -0
  176. package/src/funcs/accountingLocationsList.ts +1 -0
  177. package/src/funcs/accountingQuotesList.ts +1 -0
  178. package/src/funcs/accountingSubsidiariesList.ts +17 -7
  179. package/src/funcs/crmListsGet.ts +228 -0
  180. package/src/funcs/crmListsList.ts +303 -0
  181. package/src/lib/config.ts +4 -4
  182. package/src/lib/http.ts +3 -1
  183. package/src/lib/security.ts +10 -5
  184. package/src/models/components/billsfilter.ts +18 -0
  185. package/src/models/components/connection.ts +85 -6
  186. package/src/models/components/connector.ts +9 -0
  187. package/src/models/components/connectoroverview.ts +346 -0
  188. package/src/models/components/consumerconnection.ts +44 -3
  189. package/src/models/components/expensereport.ts +11 -0
  190. package/src/models/components/getlistresponse.ts +78 -0
  191. package/src/models/components/getlistsresponse.ts +84 -0
  192. package/src/models/components/index.ts +4 -0
  193. package/src/models/components/list.ts +181 -0
  194. package/src/models/components/webhookeventlogsfilter.ts +48 -0
  195. package/src/models/components/webhookeventtype.ts +3 -0
  196. package/src/models/operations/accountingattachmentsall.ts +7 -0
  197. package/src/models/operations/accountingcategoriesall.ts +10 -0
  198. package/src/models/operations/accountingcompaniesall.ts +10 -0
  199. package/src/models/operations/accountingdepartmentsall.ts +10 -0
  200. package/src/models/operations/accountingemployeesall.ts +10 -0
  201. package/src/models/operations/accountingexpensecategoriesall.ts +10 -0
  202. package/src/models/operations/accountingexpensereportsall.ts +10 -0
  203. package/src/models/operations/accountingexpensesall.ts +10 -0
  204. package/src/models/operations/accountinglocationsall.ts +10 -0
  205. package/src/models/operations/accountingquotesall.ts +10 -0
  206. package/src/models/operations/accountingsubsidiariesall.ts +10 -0
  207. package/src/models/operations/crmlistsall.ts +138 -0
  208. package/src/models/operations/crmlistsone.ts +122 -0
  209. package/src/models/operations/index.ts +2 -0
  210. package/src/sdk/crm.ts +6 -0
  211. package/src/sdk/lists.ts +46 -0
@@ -54,6 +54,10 @@ export type AccountingExpensesAllRequest = {
54
54
  * Apply filters
55
55
  */
56
56
  filter?: components.ExpensesFilter | undefined;
57
+ /**
58
+ * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
59
+ */
60
+ passThrough?: { [k: string]: any } | undefined;
57
61
  };
58
62
 
59
63
  export type AccountingExpensesAllResponse = {
@@ -78,6 +82,7 @@ export type AccountingExpensesAllRequest$Outbound = {
78
82
  cursor?: string | null | undefined;
79
83
  limit: number;
80
84
  filter?: components.ExpensesFilter$Outbound | undefined;
85
+ pass_through?: { [k: string]: any } | undefined;
81
86
  };
82
87
 
83
88
  /** @internal */
@@ -94,6 +99,11 @@ export const AccountingExpensesAllRequest$outboundSchema: z.ZodType<
94
99
  cursor: z.nullable(z.string()).optional(),
95
100
  limit: z.number().int().default(20),
96
101
  filter: components.ExpensesFilter$outboundSchema.optional(),
102
+ passThrough: z.record(z.any()).optional(),
103
+ }).transform((v) => {
104
+ return remap$(v, {
105
+ passThrough: "pass_through",
106
+ });
97
107
  });
98
108
 
99
109
  export function accountingExpensesAllRequestToJSON(
@@ -58,6 +58,10 @@ export type AccountingLocationsAllRequest = {
58
58
  * Apply filters
59
59
  */
60
60
  filter?: components.AccountingLocationsFilter | undefined;
61
+ /**
62
+ * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
63
+ */
64
+ passThrough?: { [k: string]: any } | undefined;
61
65
  };
62
66
 
63
67
  export type AccountingLocationsAllResponse = {
@@ -85,6 +89,7 @@ export type AccountingLocationsAllRequest$Outbound = {
85
89
  limit: number;
86
90
  fields?: string | null | undefined;
87
91
  filter?: components.AccountingLocationsFilter$Outbound | undefined;
92
+ pass_through?: { [k: string]: any } | undefined;
88
93
  };
89
94
 
90
95
  /** @internal */
@@ -102,6 +107,11 @@ export const AccountingLocationsAllRequest$outboundSchema: z.ZodType<
102
107
  limit: z.number().int().default(20),
103
108
  fields: z.nullable(z.string()).optional(),
104
109
  filter: components.AccountingLocationsFilter$outboundSchema.optional(),
110
+ passThrough: z.record(z.any()).optional(),
111
+ }).transform((v) => {
112
+ return remap$(v, {
113
+ passThrough: "pass_through",
114
+ });
105
115
  });
106
116
 
107
117
  export function accountingLocationsAllRequestToJSON(
@@ -54,6 +54,10 @@ export type AccountingQuotesAllRequest = {
54
54
  * Apply filters
55
55
  */
56
56
  filter?: components.QuotesFilter | undefined;
57
+ /**
58
+ * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
59
+ */
60
+ passThrough?: { [k: string]: any } | undefined;
57
61
  };
58
62
 
59
63
  export type AccountingQuotesAllResponse = {
@@ -78,6 +82,7 @@ export type AccountingQuotesAllRequest$Outbound = {
78
82
  cursor?: string | null | undefined;
79
83
  limit: number;
80
84
  filter?: components.QuotesFilter$Outbound | undefined;
85
+ pass_through?: { [k: string]: any } | undefined;
81
86
  };
82
87
 
83
88
  /** @internal */
@@ -94,6 +99,11 @@ export const AccountingQuotesAllRequest$outboundSchema: z.ZodType<
94
99
  cursor: z.nullable(z.string()).optional(),
95
100
  limit: z.number().int().default(20),
96
101
  filter: components.QuotesFilter$outboundSchema.optional(),
102
+ passThrough: z.record(z.any()).optional(),
103
+ }).transform((v) => {
104
+ return remap$(v, {
105
+ passThrough: "pass_through",
106
+ });
97
107
  });
98
108
 
99
109
  export function accountingQuotesAllRequestToJSON(
@@ -54,6 +54,10 @@ export type AccountingSubsidiariesAllRequest = {
54
54
  * The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
55
55
  */
56
56
  fields?: string | null | undefined;
57
+ /**
58
+ * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
59
+ */
60
+ passThrough?: { [k: string]: any } | undefined;
57
61
  };
58
62
 
59
63
  export type AccountingSubsidiariesAllResponse = {
@@ -78,6 +82,7 @@ export type AccountingSubsidiariesAllRequest$Outbound = {
78
82
  cursor?: string | null | undefined;
79
83
  limit: number;
80
84
  fields?: string | null | undefined;
85
+ pass_through?: { [k: string]: any } | undefined;
81
86
  };
82
87
 
83
88
  /** @internal */
@@ -94,6 +99,11 @@ export const AccountingSubsidiariesAllRequest$outboundSchema: z.ZodType<
94
99
  cursor: z.nullable(z.string()).optional(),
95
100
  limit: z.number().int().default(20),
96
101
  fields: z.nullable(z.string()).optional(),
102
+ passThrough: z.record(z.any()).optional(),
103
+ }).transform((v) => {
104
+ return remap$(v, {
105
+ passThrough: "pass_through",
106
+ });
97
107
  });
98
108
 
99
109
  export function accountingSubsidiariesAllRequestToJSON(
@@ -0,0 +1,138 @@
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 { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type CrmListsAllGlobals = {
14
+ /**
15
+ * ID of the consumer which you want to get or push data from
16
+ */
17
+ consumerId?: string | undefined;
18
+ /**
19
+ * The ID of your Unify application
20
+ */
21
+ appId?: string | undefined;
22
+ };
23
+
24
+ export type CrmListsAllRequest = {
25
+ /**
26
+ * Include raw response. Mostly used for debugging purposes
27
+ */
28
+ raw?: boolean | undefined;
29
+ /**
30
+ * ID of the consumer which you want to get or push data from
31
+ */
32
+ consumerId?: string | undefined;
33
+ /**
34
+ * The ID of your Unify application
35
+ */
36
+ appId?: string | undefined;
37
+ /**
38
+ * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
39
+ */
40
+ serviceId?: string | undefined;
41
+ /**
42
+ * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
43
+ */
44
+ cursor?: string | null | undefined;
45
+ /**
46
+ * Number of results to return. Minimum 1, Maximum 200, Default 20
47
+ */
48
+ limit?: number | undefined;
49
+ /**
50
+ * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
51
+ */
52
+ passThrough?: { [k: string]: any } | undefined;
53
+ /**
54
+ * The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
55
+ */
56
+ fields?: string | null | undefined;
57
+ };
58
+
59
+ export type CrmListsAllResponse = {
60
+ httpMeta: components.HTTPMetadata;
61
+ /**
62
+ * Lists
63
+ */
64
+ getListsResponse?: components.GetListsResponse | undefined;
65
+ /**
66
+ * Unexpected error
67
+ */
68
+ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined;
69
+ };
70
+
71
+ /** @internal */
72
+ export type CrmListsAllRequest$Outbound = {
73
+ raw: boolean;
74
+ consumerId?: string | undefined;
75
+ appId?: string | undefined;
76
+ serviceId?: string | undefined;
77
+ cursor?: string | null | undefined;
78
+ limit: number;
79
+ pass_through?: { [k: string]: any } | undefined;
80
+ fields?: string | null | undefined;
81
+ };
82
+
83
+ /** @internal */
84
+ export const CrmListsAllRequest$outboundSchema: z.ZodType<
85
+ CrmListsAllRequest$Outbound,
86
+ z.ZodTypeDef,
87
+ CrmListsAllRequest
88
+ > = z.object({
89
+ raw: z.boolean().default(false),
90
+ consumerId: z.string().optional(),
91
+ appId: z.string().optional(),
92
+ serviceId: z.string().optional(),
93
+ cursor: z.nullable(z.string()).optional(),
94
+ limit: z.number().int().default(20),
95
+ passThrough: z.record(z.any()).optional(),
96
+ fields: z.nullable(z.string()).optional(),
97
+ }).transform((v) => {
98
+ return remap$(v, {
99
+ passThrough: "pass_through",
100
+ });
101
+ });
102
+
103
+ export function crmListsAllRequestToJSON(
104
+ crmListsAllRequest: CrmListsAllRequest,
105
+ ): string {
106
+ return JSON.stringify(
107
+ CrmListsAllRequest$outboundSchema.parse(crmListsAllRequest),
108
+ );
109
+ }
110
+
111
+ /** @internal */
112
+ export const CrmListsAllResponse$inboundSchema: z.ZodType<
113
+ CrmListsAllResponse,
114
+ z.ZodTypeDef,
115
+ unknown
116
+ > = z.object({
117
+ HttpMeta: components.HTTPMetadata$inboundSchema,
118
+ GetListsResponse: types.optional(components.GetListsResponse$inboundSchema),
119
+ UnexpectedErrorResponse: types.optional(
120
+ components.UnexpectedErrorResponse$inboundSchema,
121
+ ),
122
+ }).transform((v) => {
123
+ return remap$(v, {
124
+ "HttpMeta": "httpMeta",
125
+ "GetListsResponse": "getListsResponse",
126
+ "UnexpectedErrorResponse": "unexpectedErrorResponse",
127
+ });
128
+ });
129
+
130
+ export function crmListsAllResponseFromJSON(
131
+ jsonString: string,
132
+ ): SafeParseResult<CrmListsAllResponse, SDKValidationError> {
133
+ return safeParse(
134
+ jsonString,
135
+ (x) => CrmListsAllResponse$inboundSchema.parse(JSON.parse(x)),
136
+ `Failed to parse 'CrmListsAllResponse' from JSON`,
137
+ );
138
+ }
@@ -0,0 +1,122 @@
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 { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type CrmListsOneGlobals = {
14
+ /**
15
+ * ID of the consumer which you want to get or push data from
16
+ */
17
+ consumerId?: string | undefined;
18
+ /**
19
+ * The ID of your Unify application
20
+ */
21
+ appId?: string | undefined;
22
+ };
23
+
24
+ export type CrmListsOneRequest = {
25
+ /**
26
+ * ID of the record you are acting upon.
27
+ */
28
+ id: string;
29
+ /**
30
+ * ID of the consumer which you want to get or push data from
31
+ */
32
+ consumerId?: string | undefined;
33
+ /**
34
+ * The ID of your Unify application
35
+ */
36
+ appId?: string | undefined;
37
+ /**
38
+ * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
39
+ */
40
+ serviceId?: string | undefined;
41
+ /**
42
+ * Include raw response. Mostly used for debugging purposes
43
+ */
44
+ raw?: boolean | undefined;
45
+ /**
46
+ * The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
47
+ */
48
+ fields?: string | null | undefined;
49
+ };
50
+
51
+ export type CrmListsOneResponse = {
52
+ httpMeta: components.HTTPMetadata;
53
+ /**
54
+ * List
55
+ */
56
+ getListResponse?: components.GetListResponse | undefined;
57
+ /**
58
+ * Unexpected error
59
+ */
60
+ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export type CrmListsOneRequest$Outbound = {
65
+ id: string;
66
+ consumerId?: string | undefined;
67
+ appId?: string | undefined;
68
+ serviceId?: string | undefined;
69
+ raw: boolean;
70
+ fields?: string | null | undefined;
71
+ };
72
+
73
+ /** @internal */
74
+ export const CrmListsOneRequest$outboundSchema: z.ZodType<
75
+ CrmListsOneRequest$Outbound,
76
+ z.ZodTypeDef,
77
+ CrmListsOneRequest
78
+ > = z.object({
79
+ id: z.string(),
80
+ consumerId: z.string().optional(),
81
+ appId: z.string().optional(),
82
+ serviceId: z.string().optional(),
83
+ raw: z.boolean().default(false),
84
+ fields: z.nullable(z.string()).optional(),
85
+ });
86
+
87
+ export function crmListsOneRequestToJSON(
88
+ crmListsOneRequest: CrmListsOneRequest,
89
+ ): string {
90
+ return JSON.stringify(
91
+ CrmListsOneRequest$outboundSchema.parse(crmListsOneRequest),
92
+ );
93
+ }
94
+
95
+ /** @internal */
96
+ export const CrmListsOneResponse$inboundSchema: z.ZodType<
97
+ CrmListsOneResponse,
98
+ z.ZodTypeDef,
99
+ unknown
100
+ > = z.object({
101
+ HttpMeta: components.HTTPMetadata$inboundSchema,
102
+ GetListResponse: types.optional(components.GetListResponse$inboundSchema),
103
+ UnexpectedErrorResponse: types.optional(
104
+ components.UnexpectedErrorResponse$inboundSchema,
105
+ ),
106
+ }).transform((v) => {
107
+ return remap$(v, {
108
+ "HttpMeta": "httpMeta",
109
+ "GetListResponse": "getListResponse",
110
+ "UnexpectedErrorResponse": "unexpectedErrorResponse",
111
+ });
112
+ });
113
+
114
+ export function crmListsOneResponseFromJSON(
115
+ jsonString: string,
116
+ ): SafeParseResult<CrmListsOneResponse, SDKValidationError> {
117
+ return safeParse(
118
+ jsonString,
119
+ (x) => CrmListsOneResponse$inboundSchema.parse(JSON.parse(x)),
120
+ `Failed to parse 'CrmListsOneResponse' from JSON`,
121
+ );
122
+ }
@@ -200,6 +200,8 @@ export * from "./crmleadsall.js";
200
200
  export * from "./crmleadsdelete.js";
201
201
  export * from "./crmleadsone.js";
202
202
  export * from "./crmleadsupdate.js";
203
+ export * from "./crmlistsall.js";
204
+ export * from "./crmlistsone.js";
203
205
  export * from "./crmnotesadd.js";
204
206
  export * from "./crmnotesall.js";
205
207
  export * from "./crmnotesdelete.js";
package/src/sdk/crm.ts CHANGED
@@ -9,6 +9,7 @@ import { Contacts } from "./contacts.js";
9
9
  import { CustomObjects } from "./customobjects.js";
10
10
  import { CustomObjectSchemas } from "./customobjectschemas.js";
11
11
  import { Leads } from "./leads.js";
12
+ import { Lists } from "./lists.js";
12
13
  import { Notes } from "./notes.js";
13
14
  import { Opportunities } from "./opportunities.js";
14
15
  import { Pipelines } from "./pipelines.js";
@@ -40,6 +41,11 @@ export class Crm extends ClientSDK {
40
41
  return (this._pipelines ??= new Pipelines(this._options));
41
42
  }
42
43
 
44
+ private _lists?: Lists;
45
+ get lists(): Lists {
46
+ return (this._lists ??= new Lists(this._options));
47
+ }
48
+
43
49
  private _notes?: Notes;
44
50
  get notes(): Notes {
45
51
  return (this._notes ??= new Notes(this._options));
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { crmListsGet } from "../funcs/crmListsGet.js";
6
+ import { crmListsList } from "../funcs/crmListsList.js";
7
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { unwrapAsync } from "../types/fp.js";
10
+ import { PageIterator, unwrapResultIterator } from "../types/operations.js";
11
+
12
+ export class Lists extends ClientSDK {
13
+ /**
14
+ * List lists
15
+ *
16
+ * @remarks
17
+ * List lists
18
+ */
19
+ async list(
20
+ request: operations.CrmListsAllRequest,
21
+ options?: RequestOptions,
22
+ ): Promise<PageIterator<operations.CrmListsAllResponse, { cursor: string }>> {
23
+ return unwrapResultIterator(crmListsList(
24
+ this,
25
+ request,
26
+ options,
27
+ ));
28
+ }
29
+
30
+ /**
31
+ * Get list
32
+ *
33
+ * @remarks
34
+ * Get list
35
+ */
36
+ async get(
37
+ request: operations.CrmListsOneRequest,
38
+ options?: RequestOptions,
39
+ ): Promise<operations.CrmListsOneResponse> {
40
+ return unwrapAsync(crmListsGet(
41
+ this,
42
+ request,
43
+ options,
44
+ ));
45
+ }
46
+ }