@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
@@ -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";
@@ -14,7 +13,7 @@ export const OpenItemEntryResponseDtoDebitCreditIndicator = {
14
13
  Debit: "DEBIT",
15
14
  Credit: "CREDIT",
16
15
  } as const;
17
- export type OpenItemEntryResponseDtoDebitCreditIndicator = OpenEnum<
16
+ export type OpenItemEntryResponseDtoDebitCreditIndicator = ClosedEnum<
18
17
  typeof OpenItemEntryResponseDtoDebitCreditIndicator
19
18
  >;
20
19
 
@@ -29,8 +28,9 @@ export type OpenItemEntryResponseDto = {
29
28
 
30
29
  /** @internal */
31
30
  export const OpenItemEntryResponseDtoDebitCreditIndicator$inboundSchema:
32
- z.ZodMiniType<OpenItemEntryResponseDtoDebitCreditIndicator, unknown> =
33
- openEnums.inboundSchema(OpenItemEntryResponseDtoDebitCreditIndicator);
31
+ z.ZodMiniEnum<typeof OpenItemEntryResponseDtoDebitCreditIndicator> = z.enum(
32
+ OpenItemEntryResponseDtoDebitCreditIndicator,
33
+ );
34
34
 
35
35
  /** @internal */
36
36
  export const OpenItemEntryResponseDto$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 OpenItemResponseDtoDebitCreditIndicator = {
18
17
  Debit: "DEBIT",
19
18
  Credit: "CREDIT",
20
19
  } as const;
21
- export type OpenItemResponseDtoDebitCreditIndicator = OpenEnum<
20
+ export type OpenItemResponseDtoDebitCreditIndicator = ClosedEnum<
22
21
  typeof OpenItemResponseDtoDebitCreditIndicator
23
22
  >;
24
23
 
@@ -31,7 +30,9 @@ export const OpenItemResponseDtoType = {
31
30
  Bill: "BILL",
32
31
  Invoice: "INVOICE",
33
32
  } as const;
34
- export type OpenItemResponseDtoType = OpenEnum<typeof OpenItemResponseDtoType>;
33
+ export type OpenItemResponseDtoType = ClosedEnum<
34
+ typeof OpenItemResponseDtoType
35
+ >;
35
36
 
36
37
  export type OpenItemResponseDto = {
37
38
  id: string | null;
@@ -52,8 +53,9 @@ export type OpenItemResponseDto = {
52
53
 
53
54
  /** @internal */
54
55
  export const OpenItemResponseDtoDebitCreditIndicator$inboundSchema:
55
- z.ZodMiniType<OpenItemResponseDtoDebitCreditIndicator, unknown> = openEnums
56
- .inboundSchema(OpenItemResponseDtoDebitCreditIndicator);
56
+ z.ZodMiniEnum<typeof OpenItemResponseDtoDebitCreditIndicator> = z.enum(
57
+ OpenItemResponseDtoDebitCreditIndicator,
58
+ );
57
59
 
58
60
  /** @internal */
59
61
  export const OpenBalance$inboundSchema: z.ZodMiniType<OpenBalance, unknown> = z
@@ -75,10 +77,9 @@ export function openBalanceFromJSON(
75
77
  }
76
78
 
77
79
  /** @internal */
78
- export const OpenItemResponseDtoType$inboundSchema: z.ZodMiniType<
79
- OpenItemResponseDtoType,
80
- unknown
81
- > = openEnums.inboundSchema(OpenItemResponseDtoType);
80
+ export const OpenItemResponseDtoType$inboundSchema: z.ZodMiniEnum<
81
+ typeof OpenItemResponseDtoType
82
+ > = z.enum(OpenItemResponseDtoType);
82
83
 
83
84
  /** @internal */
84
85
  export const OpenItemResponseDto$inboundSchema: z.ZodMiniType<
@@ -4,8 +4,10 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import * as types from "../../types/primitives.js";
10
+ import { smartUnion } from "../../types/smart-union.js";
9
11
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
10
12
  import * as models from "../index.js";
11
13
 
@@ -19,6 +21,16 @@ export type CreateBookingProposalV2File = {
19
21
  content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
20
22
  };
21
23
 
24
+ export const CreateBookingProposalV2BookingType = {
25
+ Invoice: "INVOICE",
26
+ Bill: "BILL",
27
+ CreditNote: "CREDIT_NOTE",
28
+ VendorCredit: "VENDOR_CREDIT",
29
+ } as const;
30
+ export type CreateBookingProposalV2BookingType = ClosedEnum<
31
+ typeof CreateBookingProposalV2BookingType
32
+ >;
33
+
22
34
  export type CreateBookingProposalV2FolderManagement = {
23
35
  category?: string | undefined;
24
36
  folder?: string | undefined;
@@ -27,7 +39,7 @@ export type CreateBookingProposalV2FolderManagement = {
27
39
 
28
40
  export type CreateBookingProposalV2RequestBody = {
29
41
  files?: Array<CreateBookingProposalV2File> | undefined;
30
- bookingType?: string | undefined;
42
+ bookingType?: CreateBookingProposalV2BookingType | undefined;
31
43
  bookingProposal?: models.CreateBookingProposalRequestDtoV2 | undefined;
32
44
  folderManagement?: CreateBookingProposalV2FolderManagement | undefined;
33
45
  };
@@ -48,32 +60,62 @@ export type CreateBookingProposalV2Request = {
48
60
  body: CreateBookingProposalV2RequestBody;
49
61
  };
50
62
 
51
- export type CreateBookingProposalV2Pagination = {
63
+ export type CreateBookingProposalV2Pagination2 = {
52
64
  total: number;
53
65
  perPage: number;
54
66
  currentPage: number;
55
67
  totalPages: number;
56
68
  };
57
69
 
58
- export type CreateBookingProposalV2Meta = {
70
+ export type CreateBookingProposalV2Meta2 = {
59
71
  warnings?: Array<string> | null | undefined;
60
- pagination?: CreateBookingProposalV2Pagination | null | undefined;
72
+ pagination?: CreateBookingProposalV2Pagination2 | null | undefined;
61
73
  };
62
74
 
63
- export type CreateBookingProposalV2Errors = {};
75
+ export type CreateBookingProposalV2Errors2 = {};
64
76
 
65
- export type CreateBookingProposalV2RawData = {};
77
+ export type CreateBookingProposalV2RawData2 = {};
66
78
 
67
79
  /**
68
80
  * Booking proposal queued successfully. Processed asynchronously and returns 202 with taskId.
69
81
  */
70
- export type CreateBookingProposalV2Response = {
71
- meta?: CreateBookingProposalV2Meta | null | undefined;
82
+ export type CreateBookingProposalV2ResponseBody2 = {
83
+ meta?: CreateBookingProposalV2Meta2 | null | undefined;
72
84
  data: models.TaskIdResponseDto;
73
- errors: CreateBookingProposalV2Errors | null;
74
- rawData: CreateBookingProposalV2RawData | null;
85
+ errors: CreateBookingProposalV2Errors2 | null;
86
+ rawData: CreateBookingProposalV2RawData2 | null;
75
87
  };
76
88
 
89
+ export type CreateBookingProposalV2Pagination1 = {
90
+ total: number;
91
+ perPage: number;
92
+ currentPage: number;
93
+ totalPages: number;
94
+ };
95
+
96
+ export type CreateBookingProposalV2Meta1 = {
97
+ warnings?: Array<string> | null | undefined;
98
+ pagination?: CreateBookingProposalV2Pagination1 | null | undefined;
99
+ };
100
+
101
+ export type CreateBookingProposalV2Errors1 = {};
102
+
103
+ export type CreateBookingProposalV2RawData1 = {};
104
+
105
+ /**
106
+ * Booking proposal created successfully (synchronous).
107
+ */
108
+ export type CreateBookingProposalV2ResponseBody1 = {
109
+ meta?: CreateBookingProposalV2Meta1 | null | undefined;
110
+ data: models.BookingProposalResponseDtoV2;
111
+ errors: CreateBookingProposalV2Errors1 | null;
112
+ rawData: CreateBookingProposalV2RawData1 | null;
113
+ };
114
+
115
+ export type CreateBookingProposalV2Response =
116
+ | CreateBookingProposalV2ResponseBody1
117
+ | CreateBookingProposalV2ResponseBody2;
118
+
77
119
  /** @internal */
78
120
  export type CreateBookingProposalV2File$Outbound = {
79
121
  fileName: string;
@@ -104,6 +146,11 @@ export function createBookingProposalV2FileToJSON(
104
146
  );
105
147
  }
106
148
 
149
+ /** @internal */
150
+ export const CreateBookingProposalV2BookingType$outboundSchema: z.ZodMiniEnum<
151
+ typeof CreateBookingProposalV2BookingType
152
+ > = z.enum(CreateBookingProposalV2BookingType);
153
+
107
154
  /** @internal */
108
155
  export type CreateBookingProposalV2FolderManagement$Outbound = {
109
156
  category?: string | undefined;
@@ -153,7 +200,7 @@ export const CreateBookingProposalV2RequestBody$outboundSchema: z.ZodMiniType<
153
200
  files: z.optional(
154
201
  z.array(z.lazy(() => CreateBookingProposalV2File$outboundSchema)),
155
202
  ),
156
- bookingType: z.optional(z.string()),
203
+ bookingType: z.optional(CreateBookingProposalV2BookingType$outboundSchema),
157
204
  bookingProposal: z.optional(
158
205
  models.CreateBookingProposalRequestDtoV2$outboundSchema,
159
206
  ),
@@ -202,8 +249,8 @@ export function createBookingProposalV2RequestToJSON(
202
249
  }
203
250
 
204
251
  /** @internal */
205
- export const CreateBookingProposalV2Pagination$inboundSchema: z.ZodMiniType<
206
- CreateBookingProposalV2Pagination,
252
+ export const CreateBookingProposalV2Pagination2$inboundSchema: z.ZodMiniType<
253
+ CreateBookingProposalV2Pagination2,
207
254
  unknown
208
255
  > = z.object({
209
256
  total: types.number(),
@@ -212,86 +259,210 @@ export const CreateBookingProposalV2Pagination$inboundSchema: z.ZodMiniType<
212
259
  totalPages: types.number(),
213
260
  });
214
261
 
215
- export function createBookingProposalV2PaginationFromJSON(
262
+ export function createBookingProposalV2Pagination2FromJSON(
216
263
  jsonString: string,
217
- ): SafeParseResult<CreateBookingProposalV2Pagination, SDKValidationError> {
264
+ ): SafeParseResult<CreateBookingProposalV2Pagination2, SDKValidationError> {
218
265
  return safeParse(
219
266
  jsonString,
220
- (x) => CreateBookingProposalV2Pagination$inboundSchema.parse(JSON.parse(x)),
221
- `Failed to parse 'CreateBookingProposalV2Pagination' from JSON`,
267
+ (x) =>
268
+ CreateBookingProposalV2Pagination2$inboundSchema.parse(JSON.parse(x)),
269
+ `Failed to parse 'CreateBookingProposalV2Pagination2' from JSON`,
222
270
  );
223
271
  }
224
272
 
225
273
  /** @internal */
226
- export const CreateBookingProposalV2Meta$inboundSchema: z.ZodMiniType<
227
- CreateBookingProposalV2Meta,
274
+ export const CreateBookingProposalV2Meta2$inboundSchema: z.ZodMiniType<
275
+ CreateBookingProposalV2Meta2,
228
276
  unknown
229
277
  > = z.object({
230
278
  warnings: z.optional(z.nullable(z.array(types.string()))),
231
279
  pagination: z.optional(
232
- z.nullable(z.lazy(() => CreateBookingProposalV2Pagination$inboundSchema)),
280
+ z.nullable(z.lazy(() => CreateBookingProposalV2Pagination2$inboundSchema)),
233
281
  ),
234
282
  });
235
283
 
236
- export function createBookingProposalV2MetaFromJSON(
284
+ export function createBookingProposalV2Meta2FromJSON(
237
285
  jsonString: string,
238
- ): SafeParseResult<CreateBookingProposalV2Meta, SDKValidationError> {
286
+ ): SafeParseResult<CreateBookingProposalV2Meta2, SDKValidationError> {
239
287
  return safeParse(
240
288
  jsonString,
241
- (x) => CreateBookingProposalV2Meta$inboundSchema.parse(JSON.parse(x)),
242
- `Failed to parse 'CreateBookingProposalV2Meta' from JSON`,
289
+ (x) => CreateBookingProposalV2Meta2$inboundSchema.parse(JSON.parse(x)),
290
+ `Failed to parse 'CreateBookingProposalV2Meta2' from JSON`,
243
291
  );
244
292
  }
245
293
 
246
294
  /** @internal */
247
- export const CreateBookingProposalV2Errors$inboundSchema: z.ZodMiniType<
248
- CreateBookingProposalV2Errors,
295
+ export const CreateBookingProposalV2Errors2$inboundSchema: z.ZodMiniType<
296
+ CreateBookingProposalV2Errors2,
249
297
  unknown
250
298
  > = z.object({});
251
299
 
252
- export function createBookingProposalV2ErrorsFromJSON(
300
+ export function createBookingProposalV2Errors2FromJSON(
253
301
  jsonString: string,
254
- ): SafeParseResult<CreateBookingProposalV2Errors, SDKValidationError> {
302
+ ): SafeParseResult<CreateBookingProposalV2Errors2, SDKValidationError> {
255
303
  return safeParse(
256
304
  jsonString,
257
- (x) => CreateBookingProposalV2Errors$inboundSchema.parse(JSON.parse(x)),
258
- `Failed to parse 'CreateBookingProposalV2Errors' from JSON`,
305
+ (x) => CreateBookingProposalV2Errors2$inboundSchema.parse(JSON.parse(x)),
306
+ `Failed to parse 'CreateBookingProposalV2Errors2' from JSON`,
259
307
  );
260
308
  }
261
309
 
262
310
  /** @internal */
263
- export const CreateBookingProposalV2RawData$inboundSchema: z.ZodMiniType<
264
- CreateBookingProposalV2RawData,
311
+ export const CreateBookingProposalV2RawData2$inboundSchema: z.ZodMiniType<
312
+ CreateBookingProposalV2RawData2,
265
313
  unknown
266
314
  > = z.object({});
267
315
 
268
- export function createBookingProposalV2RawDataFromJSON(
316
+ export function createBookingProposalV2RawData2FromJSON(
269
317
  jsonString: string,
270
- ): SafeParseResult<CreateBookingProposalV2RawData, SDKValidationError> {
318
+ ): SafeParseResult<CreateBookingProposalV2RawData2, SDKValidationError> {
271
319
  return safeParse(
272
320
  jsonString,
273
- (x) => CreateBookingProposalV2RawData$inboundSchema.parse(JSON.parse(x)),
274
- `Failed to parse 'CreateBookingProposalV2RawData' from JSON`,
321
+ (x) => CreateBookingProposalV2RawData2$inboundSchema.parse(JSON.parse(x)),
322
+ `Failed to parse 'CreateBookingProposalV2RawData2' from JSON`,
275
323
  );
276
324
  }
277
325
 
278
326
  /** @internal */
279
- export const CreateBookingProposalV2Response$inboundSchema: z.ZodMiniType<
280
- CreateBookingProposalV2Response,
327
+ export const CreateBookingProposalV2ResponseBody2$inboundSchema: z.ZodMiniType<
328
+ CreateBookingProposalV2ResponseBody2,
281
329
  unknown
282
330
  > = z.object({
283
331
  meta: z.optional(
284
- z.nullable(z.lazy(() => CreateBookingProposalV2Meta$inboundSchema)),
332
+ z.nullable(z.lazy(() => CreateBookingProposalV2Meta2$inboundSchema)),
285
333
  ),
286
334
  data: models.TaskIdResponseDto$inboundSchema,
287
335
  errors: types.nullable(
288
- z.lazy(() => CreateBookingProposalV2Errors$inboundSchema),
336
+ z.lazy(() => CreateBookingProposalV2Errors2$inboundSchema),
289
337
  ),
290
338
  rawData: types.nullable(
291
- z.lazy(() => CreateBookingProposalV2RawData$inboundSchema),
339
+ z.lazy(() => CreateBookingProposalV2RawData2$inboundSchema),
292
340
  ),
293
341
  });
294
342
 
343
+ export function createBookingProposalV2ResponseBody2FromJSON(
344
+ jsonString: string,
345
+ ): SafeParseResult<CreateBookingProposalV2ResponseBody2, SDKValidationError> {
346
+ return safeParse(
347
+ jsonString,
348
+ (x) =>
349
+ CreateBookingProposalV2ResponseBody2$inboundSchema.parse(JSON.parse(x)),
350
+ `Failed to parse 'CreateBookingProposalV2ResponseBody2' from JSON`,
351
+ );
352
+ }
353
+
354
+ /** @internal */
355
+ export const CreateBookingProposalV2Pagination1$inboundSchema: z.ZodMiniType<
356
+ CreateBookingProposalV2Pagination1,
357
+ unknown
358
+ > = z.object({
359
+ total: types.number(),
360
+ perPage: types.number(),
361
+ currentPage: types.number(),
362
+ totalPages: types.number(),
363
+ });
364
+
365
+ export function createBookingProposalV2Pagination1FromJSON(
366
+ jsonString: string,
367
+ ): SafeParseResult<CreateBookingProposalV2Pagination1, SDKValidationError> {
368
+ return safeParse(
369
+ jsonString,
370
+ (x) =>
371
+ CreateBookingProposalV2Pagination1$inboundSchema.parse(JSON.parse(x)),
372
+ `Failed to parse 'CreateBookingProposalV2Pagination1' from JSON`,
373
+ );
374
+ }
375
+
376
+ /** @internal */
377
+ export const CreateBookingProposalV2Meta1$inboundSchema: z.ZodMiniType<
378
+ CreateBookingProposalV2Meta1,
379
+ unknown
380
+ > = z.object({
381
+ warnings: z.optional(z.nullable(z.array(types.string()))),
382
+ pagination: z.optional(
383
+ z.nullable(z.lazy(() => CreateBookingProposalV2Pagination1$inboundSchema)),
384
+ ),
385
+ });
386
+
387
+ export function createBookingProposalV2Meta1FromJSON(
388
+ jsonString: string,
389
+ ): SafeParseResult<CreateBookingProposalV2Meta1, SDKValidationError> {
390
+ return safeParse(
391
+ jsonString,
392
+ (x) => CreateBookingProposalV2Meta1$inboundSchema.parse(JSON.parse(x)),
393
+ `Failed to parse 'CreateBookingProposalV2Meta1' from JSON`,
394
+ );
395
+ }
396
+
397
+ /** @internal */
398
+ export const CreateBookingProposalV2Errors1$inboundSchema: z.ZodMiniType<
399
+ CreateBookingProposalV2Errors1,
400
+ unknown
401
+ > = z.object({});
402
+
403
+ export function createBookingProposalV2Errors1FromJSON(
404
+ jsonString: string,
405
+ ): SafeParseResult<CreateBookingProposalV2Errors1, SDKValidationError> {
406
+ return safeParse(
407
+ jsonString,
408
+ (x) => CreateBookingProposalV2Errors1$inboundSchema.parse(JSON.parse(x)),
409
+ `Failed to parse 'CreateBookingProposalV2Errors1' from JSON`,
410
+ );
411
+ }
412
+
413
+ /** @internal */
414
+ export const CreateBookingProposalV2RawData1$inboundSchema: z.ZodMiniType<
415
+ CreateBookingProposalV2RawData1,
416
+ unknown
417
+ > = z.object({});
418
+
419
+ export function createBookingProposalV2RawData1FromJSON(
420
+ jsonString: string,
421
+ ): SafeParseResult<CreateBookingProposalV2RawData1, SDKValidationError> {
422
+ return safeParse(
423
+ jsonString,
424
+ (x) => CreateBookingProposalV2RawData1$inboundSchema.parse(JSON.parse(x)),
425
+ `Failed to parse 'CreateBookingProposalV2RawData1' from JSON`,
426
+ );
427
+ }
428
+
429
+ /** @internal */
430
+ export const CreateBookingProposalV2ResponseBody1$inboundSchema: z.ZodMiniType<
431
+ CreateBookingProposalV2ResponseBody1,
432
+ unknown
433
+ > = z.object({
434
+ meta: z.optional(
435
+ z.nullable(z.lazy(() => CreateBookingProposalV2Meta1$inboundSchema)),
436
+ ),
437
+ data: models.BookingProposalResponseDtoV2$inboundSchema,
438
+ errors: types.nullable(
439
+ z.lazy(() => CreateBookingProposalV2Errors1$inboundSchema),
440
+ ),
441
+ rawData: types.nullable(
442
+ z.lazy(() => CreateBookingProposalV2RawData1$inboundSchema),
443
+ ),
444
+ });
445
+
446
+ export function createBookingProposalV2ResponseBody1FromJSON(
447
+ jsonString: string,
448
+ ): SafeParseResult<CreateBookingProposalV2ResponseBody1, SDKValidationError> {
449
+ return safeParse(
450
+ jsonString,
451
+ (x) =>
452
+ CreateBookingProposalV2ResponseBody1$inboundSchema.parse(JSON.parse(x)),
453
+ `Failed to parse 'CreateBookingProposalV2ResponseBody1' from JSON`,
454
+ );
455
+ }
456
+
457
+ /** @internal */
458
+ export const CreateBookingProposalV2Response$inboundSchema: z.ZodMiniType<
459
+ CreateBookingProposalV2Response,
460
+ unknown
461
+ > = smartUnion([
462
+ z.lazy(() => CreateBookingProposalV2ResponseBody1$inboundSchema),
463
+ z.lazy(() => CreateBookingProposalV2ResponseBody2$inboundSchema),
464
+ ]);
465
+
295
466
  export function createBookingProposalV2ResponseFromJSON(
296
467
  jsonString: string,
297
468
  ): SafeParseResult<CreateBookingProposalV2Response, SDKValidationError> {
@@ -29,7 +29,7 @@ export type GetBookingProposalsLimit = ClosedEnum<
29
29
  /**
30
30
  * Filter booking proposals by booking type
31
31
  */
32
- export const BookingType = {
32
+ export const GetBookingProposalsBookingType = {
33
33
  Invoice: "INVOICE",
34
34
  Bill: "BILL",
35
35
  CreditNote: "CREDIT_NOTE",
@@ -43,7 +43,9 @@ export const BookingType = {
43
43
  /**
44
44
  * Filter booking proposals by booking type
45
45
  */
46
- export type BookingType = ClosedEnum<typeof BookingType>;
46
+ export type GetBookingProposalsBookingType = ClosedEnum<
47
+ typeof GetBookingProposalsBookingType
48
+ >;
47
49
 
48
50
  /**
49
51
  * Filter booking proposals by status
@@ -114,7 +116,7 @@ export type GetBookingProposalsRequest = {
114
116
  /**
115
117
  * Filter booking proposals by booking type
116
118
  */
117
- bookingType?: BookingType | undefined;
119
+ bookingType?: GetBookingProposalsBookingType | undefined;
118
120
  /**
119
121
  * Filter booking proposals by status
120
122
  */
@@ -173,8 +175,9 @@ export const GetBookingProposalsLimit$outboundSchema: z.ZodMiniEnum<
173
175
  > = z.enum(GetBookingProposalsLimit);
174
176
 
175
177
  /** @internal */
176
- export const BookingType$outboundSchema: z.ZodMiniEnum<typeof BookingType> = z
177
- .enum(BookingType);
178
+ export const GetBookingProposalsBookingType$outboundSchema: z.ZodMiniEnum<
179
+ typeof GetBookingProposalsBookingType
180
+ > = z.enum(GetBookingProposalsBookingType);
178
181
 
179
182
  /** @internal */
180
183
  export const GetBookingProposalsStatus$outboundSchema: z.ZodMiniEnum<
@@ -217,7 +220,7 @@ export const GetBookingProposalsRequest$outboundSchema: z.ZodMiniType<
217
220
  lastModifiedAt: z.optional(z.string()),
218
221
  environmentName: z.optional(z.string()),
219
222
  companyId: z.optional(z.string()),
220
- bookingType: z.optional(BookingType$outboundSchema),
223
+ bookingType: z.optional(GetBookingProposalsBookingType$outboundSchema),
221
224
  status: z.optional(GetBookingProposalsStatus$outboundSchema),
222
225
  rawData: z.optional(z.boolean()),
223
226
  orderField: z.optional(GetBookingProposalsOrderField$outboundSchema),