@paygentic/sdk 0.9.18 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/commonjs/models/operations/listsubscriptions.d.ts +5 -2
- package/dist/commonjs/models/operations/listsubscriptions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listsubscriptions.js +1 -1
- package/dist/commonjs/models/operations/listsubscriptions.js.map +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/dist/esm/models/operations/listsubscriptions.d.ts +5 -2
- package/dist/esm/models/operations/listsubscriptions.d.ts.map +1 -1
- package/dist/esm/models/operations/listsubscriptions.js +1 -1
- package/dist/esm/models/operations/listsubscriptions.js.map +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
- package/src/models/operations/listsubscriptions.ts +6 -3
|
@@ -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.LineCalculationInputPrice$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationInputPriceFromJSON = lineCalculationInputPriceFromJSON;
|
|
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.LineCalculationInputPrice$inboundSchema = z.object({
|
|
46
|
+
fn: linecalculationpricefn_js_1.LineCalculationPriceFn$inboundSchema,
|
|
47
|
+
source: z.string(),
|
|
48
|
+
});
|
|
49
|
+
function lineCalculationInputPriceFromJSON(jsonString) {
|
|
50
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationInputPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationInputPrice' from JSON`);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=linecalculationinputprice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationinputprice.js","sourceRoot":"","sources":["../../../src/models/linecalculationinputprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCH,8EAQC;AAzCD,0CAA4B;AAC5B,kDAA8C;AAG9C,2EAGqC;AAgBrC,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,gEAAoC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,+CAAuC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,uDAAuD,CACxD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { LineCalculationGiven } from "./linecalculationgiven.js";
|
|
5
|
+
import { LineCalculationInputPrice } from "./linecalculationinputprice.js";
|
|
6
|
+
/**
|
|
7
|
+
* The values the evaluation started from.
|
|
8
|
+
*/
|
|
9
|
+
export type LineCalculationInputs = {
|
|
10
|
+
/**
|
|
11
|
+
* `priced`: a charge from a price, with `quantity`, `selector` and `price`. `fromLine`: a line whose base is another line's amount, with `amount`. `given`: an amount nobody priced on this run, with `amount`. An open set, so it is a string rather than an enum: known values are `priced`, `fromLine`, `given`, and new values may be added.
|
|
12
|
+
*/
|
|
13
|
+
kind: string;
|
|
14
|
+
/**
|
|
15
|
+
* A value the evaluation started from, and its source.
|
|
16
|
+
*/
|
|
17
|
+
quantity?: LineCalculationGiven | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* A value the evaluation started from, and its source.
|
|
20
|
+
*/
|
|
21
|
+
selector?: LineCalculationGiven | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* `priced` only: the price as a function, and its source.
|
|
24
|
+
*/
|
|
25
|
+
price?: LineCalculationInputPrice | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* A value the evaluation started from, and its source.
|
|
28
|
+
*/
|
|
29
|
+
amount?: LineCalculationGiven | undefined;
|
|
30
|
+
};
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const LineCalculationInputs$inboundSchema: z.ZodType<LineCalculationInputs, z.ZodTypeDef, unknown>;
|
|
33
|
+
export declare function lineCalculationInputsFromJSON(jsonString: string): SafeParseResult<LineCalculationInputs, SDKValidationError>;
|
|
34
|
+
//# sourceMappingURL=linecalculationinputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationinputs.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationinputs.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,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,yBAAyB,EAE1B,MAAM,gCAAgC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAOP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.LineCalculationInputs$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationInputsFromJSON = lineCalculationInputsFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
const linecalculationgiven_js_1 = require("./linecalculationgiven.js");
|
|
44
|
+
const linecalculationinputprice_js_1 = require("./linecalculationinputprice.js");
|
|
45
|
+
/** @internal */
|
|
46
|
+
exports.LineCalculationInputs$inboundSchema = z.object({
|
|
47
|
+
kind: z.string(),
|
|
48
|
+
quantity: linecalculationgiven_js_1.LineCalculationGiven$inboundSchema.optional(),
|
|
49
|
+
selector: linecalculationgiven_js_1.LineCalculationGiven$inboundSchema.optional(),
|
|
50
|
+
price: linecalculationinputprice_js_1.LineCalculationInputPrice$inboundSchema.optional(),
|
|
51
|
+
amount: linecalculationgiven_js_1.LineCalculationGiven$inboundSchema.optional(),
|
|
52
|
+
});
|
|
53
|
+
function lineCalculationInputsFromJSON(jsonString) {
|
|
54
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationInputs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationInputs' from JSON`);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=linecalculationinputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationinputs.js","sourceRoot":"","sources":["../../../src/models/linecalculationinputs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDH,sEAQC;AA5DD,0CAA4B;AAC5B,kDAA8C;AAG9C,uEAGmC;AACnC,iFAGwC;AA4BxC,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,4DAAkC,CAAC,QAAQ,EAAE;IACvD,QAAQ,EAAE,4DAAkC,CAAC,QAAQ,EAAE;IACvD,KAAK,EAAE,sEAAuC,CAAC,QAAQ,EAAE;IACzD,MAAM,EAAE,4DAAkC,CAAC,QAAQ,EAAE;CACtD,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,20 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* A rule in force for the line that did not change it.
|
|
6
|
+
*/
|
|
7
|
+
export type LineCalculationNotApplied = {
|
|
8
|
+
/**
|
|
9
|
+
* The key of the rule's source in `sources`.
|
|
10
|
+
*/
|
|
11
|
+
source: string;
|
|
12
|
+
/**
|
|
13
|
+
* Why the rule did not change the line, for example `within` or `notBinding`.
|
|
14
|
+
*/
|
|
15
|
+
reason: string;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const LineCalculationNotApplied$inboundSchema: z.ZodType<LineCalculationNotApplied, z.ZodTypeDef, unknown>;
|
|
19
|
+
export declare function lineCalculationNotAppliedFromJSON(jsonString: string): SafeParseResult<LineCalculationNotApplied, SDKValidationError>;
|
|
20
|
+
//# sourceMappingURL=linecalculationnotapplied.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationnotapplied.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationnotapplied.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAMhE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.LineCalculationNotApplied$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationNotAppliedFromJSON = lineCalculationNotAppliedFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
/** @internal */
|
|
44
|
+
exports.LineCalculationNotApplied$inboundSchema = z.object({
|
|
45
|
+
source: z.string(),
|
|
46
|
+
reason: z.string(),
|
|
47
|
+
});
|
|
48
|
+
function lineCalculationNotAppliedFromJSON(jsonString) {
|
|
49
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationNotApplied$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationNotApplied' from JSON`);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=linecalculationnotapplied.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationnotapplied.js","sourceRoot":"","sources":["../../../src/models/linecalculationnotapplied.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,8EAQC;AArCD,0CAA4B;AAC5B,kDAA8C;AAkB9C,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,+CAAuC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,uDAAuD,CACxD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* The period the line bills.
|
|
6
|
+
*/
|
|
7
|
+
export type LineCalculationPeriod = {
|
|
8
|
+
start: Date;
|
|
9
|
+
end: Date;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const LineCalculationPeriod$inboundSchema: z.ZodType<LineCalculationPeriod, z.ZodTypeDef, unknown>;
|
|
13
|
+
export declare function lineCalculationPeriodFromJSON(jsonString: string): SafeParseResult<LineCalculationPeriod, SDKValidationError>;
|
|
14
|
+
//# sourceMappingURL=linecalculationperiod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationperiod.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationperiod.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,IAAI,CAAC;CACX,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.LineCalculationPeriod$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationPeriodFromJSON = lineCalculationPeriodFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
/** @internal */
|
|
44
|
+
exports.LineCalculationPeriod$inboundSchema = z.object({
|
|
45
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
46
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
47
|
+
});
|
|
48
|
+
function lineCalculationPeriodFromJSON(jsonString) {
|
|
49
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationPeriod$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPeriod' from JSON`);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=linecalculationperiod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationperiod.js","sourceRoot":"","sources":["../../../src/models/linecalculationperiod.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBH,sEAQC;AA/BD,0CAA4B;AAC5B,kDAA8C;AAY9C,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IACxE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;CACvE,CAAC,CAAC;AAEH,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,14 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* The default arithmetic of every step. Any other rounding is an explicit `round` step.
|
|
6
|
+
*/
|
|
7
|
+
export type LineCalculationPrecision = {
|
|
8
|
+
significantDigits: number;
|
|
9
|
+
rounding: string;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const LineCalculationPrecision$inboundSchema: z.ZodType<LineCalculationPrecision, z.ZodTypeDef, unknown>;
|
|
13
|
+
export declare function lineCalculationPrecisionFromJSON(jsonString: string): SafeParseResult<LineCalculationPrecision, SDKValidationError>;
|
|
14
|
+
//# sourceMappingURL=linecalculationprecision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationprecision.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationprecision.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.LineCalculationPrecision$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationPrecisionFromJSON = lineCalculationPrecisionFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
/** @internal */
|
|
44
|
+
exports.LineCalculationPrecision$inboundSchema = z.object({
|
|
45
|
+
significantDigits: z.number().int(),
|
|
46
|
+
rounding: z.string(),
|
|
47
|
+
});
|
|
48
|
+
function lineCalculationPrecisionFromJSON(jsonString) {
|
|
49
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationPrecision$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPrecision' from JSON`);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=linecalculationprecision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationprecision.js","sourceRoot":"","sources":["../../../src/models/linecalculationprecision.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBH,4EAQC;AA/BD,0CAA4B;AAC5B,kDAA8C;AAY9C,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type LineCalculationPriceBand = {
|
|
5
|
+
upTo: string | null;
|
|
6
|
+
rate: string;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const LineCalculationPriceBand$inboundSchema: z.ZodType<LineCalculationPriceBand, z.ZodTypeDef, unknown>;
|
|
10
|
+
export declare function lineCalculationPriceBandFromJSON(jsonString: string): SafeParseResult<LineCalculationPriceBand, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=linecalculationpriceband.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationpriceband.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationpriceband.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.LineCalculationPriceBand$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationPriceBandFromJSON = lineCalculationPriceBandFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
/** @internal */
|
|
44
|
+
exports.LineCalculationPriceBand$inboundSchema = z.object({
|
|
45
|
+
upTo: z.nullable(z.string()),
|
|
46
|
+
rate: z.string(),
|
|
47
|
+
});
|
|
48
|
+
function lineCalculationPriceBandFromJSON(jsonString) {
|
|
49
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationPriceBand$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPriceBand' from JSON`);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=linecalculationpriceband.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationpriceband.js","sourceRoot":"","sources":["../../../src/models/linecalculationpriceband.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBH,4EAQC;AA5BD,0CAA4B;AAC5B,kDAA8C;AAS9C,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { LineCalculationPriceBand } from "./linecalculationpriceband.js";
|
|
5
|
+
/**
|
|
6
|
+
* A price as a function from quantity to money. A new model may carry fields not listed here.
|
|
7
|
+
*/
|
|
8
|
+
export type LineCalculationPriceFn = {
|
|
9
|
+
/**
|
|
10
|
+
* `unit`: `rate` per unit. `volume`: `bands`, each with `upTo` (null for the open band) and `rate`; one band prices every unit. `percentage`: `rate` as a fraction, with `min` and `max` charge or null. `flat`: one `amount`. `dynamic`: the quantity is already money. An open set, so it is a string rather than an enum: known values are `unit`, `volume`, `percentage`, `flat`, `dynamic`, and new values may be added.
|
|
11
|
+
*/
|
|
12
|
+
model: string;
|
|
13
|
+
/**
|
|
14
|
+
* `unit`, `percentage`: the rate.
|
|
15
|
+
*/
|
|
16
|
+
rate?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* `volume` only: the bands in ascending order.
|
|
19
|
+
*/
|
|
20
|
+
bands?: Array<LineCalculationPriceBand> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* `percentage` only: the minimum charge, or null.
|
|
23
|
+
*/
|
|
24
|
+
min?: string | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* `percentage` only: the maximum charge, or null.
|
|
27
|
+
*/
|
|
28
|
+
max?: string | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* `flat` only: the amount for the period.
|
|
31
|
+
*/
|
|
32
|
+
amount?: string | undefined;
|
|
33
|
+
additionalProperties?: {
|
|
34
|
+
[k: string]: any;
|
|
35
|
+
} | undefined;
|
|
36
|
+
};
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare const LineCalculationPriceFn$inboundSchema: z.ZodType<LineCalculationPriceFn, z.ZodTypeDef, unknown>;
|
|
39
|
+
export declare function lineCalculationPriceFnFromJSON(jsonString: string): SafeParseResult<LineCalculationPriceFn, SDKValidationError>;
|
|
40
|
+
//# sourceMappingURL=linecalculationpricefn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationpricefn.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationpricefn.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAK5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAAC;IACpD;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAYR,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.LineCalculationPriceFn$inboundSchema = void 0;
|
|
40
|
+
exports.lineCalculationPriceFnFromJSON = lineCalculationPriceFnFromJSON;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
+
const linecalculationpriceband_js_1 = require("./linecalculationpriceband.js");
|
|
44
|
+
/** @internal */
|
|
45
|
+
exports.LineCalculationPriceFn$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
|
|
46
|
+
model: z.string(),
|
|
47
|
+
rate: z.string().optional(),
|
|
48
|
+
bands: z.array(linecalculationpriceband_js_1.LineCalculationPriceBand$inboundSchema).optional(),
|
|
49
|
+
min: z.nullable(z.string()).optional(),
|
|
50
|
+
max: z.nullable(z.string()).optional(),
|
|
51
|
+
amount: z.string().optional(),
|
|
52
|
+
}).catchall(z.any()), "additionalProperties", true);
|
|
53
|
+
function lineCalculationPriceFnFromJSON(jsonString) {
|
|
54
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineCalculationPriceFn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineCalculationPriceFn' from JSON`);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=linecalculationpricefn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationpricefn.js","sourceRoot":"","sources":["../../../src/models/linecalculationpricefn.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DH,wEAQC;AArED,0CAA4B;AAC5B,kDAG2B;AAG3B,+EAGuC;AAiCvC,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,IAAA,6BAAiB,EACnB,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oEAAsC,CAAC,CAAC,QAAQ,EAAE;IACjE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EACpB,sBAAsB,EACtB,IAAI,CACL,CAAC;AAEF,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Equal to the line's stored amount, quantity and unit price.
|
|
6
|
+
*/
|
|
7
|
+
export type LineCalculationResult = {
|
|
8
|
+
/**
|
|
9
|
+
* The line's amount before tax.
|
|
10
|
+
*/
|
|
11
|
+
amount: string;
|
|
12
|
+
/**
|
|
13
|
+
* The line's quantity.
|
|
14
|
+
*/
|
|
15
|
+
quantity: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The line's unit price. It can be rounded, so quantity times unit price can differ from the amount.
|
|
18
|
+
*/
|
|
19
|
+
unitPrice: string | null;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const LineCalculationResult$inboundSchema: z.ZodType<LineCalculationResult, z.ZodTypeDef, unknown>;
|
|
23
|
+
export declare function lineCalculationResultFromJSON(jsonString: string): SafeParseResult<LineCalculationResult, SDKValidationError>;
|
|
24
|
+
//# sourceMappingURL=linecalculationresult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linecalculationresult.d.ts","sourceRoot":"","sources":["../../../src/models/linecalculationresult.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
|