@paygentic/sdk 0.9.10 → 0.9.11

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 (30) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/models/costreportresponse.d.ts +20 -0
  4. package/dist/commonjs/models/costreportresponse.d.ts.map +1 -1
  5. package/dist/commonjs/models/costreportresponse.js +12 -1
  6. package/dist/commonjs/models/costreportresponse.js.map +1 -1
  7. package/dist/commonjs/models/invoice.d.ts +3 -3
  8. package/dist/commonjs/models/invoice.js +1 -1
  9. package/dist/commonjs/models/profitabilitysummaryresponse.d.ts +20 -0
  10. package/dist/commonjs/models/profitabilitysummaryresponse.d.ts.map +1 -1
  11. package/dist/commonjs/models/profitabilitysummaryresponse.js +11 -1
  12. package/dist/commonjs/models/profitabilitysummaryresponse.js.map +1 -1
  13. package/dist/esm/lib/config.d.ts +2 -2
  14. package/dist/esm/lib/config.js +2 -2
  15. package/dist/esm/models/costreportresponse.d.ts +20 -0
  16. package/dist/esm/models/costreportresponse.d.ts.map +1 -1
  17. package/dist/esm/models/costreportresponse.js +10 -0
  18. package/dist/esm/models/costreportresponse.js.map +1 -1
  19. package/dist/esm/models/invoice.d.ts +3 -3
  20. package/dist/esm/models/invoice.js +1 -1
  21. package/dist/esm/models/profitabilitysummaryresponse.d.ts +20 -0
  22. package/dist/esm/models/profitabilitysummaryresponse.d.ts.map +1 -1
  23. package/dist/esm/models/profitabilitysummaryresponse.js +9 -0
  24. package/dist/esm/models/profitabilitysummaryresponse.js.map +1 -1
  25. package/jsr.json +1 -1
  26. package/package.json +1 -1
  27. package/src/lib/config.ts +2 -2
  28. package/src/models/costreportresponse.ts +40 -0
  29. package/src/models/invoice.ts +3 -3
  30. package/src/models/profitabilitysummaryresponse.ts +42 -0
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
31
31
  export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "0.1.0";
34
- readonly sdkVersion: "0.9.10";
34
+ readonly sdkVersion: "0.9.11";
35
35
  readonly genVersion: "2.879.13";
36
- readonly userAgent: "speakeasy-sdk/typescript 0.9.10 2.879.13 0.1.0 @paygentic/sdk";
36
+ readonly userAgent: "speakeasy-sdk/typescript 0.9.11 2.879.13 0.1.0 @paygentic/sdk";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -35,8 +35,8 @@ function serverURLFromOptions(options) {
35
35
  exports.SDK_METADATA = {
36
36
  language: "typescript",
37
37
  openapiDocVersion: "0.1.0",
38
- sdkVersion: "0.9.10",
38
+ sdkVersion: "0.9.11",
39
39
  genVersion: "2.879.13",
40
- userAgent: "speakeasy-sdk/typescript 0.9.10 2.879.13 0.1.0 @paygentic/sdk",
40
+ userAgent: "speakeasy-sdk/typescript 0.9.11 2.879.13 0.1.0 @paygentic/sdk",
41
41
  };
42
42
  //# sourceMappingURL=config.js.map
@@ -17,6 +17,19 @@ export type Pagination = {
17
17
  limit: number;
18
18
  offset: number;
19
19
  };
20
+ /**
21
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
22
+ */
23
+ export type CostReportResponseCostRange = {
24
+ /**
25
+ * Earliest cost event instant.
26
+ */
27
+ from: Date;
28
+ /**
29
+ * Latest cost event instant.
30
+ */
31
+ to: Date;
32
+ };
20
33
  export type CostReportResponse = {
21
34
  object: CostReportResponseObject;
22
35
  /**
@@ -53,6 +66,10 @@ export type CostReportResponse = {
53
66
  */
54
67
  warnings?: Array<string> | undefined;
55
68
  pagination: Pagination;
69
+ /**
70
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
71
+ */
72
+ costRange?: CostReportResponseCostRange | null | undefined;
56
73
  };
57
74
  /** @internal */
58
75
  export declare const CostReportResponseObject$inboundSchema: z.ZodNativeEnum<typeof CostReportResponseObject>;
@@ -63,6 +80,9 @@ export declare function periodFromJSON(jsonString: string): SafeParseResult<Peri
63
80
  export declare const Pagination$inboundSchema: z.ZodType<Pagination, z.ZodTypeDef, unknown>;
64
81
  export declare function paginationFromJSON(jsonString: string): SafeParseResult<Pagination, SDKValidationError>;
65
82
  /** @internal */
83
+ export declare const CostReportResponseCostRange$inboundSchema: z.ZodType<CostReportResponseCostRange, z.ZodTypeDef, unknown>;
84
+ export declare function costReportResponseCostRangeFromJSON(jsonString: string): SafeParseResult<CostReportResponseCostRange, SDKValidationError>;
85
+ /** @internal */
66
86
  export declare const CostReportResponse$inboundSchema: z.ZodType<CostReportResponse, z.ZodTypeDef, unknown>;
67
87
  export declare function costReportResponseFromJSON(jsonString: string): SafeParseResult<CostReportResponse, SDKValidationError>;
68
88
  //# sourceMappingURL=costreportresponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"costreportresponse.d.ts","sourceRoot":"","sources":["../../../src/models/costreportresponse.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,EACL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,eAAO,MAAM,wBAAwB;;CAE3B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAA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AAO,CAKP,CAAC;AAEH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAMjD;AAED,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
1
+ {"version":3,"file":"costreportresponse.d.ts","sourceRoot":"","sources":["../../../src/models/costreportresponse.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,EACL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,eAAO,MAAM,wBAAwB;;CAE3B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,EAAE,EAAE,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,IAAI,CAAC;CACV,CAAC;AAEF,M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AC,CAAC,OAAO,CAC/D,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAMlE;AAED,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAeP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
@@ -36,9 +36,10 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.CostReportResponse$inboundSchema = exports.Pagination$inboundSchema = exports.Period$inboundSchema = exports.CostReportResponseObject$inboundSchema = exports.CostReportResponseObject = void 0;
39
+ exports.CostReportResponse$inboundSchema = exports.CostReportResponseCostRange$inboundSchema = exports.Pagination$inboundSchema = exports.Period$inboundSchema = exports.CostReportResponseObject$inboundSchema = exports.CostReportResponseObject = void 0;
40
40
  exports.periodFromJSON = periodFromJSON;
41
41
  exports.paginationFromJSON = paginationFromJSON;
42
+ exports.costReportResponseCostRangeFromJSON = costReportResponseCostRangeFromJSON;
42
43
  exports.costReportResponseFromJSON = costReportResponseFromJSON;
43
44
  const z = __importStar(require("zod/v3"));
44
45
  const schemas_js_1 = require("../lib/schemas.js");
@@ -68,6 +69,14 @@ function paginationFromJSON(jsonString) {
68
69
  return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Pagination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pagination' from JSON`);
69
70
  }
70
71
  /** @internal */
72
+ exports.CostReportResponseCostRange$inboundSchema = z.object({
73
+ from: z.string().datetime({ offset: true }).transform(v => new Date(v)),
74
+ to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
75
+ });
76
+ function costReportResponseCostRangeFromJSON(jsonString) {
77
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CostReportResponseCostRange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CostReportResponseCostRange' from JSON`);
78
+ }
79
+ /** @internal */
71
80
  exports.CostReportResponse$inboundSchema = z.object({
72
81
  object: exports.CostReportResponseObject$inboundSchema.default("cost_report"),
73
82
  currency: z.string(),
@@ -80,6 +89,8 @@ exports.CostReportResponse$inboundSchema = z.object({
80
89
  availableDimensions: z.array(z.string()),
81
90
  warnings: z.array(z.string()).optional(),
82
91
  pagination: z.lazy(() => exports.Pagination$inboundSchema),
92
+ costRange: z.nullable(z.lazy(() => exports.CostReportResponseCostRange$inboundSchema))
93
+ .optional(),
83
94
  });
84
95
  function costReportResponseFromJSON(jsonString) {
85
96
  return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CostReportResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CostReportResponse' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"costreportresponse.js","sourceRoot":"","sources":["../../../src/models/costreportresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFH,wCAQC;AAaD,gDAQC;AAqBD,gEAQC;AA5ID,0CAA4B;AAC5B,kDAA8C;AAG9C,6DAG8B;AAC9B,uEAGmC;AAGtB,QAAA,wBAAwB,GAAG;IACtC,UAAU,EAAE,aAAa;CACjB,CAAC;AAsDX,gBAAgB;AACH,QAAA,sCAAsC,GAE/C,CAAC,CAAC,UAAU,CAAC,gCAAwB,CAAC,CAAC;AAE3C,gBAAgB;AACH,QAAA,oBAAoB,GAA6C,CAAC;KAC5E,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CA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CACxC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
@@ -51,7 +51,7 @@ export declare const PdfSource: {
51
51
  */
52
52
  export type PdfSource = ClosedEnum<typeof PdfSource>;
53
53
  /**
54
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
54
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
55
55
  */
56
56
  export declare const DocumentWithheldReason: {
57
57
  readonly TaxUnreconciled: "tax_unreconciled";
@@ -61,7 +61,7 @@ export declare const DocumentWithheldReason: {
61
61
  readonly TaxProviderDisagrees: "tax_provider_disagrees";
62
62
  };
63
63
  /**
64
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
64
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
65
65
  */
66
66
  export type DocumentWithheldReason = OpenEnum<typeof DocumentWithheldReason>;
67
67
  /**
@@ -213,7 +213,7 @@ export type Invoice = {
213
213
  */
214
214
  pdfSource?: PdfSource | null | undefined;
215
215
  /**
216
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
216
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
217
217
  */
218
218
  documentWithheldReason?: DocumentWithheldReason | null | undefined;
219
219
  /**
@@ -59,7 +59,7 @@ exports.PdfSource = {
59
59
  TaxProvider: "tax_provider",
60
60
  };
61
61
  /**
62
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
62
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
63
63
  */
64
64
  exports.DocumentWithheldReason = {
65
65
  TaxUnreconciled: "tax_unreconciled",
@@ -15,6 +15,19 @@ export type ProfitabilitySummaryResponseRevenueRange = {
15
15
  */
16
16
  to: Date;
17
17
  };
18
+ /**
19
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
20
+ */
21
+ export type ProfitabilitySummaryResponseCostRange = {
22
+ /**
23
+ * Earliest cost event instant.
24
+ */
25
+ from: Date;
26
+ /**
27
+ * Latest cost event instant.
28
+ */
29
+ to: Date;
30
+ };
18
31
  export type ProfitabilitySummaryResponse = {
19
32
  /**
20
33
  * Object type identifier
@@ -36,11 +49,18 @@ export type ProfitabilitySummaryResponse = {
36
49
  * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
37
50
  */
38
51
  revenueRange?: ProfitabilitySummaryResponseRevenueRange | null | undefined;
52
+ /**
53
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
54
+ */
55
+ costRange?: ProfitabilitySummaryResponseCostRange | null | undefined;
39
56
  };
40
57
  /** @internal */
41
58
  export declare const ProfitabilitySummaryResponseRevenueRange$inboundSchema: z.ZodType<ProfitabilitySummaryResponseRevenueRange, z.ZodTypeDef, unknown>;
42
59
  export declare function profitabilitySummaryResponseRevenueRangeFromJSON(jsonString: string): SafeParseResult<ProfitabilitySummaryResponseRevenueRange, SDKValidationError>;
43
60
  /** @internal */
61
+ export declare const ProfitabilitySummaryResponseCostRange$inboundSchema: z.ZodType<ProfitabilitySummaryResponseCostRange, z.ZodTypeDef, unknown>;
62
+ export declare function profitabilitySummaryResponseCostRangeFromJSON(jsonString: string): SafeParseResult<ProfitabilitySummaryResponseCostRange, SDKValidationError>;
63
+ /** @internal */
44
64
  export declare const ProfitabilitySummaryResponse$inboundSchema: z.ZodType<ProfitabilitySummaryResponse, z.ZodTypeDef, unknown>;
45
65
  export declare function profitabilitySummaryResponseFromJSON(jsonString: string): SafeParseResult<ProfitabilitySummaryResponse, SDKValidationError>;
46
66
  //# sourceMappingURL=profitabilitysummaryresponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profitabilitysummaryresponse.d.ts","sourceRoot":"","sources":["../../../src/models/profitabilitysummaryresponse.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,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,MAAM,EAAE,uBAAuB,CAAC;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,wCAAwC,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5E,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sDAAsD,EAAE,CAAC,CAAC,OAAO,CAC5E,wCAAwC,EACxC,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,gDAAgD,CAC9D,UAAU,EAAE,MAAM,GACjB,eAAe,CAChB,wCAAwC,EACxC,kBAAkB,CACnB,CASA;AAED,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAMnE"}
1
+ {"version":3,"file":"profitabilitysummaryresponse.d.ts","sourceRoot":"","sources":["../../../src/models/profitabilitysummaryresponse.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,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,wCAAwC,GA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O,CAYP,CAAC;AAEH,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAMnE"}
@@ -36,8 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.ProfitabilitySummaryResponse$inboundSchema = exports.ProfitabilitySummaryResponseRevenueRange$inboundSchema = void 0;
39
+ exports.ProfitabilitySummaryResponse$inboundSchema = exports.ProfitabilitySummaryResponseCostRange$inboundSchema = exports.ProfitabilitySummaryResponseRevenueRange$inboundSchema = void 0;
40
40
  exports.profitabilitySummaryResponseRevenueRangeFromJSON = profitabilitySummaryResponseRevenueRangeFromJSON;
41
+ exports.profitabilitySummaryResponseCostRangeFromJSON = profitabilitySummaryResponseCostRangeFromJSON;
41
42
  exports.profitabilitySummaryResponseFromJSON = profitabilitySummaryResponseFromJSON;
42
43
  const z = __importStar(require("zod/v3"));
43
44
  const schemas_js_1 = require("../lib/schemas.js");
@@ -51,12 +52,21 @@ function profitabilitySummaryResponseRevenueRangeFromJSON(jsonString) {
51
52
  return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProfitabilitySummaryResponseRevenueRange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProfitabilitySummaryResponseRevenueRange' from JSON`);
52
53
  }
53
54
  /** @internal */
55
+ exports.ProfitabilitySummaryResponseCostRange$inboundSchema = z.object({
56
+ from: z.string().datetime({ offset: true }).transform(v => new Date(v)),
57
+ to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
58
+ });
59
+ function profitabilitySummaryResponseCostRangeFromJSON(jsonString) {
60
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProfitabilitySummaryResponseCostRange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProfitabilitySummaryResponseCostRange' from JSON`);
61
+ }
62
+ /** @internal */
54
63
  exports.ProfitabilitySummaryResponse$inboundSchema = z.object({
55
64
  object: z.literal("profitability_summary"),
56
65
  currency: z.string(),
57
66
  rows: z.array(profitabilityrow_js_1.ProfitabilityRow$inboundSchema),
58
67
  warnings: z.array(z.string()).optional(),
59
68
  revenueRange: z.nullable(z.lazy(() => exports.ProfitabilitySummaryResponseRevenueRange$inboundSchema)).optional(),
69
+ costRange: z.nullable(z.lazy(() => exports.ProfitabilitySummaryResponseCostRange$inboundSchema)).optional(),
60
70
  });
61
71
  function profitabilitySummaryResponseFromJSON(jsonString) {
62
72
  return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProfitabilitySummaryResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProfitabilitySummaryResponse' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"profitabilitysummaryresponse.js","sourceRoot":"","sources":["../../../src/models/profitabilitysummaryresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DH,4GAcC;AAiBD,oFAQC;AA/FD,0CAA4B;AAC5B,kDAA8C;AAG9C,+DAG+B;AAuC/B,gBAAgB;AACH,QAAA,sDAAsD,GAI/D,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,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;IACvE,EAAE,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;CACtE,CAAC,CAAC;AAEH,SAAgB,gDAAgD,CAC9D,UAAkB;IAKlB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,8DAAsD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IACpB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,oDAA8B,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,CAAC,CAAC,QAAQ,CACtB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,8DAAsD,CAAC,CACrE,CAAC,QAAQ,EAAE;IACZ,SAAS,EAAE,CAAC,CAAC,QAAQ,CACnB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,2DAAmD,CAAC,CAClE,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAEH,SAAgB,oCAAoC,CAClD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kDAA0C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtE,0DAA0D,CAC3D,CAAC;AACJ,CAAC"}
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
31
31
  export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "0.1.0";
34
- readonly sdkVersion: "0.9.10";
34
+ readonly sdkVersion: "0.9.11";
35
35
  readonly genVersion: "2.879.13";
36
- readonly userAgent: "speakeasy-sdk/typescript 0.9.10 2.879.13 0.1.0 @paygentic/sdk";
36
+ readonly userAgent: "speakeasy-sdk/typescript 0.9.11 2.879.13 0.1.0 @paygentic/sdk";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -31,8 +31,8 @@ export function serverURLFromOptions(options) {
31
31
  export const SDK_METADATA = {
32
32
  language: "typescript",
33
33
  openapiDocVersion: "0.1.0",
34
- sdkVersion: "0.9.10",
34
+ sdkVersion: "0.9.11",
35
35
  genVersion: "2.879.13",
36
- userAgent: "speakeasy-sdk/typescript 0.9.10 2.879.13 0.1.0 @paygentic/sdk",
36
+ userAgent: "speakeasy-sdk/typescript 0.9.11 2.879.13 0.1.0 @paygentic/sdk",
37
37
  };
38
38
  //# sourceMappingURL=config.js.map
@@ -17,6 +17,19 @@ export type Pagination = {
17
17
  limit: number;
18
18
  offset: number;
19
19
  };
20
+ /**
21
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
22
+ */
23
+ export type CostReportResponseCostRange = {
24
+ /**
25
+ * Earliest cost event instant.
26
+ */
27
+ from: Date;
28
+ /**
29
+ * Latest cost event instant.
30
+ */
31
+ to: Date;
32
+ };
20
33
  export type CostReportResponse = {
21
34
  object: CostReportResponseObject;
22
35
  /**
@@ -53,6 +66,10 @@ export type CostReportResponse = {
53
66
  */
54
67
  warnings?: Array<string> | undefined;
55
68
  pagination: Pagination;
69
+ /**
70
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
71
+ */
72
+ costRange?: CostReportResponseCostRange | null | undefined;
56
73
  };
57
74
  /** @internal */
58
75
  export declare const CostReportResponseObject$inboundSchema: z.ZodNativeEnum<typeof CostReportResponseObject>;
@@ -63,6 +80,9 @@ export declare function periodFromJSON(jsonString: string): SafeParseResult<Peri
63
80
  export declare const Pagination$inboundSchema: z.ZodType<Pagination, z.ZodTypeDef, unknown>;
64
81
  export declare function paginationFromJSON(jsonString: string): SafeParseResult<Pagination, SDKValidationError>;
65
82
  /** @internal */
83
+ export declare const CostReportResponseCostRange$inboundSchema: z.ZodType<CostReportResponseCostRange, z.ZodTypeDef, unknown>;
84
+ export declare function costReportResponseCostRangeFromJSON(jsonString: string): SafeParseResult<CostReportResponseCostRange, SDKValidationError>;
85
+ /** @internal */
66
86
  export declare const CostReportResponse$inboundSchema: z.ZodType<CostReportResponse, z.ZodTypeDef, unknown>;
67
87
  export declare function costReportResponseFromJSON(jsonString: string): SafeParseResult<CostReportResponse, SDKValidationError>;
68
88
  //# sourceMappingURL=costreportresponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"costreportresponse.d.ts","sourceRoot":"","sources":["../../../src/models/costreportresponse.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,EACL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,eAAO,MAAM,wBAAwB;;CAE3B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,EAAE,EAAE,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,wBAAwB,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,KAAK,CAA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AAE,UAAU,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,aAAa,CAClE,OAAO,wBAAwB,CACS,CAAC;AAE3C,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAItE,CAAC;AAEL,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAM7C;AAED,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAC9C,UAAU,EACV,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAMjD;AAED,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAMlE;AAED,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAeP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
@@ -29,6 +29,14 @@ export function paginationFromJSON(jsonString) {
29
29
  return safeParse(jsonString, (x) => Pagination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pagination' from JSON`);
30
30
  }
31
31
  /** @internal */
32
+ export const CostReportResponseCostRange$inboundSchema = z.object({
33
+ from: z.string().datetime({ offset: true }).transform(v => new Date(v)),
34
+ to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
35
+ });
36
+ export function costReportResponseCostRangeFromJSON(jsonString) {
37
+ return safeParse(jsonString, (x) => CostReportResponseCostRange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CostReportResponseCostRange' from JSON`);
38
+ }
39
+ /** @internal */
32
40
  export const CostReportResponse$inboundSchema = z.object({
33
41
  object: CostReportResponseObject$inboundSchema.default("cost_report"),
34
42
  currency: z.string(),
@@ -41,6 +49,8 @@ export const CostReportResponse$inboundSchema = z.object({
41
49
  availableDimensions: z.array(z.string()),
42
50
  warnings: z.array(z.string()).optional(),
43
51
  pagination: z.lazy(() => Pagination$inboundSchema),
52
+ costRange: z.nullable(z.lazy(() => CostReportResponseCostRange$inboundSchema))
53
+ .optional(),
44
54
  });
45
55
  export function costReportResponseFromJSON(jsonString) {
46
56
  return safeParse(jsonString, (x) => CostReportResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CostReportResponse' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"costreportresponse.js","sourceRoot":"","sources":["../../../src/models/costreportresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,kCAAkC,GACnC,MAAM,2BAA2B,CAAC;AAGnC,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,aAAa;CACjB,CAAC;AAsDX,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAE/C,CAAC,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAE3C,gBAAgB;AAChB,MAAM,CAAC,MAAM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CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;IAClD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,yCAAyC,CAAC,CAAC;SAC3E,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B,CACxC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
@@ -51,7 +51,7 @@ export declare const PdfSource: {
51
51
  */
52
52
  export type PdfSource = ClosedEnum<typeof PdfSource>;
53
53
  /**
54
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
54
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
55
55
  */
56
56
  export declare const DocumentWithheldReason: {
57
57
  readonly TaxUnreconciled: "tax_unreconciled";
@@ -61,7 +61,7 @@ export declare const DocumentWithheldReason: {
61
61
  readonly TaxProviderDisagrees: "tax_provider_disagrees";
62
62
  };
63
63
  /**
64
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
64
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
65
65
  */
66
66
  export type DocumentWithheldReason = OpenEnum<typeof DocumentWithheldReason>;
67
67
  /**
@@ -213,7 +213,7 @@ export type Invoice = {
213
213
  */
214
214
  pdfSource?: PdfSource | null | undefined;
215
215
  /**
216
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
216
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
217
217
  */
218
218
  documentWithheldReason?: DocumentWithheldReason | null | undefined;
219
219
  /**
@@ -20,7 +20,7 @@ export const PdfSource = {
20
20
  TaxProvider: "tax_provider",
21
21
  };
22
22
  /**
23
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
23
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
24
24
  */
25
25
  export const DocumentWithheldReason = {
26
26
  TaxUnreconciled: "tax_unreconciled",
@@ -15,6 +15,19 @@ export type ProfitabilitySummaryResponseRevenueRange = {
15
15
  */
16
16
  to: Date;
17
17
  };
18
+ /**
19
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
20
+ */
21
+ export type ProfitabilitySummaryResponseCostRange = {
22
+ /**
23
+ * Earliest cost event instant.
24
+ */
25
+ from: Date;
26
+ /**
27
+ * Latest cost event instant.
28
+ */
29
+ to: Date;
30
+ };
18
31
  export type ProfitabilitySummaryResponse = {
19
32
  /**
20
33
  * Object type identifier
@@ -36,11 +49,18 @@ export type ProfitabilitySummaryResponse = {
36
49
  * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
37
50
  */
38
51
  revenueRange?: ProfitabilitySummaryResponseRevenueRange | null | undefined;
52
+ /**
53
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
54
+ */
55
+ costRange?: ProfitabilitySummaryResponseCostRange | null | undefined;
39
56
  };
40
57
  /** @internal */
41
58
  export declare const ProfitabilitySummaryResponseRevenueRange$inboundSchema: z.ZodType<ProfitabilitySummaryResponseRevenueRange, z.ZodTypeDef, unknown>;
42
59
  export declare function profitabilitySummaryResponseRevenueRangeFromJSON(jsonString: string): SafeParseResult<ProfitabilitySummaryResponseRevenueRange, SDKValidationError>;
43
60
  /** @internal */
61
+ export declare const ProfitabilitySummaryResponseCostRange$inboundSchema: z.ZodType<ProfitabilitySummaryResponseCostRange, z.ZodTypeDef, unknown>;
62
+ export declare function profitabilitySummaryResponseCostRangeFromJSON(jsonString: string): SafeParseResult<ProfitabilitySummaryResponseCostRange, SDKValidationError>;
63
+ /** @internal */
44
64
  export declare const ProfitabilitySummaryResponse$inboundSchema: z.ZodType<ProfitabilitySummaryResponse, z.ZodTypeDef, unknown>;
45
65
  export declare function profitabilitySummaryResponseFromJSON(jsonString: string): SafeParseResult<ProfitabilitySummaryResponse, SDKValidationError>;
46
66
  //# sourceMappingURL=profitabilitysummaryresponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profitabilitysummaryresponse.d.ts","sourceRoot":"","sources":["../../../src/models/profitabilitysumma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AAmD,EAAE,CAAC,CAAC,OAAO,CACzE,qCAAqC,EACrC,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qCAAqC,EAAE,kBAAkB,CAAC,CAO5E;AAED,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAMnE"}
@@ -13,12 +13,21 @@ export function profitabilitySummaryResponseRevenueRangeFromJSON(jsonString) {
13
13
  return safeParse(jsonString, (x) => ProfitabilitySummaryResponseRevenueRange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProfitabilitySummaryResponseRevenueRange' from JSON`);
14
14
  }
15
15
  /** @internal */
16
+ export const ProfitabilitySummaryResponseCostRange$inboundSchema = z.object({
17
+ from: z.string().datetime({ offset: true }).transform(v => new Date(v)),
18
+ to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
19
+ });
20
+ export function profitabilitySummaryResponseCostRangeFromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => ProfitabilitySummaryResponseCostRange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProfitabilitySummaryResponseCostRange' from JSON`);
22
+ }
23
+ /** @internal */
16
24
  export const ProfitabilitySummaryResponse$inboundSchema = z.object({
17
25
  object: z.literal("profitability_summary"),
18
26
  currency: z.string(),
19
27
  rows: z.array(ProfitabilityRow$inboundSchema),
20
28
  warnings: z.array(z.string()).optional(),
21
29
  revenueRange: z.nullable(z.lazy(() => ProfitabilitySummaryResponseRevenueRange$inboundSchema)).optional(),
30
+ costRange: z.nullable(z.lazy(() => ProfitabilitySummaryResponseCostRange$inboundSchema)).optional(),
22
31
  });
23
32
  export function profitabilitySummaryResponseFromJSON(jsonString) {
24
33
  return safeParse(jsonString, (x) => ProfitabilitySummaryResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProfitabilitySummaryResponse' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"profitabilitysummaryresponse.js","sourceRoot":"","sources":["../../../src/models/profitabilitysummaryresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAuC/B,gBAAgB;AAChB,MAAM,CAAC,MAAM,sDAAsD,GAI/D,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,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;IACvE,EAAE,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;CACtE,CAAC,CAAC;AAEH,MAAM,UAAU,gDAAgD,CAC9D,UAAkB;IAKlB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,sDAAsD,CAAC,KAAK,CAC1D,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,EACH,sEAAsE,CACvE,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC;IAC1C,QAAQ,EAAE,CAAC,CAAC,M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AC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,sDAAsD,CAAC,CACrE,CAAC,QAAQ,EAAE;IACZ,SAAS,EAAE,CAAC,CAAC,QAAQ,CACnB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,mDAAmD,CAAC,CAClE,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAEH,MAAM,UAAU,oCAAoC,CAClD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0CAA0C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtE,0DAA0D,CAC3D,CAAC;AACJ,CAAC"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@paygentic/sdk",
5
- "version": "0.9.10",
5
+ "version": "0.9.11",
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.10",
3
+ "version": "0.9.11",
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.10",
68
+ sdkVersion: "0.9.11",
69
69
  genVersion: "2.879.13",
70
- userAgent: "speakeasy-sdk/typescript 0.9.10 2.879.13 0.1.0 @paygentic/sdk",
70
+ userAgent: "speakeasy-sdk/typescript 0.9.11 2.879.13 0.1.0 @paygentic/sdk",
71
71
  } as const;
@@ -34,6 +34,20 @@ export type Pagination = {
34
34
  offset: number;
35
35
  };
36
36
 
37
+ /**
38
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
39
+ */
40
+ export type CostReportResponseCostRange = {
41
+ /**
42
+ * Earliest cost event instant.
43
+ */
44
+ from: Date;
45
+ /**
46
+ * Latest cost event instant.
47
+ */
48
+ to: Date;
49
+ };
50
+
37
51
  export type CostReportResponse = {
38
52
  object: CostReportResponseObject;
39
53
  /**
@@ -70,6 +84,10 @@ export type CostReportResponse = {
70
84
  */
71
85
  warnings?: Array<string> | undefined;
72
86
  pagination: Pagination;
87
+ /**
88
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
89
+ */
90
+ costRange?: CostReportResponseCostRange | null | undefined;
73
91
  };
74
92
 
75
93
  /** @internal */
@@ -115,6 +133,26 @@ export function paginationFromJSON(
115
133
  );
116
134
  }
117
135
 
136
+ /** @internal */
137
+ export const CostReportResponseCostRange$inboundSchema: z.ZodType<
138
+ CostReportResponseCostRange,
139
+ z.ZodTypeDef,
140
+ unknown
141
+ > = z.object({
142
+ from: z.string().datetime({ offset: true }).transform(v => new Date(v)),
143
+ to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
144
+ });
145
+
146
+ export function costReportResponseCostRangeFromJSON(
147
+ jsonString: string,
148
+ ): SafeParseResult<CostReportResponseCostRange, SDKValidationError> {
149
+ return safeParse(
150
+ jsonString,
151
+ (x) => CostReportResponseCostRange$inboundSchema.parse(JSON.parse(x)),
152
+ `Failed to parse 'CostReportResponseCostRange' from JSON`,
153
+ );
154
+ }
155
+
118
156
  /** @internal */
119
157
  export const CostReportResponse$inboundSchema: z.ZodType<
120
158
  CostReportResponse,
@@ -132,6 +170,8 @@ export const CostReportResponse$inboundSchema: z.ZodType<
132
170
  availableDimensions: z.array(z.string()),
133
171
  warnings: z.array(z.string()).optional(),
134
172
  pagination: z.lazy(() => Pagination$inboundSchema),
173
+ costRange: z.nullable(z.lazy(() => CostReportResponseCostRange$inboundSchema))
174
+ .optional(),
135
175
  });
136
176
 
137
177
  export function costReportResponseFromJSON(
@@ -64,7 +64,7 @@ export const PdfSource = {
64
64
  export type PdfSource = ClosedEnum<typeof PdfSource>;
65
65
 
66
66
  /**
67
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
67
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
68
68
  */
69
69
  export const DocumentWithheldReason = {
70
70
  TaxUnreconciled: "tax_unreconciled",
@@ -74,7 +74,7 @@ export const DocumentWithheldReason = {
74
74
  TaxProviderDisagrees: "tax_provider_disagrees",
75
75
  } as const;
76
76
  /**
77
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
77
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
78
78
  */
79
79
  export type DocumentWithheldReason = OpenEnum<typeof DocumentWithheldReason>;
80
80
 
@@ -227,7 +227,7 @@ export type Invoice = {
227
227
  */
228
228
  pdfSource?: PdfSource | null | undefined;
229
229
  /**
230
- * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
230
+ * Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice the tax provider serves by design reports pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
231
231
  */
232
232
  documentWithheldReason?: DocumentWithheldReason | null | undefined;
233
233
  /**
@@ -25,6 +25,20 @@ export type ProfitabilitySummaryResponseRevenueRange = {
25
25
  to: Date;
26
26
  };
27
27
 
28
+ /**
29
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
30
+ */
31
+ export type ProfitabilitySummaryResponseCostRange = {
32
+ /**
33
+ * Earliest cost event instant.
34
+ */
35
+ from: Date;
36
+ /**
37
+ * Latest cost event instant.
38
+ */
39
+ to: Date;
40
+ };
41
+
28
42
  export type ProfitabilitySummaryResponse = {
29
43
  /**
30
44
  * Object type identifier
@@ -46,6 +60,10 @@ export type ProfitabilitySummaryResponse = {
46
60
  * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
47
61
  */
48
62
  revenueRange?: ProfitabilitySummaryResponseRevenueRange | null | undefined;
63
+ /**
64
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
65
+ */
66
+ costRange?: ProfitabilitySummaryResponseCostRange | null | undefined;
49
67
  };
50
68
 
51
69
  /** @internal */
@@ -74,6 +92,27 @@ export function profitabilitySummaryResponseRevenueRangeFromJSON(
74
92
  );
75
93
  }
76
94
 
95
+ /** @internal */
96
+ export const ProfitabilitySummaryResponseCostRange$inboundSchema: z.ZodType<
97
+ ProfitabilitySummaryResponseCostRange,
98
+ z.ZodTypeDef,
99
+ unknown
100
+ > = z.object({
101
+ from: z.string().datetime({ offset: true }).transform(v => new Date(v)),
102
+ to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
103
+ });
104
+
105
+ export function profitabilitySummaryResponseCostRangeFromJSON(
106
+ jsonString: string,
107
+ ): SafeParseResult<ProfitabilitySummaryResponseCostRange, SDKValidationError> {
108
+ return safeParse(
109
+ jsonString,
110
+ (x) =>
111
+ ProfitabilitySummaryResponseCostRange$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'ProfitabilitySummaryResponseCostRange' from JSON`,
113
+ );
114
+ }
115
+
77
116
  /** @internal */
78
117
  export const ProfitabilitySummaryResponse$inboundSchema: z.ZodType<
79
118
  ProfitabilitySummaryResponse,
@@ -87,6 +126,9 @@ export const ProfitabilitySummaryResponse$inboundSchema: z.ZodType<
87
126
  revenueRange: z.nullable(
88
127
  z.lazy(() => ProfitabilitySummaryResponseRevenueRange$inboundSchema),
89
128
  ).optional(),
129
+ costRange: z.nullable(
130
+ z.lazy(() => ProfitabilitySummaryResponseCostRange$inboundSchema),
131
+ ).optional(),
90
132
  });
91
133
 
92
134
  export function profitabilitySummaryResponseFromJSON(