@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,69 @@
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 { LineCalculationInputs } from "./linecalculationinputs.js";
5
+ import { LineCalculationNotApplied } from "./linecalculationnotapplied.js";
6
+ import { LineCalculationPeriod } from "./linecalculationperiod.js";
7
+ import { LineCalculationPrecision } from "./linecalculationprecision.js";
8
+ import { LineCalculationResult } from "./linecalculationresult.js";
9
+ import { LineCalculationSource } from "./linecalculationsource.js";
10
+ import { LineCalculationStep } from "./linecalculationstep.js";
11
+ /**
12
+ * 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.
13
+ */
14
+ export type LineProvenance = {
15
+ /**
16
+ * `recorded`: the trace is present. `notRecorded`: the line was calculated but has no saved trace, for example a line calculated before traces were saved (show "Calculation not recorded"). `pending`: the line's invoice has not been calculated yet. An open set, so it is a string rather than an enum: known values are `recorded`, `notRecorded`, `pending`, and new values may be added.
17
+ */
18
+ status: string;
19
+ /**
20
+ * The format version. It changes only when a field is removed or renamed, or a field changes meaning. A new op, source type, price model, reason or label is not a new version.
21
+ */
22
+ version?: number | undefined;
23
+ /**
24
+ * The currency of every amount in the trace.
25
+ */
26
+ currency?: string | undefined;
27
+ /**
28
+ * The default arithmetic of every step. Any other rounding is an explicit `round` step.
29
+ */
30
+ precision?: LineCalculationPrecision | undefined;
31
+ /**
32
+ * The period the line bills.
33
+ */
34
+ period?: LineCalculationPeriod | undefined;
35
+ /**
36
+ * When the calculation ran.
37
+ */
38
+ calculatedAt?: Date | undefined;
39
+ /**
40
+ * The subscription the line belongs to.
41
+ */
42
+ subscriptionId?: string | undefined;
43
+ /**
44
+ * The values the evaluation started from.
45
+ */
46
+ inputs?: LineCalculationInputs | undefined;
47
+ /**
48
+ * Every source a step or an input names, by key.
49
+ */
50
+ sources?: {
51
+ [k: string]: LineCalculationSource;
52
+ } | undefined;
53
+ /**
54
+ * The steps in the order they were applied. Each starts where the last step on the same value ended.
55
+ */
56
+ steps?: Array<LineCalculationStep> | undefined;
57
+ /**
58
+ * Rules in force for the line that did not change it, and why.
59
+ */
60
+ notApplied?: Array<LineCalculationNotApplied> | undefined;
61
+ /**
62
+ * Equal to the line's stored amount, quantity and unit price.
63
+ */
64
+ result?: LineCalculationResult | undefined;
65
+ };
66
+ /** @internal */
67
+ export declare const LineProvenance$inboundSchema: z.ZodType<LineProvenance, z.ZodTypeDef, unknown>;
68
+ export declare function lineProvenanceFromJSON(jsonString: string): SafeParseResult<LineProvenance, SDKValidationError>;
69
+ //# sourceMappingURL=lineprovenance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineprovenance.d.ts","sourceRoot":"","sources":["../../../src/models/lineprovenance.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,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,yBAAyB,EAE1B,MAA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,CAAC,CAAC,UAAU,EACZ,OAAO,CAgBP,CAAC;AAEH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAMrD"}
@@ -0,0 +1,31 @@
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 { LineCalculationInputs$inboundSchema, } from "./linecalculationinputs.js";
7
+ import { LineCalculationNotApplied$inboundSchema, } from "./linecalculationnotapplied.js";
8
+ import { LineCalculationPeriod$inboundSchema, } from "./linecalculationperiod.js";
9
+ import { LineCalculationPrecision$inboundSchema, } from "./linecalculationprecision.js";
10
+ import { LineCalculationResult$inboundSchema, } from "./linecalculationresult.js";
11
+ import { LineCalculationSource$inboundSchema, } from "./linecalculationsource.js";
12
+ import { LineCalculationStep$inboundSchema, } from "./linecalculationstep.js";
13
+ /** @internal */
14
+ export const LineProvenance$inboundSchema = z.object({
15
+ status: z.string(),
16
+ version: z.number().int().optional(),
17
+ currency: z.string().optional(),
18
+ precision: LineCalculationPrecision$inboundSchema.optional(),
19
+ period: LineCalculationPeriod$inboundSchema.optional(),
20
+ calculatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
21
+ subscriptionId: z.string().optional(),
22
+ inputs: LineCalculationInputs$inboundSchema.optional(),
23
+ sources: z.record(LineCalculationSource$inboundSchema).optional(),
24
+ steps: z.array(LineCalculationStep$inboundSchema).optional(),
25
+ notApplied: z.array(LineCalculationNotApplied$inboundSchema).optional(),
26
+ result: LineCalculationResult$inboundSchema.optional(),
27
+ });
28
+ export function lineProvenanceFromJSON(jsonString) {
29
+ return safeParse(jsonString, (x) => LineProvenance$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineProvenance' from JSON`);
30
+ }
31
+ //# sourceMappingURL=lineprovenance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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AAM,CAAC,mCAAmC,CAAC,CAAC,QAAQ,EAAE;IACjE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;IAC5D,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC,QAAQ,EAAE;IACvE,MAAM,EAAE,mCAAmC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEH,MAAM,UAAU,sBAAsB,CACpC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4BAA4B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxD,4CAA4C,CAC7C,CAAC;AACJ,CAAC"}
@@ -5,7 +5,7 @@ export type GetInvoiceRequest = {
5
5
  */
6
6
  id: string;
7
7
  /**
8
- * Comma-separated list of fields to expand. Supports: lineItems, items. `items` resolves each returned line's item and its external accounting codes into an `items` collection inside the lineItems block; because those ids come from the lines, requesting `items` also expands `lineItems` on its default paging.
8
+ * Comma-separated list of fields to expand. Supports: lineItems, items, lineProvenance. `items` resolves each returned line's item and its external accounting codes into an `items` collection inside the lineItems block; because those ids come from the lines, requesting `items` also expands `lineItems` on its default paging. `lineProvenance` adds `provenance` to each returned line: how its amount before tax was calculated. It also expands `lineItems`.
9
9
  */
10
10
  expand?: string | undefined;
11
11
  /**
@@ -13,7 +13,7 @@ export type GetInvoiceLineItemsRequest = {
13
13
  */
14
14
  pageToken?: string | undefined;
15
15
  /**
16
- * Comma-separated list of fields to expand. Supports: items — resolves each returned line's item and that item's external accounting codes into an `items` collection, so a line can be translated to a GL/SKU code without a second call.
16
+ * Comma-separated list of fields to expand. Supports: items, lineProvenance. `items` resolves each returned line's item and that item's external accounting codes into an `items` collection, so a line can be translated to a GL/SKU code without a second call. `lineProvenance` adds `provenance` to each returned line: how its amount before tax was calculated.
17
17
  */
18
18
  expand?: string | undefined;
19
19
  /**
@@ -25,7 +25,7 @@ export type ListLineItemsRequest = {
25
25
  */
26
26
  invoiceId?: string | undefined;
27
27
  /**
28
- * Comma-separated list of fields to expand. Supports: items — resolves each returned line's item and that item's external accounting codes into an `items` collection, so a line can be translated to a GL/SKU code without a second call.
28
+ * Comma-separated list of fields to expand. Supports: items, lineProvenance. `items` resolves each returned line's item and that item's external accounting codes into an `items` collection, so a line can be translated to a GL/SKU code without a second call. `lineProvenance` adds `provenance` to each returned line: how its amount before tax was calculated.
29
29
  */
30
30
  expand?: string | undefined;
31
31
  /**
@@ -40,7 +40,10 @@ export type ListSubscriptionsRequest = {
40
40
  * Number of subscriptions to skip
41
41
  */
42
42
  offset?: string | undefined;
43
- status?: ListSubscriptionsStatus | undefined;
43
+ /**
44
+ * Return subscriptions in any of these statuses. Repeat the parameter to pass several, e.g. `?status=active&status=pending_payment`. Omit it to return every status. An SDK leaves an empty list out of the request, so an empty list also returns every status: check for one before calling if it should match nothing.
45
+ */
46
+ status?: Array<ListSubscriptionsStatus> | undefined;
44
47
  /**
45
48
  * Filter subscriptions started at or before this ISO 8601 date-time
46
49
  */
@@ -71,7 +74,7 @@ export type ListSubscriptionsRequest$Outbound = {
71
74
  limit: string;
72
75
  merchantId?: string | undefined;
73
76
  offset: string;
74
- status?: string | undefined;
77
+ status?: Array<string> | undefined;
75
78
  startedBefore?: string | undefined;
76
79
  include?: string | undefined;
77
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"listsubscriptions.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/listsubscriptions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,eAAO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KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CAUxB,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR;AAED,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"}
@@ -27,7 +27,7 @@ export const ListSubscriptionsRequest$outboundSchema = z.object({
27
27
  limit: z.string().default("10"),
28
28
  merchantId: z.string().optional(),
29
29
  offset: z.string().default("0"),
30
- status: ListSubscriptionsStatus$outboundSchema.optional(),
30
+ status: z.array(ListSubscriptionsStatus$outboundSchema).optional(),
31
31
  startedBefore: z.date().transform(v => v.toISOString()).optional(),
32
32
  include: Include$outboundSchema.optional(),
33
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"listsubscriptions.js","sourceRoot":"","sources":["../../../../src/models/operations/listsubscriptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;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10.1",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paygentic/sdk",
3
- "version": "0.9.18",
3
+ "version": "0.10.1",
4
4
  "author": "Speakeasy",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "0.1.0",
68
- sdkVersion: "0.9.18",
68
+ sdkVersion: "0.10.1",
69
69
  genVersion: "2.879.13",
70
- userAgent: "speakeasy-sdk/typescript 0.9.18 2.879.13 0.1.0 @paygentic/sdk",
70
+ userAgent: "speakeasy-sdk/typescript 0.10.1 2.879.13 0.1.0 @paygentic/sdk",
71
71
  } as const;
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ /**
9
+ * Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.
10
+ */
11
+ export const AuthorizationDenialReason = {
12
+ NoPermission: "no_permission",
13
+ InsufficientScope: "insufficient_scope",
14
+ NotMember: "not_member",
15
+ } as const;
16
+ /**
17
+ * Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.
18
+ */
19
+ export type AuthorizationDenialReason = ClosedEnum<
20
+ typeof AuthorizationDenialReason
21
+ >;
22
+
23
+ /** @internal */
24
+ export const AuthorizationDenialReason$inboundSchema: z.ZodNativeEnum<
25
+ typeof AuthorizationDenialReason
26
+ > = z.nativeEnum(AuthorizationDenialReason);
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import * as models from "../index.js";
6
7
  import { PaygenticError } from "./paygenticerror.js";
7
8
 
8
9
  export type ErrorTData = {
@@ -22,6 +23,14 @@ export type ErrorTData = {
22
23
  * Additional error details
23
24
  */
24
25
  details?: { [k: string]: any } | undefined;
26
+ /**
27
+ * Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.
28
+ */
29
+ reason?: models.AuthorizationDenialReason | undefined;
30
+ /**
31
+ * Present on a 403 from the authorization check. The permissions the caller needs for this request.
32
+ */
33
+ requiredPermissions?: Array<string> | undefined;
25
34
  };
26
35
 
27
36
  export class ErrorT extends PaygenticError {
@@ -37,6 +46,14 @@ export class ErrorT extends PaygenticError {
37
46
  * Additional error details
38
47
  */
39
48
  details?: { [k: string]: any } | undefined;
49
+ /**
50
+ * Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.
51
+ */
52
+ reason?: models.AuthorizationDenialReason | undefined;
53
+ /**
54
+ * Present on a 403 from the authorization check. The permissions the caller needs for this request.
55
+ */
56
+ requiredPermissions?: Array<string> | undefined;
40
57
 
41
58
  /** The original data that was passed to this error instance. */
42
59
  data$: ErrorTData;
@@ -51,6 +68,10 @@ export class ErrorT extends PaygenticError {
51
68
  if (err.error != null) this.error = err.error;
52
69
  if (err.code != null) this.code = err.code;
53
70
  if (err.details != null) this.details = err.details;
71
+ if (err.reason != null) this.reason = err.reason;
72
+ if (err.requiredPermissions != null) {
73
+ this.requiredPermissions = err.requiredPermissions;
74
+ }
54
75
 
55
76
  this.name = "ErrorT";
56
77
  }
@@ -63,6 +84,8 @@ export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
63
84
  message: z.string(),
64
85
  code: z.string().optional(),
65
86
  details: z.record(z.any()).optional(),
87
+ reason: models.AuthorizationDenialReason$inboundSchema.optional(),
88
+ requiredPermissions: z.array(z.string()).optional(),
66
89
  request$: z.instanceof(Request),
67
90
  response$: z.instanceof(Response),
68
91
  body$: z.string(),
@@ -26,6 +26,14 @@ export type UnprocessableEntityErrorData = {
26
26
  * Additional error details
27
27
  */
28
28
  details?: { [k: string]: any } | undefined;
29
+ /**
30
+ * Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.
31
+ */
32
+ reason?: models.AuthorizationDenialReason | undefined;
33
+ /**
34
+ * Present on a 403 from the authorization check. The permissions the caller needs for this request.
35
+ */
36
+ requiredPermissions?: Array<string> | undefined;
29
37
  };
30
38
 
31
39
  /**
@@ -44,6 +52,14 @@ export class UnprocessableEntityError extends PaygenticError {
44
52
  * Additional error details
45
53
  */
46
54
  details?: { [k: string]: any } | undefined;
55
+ /**
56
+ * Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.
57
+ */
58
+ reason?: models.AuthorizationDenialReason | undefined;
59
+ /**
60
+ * Present on a 403 from the authorization check. The permissions the caller needs for this request.
61
+ */
62
+ requiredPermissions?: Array<string> | undefined;
47
63
 
48
64
  /** The original data that was passed to this error instance. */
49
65
  data$: UnprocessableEntityErrorData;
@@ -58,6 +74,10 @@ export class UnprocessableEntityError extends PaygenticError {
58
74
  this.error = err.error;
59
75
  this.code = err.code;
60
76
  if (err.details != null) this.details = err.details;
77
+ if (err.reason != null) this.reason = err.reason;
78
+ if (err.requiredPermissions != null) {
79
+ this.requiredPermissions = err.requiredPermissions;
80
+ }
61
81
 
62
82
  this.name = "UnprocessableEntityError";
63
83
  }
@@ -73,6 +93,8 @@ export const UnprocessableEntityError$inboundSchema: z.ZodType<
73
93
  message: z.string(),
74
94
  code: models.InvoicePaymentLinkErrorCode$inboundSchema,
75
95
  details: z.record(z.any()).optional(),
96
+ reason: models.AuthorizationDenialReason$inboundSchema.optional(),
97
+ requiredPermissions: z.array(z.string()).optional(),
76
98
  request$: z.instanceof(Request),
77
99
  response$: z.instanceof(Response),
78
100
  body$: z.string(),
@@ -6,6 +6,7 @@ export * from "./accountfigure.js";
6
6
  export * from "./address.js";
7
7
  export * from "./approval.js";
8
8
  export * from "./approvallist.js";
9
+ export * from "./authorizationdenialreason.js";
9
10
  export * from "./billablemetric.js";
10
11
  export * from "./billingschedule.js";
11
12
  export * from "./booleanentitlementdetail.js";
@@ -61,9 +62,23 @@ export * from "./invoicerefundlist.js";
61
62
  export * from "./invoicesummary.js";
62
63
  export * from "./issueentitlementrequest.js";
63
64
  export * from "./item.js";
65
+ export * from "./linecalculationcontribution.js";
66
+ export * from "./linecalculationgiven.js";
67
+ export * from "./linecalculationinputprice.js";
68
+ export * from "./linecalculationinputs.js";
69
+ export * from "./linecalculationnotapplied.js";
70
+ export * from "./linecalculationperiod.js";
71
+ export * from "./linecalculationprecision.js";
72
+ export * from "./linecalculationpriceband.js";
73
+ export * from "./linecalculationpricefn.js";
74
+ export * from "./linecalculationresult.js";
75
+ export * from "./linecalculationsource.js";
76
+ export * from "./linecalculationstep.js";
77
+ export * from "./linecalculationvalue.js";
64
78
  export * from "./lineitem.js";
65
79
  export * from "./lineitemsresponse.js";
66
80
  export * from "./lineitemssummary.js";
81
+ export * from "./lineprovenance.js";
67
82
  export * from "./mappingcapabilities.js";
68
83
  export * from "./merchantintegration.js";
69
84
  export * from "./merchantintegrationprovider.js";
@@ -7,6 +7,10 @@ import { safeParse } from "../lib/schemas.js";
7
7
  import { ClosedEnum } from "../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../types/fp.js";
9
9
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+ import {
11
+ LineProvenance,
12
+ LineProvenance$inboundSchema,
13
+ } from "./lineprovenance.js";
10
14
 
11
15
  /**
12
16
  * Type of event: 'usage' for billable metric events, 'fee' for fee events, 'discount' for grant discount line items (subtotal/total are negative, representing a credit)
@@ -134,6 +138,10 @@ export type InvoiceLineItem = {
134
138
  * Unit price in decimal dollars
135
139
  */
136
140
  unitPrice: string;
141
+ /**
142
+ * 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.
143
+ */
144
+ provenance?: LineProvenance | undefined;
137
145
  };
138
146
 
139
147
  /** @internal */
@@ -179,6 +187,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
179
187
  totalPrice: z.string(),
180
188
  totalTax: z.string(),
181
189
  unitPrice: z.string(),
190
+ provenance: LineProvenance$inboundSchema.optional(),
182
191
  });
183
192
 
184
193
  export function invoiceLineItemFromJSON(
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
+
10
+ export type LineCalculationContribution = {
11
+ lineItemId: string;
12
+ value: string;
13
+ share: string | null;
14
+ };
15
+
16
+ /** @internal */
17
+ export const LineCalculationContribution$inboundSchema: z.ZodType<
18
+ LineCalculationContribution,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ lineItemId: z.string(),
23
+ value: z.string(),
24
+ share: z.nullable(z.string()),
25
+ });
26
+
27
+ export function lineCalculationContributionFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<LineCalculationContribution, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => LineCalculationContribution$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'LineCalculationContribution' from JSON`,
34
+ );
35
+ }
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * A value the evaluation started from, and its source.
12
+ */
13
+ export type LineCalculationGiven = {
14
+ /**
15
+ * The value.
16
+ */
17
+ value: string;
18
+ /**
19
+ * The key of the source in `sources` that stated it.
20
+ */
21
+ source: string;
22
+ };
23
+
24
+ /** @internal */
25
+ export const LineCalculationGiven$inboundSchema: z.ZodType<
26
+ LineCalculationGiven,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ value: z.string(),
31
+ source: z.string(),
32
+ });
33
+
34
+ export function lineCalculationGivenFromJSON(
35
+ jsonString: string,
36
+ ): SafeParseResult<LineCalculationGiven, SDKValidationError> {
37
+ return safeParse(
38
+ jsonString,
39
+ (x) => LineCalculationGiven$inboundSchema.parse(JSON.parse(x)),
40
+ `Failed to parse 'LineCalculationGiven' from JSON`,
41
+ );
42
+ }
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
+ import {
10
+ LineCalculationPriceFn,
11
+ LineCalculationPriceFn$inboundSchema,
12
+ } from "./linecalculationpricefn.js";
13
+
14
+ /**
15
+ * `priced` only: the price as a function, and its source.
16
+ */
17
+ export type LineCalculationInputPrice = {
18
+ /**
19
+ * A price as a function from quantity to money. A new model may carry fields not listed here.
20
+ */
21
+ fn: LineCalculationPriceFn;
22
+ /**
23
+ * The key of the source in `sources` that stated the price.
24
+ */
25
+ source: string;
26
+ };
27
+
28
+ /** @internal */
29
+ export const LineCalculationInputPrice$inboundSchema: z.ZodType<
30
+ LineCalculationInputPrice,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ fn: LineCalculationPriceFn$inboundSchema,
35
+ source: z.string(),
36
+ });
37
+
38
+ export function lineCalculationInputPriceFromJSON(
39
+ jsonString: string,
40
+ ): SafeParseResult<LineCalculationInputPrice, SDKValidationError> {
41
+ return safeParse(
42
+ jsonString,
43
+ (x) => LineCalculationInputPrice$inboundSchema.parse(JSON.parse(x)),
44
+ `Failed to parse 'LineCalculationInputPrice' from JSON`,
45
+ );
46
+ }
@@ -0,0 +1,65 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
+ import {
10
+ LineCalculationGiven,
11
+ LineCalculationGiven$inboundSchema,
12
+ } from "./linecalculationgiven.js";
13
+ import {
14
+ LineCalculationInputPrice,
15
+ LineCalculationInputPrice$inboundSchema,
16
+ } from "./linecalculationinputprice.js";
17
+
18
+ /**
19
+ * The values the evaluation started from.
20
+ */
21
+ export type LineCalculationInputs = {
22
+ /**
23
+ * `priced`: a charge from a price, with `quantity`, `selector` and `price`. `fromLine`: a line whose base is another line's amount, with `amount`. `given`: an amount nobody priced on this run, with `amount`. An open set, so it is a string rather than an enum: known values are `priced`, `fromLine`, `given`, and new values may be added.
24
+ */
25
+ kind: string;
26
+ /**
27
+ * A value the evaluation started from, and its source.
28
+ */
29
+ quantity?: LineCalculationGiven | undefined;
30
+ /**
31
+ * A value the evaluation started from, and its source.
32
+ */
33
+ selector?: LineCalculationGiven | undefined;
34
+ /**
35
+ * `priced` only: the price as a function, and its source.
36
+ */
37
+ price?: LineCalculationInputPrice | undefined;
38
+ /**
39
+ * A value the evaluation started from, and its source.
40
+ */
41
+ amount?: LineCalculationGiven | undefined;
42
+ };
43
+
44
+ /** @internal */
45
+ export const LineCalculationInputs$inboundSchema: z.ZodType<
46
+ LineCalculationInputs,
47
+ z.ZodTypeDef,
48
+ unknown
49
+ > = z.object({
50
+ kind: z.string(),
51
+ quantity: LineCalculationGiven$inboundSchema.optional(),
52
+ selector: LineCalculationGiven$inboundSchema.optional(),
53
+ price: LineCalculationInputPrice$inboundSchema.optional(),
54
+ amount: LineCalculationGiven$inboundSchema.optional(),
55
+ });
56
+
57
+ export function lineCalculationInputsFromJSON(
58
+ jsonString: string,
59
+ ): SafeParseResult<LineCalculationInputs, SDKValidationError> {
60
+ return safeParse(
61
+ jsonString,
62
+ (x) => LineCalculationInputs$inboundSchema.parse(JSON.parse(x)),
63
+ `Failed to parse 'LineCalculationInputs' from JSON`,
64
+ );
65
+ }