@paygentic/sdk 0.9.18 → 0.10.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 (206) hide show
  1. package/README.md +1 -0
  2. package/dist/commonjs/lib/config.d.ts +2 -2
  3. package/dist/commonjs/lib/config.js +2 -2
  4. package/dist/commonjs/models/authorizationdenialreason.d.ts +17 -0
  5. package/dist/commonjs/models/authorizationdenialreason.d.ts.map +1 -0
  6. package/dist/commonjs/models/authorizationdenialreason.js +51 -0
  7. package/dist/commonjs/models/authorizationdenialreason.js.map +1 -0
  8. package/dist/commonjs/models/errors/error.d.ts +17 -0
  9. package/dist/commonjs/models/errors/error.d.ts.map +1 -1
  10. package/dist/commonjs/models/errors/error.js +8 -0
  11. package/dist/commonjs/models/errors/error.js.map +1 -1
  12. package/dist/commonjs/models/errors/recordinvoicepayment.d.ts +16 -0
  13. package/dist/commonjs/models/errors/recordinvoicepayment.d.ts.map +1 -1
  14. package/dist/commonjs/models/errors/recordinvoicepayment.js +7 -0
  15. package/dist/commonjs/models/errors/recordinvoicepayment.js.map +1 -1
  16. package/dist/commonjs/models/index.d.ts +15 -0
  17. package/dist/commonjs/models/index.d.ts.map +1 -1
  18. package/dist/commonjs/models/index.js +15 -0
  19. package/dist/commonjs/models/index.js.map +1 -1
  20. package/dist/commonjs/models/invoicelineitem.d.ts +5 -0
  21. package/dist/commonjs/models/invoicelineitem.d.ts.map +1 -1
  22. package/dist/commonjs/models/invoicelineitem.js +2 -0
  23. package/dist/commonjs/models/invoicelineitem.js.map +1 -1
  24. package/dist/commonjs/models/linecalculationcontribution.d.ts +12 -0
  25. package/dist/commonjs/models/linecalculationcontribution.d.ts.map +1 -0
  26. package/dist/commonjs/models/linecalculationcontribution.js +52 -0
  27. package/dist/commonjs/models/linecalculationcontribution.js.map +1 -0
  28. package/dist/commonjs/models/linecalculationgiven.d.ts +20 -0
  29. package/dist/commonjs/models/linecalculationgiven.d.ts.map +1 -0
  30. package/dist/commonjs/models/linecalculationgiven.js +51 -0
  31. package/dist/commonjs/models/linecalculationgiven.js.map +1 -0
  32. package/dist/commonjs/models/linecalculationinputprice.d.ts +21 -0
  33. package/dist/commonjs/models/linecalculationinputprice.d.ts.map +1 -0
  34. package/dist/commonjs/models/linecalculationinputprice.js +52 -0
  35. package/dist/commonjs/models/linecalculationinputprice.js.map +1 -0
  36. package/dist/commonjs/models/linecalculationinputs.d.ts +34 -0
  37. package/dist/commonjs/models/linecalculationinputs.d.ts.map +1 -0
  38. package/dist/commonjs/models/linecalculationinputs.js +56 -0
  39. package/dist/commonjs/models/linecalculationinputs.js.map +1 -0
  40. package/dist/commonjs/models/linecalculationnotapplied.d.ts +20 -0
  41. package/dist/commonjs/models/linecalculationnotapplied.d.ts.map +1 -0
  42. package/dist/commonjs/models/linecalculationnotapplied.js +51 -0
  43. package/dist/commonjs/models/linecalculationnotapplied.js.map +1 -0
  44. package/dist/commonjs/models/linecalculationperiod.d.ts +14 -0
  45. package/dist/commonjs/models/linecalculationperiod.d.ts.map +1 -0
  46. package/dist/commonjs/models/linecalculationperiod.js +51 -0
  47. package/dist/commonjs/models/linecalculationperiod.js.map +1 -0
  48. package/dist/commonjs/models/linecalculationprecision.d.ts +14 -0
  49. package/dist/commonjs/models/linecalculationprecision.d.ts.map +1 -0
  50. package/dist/commonjs/models/linecalculationprecision.js +51 -0
  51. package/dist/commonjs/models/linecalculationprecision.js.map +1 -0
  52. package/dist/commonjs/models/linecalculationpriceband.d.ts +11 -0
  53. package/dist/commonjs/models/linecalculationpriceband.d.ts.map +1 -0
  54. package/dist/commonjs/models/linecalculationpriceband.js +51 -0
  55. package/dist/commonjs/models/linecalculationpriceband.js.map +1 -0
  56. package/dist/commonjs/models/linecalculationpricefn.d.ts +40 -0
  57. package/dist/commonjs/models/linecalculationpricefn.d.ts.map +1 -0
  58. package/dist/commonjs/models/linecalculationpricefn.js +56 -0
  59. package/dist/commonjs/models/linecalculationpricefn.js.map +1 -0
  60. package/dist/commonjs/models/linecalculationresult.d.ts +24 -0
  61. package/dist/commonjs/models/linecalculationresult.d.ts.map +1 -0
  62. package/dist/commonjs/models/linecalculationresult.js +52 -0
  63. package/dist/commonjs/models/linecalculationresult.js.map +1 -0
  64. package/dist/commonjs/models/linecalculationsource.d.ts +32 -0
  65. package/dist/commonjs/models/linecalculationsource.d.ts.map +1 -0
  66. package/dist/commonjs/models/linecalculationsource.js +53 -0
  67. package/dist/commonjs/models/linecalculationsource.js.map +1 -0
  68. package/dist/commonjs/models/linecalculationstep.d.ts +50 -0
  69. package/dist/commonjs/models/linecalculationstep.d.ts.map +1 -0
  70. package/dist/commonjs/models/linecalculationstep.js +59 -0
  71. package/dist/commonjs/models/linecalculationstep.js.map +1 -0
  72. package/dist/commonjs/models/linecalculationvalue.d.ts +12 -0
  73. package/dist/commonjs/models/linecalculationvalue.d.ts.map +1 -0
  74. package/dist/commonjs/models/linecalculationvalue.js +49 -0
  75. package/dist/commonjs/models/linecalculationvalue.js.map +1 -0
  76. package/dist/commonjs/models/lineitem.d.ts +5 -0
  77. package/dist/commonjs/models/lineitem.d.ts.map +1 -1
  78. package/dist/commonjs/models/lineitem.js +2 -0
  79. package/dist/commonjs/models/lineitem.js.map +1 -1
  80. package/dist/commonjs/models/lineprovenance.d.ts +69 -0
  81. package/dist/commonjs/models/lineprovenance.d.ts.map +1 -0
  82. package/dist/commonjs/models/lineprovenance.js +68 -0
  83. package/dist/commonjs/models/lineprovenance.js.map +1 -0
  84. package/dist/commonjs/models/operations/getinvoice.d.ts +1 -1
  85. package/dist/commonjs/models/operations/getinvoicelineitems.d.ts +1 -1
  86. package/dist/commonjs/models/operations/listlineitems.d.ts +1 -1
  87. package/dist/commonjs/models/operations/listsubscriptions.d.ts +5 -2
  88. package/dist/commonjs/models/operations/listsubscriptions.d.ts.map +1 -1
  89. package/dist/commonjs/models/operations/listsubscriptions.js +1 -1
  90. package/dist/commonjs/models/operations/listsubscriptions.js.map +1 -1
  91. package/dist/esm/lib/config.d.ts +2 -2
  92. package/dist/esm/lib/config.js +2 -2
  93. package/dist/esm/models/authorizationdenialreason.d.ts +17 -0
  94. package/dist/esm/models/authorizationdenialreason.d.ts.map +1 -0
  95. package/dist/esm/models/authorizationdenialreason.js +15 -0
  96. package/dist/esm/models/authorizationdenialreason.js.map +1 -0
  97. package/dist/esm/models/errors/error.d.ts +17 -0
  98. package/dist/esm/models/errors/error.d.ts.map +1 -1
  99. package/dist/esm/models/errors/error.js +8 -0
  100. package/dist/esm/models/errors/error.js.map +1 -1
  101. package/dist/esm/models/errors/recordinvoicepayment.d.ts +16 -0
  102. package/dist/esm/models/errors/recordinvoicepayment.d.ts.map +1 -1
  103. package/dist/esm/models/errors/recordinvoicepayment.js +7 -0
  104. package/dist/esm/models/errors/recordinvoicepayment.js.map +1 -1
  105. package/dist/esm/models/index.d.ts +15 -0
  106. package/dist/esm/models/index.d.ts.map +1 -1
  107. package/dist/esm/models/index.js +15 -0
  108. package/dist/esm/models/index.js.map +1 -1
  109. package/dist/esm/models/invoicelineitem.d.ts +5 -0
  110. package/dist/esm/models/invoicelineitem.d.ts.map +1 -1
  111. package/dist/esm/models/invoicelineitem.js +2 -0
  112. package/dist/esm/models/invoicelineitem.js.map +1 -1
  113. package/dist/esm/models/linecalculationcontribution.d.ts +12 -0
  114. package/dist/esm/models/linecalculationcontribution.d.ts.map +1 -0
  115. package/dist/esm/models/linecalculationcontribution.js +15 -0
  116. package/dist/esm/models/linecalculationcontribution.js.map +1 -0
  117. package/dist/esm/models/linecalculationgiven.d.ts +20 -0
  118. package/dist/esm/models/linecalculationgiven.d.ts.map +1 -0
  119. package/dist/esm/models/linecalculationgiven.js +14 -0
  120. package/dist/esm/models/linecalculationgiven.js.map +1 -0
  121. package/dist/esm/models/linecalculationinputprice.d.ts +21 -0
  122. package/dist/esm/models/linecalculationinputprice.d.ts.map +1 -0
  123. package/dist/esm/models/linecalculationinputprice.js +15 -0
  124. package/dist/esm/models/linecalculationinputprice.js.map +1 -0
  125. package/dist/esm/models/linecalculationinputs.d.ts +34 -0
  126. package/dist/esm/models/linecalculationinputs.d.ts.map +1 -0
  127. package/dist/esm/models/linecalculationinputs.js +19 -0
  128. package/dist/esm/models/linecalculationinputs.js.map +1 -0
  129. package/dist/esm/models/linecalculationnotapplied.d.ts +20 -0
  130. package/dist/esm/models/linecalculationnotapplied.d.ts.map +1 -0
  131. package/dist/esm/models/linecalculationnotapplied.js +14 -0
  132. package/dist/esm/models/linecalculationnotapplied.js.map +1 -0
  133. package/dist/esm/models/linecalculationperiod.d.ts +14 -0
  134. package/dist/esm/models/linecalculationperiod.d.ts.map +1 -0
  135. package/dist/esm/models/linecalculationperiod.js +14 -0
  136. package/dist/esm/models/linecalculationperiod.js.map +1 -0
  137. package/dist/esm/models/linecalculationprecision.d.ts +14 -0
  138. package/dist/esm/models/linecalculationprecision.d.ts.map +1 -0
  139. package/dist/esm/models/linecalculationprecision.js +14 -0
  140. package/dist/esm/models/linecalculationprecision.js.map +1 -0
  141. package/dist/esm/models/linecalculationpriceband.d.ts +11 -0
  142. package/dist/esm/models/linecalculationpriceband.d.ts.map +1 -0
  143. package/dist/esm/models/linecalculationpriceband.js +14 -0
  144. package/dist/esm/models/linecalculationpriceband.js.map +1 -0
  145. package/dist/esm/models/linecalculationpricefn.d.ts +40 -0
  146. package/dist/esm/models/linecalculationpricefn.d.ts.map +1 -0
  147. package/dist/esm/models/linecalculationpricefn.js +19 -0
  148. package/dist/esm/models/linecalculationpricefn.js.map +1 -0
  149. package/dist/esm/models/linecalculationresult.d.ts +24 -0
  150. package/dist/esm/models/linecalculationresult.d.ts.map +1 -0
  151. package/dist/esm/models/linecalculationresult.js +15 -0
  152. package/dist/esm/models/linecalculationresult.js.map +1 -0
  153. package/dist/esm/models/linecalculationsource.d.ts +32 -0
  154. package/dist/esm/models/linecalculationsource.d.ts.map +1 -0
  155. package/dist/esm/models/linecalculationsource.js +16 -0
  156. package/dist/esm/models/linecalculationsource.js.map +1 -0
  157. package/dist/esm/models/linecalculationstep.d.ts +50 -0
  158. package/dist/esm/models/linecalculationstep.d.ts.map +1 -0
  159. package/dist/esm/models/linecalculationstep.js +22 -0
  160. package/dist/esm/models/linecalculationstep.js.map +1 -0
  161. package/dist/esm/models/linecalculationvalue.d.ts +12 -0
  162. package/dist/esm/models/linecalculationvalue.d.ts.map +1 -0
  163. package/dist/esm/models/linecalculationvalue.js +12 -0
  164. package/dist/esm/models/linecalculationvalue.js.map +1 -0
  165. package/dist/esm/models/lineitem.d.ts +5 -0
  166. package/dist/esm/models/lineitem.d.ts.map +1 -1
  167. package/dist/esm/models/lineitem.js +2 -0
  168. package/dist/esm/models/lineitem.js.map +1 -1
  169. package/dist/esm/models/lineprovenance.d.ts +69 -0
  170. package/dist/esm/models/lineprovenance.d.ts.map +1 -0
  171. package/dist/esm/models/lineprovenance.js +31 -0
  172. package/dist/esm/models/lineprovenance.js.map +1 -0
  173. package/dist/esm/models/operations/getinvoice.d.ts +1 -1
  174. package/dist/esm/models/operations/getinvoicelineitems.d.ts +1 -1
  175. package/dist/esm/models/operations/listlineitems.d.ts +1 -1
  176. package/dist/esm/models/operations/listsubscriptions.d.ts +5 -2
  177. package/dist/esm/models/operations/listsubscriptions.d.ts.map +1 -1
  178. package/dist/esm/models/operations/listsubscriptions.js +1 -1
  179. package/dist/esm/models/operations/listsubscriptions.js.map +1 -1
  180. package/jsr.json +1 -1
  181. package/package.json +1 -1
  182. package/src/lib/config.ts +2 -2
  183. package/src/models/authorizationdenialreason.ts +26 -0
  184. package/src/models/errors/error.ts +23 -0
  185. package/src/models/errors/recordinvoicepayment.ts +22 -0
  186. package/src/models/index.ts +15 -0
  187. package/src/models/invoicelineitem.ts +9 -0
  188. package/src/models/linecalculationcontribution.ts +35 -0
  189. package/src/models/linecalculationgiven.ts +42 -0
  190. package/src/models/linecalculationinputprice.ts +46 -0
  191. package/src/models/linecalculationinputs.ts +65 -0
  192. package/src/models/linecalculationnotapplied.ts +42 -0
  193. package/src/models/linecalculationperiod.ts +36 -0
  194. package/src/models/linecalculationprecision.ts +36 -0
  195. package/src/models/linecalculationpriceband.ts +33 -0
  196. package/src/models/linecalculationpricefn.ts +74 -0
  197. package/src/models/linecalculationresult.ts +47 -0
  198. package/src/models/linecalculationsource.ts +52 -0
  199. package/src/models/linecalculationstep.ts +80 -0
  200. package/src/models/linecalculationvalue.ts +34 -0
  201. package/src/models/lineitem.ts +9 -0
  202. package/src/models/lineprovenance.ts +122 -0
  203. package/src/models/operations/getinvoice.ts +1 -1
  204. package/src/models/operations/getinvoicelineitems.ts +1 -1
  205. package/src/models/operations/listlineitems.ts +1 -1
  206. package/src/models/operations/listsubscriptions.ts +6 -3
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { LineCalculationGiven$inboundSchema, } from "./linecalculationgiven.js";
7
+ import { LineCalculationInputPrice$inboundSchema, } from "./linecalculationinputprice.js";
8
+ /** @internal */
9
+ export const LineCalculationInputs$inboundSchema = z.object({
10
+ kind: z.string(),
11
+ quantity: LineCalculationGiven$inboundSchema.optional(),
12
+ selector: LineCalculationGiven$inboundSchema.optional(),
13
+ price: LineCalculationInputPrice$inboundSchema.optional(),
14
+ amount: LineCalculationGiven$inboundSchema.optional(),
15
+ });
16
+ export function lineCalculationInputsFromJSON(jsonString) {
17
+ return safeParse(jsonString, (x) => LineCalculationInputs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationInputs' from JSON`);
18
+ }
19
+ //# sourceMappingURL=linecalculationinputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationinputs.js","sourceRoot":"","sources":["../../../src/models/linecalculationinputs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,kCAAkC,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,uCAAuC,GACxC,MAAM,gCAAgC,CAAC;AA4BxC,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,kCAAkC,CAAC,QAAQ,EAAE;IACvD,QAAQ,EAAE,kCAAkC,CAAC,QAAQ,EAAE;IACvD,KAAK,EAAE,uCAAuC,CAAC,QAAQ,EAAE;IACzD,MAAM,EAAE,kCAAkC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * A rule in force for the line that did not change it.
6
+ */
7
+ export type LineCalculationNotApplied = {
8
+ /**
9
+ * The key of the rule's source in `sources`.
10
+ */
11
+ source: string;
12
+ /**
13
+ * Why the rule did not change the line, for example `within` or `notBinding`.
14
+ */
15
+ reason: string;
16
+ };
17
+ /** @internal */
18
+ export declare const LineCalculationNotApplied$inboundSchema: z.ZodType<LineCalculationNotApplied, z.ZodTypeDef, unknown>;
19
+ export declare function lineCalculationNotAppliedFromJSON(jsonString: string): SafeParseResult<LineCalculationNotApplied, SDKValidationError>;
20
+ //# sourceMappingURL=linecalculationnotapplied.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationnotapplied.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationnotapplied.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAMhE"}
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const LineCalculationNotApplied$inboundSchema = z.object({
8
+ source: z.string(),
9
+ reason: z.string(),
10
+ });
11
+ export function lineCalculationNotAppliedFromJSON(jsonString) {
12
+ return safeParse(jsonString, (x) => LineCalculationNotApplied$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationNotApplied' from JSON`);
13
+ }
14
+ //# sourceMappingURL=linecalculationnotapplied.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationnotapplied.js","sourceRoot":"","sources":["../../../src/models/linecalculationnotapplied.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkB9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC;AAEH,MAAM,UAAU,iCAAiC,CAC/C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAAuC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,uDAAuD,CACxD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * The period the line bills.
6
+ */
7
+ export type LineCalculationPeriod = {
8
+ start: Date;
9
+ end: Date;
10
+ };
11
+ /** @internal */
12
+ export declare const LineCalculationPeriod$inboundSchema: z.ZodType<LineCalculationPeriod, z.ZodTypeDef, unknown>;
13
+ export declare function lineCalculationPeriodFromJSON(jsonString: string): SafeParseResult<LineCalculationPeriod, SDKValidationError>;
14
+ //# sourceMappingURL=linecalculationperiod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationperiod.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationperiod.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,IAAI,CAAC;CACX,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const LineCalculationPeriod$inboundSchema = z.object({
8
+ start: z.string().datetime({ offset: true }).transform(v => new Date(v)),
9
+ end: z.string().datetime({ offset: true }).transform(v => new Date(v)),
10
+ });
11
+ export function lineCalculationPeriodFromJSON(jsonString) {
12
+ return safeParse(jsonString, (x) => LineCalculationPeriod$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPeriod' from JSON`);
13
+ }
14
+ //# sourceMappingURL=linecalculationperiod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationperiod.js","sourceRoot":"","sources":["../../../src/models/linecalculationperiod.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAY9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IACxE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;CACvE,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * The default arithmetic of every step. Any other rounding is an explicit `round` step.
6
+ */
7
+ export type LineCalculationPrecision = {
8
+ significantDigits: number;
9
+ rounding: string;
10
+ };
11
+ /** @internal */
12
+ export declare const LineCalculationPrecision$inboundSchema: z.ZodType<LineCalculationPrecision, z.ZodTypeDef, unknown>;
13
+ export declare function lineCalculationPrecisionFromJSON(jsonString: string): SafeParseResult<LineCalculationPrecision, SDKValidationError>;
14
+ //# sourceMappingURL=linecalculationprecision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationprecision.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationprecision.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const LineCalculationPrecision$inboundSchema = z.object({
8
+ significantDigits: z.number().int(),
9
+ rounding: z.string(),
10
+ });
11
+ export function lineCalculationPrecisionFromJSON(jsonString) {
12
+ return safeParse(jsonString, (x) => LineCalculationPrecision$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPrecision' from JSON`);
13
+ }
14
+ //# sourceMappingURL=linecalculationprecision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationprecision.js","sourceRoot":"","sources":["../../../src/models/linecalculationprecision.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAY9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,MAAM,UAAU,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,sCAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type LineCalculationPriceBand = {
5
+ upTo: string | null;
6
+ rate: string;
7
+ };
8
+ /** @internal */
9
+ export declare const LineCalculationPriceBand$inboundSchema: z.ZodType<LineCalculationPriceBand, z.ZodTypeDef, unknown>;
10
+ export declare function lineCalculationPriceBandFromJSON(jsonString: string): SafeParseResult<LineCalculationPriceBand, SDKValidationError>;
11
+ //# sourceMappingURL=linecalculationpriceband.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationpriceband.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationpriceband.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const LineCalculationPriceBand$inboundSchema = z.object({
8
+ upTo: z.nullable(z.string()),
9
+ rate: z.string(),
10
+ });
11
+ export function lineCalculationPriceBandFromJSON(jsonString) {
12
+ return safeParse(jsonString, (x) => LineCalculationPriceBand$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPriceBand' from JSON`);
13
+ }
14
+ //# sourceMappingURL=linecalculationpriceband.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationpriceband.js","sourceRoot":"","sources":["../../../src/models/linecalculationpriceband.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAS9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,MAAM,UAAU,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,sCAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { LineCalculationPriceBand } from "./linecalculationpriceband.js";
5
+ /**
6
+ * A price as a function from quantity to money. A new model may carry fields not listed here.
7
+ */
8
+ export type LineCalculationPriceFn = {
9
+ /**
10
+ * `unit`: `rate` per unit. `volume`: `bands`, each with `upTo` (null for the open band) and `rate`; one band prices every unit. `percentage`: `rate` as a fraction, with `min` and `max` charge or null. `flat`: one `amount`. `dynamic`: the quantity is already money. An open set, so it is a string rather than an enum: known values are `unit`, `volume`, `percentage`, `flat`, `dynamic`, and new values may be added.
11
+ */
12
+ model: string;
13
+ /**
14
+ * `unit`, `percentage`: the rate.
15
+ */
16
+ rate?: string | undefined;
17
+ /**
18
+ * `volume` only: the bands in ascending order.
19
+ */
20
+ bands?: Array<LineCalculationPriceBand> | undefined;
21
+ /**
22
+ * `percentage` only: the minimum charge, or null.
23
+ */
24
+ min?: string | null | undefined;
25
+ /**
26
+ * `percentage` only: the maximum charge, or null.
27
+ */
28
+ max?: string | null | undefined;
29
+ /**
30
+ * `flat` only: the amount for the period.
31
+ */
32
+ amount?: string | undefined;
33
+ additionalProperties?: {
34
+ [k: string]: any;
35
+ } | undefined;
36
+ };
37
+ /** @internal */
38
+ export declare const LineCalculationPriceFn$inboundSchema: z.ZodType<LineCalculationPriceFn, z.ZodTypeDef, unknown>;
39
+ export declare function lineCalculationPriceFnFromJSON(jsonString: string): SafeParseResult<LineCalculationPriceFn, SDKValidationError>;
40
+ //# sourceMappingURL=linecalculationpricefn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationpricefn.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationpricefn.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAK5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAAC;IACpD;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAYR,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
6
+ import { LineCalculationPriceBand$inboundSchema, } from "./linecalculationpriceband.js";
7
+ /** @internal */
8
+ export const LineCalculationPriceFn$inboundSchema = collectExtraKeys$(z.object({
9
+ model: z.string(),
10
+ rate: z.string().optional(),
11
+ bands: z.array(LineCalculationPriceBand$inboundSchema).optional(),
12
+ min: z.nullable(z.string()).optional(),
13
+ max: z.nullable(z.string()).optional(),
14
+ amount: z.string().optional(),
15
+ }).catchall(z.any()), "additionalProperties", true);
16
+ export function lineCalculationPriceFnFromJSON(jsonString) {
17
+ return safeParse(jsonString, (x) => LineCalculationPriceFn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPriceFn' from JSON`);
18
+ }
19
+ //# sourceMappingURL=linecalculationpricefn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationpricefn.js","sourceRoot":"","sources":["../../../src/models/linecalculationpricefn.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,GACV,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAEL,sCAAsC,GACvC,MAAM,+BAA+B,CAAC;AAiCvC,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAI7C,iBAAiB,CACnB,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC,QAAQ,EAAE;IACjE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EACpB,sBAAsB,EACtB,IAAI,CACL,CAAC;AAEF,MAAM,UAAU,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,24 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Equal to the line's stored amount, quantity and unit price.
6
+ */
7
+ export type LineCalculationResult = {
8
+ /**
9
+ * The line's amount before tax.
10
+ */
11
+ amount: string;
12
+ /**
13
+ * The line's quantity.
14
+ */
15
+ quantity: string | null;
16
+ /**
17
+ * The line's unit price. It can be rounded, so quantity times unit price can differ from the amount.
18
+ */
19
+ unitPrice: string | null;
20
+ };
21
+ /** @internal */
22
+ export declare const LineCalculationResult$inboundSchema: z.ZodType<LineCalculationResult, z.ZodTypeDef, unknown>;
23
+ export declare function lineCalculationResultFromJSON(jsonString: string): SafeParseResult<LineCalculationResult, SDKValidationError>;
24
+ //# sourceMappingURL=linecalculationresult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationresult.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationresult.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const LineCalculationResult$inboundSchema = z.object({
8
+ amount: z.string(),
9
+ quantity: z.nullable(z.string()),
10
+ unitPrice: z.nullable(z.string()),
11
+ });
12
+ export function lineCalculationResultFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => LineCalculationResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationResult' from JSON`);
14
+ }
15
+ //# sourceMappingURL=linecalculationresult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationresult.js","sourceRoot":"","sources":["../../../src/models/linecalculationresult.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAsB9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Where a value came from: `ref`, a link that can break after the invoice is issued, and `asUsed`, the values the calculation read, which never change.
6
+ */
7
+ export type LineCalculationSource = {
8
+ /**
9
+ * `interval`: a subscription price interval. `price`: a catalog price. `meter`: a billable metric read directly. `entitlement`: the grant engine's reading of an entitlement. `grant`: a grant. `adjustment`: a subscription adjustment. `line`: another line on the invoice. `storedRow`: a figure the line already stored, with `reason`. `merchant`: an amount a merchant entered. `input` is reserved for a value from a system that is not a meter, with `ref` `name` and `eventId` and `asUsed` `value` and `unit`; nothing produces it yet. An open set, so it is a string rather than an enum: known values are `interval`, `price`, `meter`, `entitlement`, `grant`, `adjustment`, `line`, `storedRow`, `merchant`, and new values may be added.
10
+ */
11
+ type: string;
12
+ /**
13
+ * The ids that link to the resource.
14
+ */
15
+ ref?: {
16
+ [k: string]: any;
17
+ } | undefined;
18
+ /**
19
+ * The values the calculation read from the resource. A `line` source has `amount`, and `unitPrice` where a step read the line's rate.
20
+ */
21
+ asUsed?: {
22
+ [k: string]: any;
23
+ } | undefined;
24
+ /**
25
+ * `storedRow` only: why the stored figure stands. An open set, so it is a string rather than an enum: known values are `precedes_timeline`, `no_timeline`, `not_derived`, `no_covering_charge`, and new values may be added.
26
+ */
27
+ reason?: string | undefined;
28
+ };
29
+ /** @internal */
30
+ export declare const LineCalculationSource$inboundSchema: z.ZodType<LineCalculationSource, z.ZodTypeDef, unknown>;
31
+ export declare function lineCalculationSourceFromJSON(jsonString: string): SafeParseResult<LineCalculationSource, SDKValidationError>;
32
+ //# sourceMappingURL=linecalculationsource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationsource.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationsource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const LineCalculationSource$inboundSchema = z.object({
8
+ type: z.string(),
9
+ ref: z.record(z.any()).optional(),
10
+ asUsed: z.record(z.any()).optional(),
11
+ reason: z.string().optional(),
12
+ });
13
+ export function lineCalculationSourceFromJSON(jsonString) {
14
+ return safeParse(jsonString, (x) => LineCalculationSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationSource' from JSON`);
15
+ }
16
+ //# sourceMappingURL=linecalculationsource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationsource.js","sourceRoot":"","sources":["../../../src/models/linecalculationsource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA0B9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,50 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { LineCalculationContribution } from "./linecalculationcontribution.js";
5
+ import { LineCalculationValue } from "./linecalculationvalue.js";
6
+ /**
7
+ * One step: the value it changed (`on`), the value before (`in`) and after (`out`), the rule's parameters, and the source of the rule. A reader that does not know an op shows it as "in → out, because source".
8
+ */
9
+ export type LineCalculationStep = {
10
+ /**
11
+ * `allow`: units a grant covered (`covered`). `clamp`: `min` and `max`, null when open. `scaleToBound`: a minimum or maximum applied to a group of lines by uniform scaling (`bound`, `side`, `measured`, `factor`). `setToBound`: a minimum applied to a group that measured zero (`bound`, `sumOfShares`). `prorate`: `fraction` of the period, with the `billed` and full (`of`) windows and the `basis`. `evaluate`: the one join of quantity and price into an amount (`quantity`, `selector`, `fn`, `applied`); its `in` is null. `cap`: `max` and `scope`; on an `invoice` cap also `total`, what the cap started at, and `usedBefore`, what earlier credits took from it. `replace`: a value set by a rule, with `reason`. `subtract`: `units`. `scale`: ordered `terms`, each `by`, `value` and `label`. A `subtract`, `clamp` or `scale` that did not use the envelope's precision says so in `arithmetic`: `float64` or `decimal120`. `round`: `scale` and `mode`. An open set, so it is a string rather than an enum: known values are `allow`, `clamp`, `scaleToBound`, `setToBound`, `prorate`, `evaluate`, `cap`, `replace`, `subtract`, `scale`, `round`, and new values may be added.
12
+ */
13
+ op: string;
14
+ /**
15
+ * The value the step changes. `quantity`, `selector` (the quantity a volume band is chosen on), `price` and `amount` are reserved; other names may be added.
16
+ */
17
+ on: string;
18
+ /**
19
+ * The value before the step. Null only on `evaluate`.
20
+ */
21
+ in: LineCalculationValue | null;
22
+ /**
23
+ * A decimal string, or a price function.
24
+ */
25
+ out: LineCalculationValue;
26
+ /**
27
+ * The parameters of the op. See `op`.
28
+ */
29
+ params: {
30
+ [k: string]: any;
31
+ };
32
+ /**
33
+ * The key of the source in `sources` whose rule this is.
34
+ */
35
+ source: string;
36
+ /**
37
+ * The other lines a group rule read, with each one's value and period share.
38
+ */
39
+ inputsFrom?: Array<LineCalculationContribution> | undefined;
40
+ /**
41
+ * Reserved for an `evaluate` of a custom pricing function: the steps inside it, each of the same shape as a step. Free-form here so the schema does not refer to itself. Nothing produces it yet.
42
+ */
43
+ trace?: Array<{
44
+ [k: string]: any;
45
+ }> | undefined;
46
+ };
47
+ /** @internal */
48
+ export declare const LineCalculationStep$inboundSchema: z.ZodType<LineCalculationStep, z.ZodTypeDef, unknown>;
49
+ export declare function lineCalculationStepFromJSON(jsonString: string): SafeParseResult<LineCalculationStep, SDKValidationError>;
50
+ //# sourceMappingURL=linecalculationstep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationstep.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationstep.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,2BAA2B,EAE5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,GAAG,EAAE,oBAAoB,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC,GAAG,SAAS,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAUP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { LineCalculationContribution$inboundSchema, } from "./linecalculationcontribution.js";
7
+ import { LineCalculationValue$inboundSchema, } from "./linecalculationvalue.js";
8
+ /** @internal */
9
+ export const LineCalculationStep$inboundSchema = z.object({
10
+ op: z.string(),
11
+ on: z.string(),
12
+ in: z.nullable(LineCalculationValue$inboundSchema),
13
+ out: LineCalculationValue$inboundSchema,
14
+ params: z.record(z.any()),
15
+ source: z.string(),
16
+ inputsFrom: z.array(LineCalculationContribution$inboundSchema).optional(),
17
+ trace: z.array(z.record(z.any())).optional(),
18
+ });
19
+ export function lineCalculationStepFromJSON(jsonString) {
20
+ return safeParse(jsonString, (x) => LineCalculationStep$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationStep' from JSON`);
21
+ }
22
+ //# sourceMappingURL=linecalculationstep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationstep.js","sourceRoot":"","sources":["../../../src/models/linecalculationstep.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,yCAAyC,GAC1C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,kCAAkC,GACnC,MAAM,2BAA2B,CAAC;AAwCnC,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAClD,GAAG,EAAE,kCAAkC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC,QAAQ,EAAE;IACzE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { LineCalculationPriceFn } from "./linecalculationpricefn.js";
5
+ /**
6
+ * A decimal string, or a price function.
7
+ */
8
+ export type LineCalculationValue = LineCalculationPriceFn | string;
9
+ /** @internal */
10
+ export declare const LineCalculationValue$inboundSchema: z.ZodType<LineCalculationValue, z.ZodTypeDef, unknown>;
11
+ export declare function lineCalculationValueFromJSON(jsonString: string): SafeParseResult<LineCalculationValue, SDKValidationError>;
12
+ //# sourceMappingURL=linecalculationvalue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationvalue.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationvalue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,sBAAsB,EAEvB,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,GAAG,MAAM,CAAC;AAEnE,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,oBAAoB,EACpB,CAAC,CAAC,UAAU,EACZ,OAAO,CACsD,CAAC;AAEhE,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAM3D"}
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { LineCalculationPriceFn$inboundSchema, } from "./linecalculationpricefn.js";
7
+ /** @internal */
8
+ export const LineCalculationValue$inboundSchema = z.union([LineCalculationPriceFn$inboundSchema, z.string()]);
9
+ export function lineCalculationValueFromJSON(jsonString) {
10
+ return safeParse(jsonString, (x) => LineCalculationValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationValue' from JSON`);
11
+ }
12
+ //# sourceMappingURL=linecalculationvalue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linecalculationvalue.js","sourceRoot":"","sources":["../../../src/models/linecalculationvalue.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,oCAAoC,GACrC,MAAM,6BAA6B,CAAC;AAOrC,gBAAgB;AAChB,MAAM,CAAC,MAAM,kCAAkC,GAI3C,CAAC,CAAC,KAAK,CAAC,CAAC,oCAAoC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEhE,MAAM,UAAU,4BAA4B,CAC1C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9D,kDAAkD,CACnD,CAAC;AACJ,CAAC"}
@@ -2,6 +2,7 @@ import * as z from "zod/v3";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { LineProvenance } from "./lineprovenance.js";
5
6
  /**
6
7
  * The type of line item. 'discount' and 'adjustment' line items have negative subtotal/total amounts: 'discount' is a grant discount, 'adjustment' is a discount agreed on the subscription.
7
8
  */
@@ -147,6 +148,10 @@ export type LineItem = {
147
148
  * Real-time estimated subtotal for a line whose amount is not final yet: current usage for a metered item, the rate the subscription is on for a fee. Null for manual items, and for any line whose amount is already final or cannot be estimated.
148
149
  */
149
150
  estimatedSubtotal?: string | null | undefined;
151
+ /**
152
+ * How the line's amount before tax was calculated: a trace of one evaluation, saved when the invoice was calculated and fixed once it is issued. Returned only with `expand=lineProvenance`. Every field but `status` is present when `status` is `recorded`. Every number is a plain decimal string.
153
+ */
154
+ provenance?: LineProvenance | undefined;
150
155
  };
151
156
  /** @internal */
152
157
  export declare const LineItemType$inboundSchema: z.ZodNativeEnum<typeof LineItemType>;
@@ -1 +1 @@
1
- {"version":3,"file":"lineitem.d.ts","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEzE,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,IAAI,EAAE,YAAY,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U,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,YAAY,CAChD,CAAC;AAE7B,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,aAAa,CACxD,OAAO,cAAc,CACS,CAAC;AAEjC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,aAAa,CAC7D,OAAO,mBAAmB,CACS,CAAC;AAEtC,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAC5C,QAAQ,EACR,CAAC,CAAC,UAAU,EACZ,OAAO,CAkCP,CAAC;AAEH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAM/C"}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as z from "zod/v3";
5
5
  import { safeParse } from "../lib/schemas.js";
6
+ import { LineProvenance$inboundSchema, } from "./lineprovenance.js";
6
7
  /**
7
8
  * The type of line item. 'discount' and 'adjustment' line items have negative subtotal/total amounts: 'discount' is a grant discount, 'adjustment' is a discount agreed on the subscription.
8
9
  */
@@ -62,6 +63,7 @@ export const LineItem$inboundSchema = z.object({
62
63
  updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
63
64
  estimatedMeteredQuantity: z.nullable(z.string()).optional(),
64
65
  estimatedSubtotal: z.nullable(z.string()).optional(),
66
+ provenance: LineProvenance$inboundSchema.optional(),
65
67
  });
66
68
  export function lineItemFromJSON(jsonString) {
67
69
  return safeParse(jsonString, (x) => LineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItem' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"lineitem.js","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;CAChB,CAAC;AAMX;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAMX;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;CACf,CAAC;AAqHX,gBAAgB;AAChB,MAAM,CAAC,MAAM,0BAA0B,GACrC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAE7B,gBAAgB;AAChB,MAAM,CAAC,MAAM,4BAA4B,GAErC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;AAEjC,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAE1C,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AAEtC,gBAAgB;AAChB,MAAM,CAAC,MAAM,sBAAsB,GAI/B,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,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