@maesn/typescript-sdk 0.6.0 → 0.6.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 (256) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/esm/funcs/accounting-v2-create-booking-proposal-v2.js +1 -1
  3. package/esm/funcs/accounting-v2-create-booking-proposal-v2.js.map +1 -1
  4. package/esm/funcs/accounting-v2-create-contact-v2.js +1 -1
  5. package/esm/funcs/accounting-v2-put-contact-v2.js +1 -1
  6. package/esm/funcs/accounting-v2-put-contact-v2.js.map +1 -1
  7. package/esm/lib/config.d.ts +3 -3
  8. package/esm/lib/config.d.ts.map +1 -1
  9. package/esm/lib/config.js +3 -3
  10. package/esm/lib/config.js.map +1 -1
  11. package/esm/models/account-response-dto.d.ts +9 -9
  12. package/esm/models/account-response-dto.d.ts.map +1 -1
  13. package/esm/models/account-response-dto.js +4 -6
  14. package/esm/models/account-response-dto.js.map +1 -1
  15. package/esm/models/address-offer.d.ts +7 -7
  16. package/esm/models/address-offer.d.ts.map +1 -1
  17. package/esm/models/address-offer.js +4 -5
  18. package/esm/models/address-offer.js.map +1 -1
  19. package/esm/models/address.d.ts +7 -7
  20. package/esm/models/address.d.ts.map +1 -1
  21. package/esm/models/address.js +5 -5
  22. package/esm/models/address.js.map +1 -1
  23. package/esm/models/async-task-response-dto.d.ts +8 -4
  24. package/esm/models/async-task-response-dto.d.ts.map +1 -1
  25. package/esm/models/async-task-response-dto.js +7 -3
  26. package/esm/models/async-task-response-dto.js.map +1 -1
  27. package/esm/models/bank-account-response-dto.d.ts +7 -7
  28. package/esm/models/bank-account-response-dto.d.ts.map +1 -1
  29. package/esm/models/bank-account-response-dto.js +3 -4
  30. package/esm/models/bank-account-response-dto.js.map +1 -1
  31. package/esm/models/bill-response-dto.d.ts +9 -9
  32. package/esm/models/bill-response-dto.d.ts.map +1 -1
  33. package/esm/models/bill-response-dto.js +4 -5
  34. package/esm/models/bill-response-dto.js.map +1 -1
  35. package/esm/models/booking-proposal-address-response-dto-v2.d.ts +10 -0
  36. package/esm/models/booking-proposal-address-response-dto-v2.d.ts.map +1 -0
  37. package/esm/models/booking-proposal-address-response-dto-v2.js +14 -0
  38. package/esm/models/booking-proposal-address-response-dto-v2.js.map +1 -0
  39. package/esm/models/booking-proposal-line-item-response-dto-v2.d.ts +42 -0
  40. package/esm/models/booking-proposal-line-item-response-dto-v2.d.ts.map +1 -0
  41. package/esm/models/booking-proposal-line-item-response-dto-v2.js +45 -0
  42. package/esm/models/booking-proposal-line-item-response-dto-v2.js.map +1 -0
  43. package/esm/models/booking-proposal-response-dto-v2.d.ts +83 -0
  44. package/esm/models/booking-proposal-response-dto-v2.d.ts.map +1 -0
  45. package/esm/models/booking-proposal-response-dto-v2.js +86 -0
  46. package/esm/models/booking-proposal-response-dto-v2.js.map +1 -0
  47. package/esm/models/booking-proposal-response-dto.d.ts +7 -7
  48. package/esm/models/booking-proposal-response-dto.d.ts.map +1 -1
  49. package/esm/models/booking-proposal-response-dto.js +4 -5
  50. package/esm/models/booking-proposal-response-dto.js.map +1 -1
  51. package/esm/models/contact-address-v2.d.ts +5 -5
  52. package/esm/models/contact-address-v2.d.ts.map +1 -1
  53. package/esm/models/contact-address-v2.js +2 -3
  54. package/esm/models/contact-address-v2.js.map +1 -1
  55. package/esm/models/contact-address.d.ts +5 -5
  56. package/esm/models/contact-address.d.ts.map +1 -1
  57. package/esm/models/contact-address.js +2 -3
  58. package/esm/models/contact-address.js.map +1 -1
  59. package/esm/models/contact-response-dto-v2.d.ts +3 -3
  60. package/esm/models/contact-response-dto-v2.d.ts.map +1 -1
  61. package/esm/models/contact-response-dto-v2.js +1 -2
  62. package/esm/models/contact-response-dto-v2.js.map +1 -1
  63. package/esm/models/contact-response-dto.d.ts +5 -5
  64. package/esm/models/contact-response-dto.d.ts.map +1 -1
  65. package/esm/models/contact-response-dto.js +2 -3
  66. package/esm/models/contact-response-dto.js.map +1 -1
  67. package/esm/models/create-vendor-credit-request-dto.d.ts +2 -0
  68. package/esm/models/create-vendor-credit-request-dto.d.ts.map +1 -1
  69. package/esm/models/create-vendor-credit-request-dto.js +1 -0
  70. package/esm/models/create-vendor-credit-request-dto.js.map +1 -1
  71. package/esm/models/credit-note-response-dto.d.ts +5 -5
  72. package/esm/models/credit-note-response-dto.d.ts.map +1 -1
  73. package/esm/models/credit-note-response-dto.js +2 -3
  74. package/esm/models/credit-note-response-dto.js.map +1 -1
  75. package/esm/models/dimension-response-common-dto-v2.d.ts +13 -0
  76. package/esm/models/dimension-response-common-dto-v2.d.ts.map +1 -0
  77. package/esm/models/dimension-response-common-dto-v2.js +17 -0
  78. package/esm/models/dimension-response-common-dto-v2.js.map +1 -0
  79. package/esm/models/email-address-v2.d.ts +4 -4
  80. package/esm/models/email-address-v2.d.ts.map +1 -1
  81. package/esm/models/email-address-v2.js +2 -3
  82. package/esm/models/email-address-v2.js.map +1 -1
  83. package/esm/models/email-address.d.ts +3 -3
  84. package/esm/models/email-address.d.ts.map +1 -1
  85. package/esm/models/email-address.js +1 -2
  86. package/esm/models/email-address.js.map +1 -1
  87. package/esm/models/expense-line-item-response.d.ts +3 -3
  88. package/esm/models/expense-line-item-response.d.ts.map +1 -1
  89. package/esm/models/expense-line-item-response.js +1 -2
  90. package/esm/models/expense-line-item-response.js.map +1 -1
  91. package/esm/models/expense-response-dto.d.ts +7 -7
  92. package/esm/models/expense-response-dto.d.ts.map +1 -1
  93. package/esm/models/expense-response-dto.js +3 -4
  94. package/esm/models/expense-response-dto.js.map +1 -1
  95. package/esm/models/fiscal-year-response-dto.d.ts +5 -5
  96. package/esm/models/fiscal-year-response-dto.d.ts.map +1 -1
  97. package/esm/models/fiscal-year-response-dto.js +2 -3
  98. package/esm/models/fiscal-year-response-dto.js.map +1 -1
  99. package/esm/models/index.d.ts +4 -0
  100. package/esm/models/index.d.ts.map +1 -1
  101. package/esm/models/index.js +4 -0
  102. package/esm/models/index.js.map +1 -1
  103. package/esm/models/invoice-response-dto.d.ts +11 -11
  104. package/esm/models/invoice-response-dto.d.ts.map +1 -1
  105. package/esm/models/invoice-response-dto.js +5 -6
  106. package/esm/models/invoice-response-dto.js.map +1 -1
  107. package/esm/models/item-response-dto.d.ts +5 -5
  108. package/esm/models/item-response-dto.d.ts.map +1 -1
  109. package/esm/models/item-response-dto.js +2 -3
  110. package/esm/models/item-response-dto.js.map +1 -1
  111. package/esm/models/journal-entry-response-dto.d.ts +5 -5
  112. package/esm/models/journal-entry-response-dto.d.ts.map +1 -1
  113. package/esm/models/journal-entry-response-dto.js +2 -3
  114. package/esm/models/journal-entry-response-dto.js.map +1 -1
  115. package/esm/models/journal-line-item.d.ts +5 -5
  116. package/esm/models/journal-line-item.d.ts.map +1 -1
  117. package/esm/models/journal-line-item.js +2 -3
  118. package/esm/models/journal-line-item.js.map +1 -1
  119. package/esm/models/line-item-response.d.ts +3 -3
  120. package/esm/models/line-item-response.d.ts.map +1 -1
  121. package/esm/models/line-item-response.js +1 -2
  122. package/esm/models/line-item-response.js.map +1 -1
  123. package/esm/models/monthly-value.d.ts +3 -3
  124. package/esm/models/monthly-value.d.ts.map +1 -1
  125. package/esm/models/monthly-value.js +1 -2
  126. package/esm/models/monthly-value.js.map +1 -1
  127. package/esm/models/offer-line-item-response-dto.d.ts +3 -3
  128. package/esm/models/offer-line-item-response-dto.d.ts.map +1 -1
  129. package/esm/models/offer-line-item-response-dto.js +1 -2
  130. package/esm/models/offer-line-item-response-dto.js.map +1 -1
  131. package/esm/models/offer-response-dto.d.ts +3 -3
  132. package/esm/models/offer-response-dto.d.ts.map +1 -1
  133. package/esm/models/offer-response-dto.js +1 -2
  134. package/esm/models/offer-response-dto.js.map +1 -1
  135. package/esm/models/open-item-entry-response-dto.d.ts +3 -3
  136. package/esm/models/open-item-entry-response-dto.d.ts.map +1 -1
  137. package/esm/models/open-item-entry-response-dto.js +1 -2
  138. package/esm/models/open-item-entry-response-dto.js.map +1 -1
  139. package/esm/models/open-item-response-dto.d.ts +5 -5
  140. package/esm/models/open-item-response-dto.d.ts.map +1 -1
  141. package/esm/models/open-item-response-dto.js +2 -4
  142. package/esm/models/open-item-response-dto.js.map +1 -1
  143. package/esm/models/operations/create-booking-proposal-v2.d.ts +68 -18
  144. package/esm/models/operations/create-booking-proposal-v2.d.ts.map +1 -1
  145. package/esm/models/operations/create-booking-proposal-v2.js +73 -18
  146. package/esm/models/operations/create-booking-proposal-v2.js.map +1 -1
  147. package/esm/models/operations/get-booking-proposals.d.ts +4 -4
  148. package/esm/models/operations/get-booking-proposals.d.ts.map +1 -1
  149. package/esm/models/operations/get-booking-proposals.js +3 -4
  150. package/esm/models/operations/get-booking-proposals.js.map +1 -1
  151. package/esm/models/operations/put-contact-v2.d.ts +57 -17
  152. package/esm/models/operations/put-contact-v2.d.ts.map +1 -1
  153. package/esm/models/operations/put-contact-v2.js +64 -17
  154. package/esm/models/operations/put-contact-v2.js.map +1 -1
  155. package/esm/models/payment-response-dto.d.ts +3 -3
  156. package/esm/models/payment-response-dto.d.ts.map +1 -1
  157. package/esm/models/payment-response-dto.js +1 -2
  158. package/esm/models/payment-response-dto.js.map +1 -1
  159. package/esm/models/payment-term-response-dto.d.ts +5 -5
  160. package/esm/models/payment-term-response-dto.d.ts.map +1 -1
  161. package/esm/models/payment-term-response-dto.js +2 -3
  162. package/esm/models/payment-term-response-dto.js.map +1 -1
  163. package/esm/models/phone-number-v2.d.ts +4 -4
  164. package/esm/models/phone-number-v2.d.ts.map +1 -1
  165. package/esm/models/phone-number-v2.js +2 -3
  166. package/esm/models/phone-number-v2.js.map +1 -1
  167. package/esm/models/phone-number.d.ts +3 -3
  168. package/esm/models/phone-number.d.ts.map +1 -1
  169. package/esm/models/phone-number.js +1 -2
  170. package/esm/models/phone-number.js.map +1 -1
  171. package/esm/models/project-response-dto.d.ts +5 -5
  172. package/esm/models/project-response-dto.d.ts.map +1 -1
  173. package/esm/models/project-response-dto.js +2 -3
  174. package/esm/models/project-response-dto.js.map +1 -1
  175. package/esm/models/purchase-order-response-dto.d.ts +5 -5
  176. package/esm/models/purchase-order-response-dto.d.ts.map +1 -1
  177. package/esm/models/purchase-order-response-dto.js +2 -3
  178. package/esm/models/purchase-order-response-dto.js.map +1 -1
  179. package/esm/models/sales-order-response-dto.d.ts +3 -3
  180. package/esm/models/sales-order-response-dto.d.ts.map +1 -1
  181. package/esm/models/sales-order-response-dto.js +1 -2
  182. package/esm/models/sales-order-response-dto.js.map +1 -1
  183. package/esm/models/tax-rate-response-dto.d.ts +5 -5
  184. package/esm/models/tax-rate-response-dto.d.ts.map +1 -1
  185. package/esm/models/tax-rate-response-dto.js +2 -4
  186. package/esm/models/tax-rate-response-dto.js.map +1 -1
  187. package/esm/models/transaction-response-dto.d.ts +7 -7
  188. package/esm/models/transaction-response-dto.d.ts.map +1 -1
  189. package/esm/models/transaction-response-dto.js +3 -4
  190. package/esm/models/transaction-response-dto.js.map +1 -1
  191. package/esm/models/trial-balance-response-dto.d.ts +5 -5
  192. package/esm/models/trial-balance-response-dto.d.ts.map +1 -1
  193. package/esm/models/trial-balance-response-dto.js +3 -3
  194. package/esm/models/trial-balance-response-dto.js.map +1 -1
  195. package/esm/models/vendor-credit-response-dto.d.ts +10 -9
  196. package/esm/models/vendor-credit-response-dto.d.ts.map +1 -1
  197. package/esm/models/vendor-credit-response-dto.js +5 -5
  198. package/esm/models/vendor-credit-response-dto.js.map +1 -1
  199. package/esm/types/primitives.d.ts +1 -1
  200. package/esm/types/primitives.d.ts.map +1 -1
  201. package/esm/types/primitives.js +2 -3
  202. package/esm/types/primitives.js.map +1 -1
  203. package/jsr.json +1 -1
  204. package/package.json +1 -1
  205. package/src/funcs/accounting-v2-create-booking-proposal-v2.ts +1 -0
  206. package/src/funcs/accounting-v2-create-contact-v2.ts +1 -1
  207. package/src/funcs/accounting-v2-put-contact-v2.ts +1 -0
  208. package/src/lib/config.ts +4 -3
  209. package/src/models/account-response-dto.ts +19 -20
  210. package/src/models/address-offer.ts +17 -20
  211. package/src/models/address.ts +13 -16
  212. package/src/models/async-task-response-dto.ts +23 -9
  213. package/src/models/bank-account-response-dto.ts +13 -17
  214. package/src/models/bill-response-dto.ts +17 -22
  215. package/src/models/booking-proposal-address-response-dto-v2.ts +32 -0
  216. package/src/models/booking-proposal-line-item-response-dto-v2.ts +106 -0
  217. package/src/models/booking-proposal-response-dto-v2.ts +195 -0
  218. package/src/models/booking-proposal-response-dto.ts +16 -13
  219. package/src/models/contact-address-v2.ts +9 -12
  220. package/src/models/contact-address.ts +9 -12
  221. package/src/models/contact-response-dto-v2.ts +5 -7
  222. package/src/models/contact-response-dto.ts +9 -12
  223. package/src/models/create-vendor-credit-request-dto.ts +3 -0
  224. package/src/models/credit-note-response-dto.ts +9 -12
  225. package/src/models/dimension-response-common-dto-v2.ts +37 -0
  226. package/src/models/email-address-v2.ts +8 -11
  227. package/src/models/email-address.ts +5 -7
  228. package/src/models/expense-line-item-response.ts +5 -7
  229. package/src/models/expense-response-dto.ts +13 -17
  230. package/src/models/fiscal-year-response-dto.ts +9 -12
  231. package/src/models/index.ts +4 -0
  232. package/src/models/invoice-response-dto.ts +21 -27
  233. package/src/models/item-response-dto.ts +11 -12
  234. package/src/models/journal-entry-response-dto.ts +9 -10
  235. package/src/models/journal-line-item.ts +11 -12
  236. package/src/models/line-item-response.ts +5 -7
  237. package/src/models/monthly-value.ts +5 -7
  238. package/src/models/offer-line-item-response-dto.ts +5 -7
  239. package/src/models/offer-response-dto.ts +5 -7
  240. package/src/models/open-item-entry-response-dto.ts +5 -5
  241. package/src/models/open-item-response-dto.ts +11 -10
  242. package/src/models/operations/create-booking-proposal-v2.ts +212 -41
  243. package/src/models/operations/get-booking-proposals.ts +9 -6
  244. package/src/models/operations/put-contact-v2.ts +184 -39
  245. package/src/models/payment-response-dto.ts +5 -7
  246. package/src/models/payment-term-response-dto.ts +8 -12
  247. package/src/models/phone-number-v2.ts +8 -11
  248. package/src/models/phone-number.ts +5 -7
  249. package/src/models/project-response-dto.ts +9 -12
  250. package/src/models/purchase-order-response-dto.ts +9 -12
  251. package/src/models/sales-order-response-dto.ts +5 -7
  252. package/src/models/tax-rate-response-dto.ts +7 -10
  253. package/src/models/transaction-response-dto.ts +13 -17
  254. package/src/models/trial-balance-response-dto.ts +8 -10
  255. package/src/models/vendor-credit-response-dto.ts +19 -22
  256. package/src/types/primitives.ts +2 -4
@@ -6,6 +6,7 @@ import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import * as types from "../../types/primitives.js";
9
+ import { smartUnion } from "../../types/smart-union.js";
9
10
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
10
11
  import * as models from "../index.js";
11
12
 
@@ -35,32 +36,62 @@ export type PutContactV2Request = {
35
36
  body: models.CreateContactRequestDtoV2;
36
37
  };
37
38
 
38
- export type PutContactV2Pagination = {
39
+ export type PutContactV2Pagination2 = {
39
40
  total: number;
40
41
  perPage: number;
41
42
  currentPage: number;
42
43
  totalPages: number;
43
44
  };
44
45
 
45
- export type PutContactV2Meta = {
46
+ export type PutContactV2Meta2 = {
46
47
  warnings?: Array<string> | null | undefined;
47
- pagination?: PutContactV2Pagination | null | undefined;
48
+ pagination?: PutContactV2Pagination2 | null | undefined;
48
49
  };
49
50
 
50
- export type PutContactV2Errors = {};
51
+ export type PutContactV2Errors2 = {};
51
52
 
52
- export type PutContactV2RawData = {};
53
+ export type PutContactV2RawData2 = {};
54
+
55
+ /**
56
+ * Contact created successfully (upsert)
57
+ */
58
+ export type PutContactV2ResponseBody2 = {
59
+ meta?: PutContactV2Meta2 | null | undefined;
60
+ data: models.ContactResponseDtoV2;
61
+ errors: PutContactV2Errors2 | null;
62
+ rawData: PutContactV2RawData2 | null;
63
+ };
64
+
65
+ export type PutContactV2Pagination1 = {
66
+ total: number;
67
+ perPage: number;
68
+ currentPage: number;
69
+ totalPages: number;
70
+ };
71
+
72
+ export type PutContactV2Meta1 = {
73
+ warnings?: Array<string> | null | undefined;
74
+ pagination?: PutContactV2Pagination1 | null | undefined;
75
+ };
76
+
77
+ export type PutContactV2Errors1 = {};
78
+
79
+ export type PutContactV2RawData1 = {};
53
80
 
54
81
  /**
55
82
  * Contact updated successfully
56
83
  */
57
- export type PutContactV2Response = {
58
- meta?: PutContactV2Meta | null | undefined;
84
+ export type PutContactV2ResponseBody1 = {
85
+ meta?: PutContactV2Meta1 | null | undefined;
59
86
  data: models.ContactResponseDtoV2;
60
- errors: PutContactV2Errors | null;
61
- rawData: PutContactV2RawData | null;
87
+ errors: PutContactV2Errors1 | null;
88
+ rawData: PutContactV2RawData1 | null;
62
89
  };
63
90
 
91
+ export type PutContactV2Response =
92
+ | PutContactV2ResponseBody1
93
+ | PutContactV2ResponseBody2;
94
+
64
95
  /** @internal */
65
96
  export type PutContactV2Request$Outbound = {
66
97
  contactId: string;
@@ -93,8 +124,8 @@ export function putContactV2RequestToJSON(
93
124
  }
94
125
 
95
126
  /** @internal */
96
- export const PutContactV2Pagination$inboundSchema: z.ZodMiniType<
97
- PutContactV2Pagination,
127
+ export const PutContactV2Pagination2$inboundSchema: z.ZodMiniType<
128
+ PutContactV2Pagination2,
98
129
  unknown
99
130
  > = z.object({
100
131
  total: types.number(),
@@ -103,80 +134,194 @@ export const PutContactV2Pagination$inboundSchema: z.ZodMiniType<
103
134
  totalPages: types.number(),
104
135
  });
105
136
 
106
- export function putContactV2PaginationFromJSON(
137
+ export function putContactV2Pagination2FromJSON(
107
138
  jsonString: string,
108
- ): SafeParseResult<PutContactV2Pagination, SDKValidationError> {
139
+ ): SafeParseResult<PutContactV2Pagination2, SDKValidationError> {
109
140
  return safeParse(
110
141
  jsonString,
111
- (x) => PutContactV2Pagination$inboundSchema.parse(JSON.parse(x)),
112
- `Failed to parse 'PutContactV2Pagination' from JSON`,
142
+ (x) => PutContactV2Pagination2$inboundSchema.parse(JSON.parse(x)),
143
+ `Failed to parse 'PutContactV2Pagination2' from JSON`,
113
144
  );
114
145
  }
115
146
 
116
147
  /** @internal */
117
- export const PutContactV2Meta$inboundSchema: z.ZodMiniType<
118
- PutContactV2Meta,
148
+ export const PutContactV2Meta2$inboundSchema: z.ZodMiniType<
149
+ PutContactV2Meta2,
119
150
  unknown
120
151
  > = z.object({
121
152
  warnings: z.optional(z.nullable(z.array(types.string()))),
122
153
  pagination: z.optional(
123
- z.nullable(z.lazy(() => PutContactV2Pagination$inboundSchema)),
154
+ z.nullable(z.lazy(() => PutContactV2Pagination2$inboundSchema)),
124
155
  ),
125
156
  });
126
157
 
127
- export function putContactV2MetaFromJSON(
158
+ export function putContactV2Meta2FromJSON(
128
159
  jsonString: string,
129
- ): SafeParseResult<PutContactV2Meta, SDKValidationError> {
160
+ ): SafeParseResult<PutContactV2Meta2, SDKValidationError> {
130
161
  return safeParse(
131
162
  jsonString,
132
- (x) => PutContactV2Meta$inboundSchema.parse(JSON.parse(x)),
133
- `Failed to parse 'PutContactV2Meta' from JSON`,
163
+ (x) => PutContactV2Meta2$inboundSchema.parse(JSON.parse(x)),
164
+ `Failed to parse 'PutContactV2Meta2' from JSON`,
134
165
  );
135
166
  }
136
167
 
137
168
  /** @internal */
138
- export const PutContactV2Errors$inboundSchema: z.ZodMiniType<
139
- PutContactV2Errors,
169
+ export const PutContactV2Errors2$inboundSchema: z.ZodMiniType<
170
+ PutContactV2Errors2,
140
171
  unknown
141
172
  > = z.object({});
142
173
 
143
- export function putContactV2ErrorsFromJSON(
174
+ export function putContactV2Errors2FromJSON(
144
175
  jsonString: string,
145
- ): SafeParseResult<PutContactV2Errors, SDKValidationError> {
176
+ ): SafeParseResult<PutContactV2Errors2, SDKValidationError> {
146
177
  return safeParse(
147
178
  jsonString,
148
- (x) => PutContactV2Errors$inboundSchema.parse(JSON.parse(x)),
149
- `Failed to parse 'PutContactV2Errors' from JSON`,
179
+ (x) => PutContactV2Errors2$inboundSchema.parse(JSON.parse(x)),
180
+ `Failed to parse 'PutContactV2Errors2' from JSON`,
150
181
  );
151
182
  }
152
183
 
153
184
  /** @internal */
154
- export const PutContactV2RawData$inboundSchema: z.ZodMiniType<
155
- PutContactV2RawData,
185
+ export const PutContactV2RawData2$inboundSchema: z.ZodMiniType<
186
+ PutContactV2RawData2,
156
187
  unknown
157
188
  > = z.object({});
158
189
 
159
- export function putContactV2RawDataFromJSON(
190
+ export function putContactV2RawData2FromJSON(
160
191
  jsonString: string,
161
- ): SafeParseResult<PutContactV2RawData, SDKValidationError> {
192
+ ): SafeParseResult<PutContactV2RawData2, SDKValidationError> {
162
193
  return safeParse(
163
194
  jsonString,
164
- (x) => PutContactV2RawData$inboundSchema.parse(JSON.parse(x)),
165
- `Failed to parse 'PutContactV2RawData' from JSON`,
195
+ (x) => PutContactV2RawData2$inboundSchema.parse(JSON.parse(x)),
196
+ `Failed to parse 'PutContactV2RawData2' from JSON`,
166
197
  );
167
198
  }
168
199
 
169
200
  /** @internal */
170
- export const PutContactV2Response$inboundSchema: z.ZodMiniType<
171
- PutContactV2Response,
201
+ export const PutContactV2ResponseBody2$inboundSchema: z.ZodMiniType<
202
+ PutContactV2ResponseBody2,
172
203
  unknown
173
204
  > = z.object({
174
- meta: z.optional(z.nullable(z.lazy(() => PutContactV2Meta$inboundSchema))),
205
+ meta: z.optional(z.nullable(z.lazy(() => PutContactV2Meta2$inboundSchema))),
175
206
  data: models.ContactResponseDtoV2$inboundSchema,
176
- errors: types.nullable(z.lazy(() => PutContactV2Errors$inboundSchema)),
177
- rawData: types.nullable(z.lazy(() => PutContactV2RawData$inboundSchema)),
207
+ errors: types.nullable(z.lazy(() => PutContactV2Errors2$inboundSchema)),
208
+ rawData: types.nullable(z.lazy(() => PutContactV2RawData2$inboundSchema)),
209
+ });
210
+
211
+ export function putContactV2ResponseBody2FromJSON(
212
+ jsonString: string,
213
+ ): SafeParseResult<PutContactV2ResponseBody2, SDKValidationError> {
214
+ return safeParse(
215
+ jsonString,
216
+ (x) => PutContactV2ResponseBody2$inboundSchema.parse(JSON.parse(x)),
217
+ `Failed to parse 'PutContactV2ResponseBody2' from JSON`,
218
+ );
219
+ }
220
+
221
+ /** @internal */
222
+ export const PutContactV2Pagination1$inboundSchema: z.ZodMiniType<
223
+ PutContactV2Pagination1,
224
+ unknown
225
+ > = z.object({
226
+ total: types.number(),
227
+ perPage: types.number(),
228
+ currentPage: types.number(),
229
+ totalPages: types.number(),
178
230
  });
179
231
 
232
+ export function putContactV2Pagination1FromJSON(
233
+ jsonString: string,
234
+ ): SafeParseResult<PutContactV2Pagination1, SDKValidationError> {
235
+ return safeParse(
236
+ jsonString,
237
+ (x) => PutContactV2Pagination1$inboundSchema.parse(JSON.parse(x)),
238
+ `Failed to parse 'PutContactV2Pagination1' from JSON`,
239
+ );
240
+ }
241
+
242
+ /** @internal */
243
+ export const PutContactV2Meta1$inboundSchema: z.ZodMiniType<
244
+ PutContactV2Meta1,
245
+ unknown
246
+ > = z.object({
247
+ warnings: z.optional(z.nullable(z.array(types.string()))),
248
+ pagination: z.optional(
249
+ z.nullable(z.lazy(() => PutContactV2Pagination1$inboundSchema)),
250
+ ),
251
+ });
252
+
253
+ export function putContactV2Meta1FromJSON(
254
+ jsonString: string,
255
+ ): SafeParseResult<PutContactV2Meta1, SDKValidationError> {
256
+ return safeParse(
257
+ jsonString,
258
+ (x) => PutContactV2Meta1$inboundSchema.parse(JSON.parse(x)),
259
+ `Failed to parse 'PutContactV2Meta1' from JSON`,
260
+ );
261
+ }
262
+
263
+ /** @internal */
264
+ export const PutContactV2Errors1$inboundSchema: z.ZodMiniType<
265
+ PutContactV2Errors1,
266
+ unknown
267
+ > = z.object({});
268
+
269
+ export function putContactV2Errors1FromJSON(
270
+ jsonString: string,
271
+ ): SafeParseResult<PutContactV2Errors1, SDKValidationError> {
272
+ return safeParse(
273
+ jsonString,
274
+ (x) => PutContactV2Errors1$inboundSchema.parse(JSON.parse(x)),
275
+ `Failed to parse 'PutContactV2Errors1' from JSON`,
276
+ );
277
+ }
278
+
279
+ /** @internal */
280
+ export const PutContactV2RawData1$inboundSchema: z.ZodMiniType<
281
+ PutContactV2RawData1,
282
+ unknown
283
+ > = z.object({});
284
+
285
+ export function putContactV2RawData1FromJSON(
286
+ jsonString: string,
287
+ ): SafeParseResult<PutContactV2RawData1, SDKValidationError> {
288
+ return safeParse(
289
+ jsonString,
290
+ (x) => PutContactV2RawData1$inboundSchema.parse(JSON.parse(x)),
291
+ `Failed to parse 'PutContactV2RawData1' from JSON`,
292
+ );
293
+ }
294
+
295
+ /** @internal */
296
+ export const PutContactV2ResponseBody1$inboundSchema: z.ZodMiniType<
297
+ PutContactV2ResponseBody1,
298
+ unknown
299
+ > = z.object({
300
+ meta: z.optional(z.nullable(z.lazy(() => PutContactV2Meta1$inboundSchema))),
301
+ data: models.ContactResponseDtoV2$inboundSchema,
302
+ errors: types.nullable(z.lazy(() => PutContactV2Errors1$inboundSchema)),
303
+ rawData: types.nullable(z.lazy(() => PutContactV2RawData1$inboundSchema)),
304
+ });
305
+
306
+ export function putContactV2ResponseBody1FromJSON(
307
+ jsonString: string,
308
+ ): SafeParseResult<PutContactV2ResponseBody1, SDKValidationError> {
309
+ return safeParse(
310
+ jsonString,
311
+ (x) => PutContactV2ResponseBody1$inboundSchema.parse(JSON.parse(x)),
312
+ `Failed to parse 'PutContactV2ResponseBody1' from JSON`,
313
+ );
314
+ }
315
+
316
+ /** @internal */
317
+ export const PutContactV2Response$inboundSchema: z.ZodMiniType<
318
+ PutContactV2Response,
319
+ unknown
320
+ > = smartUnion([
321
+ z.lazy(() => PutContactV2ResponseBody1$inboundSchema),
322
+ z.lazy(() => PutContactV2ResponseBody2$inboundSchema),
323
+ ]);
324
+
180
325
  export function putContactV2ResponseFromJSON(
181
326
  jsonString: string,
182
327
  ): SafeParseResult<PutContactV2Response, SDKValidationError> {
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
@@ -16,7 +15,7 @@ export const PaymentResponseDtoDocumentType = {
16
15
  Bill: "BILL",
17
16
  BookingProposal: "BOOKING_PROPOSAL",
18
17
  } as const;
19
- export type PaymentResponseDtoDocumentType = OpenEnum<
18
+ export type PaymentResponseDtoDocumentType = ClosedEnum<
20
19
  typeof PaymentResponseDtoDocumentType
21
20
  >;
22
21
 
@@ -33,10 +32,9 @@ export type PaymentResponseDto = {
33
32
  };
34
33
 
35
34
  /** @internal */
36
- export const PaymentResponseDtoDocumentType$inboundSchema: z.ZodMiniType<
37
- PaymentResponseDtoDocumentType,
38
- unknown
39
- > = openEnums.inboundSchema(PaymentResponseDtoDocumentType);
35
+ export const PaymentResponseDtoDocumentType$inboundSchema: z.ZodMiniEnum<
36
+ typeof PaymentResponseDtoDocumentType
37
+ > = z.enum(PaymentResponseDtoDocumentType);
40
38
 
41
39
  /** @internal */
42
40
  export const PaymentResponseDto$inboundSchema: z.ZodMiniType<
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import {
@@ -18,7 +17,7 @@ export const PaymentTermResponseDtoDueType = {
18
17
  DueInDays: "DUE_IN_DAYS",
19
18
  DueAsPeriod: "DUE_AS_PERIOD",
20
19
  } as const;
21
- export type PaymentTermResponseDtoDueType = OpenEnum<
20
+ export type PaymentTermResponseDtoDueType = ClosedEnum<
22
21
  typeof PaymentTermResponseDtoDueType
23
22
  >;
24
23
 
@@ -28,7 +27,7 @@ export const PaymentMethod = {
28
27
  PaymentServiceProvider: "PAYMENT_SERVICE_PROVIDER",
29
28
  AutomaticBankWithdrawal: "AUTOMATIC_BANK_WITHDRAWAL",
30
29
  } as const;
31
- export type PaymentMethod = OpenEnum<typeof PaymentMethod>;
30
+ export type PaymentMethod = ClosedEnum<typeof PaymentMethod>;
32
31
 
33
32
  export type PaymentTermResponseDto = {
34
33
  id: string | null;
@@ -48,16 +47,13 @@ export type PaymentTermResponseDto = {
48
47
  };
49
48
 
50
49
  /** @internal */
51
- export const PaymentTermResponseDtoDueType$inboundSchema: z.ZodMiniType<
52
- PaymentTermResponseDtoDueType,
53
- unknown
54
- > = openEnums.inboundSchema(PaymentTermResponseDtoDueType);
50
+ export const PaymentTermResponseDtoDueType$inboundSchema: z.ZodMiniEnum<
51
+ typeof PaymentTermResponseDtoDueType
52
+ > = z.enum(PaymentTermResponseDtoDueType);
55
53
 
56
54
  /** @internal */
57
- export const PaymentMethod$inboundSchema: z.ZodMiniType<
58
- PaymentMethod,
59
- unknown
60
- > = openEnums.inboundSchema(PaymentMethod);
55
+ export const PaymentMethod$inboundSchema: z.ZodMiniEnum<typeof PaymentMethod> =
56
+ z.enum(PaymentMethod);
61
57
 
62
58
  /** @internal */
63
59
  export const PaymentTermResponseDto$inboundSchema: z.ZodMiniType<
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
@@ -18,7 +17,7 @@ export const PhoneNumberV2Type = {
18
17
  Private: "PRIVATE",
19
18
  Other: "OTHER",
20
19
  } as const;
21
- export type PhoneNumberV2Type = OpenEnum<typeof PhoneNumberV2Type>;
20
+ export type PhoneNumberV2Type = ClosedEnum<typeof PhoneNumberV2Type>;
22
21
 
23
22
  export type PhoneNumberV2 = {
24
23
  number: string | null;
@@ -26,15 +25,13 @@ export type PhoneNumberV2 = {
26
25
  };
27
26
 
28
27
  /** @internal */
29
- export const PhoneNumberV2Type$inboundSchema: z.ZodMiniType<
30
- PhoneNumberV2Type,
31
- unknown
32
- > = openEnums.inboundSchema(PhoneNumberV2Type);
28
+ export const PhoneNumberV2Type$inboundSchema: z.ZodMiniEnum<
29
+ typeof PhoneNumberV2Type
30
+ > = z.enum(PhoneNumberV2Type);
33
31
  /** @internal */
34
- export const PhoneNumberV2Type$outboundSchema: z.ZodMiniType<
35
- string,
36
- PhoneNumberV2Type
37
- > = openEnums.outboundSchema(PhoneNumberV2Type);
32
+ export const PhoneNumberV2Type$outboundSchema: z.ZodMiniEnum<
33
+ typeof PhoneNumberV2Type
34
+ > = PhoneNumberV2Type$inboundSchema;
38
35
 
39
36
  /** @internal */
40
37
  export const PhoneNumberV2$inboundSchema: z.ZodMiniType<
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
@@ -21,7 +20,7 @@ export const PhoneNumberType = {
21
20
  Whatsapp: "WHATSAPP",
22
21
  Other: "OTHER",
23
22
  } as const;
24
- export type PhoneNumberType = OpenEnum<typeof PhoneNumberType>;
23
+ export type PhoneNumberType = ClosedEnum<typeof PhoneNumberType>;
25
24
 
26
25
  export type PhoneNumber = {
27
26
  number: string | null;
@@ -29,10 +28,9 @@ export type PhoneNumber = {
29
28
  };
30
29
 
31
30
  /** @internal */
32
- export const PhoneNumberType$inboundSchema: z.ZodMiniType<
33
- PhoneNumberType,
34
- unknown
35
- > = openEnums.inboundSchema(PhoneNumberType);
31
+ export const PhoneNumberType$inboundSchema: z.ZodMiniEnum<
32
+ typeof PhoneNumberType
33
+ > = z.enum(PhoneNumberType);
36
34
 
37
35
  /** @internal */
38
36
  export const PhoneNumber$inboundSchema: z.ZodMiniType<PhoneNumber, unknown> = z
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
@@ -168,7 +167,7 @@ export const ProjectResponseDtoCurrency = {
168
167
  Zmk: "ZMK",
169
168
  Zwr: "ZWR",
170
169
  } as const;
171
- export type ProjectResponseDtoCurrency = OpenEnum<
170
+ export type ProjectResponseDtoCurrency = ClosedEnum<
172
171
  typeof ProjectResponseDtoCurrency
173
172
  >;
174
173
 
@@ -176,7 +175,7 @@ export const ProjectResponseDtoStatus = {
176
175
  Active: "ACTIVE",
177
176
  Closed: "CLOSED",
178
177
  } as const;
179
- export type ProjectResponseDtoStatus = OpenEnum<
178
+ export type ProjectResponseDtoStatus = ClosedEnum<
180
179
  typeof ProjectResponseDtoStatus
181
180
  >;
182
181
 
@@ -197,16 +196,14 @@ export type ProjectResponseDto = {
197
196
  };
198
197
 
199
198
  /** @internal */
200
- export const ProjectResponseDtoCurrency$inboundSchema: z.ZodMiniType<
201
- ProjectResponseDtoCurrency,
202
- unknown
203
- > = openEnums.inboundSchema(ProjectResponseDtoCurrency);
199
+ export const ProjectResponseDtoCurrency$inboundSchema: z.ZodMiniEnum<
200
+ typeof ProjectResponseDtoCurrency
201
+ > = z.enum(ProjectResponseDtoCurrency);
204
202
 
205
203
  /** @internal */
206
- export const ProjectResponseDtoStatus$inboundSchema: z.ZodMiniType<
207
- ProjectResponseDtoStatus,
208
- unknown
209
- > = openEnums.inboundSchema(ProjectResponseDtoStatus);
204
+ export const ProjectResponseDtoStatus$inboundSchema: z.ZodMiniEnum<
205
+ typeof ProjectResponseDtoStatus
206
+ > = z.enum(ProjectResponseDtoStatus);
210
207
 
211
208
  /** @internal */
212
209
  export const ProjectResponseDto$inboundSchema: z.ZodMiniType<
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import { Address, Address$inboundSchema } from "./address.js";
@@ -173,7 +172,7 @@ export const PurchaseOrderResponseDtoCurrency = {
173
172
  Zmk: "ZMK",
174
173
  Zwr: "ZWR",
175
174
  } as const;
176
- export type PurchaseOrderResponseDtoCurrency = OpenEnum<
175
+ export type PurchaseOrderResponseDtoCurrency = ClosedEnum<
177
176
  typeof PurchaseOrderResponseDtoCurrency
178
177
  >;
179
178
 
@@ -183,7 +182,7 @@ export const PurchaseOrderResponseDtoStatus = {
183
182
  PartiallyFulfilled: "PARTIALLY_FULFILLED",
184
183
  Canceled: "CANCELED",
185
184
  } as const;
186
- export type PurchaseOrderResponseDtoStatus = OpenEnum<
185
+ export type PurchaseOrderResponseDtoStatus = ClosedEnum<
187
186
  typeof PurchaseOrderResponseDtoStatus
188
187
  >;
189
188
 
@@ -210,16 +209,14 @@ export type PurchaseOrderResponseDto = {
210
209
  };
211
210
 
212
211
  /** @internal */
213
- export const PurchaseOrderResponseDtoCurrency$inboundSchema: z.ZodMiniType<
214
- PurchaseOrderResponseDtoCurrency,
215
- unknown
216
- > = openEnums.inboundSchema(PurchaseOrderResponseDtoCurrency);
212
+ export const PurchaseOrderResponseDtoCurrency$inboundSchema: z.ZodMiniEnum<
213
+ typeof PurchaseOrderResponseDtoCurrency
214
+ > = z.enum(PurchaseOrderResponseDtoCurrency);
217
215
 
218
216
  /** @internal */
219
- export const PurchaseOrderResponseDtoStatus$inboundSchema: z.ZodMiniType<
220
- PurchaseOrderResponseDtoStatus,
221
- unknown
222
- > = openEnums.inboundSchema(PurchaseOrderResponseDtoStatus);
217
+ export const PurchaseOrderResponseDtoStatus$inboundSchema: z.ZodMiniEnum<
218
+ typeof PurchaseOrderResponseDtoStatus
219
+ > = z.enum(PurchaseOrderResponseDtoStatus);
223
220
 
224
221
  /** @internal */
225
222
  export const PurchaseOrderResponseDto$inboundSchema: z.ZodMiniType<
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import { Address, Address$inboundSchema } from "./address.js";
@@ -22,7 +21,7 @@ export const SalesOrderResponseDtoStatus = {
22
21
  Closed: "CLOSED",
23
22
  Voided: "VOIDED",
24
23
  } as const;
25
- export type SalesOrderResponseDtoStatus = OpenEnum<
24
+ export type SalesOrderResponseDtoStatus = ClosedEnum<
26
25
  typeof SalesOrderResponseDtoStatus
27
26
  >;
28
27
 
@@ -51,10 +50,9 @@ export type SalesOrderResponseDto = {
51
50
  };
52
51
 
53
52
  /** @internal */
54
- export const SalesOrderResponseDtoStatus$inboundSchema: z.ZodMiniType<
55
- SalesOrderResponseDtoStatus,
56
- unknown
57
- > = openEnums.inboundSchema(SalesOrderResponseDtoStatus);
53
+ export const SalesOrderResponseDtoStatus$inboundSchema: z.ZodMiniEnum<
54
+ typeof SalesOrderResponseDtoStatus
55
+ > = z.enum(SalesOrderResponseDtoStatus);
58
56
 
59
57
  /** @internal */
60
58
  export const SalesOrderResponseDto$inboundSchema: z.ZodMiniType<
@@ -4,8 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- import { OpenEnum } from "../types/enums.js";
7
+ import { ClosedEnum } from "../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../types/fp.js";
10
9
  import * as types from "../types/primitives.js";
11
10
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
@@ -16,7 +15,7 @@ export const TaxRateResponseDtoType = {
16
15
  NoTax: "NO_TAX",
17
16
  ZeroTax: "ZERO_TAX",
18
17
  } as const;
19
- export type TaxRateResponseDtoType = OpenEnum<typeof TaxRateResponseDtoType>;
18
+ export type TaxRateResponseDtoType = ClosedEnum<typeof TaxRateResponseDtoType>;
20
19
 
21
20
  export const Usage = {
22
21
  Invoice: "INVOICE",
@@ -25,7 +24,7 @@ export const Usage = {
25
24
  Cash: "CASH",
26
25
  All: "ALL",
27
26
  } as const;
28
- export type Usage = OpenEnum<typeof Usage>;
27
+ export type Usage = ClosedEnum<typeof Usage>;
29
28
 
30
29
  export type TaxRateResponseDto = {
31
30
  id: string | null;
@@ -40,14 +39,12 @@ export type TaxRateResponseDto = {
40
39
  };
41
40
 
42
41
  /** @internal */
43
- export const TaxRateResponseDtoType$inboundSchema: z.ZodMiniType<
44
- TaxRateResponseDtoType,
45
- unknown
46
- > = openEnums.inboundSchema(TaxRateResponseDtoType);
42
+ export const TaxRateResponseDtoType$inboundSchema: z.ZodMiniEnum<
43
+ typeof TaxRateResponseDtoType
44
+ > = z.enum(TaxRateResponseDtoType);
47
45
 
48
46
  /** @internal */
49
- export const Usage$inboundSchema: z.ZodMiniType<Usage, unknown> = openEnums
50
- .inboundSchema(Usage);
47
+ export const Usage$inboundSchema: z.ZodMiniEnum<typeof Usage> = z.enum(Usage);
51
48
 
52
49
  /** @internal */
53
50
  export const TaxRateResponseDto$inboundSchema: z.ZodMiniType<