@paygentic/sdk 0.9.18 → 0.10.0
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.
- package/README.md +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/authorizationdenialreason.d.ts +17 -0
- package/dist/commonjs/models/authorizationdenialreason.d.ts.map +1 -0
- package/dist/commonjs/models/authorizationdenialreason.js +51 -0
- package/dist/commonjs/models/authorizationdenialreason.js.map +1 -0
- package/dist/commonjs/models/errors/error.d.ts +17 -0
- package/dist/commonjs/models/errors/error.d.ts.map +1 -1
- package/dist/commonjs/models/errors/error.js +8 -0
- package/dist/commonjs/models/errors/error.js.map +1 -1
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts +16 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts.map +1 -1
- package/dist/commonjs/models/errors/recordinvoicepayment.js +7 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +15 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +15 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoicelineitem.d.ts +5 -0
- package/dist/commonjs/models/invoicelineitem.d.ts.map +1 -1
- package/dist/commonjs/models/invoicelineitem.js +2 -0
- package/dist/commonjs/models/invoicelineitem.js.map +1 -1
- package/dist/commonjs/models/linecalculationcontribution.d.ts +12 -0
- package/dist/commonjs/models/linecalculationcontribution.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationcontribution.js +52 -0
- package/dist/commonjs/models/linecalculationcontribution.js.map +1 -0
- package/dist/commonjs/models/linecalculationgiven.d.ts +20 -0
- package/dist/commonjs/models/linecalculationgiven.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationgiven.js +51 -0
- package/dist/commonjs/models/linecalculationgiven.js.map +1 -0
- package/dist/commonjs/models/linecalculationinputprice.d.ts +21 -0
- package/dist/commonjs/models/linecalculationinputprice.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationinputprice.js +52 -0
- package/dist/commonjs/models/linecalculationinputprice.js.map +1 -0
- package/dist/commonjs/models/linecalculationinputs.d.ts +34 -0
- package/dist/commonjs/models/linecalculationinputs.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationinputs.js +56 -0
- package/dist/commonjs/models/linecalculationinputs.js.map +1 -0
- package/dist/commonjs/models/linecalculationnotapplied.d.ts +20 -0
- package/dist/commonjs/models/linecalculationnotapplied.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationnotapplied.js +51 -0
- package/dist/commonjs/models/linecalculationnotapplied.js.map +1 -0
- package/dist/commonjs/models/linecalculationperiod.d.ts +14 -0
- package/dist/commonjs/models/linecalculationperiod.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationperiod.js +51 -0
- package/dist/commonjs/models/linecalculationperiod.js.map +1 -0
- package/dist/commonjs/models/linecalculationprecision.d.ts +14 -0
- package/dist/commonjs/models/linecalculationprecision.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationprecision.js +51 -0
- package/dist/commonjs/models/linecalculationprecision.js.map +1 -0
- package/dist/commonjs/models/linecalculationpriceband.d.ts +11 -0
- package/dist/commonjs/models/linecalculationpriceband.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationpriceband.js +51 -0
- package/dist/commonjs/models/linecalculationpriceband.js.map +1 -0
- package/dist/commonjs/models/linecalculationpricefn.d.ts +40 -0
- package/dist/commonjs/models/linecalculationpricefn.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationpricefn.js +56 -0
- package/dist/commonjs/models/linecalculationpricefn.js.map +1 -0
- package/dist/commonjs/models/linecalculationresult.d.ts +24 -0
- package/dist/commonjs/models/linecalculationresult.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationresult.js +52 -0
- package/dist/commonjs/models/linecalculationresult.js.map +1 -0
- package/dist/commonjs/models/linecalculationsource.d.ts +32 -0
- package/dist/commonjs/models/linecalculationsource.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationsource.js +53 -0
- package/dist/commonjs/models/linecalculationsource.js.map +1 -0
- package/dist/commonjs/models/linecalculationstep.d.ts +50 -0
- package/dist/commonjs/models/linecalculationstep.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationstep.js +59 -0
- package/dist/commonjs/models/linecalculationstep.js.map +1 -0
- package/dist/commonjs/models/linecalculationvalue.d.ts +12 -0
- package/dist/commonjs/models/linecalculationvalue.d.ts.map +1 -0
- package/dist/commonjs/models/linecalculationvalue.js +49 -0
- package/dist/commonjs/models/linecalculationvalue.js.map +1 -0
- package/dist/commonjs/models/lineitem.d.ts +5 -0
- package/dist/commonjs/models/lineitem.d.ts.map +1 -1
- package/dist/commonjs/models/lineitem.js +2 -0
- package/dist/commonjs/models/lineitem.js.map +1 -1
- package/dist/commonjs/models/lineprovenance.d.ts +69 -0
- package/dist/commonjs/models/lineprovenance.d.ts.map +1 -0
- package/dist/commonjs/models/lineprovenance.js +68 -0
- package/dist/commonjs/models/lineprovenance.js.map +1 -0
- package/dist/commonjs/models/operations/getinvoice.d.ts +1 -1
- package/dist/commonjs/models/operations/getinvoicelineitems.d.ts +1 -1
- package/dist/commonjs/models/operations/listlineitems.d.ts +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/authorizationdenialreason.d.ts +17 -0
- package/dist/esm/models/authorizationdenialreason.d.ts.map +1 -0
- package/dist/esm/models/authorizationdenialreason.js +15 -0
- package/dist/esm/models/authorizationdenialreason.js.map +1 -0
- package/dist/esm/models/errors/error.d.ts +17 -0
- package/dist/esm/models/errors/error.d.ts.map +1 -1
- package/dist/esm/models/errors/error.js +8 -0
- package/dist/esm/models/errors/error.js.map +1 -1
- package/dist/esm/models/errors/recordinvoicepayment.d.ts +16 -0
- package/dist/esm/models/errors/recordinvoicepayment.d.ts.map +1 -1
- package/dist/esm/models/errors/recordinvoicepayment.js +7 -0
- package/dist/esm/models/errors/recordinvoicepayment.js.map +1 -1
- package/dist/esm/models/index.d.ts +15 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +15 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoicelineitem.d.ts +5 -0
- package/dist/esm/models/invoicelineitem.d.ts.map +1 -1
- package/dist/esm/models/invoicelineitem.js +2 -0
- package/dist/esm/models/invoicelineitem.js.map +1 -1
- package/dist/esm/models/linecalculationcontribution.d.ts +12 -0
- package/dist/esm/models/linecalculationcontribution.d.ts.map +1 -0
- package/dist/esm/models/linecalculationcontribution.js +15 -0
- package/dist/esm/models/linecalculationcontribution.js.map +1 -0
- package/dist/esm/models/linecalculationgiven.d.ts +20 -0
- package/dist/esm/models/linecalculationgiven.d.ts.map +1 -0
- package/dist/esm/models/linecalculationgiven.js +14 -0
- package/dist/esm/models/linecalculationgiven.js.map +1 -0
- package/dist/esm/models/linecalculationinputprice.d.ts +21 -0
- package/dist/esm/models/linecalculationinputprice.d.ts.map +1 -0
- package/dist/esm/models/linecalculationinputprice.js +15 -0
- package/dist/esm/models/linecalculationinputprice.js.map +1 -0
- package/dist/esm/models/linecalculationinputs.d.ts +34 -0
- package/dist/esm/models/linecalculationinputs.d.ts.map +1 -0
- package/dist/esm/models/linecalculationinputs.js +19 -0
- package/dist/esm/models/linecalculationinputs.js.map +1 -0
- package/dist/esm/models/linecalculationnotapplied.d.ts +20 -0
- package/dist/esm/models/linecalculationnotapplied.d.ts.map +1 -0
- package/dist/esm/models/linecalculationnotapplied.js +14 -0
- package/dist/esm/models/linecalculationnotapplied.js.map +1 -0
- package/dist/esm/models/linecalculationperiod.d.ts +14 -0
- package/dist/esm/models/linecalculationperiod.d.ts.map +1 -0
- package/dist/esm/models/linecalculationperiod.js +14 -0
- package/dist/esm/models/linecalculationperiod.js.map +1 -0
- package/dist/esm/models/linecalculationprecision.d.ts +14 -0
- package/dist/esm/models/linecalculationprecision.d.ts.map +1 -0
- package/dist/esm/models/linecalculationprecision.js +14 -0
- package/dist/esm/models/linecalculationprecision.js.map +1 -0
- package/dist/esm/models/linecalculationpriceband.d.ts +11 -0
- package/dist/esm/models/linecalculationpriceband.d.ts.map +1 -0
- package/dist/esm/models/linecalculationpriceband.js +14 -0
- package/dist/esm/models/linecalculationpriceband.js.map +1 -0
- package/dist/esm/models/linecalculationpricefn.d.ts +40 -0
- package/dist/esm/models/linecalculationpricefn.d.ts.map +1 -0
- package/dist/esm/models/linecalculationpricefn.js +19 -0
- package/dist/esm/models/linecalculationpricefn.js.map +1 -0
- package/dist/esm/models/linecalculationresult.d.ts +24 -0
- package/dist/esm/models/linecalculationresult.d.ts.map +1 -0
- package/dist/esm/models/linecalculationresult.js +15 -0
- package/dist/esm/models/linecalculationresult.js.map +1 -0
- package/dist/esm/models/linecalculationsource.d.ts +32 -0
- package/dist/esm/models/linecalculationsource.d.ts.map +1 -0
- package/dist/esm/models/linecalculationsource.js +16 -0
- package/dist/esm/models/linecalculationsource.js.map +1 -0
- package/dist/esm/models/linecalculationstep.d.ts +50 -0
- package/dist/esm/models/linecalculationstep.d.ts.map +1 -0
- package/dist/esm/models/linecalculationstep.js +22 -0
- package/dist/esm/models/linecalculationstep.js.map +1 -0
- package/dist/esm/models/linecalculationvalue.d.ts +12 -0
- package/dist/esm/models/linecalculationvalue.d.ts.map +1 -0
- package/dist/esm/models/linecalculationvalue.js +12 -0
- package/dist/esm/models/linecalculationvalue.js.map +1 -0
- package/dist/esm/models/lineitem.d.ts +5 -0
- package/dist/esm/models/lineitem.d.ts.map +1 -1
- package/dist/esm/models/lineitem.js +2 -0
- package/dist/esm/models/lineitem.js.map +1 -1
- package/dist/esm/models/lineprovenance.d.ts +69 -0
- package/dist/esm/models/lineprovenance.d.ts.map +1 -0
- package/dist/esm/models/lineprovenance.js +31 -0
- package/dist/esm/models/lineprovenance.js.map +1 -0
- package/dist/esm/models/operations/getinvoice.d.ts +1 -1
- package/dist/esm/models/operations/getinvoicelineitems.d.ts +1 -1
- package/dist/esm/models/operations/listlineitems.d.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/authorizationdenialreason.ts +26 -0
- package/src/models/errors/error.ts +23 -0
- package/src/models/errors/recordinvoicepayment.ts +22 -0
- package/src/models/index.ts +15 -0
- package/src/models/invoicelineitem.ts +9 -0
- package/src/models/linecalculationcontribution.ts +35 -0
- package/src/models/linecalculationgiven.ts +42 -0
- package/src/models/linecalculationinputprice.ts +46 -0
- package/src/models/linecalculationinputs.ts +65 -0
- package/src/models/linecalculationnotapplied.ts +42 -0
- package/src/models/linecalculationperiod.ts +36 -0
- package/src/models/linecalculationprecision.ts +36 -0
- package/src/models/linecalculationpriceband.ts +33 -0
- package/src/models/linecalculationpricefn.ts +74 -0
- package/src/models/linecalculationresult.ts +47 -0
- package/src/models/linecalculationsource.ts +52 -0
- package/src/models/linecalculationstep.ts +80 -0
- package/src/models/linecalculationvalue.ts +34 -0
- package/src/models/lineitem.ts +9 -0
- package/src/models/lineprovenance.ts +122 -0
- package/src/models/operations/getinvoice.ts +1 -1
- package/src/models/operations/getinvoicelineitems.ts +1 -1
- package/src/models/operations/listlineitems.ts +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LineCalculationResult$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationResultFromJSON = lineCalculationResultFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
/** @internal */
|
|
44
|
+
exports.LineCalculationResult$inboundSchema = z.object({
|
|
45
|
+
amount: z.string(),
|
|
46
|
+
quantity: z.nullable(z.string()),
|
|
47
|
+
unitPrice: z.nullable(z.string()),
|
|
48
|
+
});
|
|
49
|
+
function lineCalculationResultFromJSON(jsonString) {
|
|
50
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationResult' from JSON`);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=linecalculationresult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationresult.js","sourceRoot":"","sources":["../../../src/models/linecalculationresult.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCH,sEAQC;AA1CD,0CAA4B;AAC5B,kDAA8C;AAsB9C,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,SAAgB,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2CAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Where a value came from: `ref`, a link that can break after the invoice is issued, and `asUsed`, the values the calculation read, which never change.
|
|
6
|
+
*/
|
|
7
|
+
export type LineCalculationSource = {
|
|
8
|
+
/**
|
|
9
|
+
* `interval`: a subscription price interval. `price`: a catalog price. `meter`: a billable metric read directly. `entitlement`: the grant engine's reading of an entitlement. `grant`: a grant. `adjustment`: a subscription adjustment. `line`: another line on the invoice. `storedRow`: a figure the line already stored, with `reason`. `merchant`: an amount a merchant entered. `input` is reserved for a value from a system that is not a meter, with `ref` `name` and `eventId` and `asUsed` `value` and `unit`; nothing produces it yet. An open set, so it is a string rather than an enum: known values are `interval`, `price`, `meter`, `entitlement`, `grant`, `adjustment`, `line`, `storedRow`, `merchant`, and new values may be added.
|
|
10
|
+
*/
|
|
11
|
+
type: string;
|
|
12
|
+
/**
|
|
13
|
+
* The ids that link to the resource.
|
|
14
|
+
*/
|
|
15
|
+
ref?: {
|
|
16
|
+
[k: string]: any;
|
|
17
|
+
} | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The values the calculation read from the resource. A `line` source has `amount`, and `unitPrice` where a step read the line's rate.
|
|
20
|
+
*/
|
|
21
|
+
asUsed?: {
|
|
22
|
+
[k: string]: any;
|
|
23
|
+
} | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* `storedRow` only: why the stored figure stands. An open set, so it is a string rather than an enum: known values are `precedes_timeline`, `no_timeline`, `not_derived`, `no_covering_charge`, and new values may be added.
|
|
26
|
+
*/
|
|
27
|
+
reason?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const LineCalculationSource$inboundSchema: z.ZodType<LineCalculationSource, z.ZodTypeDef, unknown>;
|
|
31
|
+
export declare function lineCalculationSourceFromJSON(jsonString: string): SafeParseResult<LineCalculationSource, SDKValidationError>;
|
|
32
|
+
//# sourceMappingURL=linecalculationsource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationsource.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationsource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LineCalculationSource$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationSourceFromJSON = lineCalculationSourceFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
/** @internal */
|
|
44
|
+
exports.LineCalculationSource$inboundSchema = z.object({
|
|
45
|
+
type: z.string(),
|
|
46
|
+
ref: z.record(z.any()).optional(),
|
|
47
|
+
asUsed: z.record(z.any()).optional(),
|
|
48
|
+
reason: z.string().optional(),
|
|
49
|
+
});
|
|
50
|
+
function lineCalculationSourceFromJSON(jsonString) {
|
|
51
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationSource' from JSON`);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=linecalculationsource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationsource.js","sourceRoot":"","sources":["../../../src/models/linecalculationsource.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCH,sEAQC;AA/CD,0CAA4B;AAC5B,kDAA8C;AA0B9C,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,SAAgB,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2CAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { LineCalculationContribution } from "./linecalculationcontribution.js";
|
|
5
|
+
import { LineCalculationValue } from "./linecalculationvalue.js";
|
|
6
|
+
/**
|
|
7
|
+
* One step: the value it changed (`on`), the value before (`in`) and after (`out`), the rule's parameters, and the source of the rule. A reader that does not know an op shows it as "in → out, because source".
|
|
8
|
+
*/
|
|
9
|
+
export type LineCalculationStep = {
|
|
10
|
+
/**
|
|
11
|
+
* `allow`: units a grant covered (`covered`). `clamp`: `min` and `max`, null when open. `scaleToBound`: a minimum or maximum applied to a group of lines by uniform scaling (`bound`, `side`, `measured`, `factor`). `setToBound`: a minimum applied to a group that measured zero (`bound`, `sumOfShares`). `prorate`: `fraction` of the period, with the `billed` and full (`of`) windows and the `basis`. `evaluate`: the one join of quantity and price into an amount (`quantity`, `selector`, `fn`, `applied`); its `in` is null. `cap`: `max` and `scope`; on an `invoice` cap also `total`, what the cap started at, and `usedBefore`, what earlier credits took from it. `replace`: a value set by a rule, with `reason`. `subtract`: `units`. `scale`: ordered `terms`, each `by`, `value` and `label`. A `subtract`, `clamp` or `scale` that did not use the envelope's precision says so in `arithmetic`: `float64` or `decimal120`. `round`: `scale` and `mode`. An open set, so it is a string rather than an enum: known values are `allow`, `clamp`, `scaleToBound`, `setToBound`, `prorate`, `evaluate`, `cap`, `replace`, `subtract`, `scale`, `round`, and new values may be added.
|
|
12
|
+
*/
|
|
13
|
+
op: string;
|
|
14
|
+
/**
|
|
15
|
+
* The value the step changes. `quantity`, `selector` (the quantity a volume band is chosen on), `price` and `amount` are reserved; other names may be added.
|
|
16
|
+
*/
|
|
17
|
+
on: string;
|
|
18
|
+
/**
|
|
19
|
+
* The value before the step. Null only on `evaluate`.
|
|
20
|
+
*/
|
|
21
|
+
in: LineCalculationValue | null;
|
|
22
|
+
/**
|
|
23
|
+
* A decimal string, or a price function.
|
|
24
|
+
*/
|
|
25
|
+
out: LineCalculationValue;
|
|
26
|
+
/**
|
|
27
|
+
* The parameters of the op. See `op`.
|
|
28
|
+
*/
|
|
29
|
+
params: {
|
|
30
|
+
[k: string]: any;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The key of the source in `sources` whose rule this is.
|
|
34
|
+
*/
|
|
35
|
+
source: string;
|
|
36
|
+
/**
|
|
37
|
+
* The other lines a group rule read, with each one's value and period share.
|
|
38
|
+
*/
|
|
39
|
+
inputsFrom?: Array<LineCalculationContribution> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Reserved for an `evaluate` of a custom pricing function: the steps inside it, each of the same shape as a step. Free-form here so the schema does not refer to itself. Nothing produces it yet.
|
|
42
|
+
*/
|
|
43
|
+
trace?: Array<{
|
|
44
|
+
[k: string]: any;
|
|
45
|
+
}> | undefined;
|
|
46
|
+
};
|
|
47
|
+
/** @internal */
|
|
48
|
+
export declare const LineCalculationStep$inboundSchema: z.ZodType<LineCalculationStep, z.ZodTypeDef, unknown>;
|
|
49
|
+
export declare function lineCalculationStepFromJSON(jsonString: string): SafeParseResult<LineCalculationStep, SDKValidationError>;
|
|
50
|
+
//# sourceMappingURL=linecalculationstep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationstep.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationstep.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,2BAA2B,EAE5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,GAAG,EAAE,oBAAoB,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC,GAAG,SAAS,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAUP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LineCalculationStep$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationStepFromJSON = lineCalculationStepFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
const linecalculationcontribution_js_1 = require("./linecalculationcontribution.js");
|
|
44
|
+
const linecalculationvalue_js_1 = require("./linecalculationvalue.js");
|
|
45
|
+
/** @internal */
|
|
46
|
+
exports.LineCalculationStep$inboundSchema = z.object({
|
|
47
|
+
op: z.string(),
|
|
48
|
+
on: z.string(),
|
|
49
|
+
in: z.nullable(linecalculationvalue_js_1.LineCalculationValue$inboundSchema),
|
|
50
|
+
out: linecalculationvalue_js_1.LineCalculationValue$inboundSchema,
|
|
51
|
+
params: z.record(z.any()),
|
|
52
|
+
source: z.string(),
|
|
53
|
+
inputsFrom: z.array(linecalculationcontribution_js_1.LineCalculationContribution$inboundSchema).optional(),
|
|
54
|
+
trace: z.array(z.record(z.any())).optional(),
|
|
55
|
+
});
|
|
56
|
+
function lineCalculationStepFromJSON(jsonString) {
|
|
57
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationStep$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationStep' from JSON`);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=linecalculationstep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationstep.js","sourceRoot":"","sources":["../../../src/models/linecalculationstep.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEH,kEAQC;AA3ED,0CAA4B;AAC5B,kDAA8C;AAG9C,qFAG0C;AAC1C,uEAGmC;AAwCnC,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,4DAAkC,CAAC;IAClD,GAAG,EAAE,4DAAkC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,0EAAyC,CAAC,CAAC,QAAQ,EAAE;IACzE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEH,SAAgB,2BAA2B,CACzC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { LineCalculationPriceFn } from "./linecalculationpricefn.js";
|
|
5
|
+
/**
|
|
6
|
+
* A decimal string, or a price function.
|
|
7
|
+
*/
|
|
8
|
+
export type LineCalculationValue = LineCalculationPriceFn | string;
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const LineCalculationValue$inboundSchema: z.ZodType<LineCalculationValue, z.ZodTypeDef, unknown>;
|
|
11
|
+
export declare function lineCalculationValueFromJSON(jsonString: string): SafeParseResult<LineCalculationValue, SDKValidationError>;
|
|
12
|
+
//# sourceMappingURL=linecalculationvalue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationvalue.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationvalue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,sBAAsB,EAEvB,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,GAAG,MAAM,CAAC;AAEnE,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,oBAAoB,EACpB,CAAC,CAAC,UAAU,EACZ,OAAO,CACsD,CAAC;AAEhE,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAM3D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LineCalculationValue$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationValueFromJSON = lineCalculationValueFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
const linecalculationpricefn_js_1 = require("./linecalculationpricefn.js");
|
|
44
|
+
/** @internal */
|
|
45
|
+
exports.LineCalculationValue$inboundSchema = z.union([linecalculationpricefn_js_1.LineCalculationPriceFn$inboundSchema, z.string()]);
|
|
46
|
+
function lineCalculationValueFromJSON(jsonString) {
|
|
47
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationValue' from JSON`);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=linecalculationvalue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationvalue.js","sourceRoot":"","sources":["../../../src/models/linecalculationvalue.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBH,oEAQC;AA7BD,0CAA4B;AAC5B,kDAA8C;AAG9C,2EAGqC;AAOrC,gBAAgB;AACH,QAAA,kCAAkC,GAI3C,CAAC,CAAC,KAAK,CAAC,CAAC,gEAAoC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEhE,SAAgB,4BAA4B,CAC1C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0CAAkC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9D,kDAAkD,CACnD,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v3";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { LineProvenance } from "./lineprovenance.js";
|
|
5
6
|
/**
|
|
6
7
|
* The type of line item. 'discount' and 'adjustment' line items have negative subtotal/total amounts: 'discount' is a grant discount, 'adjustment' is a discount agreed on the subscription.
|
|
7
8
|
*/
|
|
@@ -147,6 +148,10 @@ export type LineItem = {
|
|
|
147
148
|
* Real-time estimated subtotal for a line whose amount is not final yet: current usage for a metered item, the rate the subscription is on for a fee. Null for manual items, and for any line whose amount is already final or cannot be estimated.
|
|
148
149
|
*/
|
|
149
150
|
estimatedSubtotal?: string | null | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* How the line's amount before tax was calculated: a trace of one evaluation, saved when the invoice was calculated and fixed once it is issued. Returned only with `expand=lineProvenance`. Every field but `status` is present when `status` is `recorded`. Every number is a plain decimal string.
|
|
153
|
+
*/
|
|
154
|
+
provenance?: LineProvenance | undefined;
|
|
150
155
|
};
|
|
151
156
|
/** @internal */
|
|
152
157
|
export declare const LineItemType$inboundSchema: z.ZodNativeEnum<typeof LineItemType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineitem.d.ts","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"lineitem.d.ts","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAA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AAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,YAAY,CAChD,CAAC;AAE7B,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,aAAa,CACxD,OAAO,cAAc,CACS,CAAC;AAEjC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,aAAa,CAC7D,OAAO,mBAAmB,CACS,CAAC;AAEtC,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAC5C,QAAQ,EACR,CAAC,CAAC,UAAU,EACZ,OAAO,CAkCP,CAAC;AAEH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAM/C"}
|
|
@@ -40,6 +40,7 @@ exports.LineItem$inboundSchema = exports.LineItemPaymentTerm$inboundSchema = exp
|
|
|
40
40
|
exports.lineItemFromJSON = lineItemFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
const lineprovenance_js_1 = require("./lineprovenance.js");
|
|
43
44
|
/**
|
|
44
45
|
* The type of line item. 'discount' and 'adjustment' line items have negative subtotal/total amounts: 'discount' is a grant discount, 'adjustment' is a discount agreed on the subscription.
|
|
45
46
|
*/
|
|
@@ -99,6 +100,7 @@ exports.LineItem$inboundSchema = z.object({
|
|
|
99
100
|
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
100
101
|
estimatedMeteredQuantity: z.nullable(z.string()).optional(),
|
|
101
102
|
estimatedSubtotal: z.nullable(z.string()).optional(),
|
|
103
|
+
provenance: lineprovenance_js_1.LineProvenance$inboundSchema.optional(),
|
|
102
104
|
});
|
|
103
105
|
function lineItemFromJSON(jsonString) {
|
|
104
106
|
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItem' from JSON`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineitem.js","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"lineitem.js","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4NH,4CAQC;AAlOD,0CAA4B;AAC5B,kDAA8C;AAI9C,2DAG6B;AAE7B;;GAEG;AACU,QAAA,YAAY,GAAG;IAC1B,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;CAChB,CAAC;AAMX;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAMX;;GAEG;AACU,QAA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,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5E,SAAS,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;IAC5E,wBAAwB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3D,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD,UAAU,EAAE,gDAA4B,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAEH,SAAgB,gBAAgB,CAC9B,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8BAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClD,sCAAsC,CACvC,CAAC;AACJ,CAAC"}
|
|
@@ -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,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD;;OAEG;IACH,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;KAAE,GAAG,SAAS,CAAC;IAC7D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IAC/C;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC;IAC1D;;OAEG;IACH,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,cAAc,EACd,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,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LineProvenance$inboundSchema = void 0;
|
|
40
|
+
exports.lineProvenanceFromJSON = lineProvenanceFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
const linecalculationinputs_js_1 = require("./linecalculationinputs.js");
|
|
44
|
+
const linecalculationnotapplied_js_1 = require("./linecalculationnotapplied.js");
|
|
45
|
+
const linecalculationperiod_js_1 = require("./linecalculationperiod.js");
|
|
46
|
+
const linecalculationprecision_js_1 = require("./linecalculationprecision.js");
|
|
47
|
+
const linecalculationresult_js_1 = require("./linecalculationresult.js");
|
|
48
|
+
const linecalculationsource_js_1 = require("./linecalculationsource.js");
|
|
49
|
+
const linecalculationstep_js_1 = require("./linecalculationstep.js");
|
|
50
|
+
/** @internal */
|
|
51
|
+
exports.LineProvenance$inboundSchema = z.object({
|
|
52
|
+
status: z.string(),
|
|
53
|
+
version: z.number().int().optional(),
|
|
54
|
+
currency: z.string().optional(),
|
|
55
|
+
precision: linecalculationprecision_js_1.LineCalculationPrecision$inboundSchema.optional(),
|
|
56
|
+
period: linecalculationperiod_js_1.LineCalculationPeriod$inboundSchema.optional(),
|
|
57
|
+
calculatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
|
|
58
|
+
subscriptionId: z.string().optional(),
|
|
59
|
+
inputs: linecalculationinputs_js_1.LineCalculationInputs$inboundSchema.optional(),
|
|
60
|
+
sources: z.record(linecalculationsource_js_1.LineCalculationSource$inboundSchema).optional(),
|
|
61
|
+
steps: z.array(linecalculationstep_js_1.LineCalculationStep$inboundSchema).optional(),
|
|
62
|
+
notApplied: z.array(linecalculationnotapplied_js_1.LineCalculationNotApplied$inboundSchema).optional(),
|
|
63
|
+
result: linecalculationresult_js_1.LineCalculationResult$inboundSchema.optional(),
|
|
64
|
+
});
|
|
65
|
+
function lineProvenanceFromJSON(jsonString) {
|
|
66
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineProvenance$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineProvenance' from JSON`);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=lineprovenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineprovenance.js","sourceRoot":"","sources":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AAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAA4B,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
|
|
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
|
|
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
|
/**
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -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.
|
|
34
|
+
readonly sdkVersion: "0.10.0";
|
|
35
35
|
readonly genVersion: "2.879.13";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.10.0 2.879.13 0.1.0 @paygentic/sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -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.
|
|
34
|
+
sdkVersion: "0.10.0",
|
|
35
35
|
genVersion: "2.879.13",
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 0.10.0 2.879.13 0.1.0 @paygentic/sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|