@paygentic/sdk 0.9.1 → 0.9.4
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/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/invoice.d.ts +21 -1
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +16 -1
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/lineitem.d.ts +4 -3
- package/dist/commonjs/models/lineitem.d.ts.map +1 -1
- package/dist/commonjs/models/lineitem.js +2 -1
- package/dist/commonjs/models/lineitem.js.map +1 -1
- package/dist/commonjs/models/pricefeature.d.ts +3 -0
- package/dist/commonjs/models/pricefeature.d.ts.map +1 -1
- package/dist/commonjs/models/pricefeature.js.map +1 -1
- package/dist/commonjs/models/pricefeatureinput.d.ts +1 -1
- package/dist/commonjs/models/pricepropertiesunion.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/invoice.d.ts +21 -1
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +15 -0
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/lineitem.d.ts +4 -3
- package/dist/esm/models/lineitem.d.ts.map +1 -1
- package/dist/esm/models/lineitem.js +2 -1
- package/dist/esm/models/lineitem.js.map +1 -1
- package/dist/esm/models/pricefeature.d.ts +3 -0
- package/dist/esm/models/pricefeature.d.ts.map +1 -1
- package/dist/esm/models/pricefeature.js.map +1 -1
- package/dist/esm/models/pricefeatureinput.d.ts +1 -1
- package/dist/esm/models/pricepropertiesunion.d.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/invoice.ts +30 -1
- package/src/models/lineitem.ts +4 -3
- package/src/models/pricefeature.ts +3 -0
- package/src/models/pricefeatureinput.ts +1 -1
- package/src/models/pricepropertiesunion.ts +1 -1
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "0.1.0";
|
|
34
|
-
readonly sdkVersion: "0.9.
|
|
34
|
+
readonly sdkVersion: "0.9.4";
|
|
35
35
|
readonly genVersion: "2.879.13";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.9.4 2.879.13 0.1.0 @paygentic/sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -35,8 +35,8 @@ function serverURLFromOptions(options) {
|
|
|
35
35
|
exports.SDK_METADATA = {
|
|
36
36
|
language: "typescript",
|
|
37
37
|
openapiDocVersion: "0.1.0",
|
|
38
|
-
sdkVersion: "0.9.
|
|
38
|
+
sdkVersion: "0.9.4",
|
|
39
39
|
genVersion: "2.879.13",
|
|
40
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
40
|
+
userAgent: "speakeasy-sdk/typescript 0.9.4 2.879.13 0.1.0 @paygentic/sdk",
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { InvoiceLineItem } from "./invoicelineitem.js";
|
|
@@ -50,6 +50,20 @@ export declare const PdfSource: {
|
|
|
50
50
|
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
51
51
|
*/
|
|
52
52
|
export type PdfSource = ClosedEnum<typeof PdfSource>;
|
|
53
|
+
/**
|
|
54
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
55
|
+
*/
|
|
56
|
+
export declare const DocumentWithheldReason: {
|
|
57
|
+
readonly TaxUnreconciled: "tax_unreconciled";
|
|
58
|
+
readonly IssuerIdentityIncomplete: "issuer_identity_incomplete";
|
|
59
|
+
readonly TaxComponentUnpriceable: "tax_component_unpriceable";
|
|
60
|
+
readonly LedgerMismatch: "ledger_mismatch";
|
|
61
|
+
readonly TaxProviderDisagrees: "tax_provider_disagrees";
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
65
|
+
*/
|
|
66
|
+
export type DocumentWithheldReason = OpenEnum<typeof DocumentWithheldReason>;
|
|
53
67
|
/**
|
|
54
68
|
* The current status of the invoice
|
|
55
69
|
*/
|
|
@@ -198,6 +212,10 @@ export type Invoice = {
|
|
|
198
212
|
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
199
213
|
*/
|
|
200
214
|
pdfSource?: PdfSource | null | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
217
|
+
*/
|
|
218
|
+
documentWithheldReason?: DocumentWithheldReason | null | undefined;
|
|
201
219
|
/**
|
|
202
220
|
* The end of the billing period
|
|
203
221
|
*/
|
|
@@ -255,6 +273,8 @@ export declare function invoiceLineItemsFromJSON(jsonString: string): SafeParseR
|
|
|
255
273
|
/** @internal */
|
|
256
274
|
export declare const PdfSource$inboundSchema: z.ZodNativeEnum<typeof PdfSource>;
|
|
257
275
|
/** @internal */
|
|
276
|
+
export declare const DocumentWithheldReason$inboundSchema: z.ZodType<DocumentWithheldReason, z.ZodTypeDef, unknown>;
|
|
277
|
+
/** @internal */
|
|
258
278
|
export declare const InvoiceStatus$inboundSchema: z.ZodNativeEnum<typeof InvoiceStatus>;
|
|
259
279
|
/** @internal */
|
|
260
280
|
export declare const Tax$inboundSchema: z.ZodType<Tax, z.ZodTypeDef, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAA8B,MAAM,mBAAmB,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,aAAa;;CAEhB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAClC;;OAEG;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AAC,aAAa,CACvD,OAAO,aAAa,CACS,CAAC;AAEhC,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAWhE,CAAC;AAEL,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAM1C;AAED,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CA0DxE,CAAC;AAEL,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAM9C"}
|
|
@@ -36,12 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Invoice$inboundSchema = exports.Tax$inboundSchema = exports.InvoiceStatus$inboundSchema = exports.PdfSource$inboundSchema = exports.InvoiceLineItems$inboundSchema = exports.InvoiceObject$inboundSchema = exports.InvoiceStatus = exports.PdfSource = exports.InvoiceObject = void 0;
|
|
39
|
+
exports.Invoice$inboundSchema = exports.Tax$inboundSchema = exports.InvoiceStatus$inboundSchema = exports.DocumentWithheldReason$inboundSchema = exports.PdfSource$inboundSchema = exports.InvoiceLineItems$inboundSchema = exports.InvoiceObject$inboundSchema = exports.InvoiceStatus = exports.DocumentWithheldReason = exports.PdfSource = exports.InvoiceObject = void 0;
|
|
40
40
|
exports.invoiceLineItemsFromJSON = invoiceLineItemsFromJSON;
|
|
41
41
|
exports.taxFromJSON = taxFromJSON;
|
|
42
42
|
exports.invoiceFromJSON = invoiceFromJSON;
|
|
43
43
|
const z = __importStar(require("zod/v3"));
|
|
44
44
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
+
const openEnums = __importStar(require("../types/enums.js"));
|
|
45
46
|
const invoicelineitem_js_1 = require("./invoicelineitem.js");
|
|
46
47
|
const resolveditem_js_1 = require("./resolveditem.js");
|
|
47
48
|
/**
|
|
@@ -57,6 +58,16 @@ exports.PdfSource = {
|
|
|
57
58
|
Paygentic: "paygentic",
|
|
58
59
|
TaxProvider: "tax_provider",
|
|
59
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
63
|
+
*/
|
|
64
|
+
exports.DocumentWithheldReason = {
|
|
65
|
+
TaxUnreconciled: "tax_unreconciled",
|
|
66
|
+
IssuerIdentityIncomplete: "issuer_identity_incomplete",
|
|
67
|
+
TaxComponentUnpriceable: "tax_component_unpriceable",
|
|
68
|
+
LedgerMismatch: "ledger_mismatch",
|
|
69
|
+
TaxProviderDisagrees: "tax_provider_disagrees",
|
|
70
|
+
};
|
|
60
71
|
/**
|
|
61
72
|
* The current status of the invoice
|
|
62
73
|
*/
|
|
@@ -90,6 +101,8 @@ function invoiceLineItemsFromJSON(jsonString) {
|
|
|
90
101
|
exports.PdfSource$inboundSchema = z
|
|
91
102
|
.nativeEnum(exports.PdfSource);
|
|
92
103
|
/** @internal */
|
|
104
|
+
exports.DocumentWithheldReason$inboundSchema = openEnums.inboundSchema(exports.DocumentWithheldReason);
|
|
105
|
+
/** @internal */
|
|
93
106
|
exports.InvoiceStatus$inboundSchema = z.nativeEnum(exports.InvoiceStatus);
|
|
94
107
|
/** @internal */
|
|
95
108
|
exports.Tax$inboundSchema = z
|
|
@@ -131,6 +144,8 @@ exports.Invoice$inboundSchema = z.object({
|
|
|
131
144
|
paymentUrl: z.nullable(z.string()).optional(),
|
|
132
145
|
pdfUrl: z.nullable(z.string()).optional(),
|
|
133
146
|
pdfSource: z.nullable(exports.PdfSource$inboundSchema).optional(),
|
|
147
|
+
documentWithheldReason: z.nullable(exports.DocumentWithheldReason$inboundSchema)
|
|
148
|
+
.optional(),
|
|
134
149
|
periodEnd: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
135
150
|
periodStart: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
136
151
|
permalink: z.nullable(z.string()).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0SH,4DAQC;AAgCD,kCAQC;AA+DD,0CAQC;AA/ZD,0CAA4B;AAC5B,kDAA8C;AAC9C,6DAA+C;AAI/C,6DAG8B;AAC9B,uDAA6E;AAE7E;;GAEG;AACU,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;CACV,CAAC;AAgCX;;GAEG;AACU,QAAA,SAAS,GAAG;IACvB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,cAAc;CACnB,CAAC;AAMX;;GAEG;AACU,QAAA,sBAAsB,G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AAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAC/D,IAAI,IAAI,CAAC,CAAC,CAAC,CACZ;IACD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAChC,MAAM,EAAE,mCAA2B;IACnC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,yBAAiB,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAC7D,IAAI,IAAI,CAAC,CAAC,CAAC,CACZ;CACF,CAAC,CAAC;AAEL,SAAgB,eAAe,CAC7B,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,6BAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjD,qCAAqC,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -3,16 +3,17 @@ 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
5
|
/**
|
|
6
|
-
* The type of line item. 'discount' line items
|
|
6
|
+
* 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
7
|
*/
|
|
8
8
|
export declare const LineItemType: {
|
|
9
9
|
readonly Fee: "fee";
|
|
10
10
|
readonly Metered: "metered";
|
|
11
11
|
readonly Manual: "manual";
|
|
12
12
|
readonly Discount: "discount";
|
|
13
|
+
readonly Adjustment: "adjustment";
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
|
-
* The type of line item. 'discount' line items
|
|
16
|
+
* 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.
|
|
16
17
|
*/
|
|
17
18
|
export type LineItemType = ClosedEnum<typeof LineItemType>;
|
|
18
19
|
/**
|
|
@@ -63,7 +64,7 @@ export type LineItem = {
|
|
|
63
64
|
*/
|
|
64
65
|
invoiceId?: string | null | undefined;
|
|
65
66
|
/**
|
|
66
|
-
* The type of line item. 'discount' line items
|
|
67
|
+
* 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.
|
|
67
68
|
*/
|
|
68
69
|
type: LineItemType;
|
|
69
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineitem.d.ts","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"lineitem.d.ts","sourceRoot":"","sources":["../../../src/models/line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,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAC5C,QAAQ,EACR,CAAC,CAAC,UAAU,EACZ,OAAO,CAgCP,CAAC;AAEH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAM/C"}
|
|
@@ -41,13 +41,14 @@ exports.lineItemFromJSON = lineItemFromJSON;
|
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
43
|
/**
|
|
44
|
-
* The type of line item. 'discount' line items
|
|
44
|
+
* 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
45
|
*/
|
|
46
46
|
exports.LineItemType = {
|
|
47
47
|
Fee: "fee",
|
|
48
48
|
Metered: "metered",
|
|
49
49
|
Manual: "manual",
|
|
50
50
|
Discount: "discount",
|
|
51
|
+
Adjustment: "adjustment",
|
|
51
52
|
};
|
|
52
53
|
/**
|
|
53
54
|
* Whether this item is pending or already on an invoice
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8MH,4CAQC;AApND,0CAA4B;AAC5B,kDAA8C;AAK9C;;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,Q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C,QAAQ,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;CACrD,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"}
|
|
@@ -16,6 +16,9 @@ export type PriceFeatureFeature = {
|
|
|
16
16
|
export type PriceFeature = {
|
|
17
17
|
id: string;
|
|
18
18
|
featureId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The allowance this price declares for the feature. An empty object where the price attaches the feature without declaring one.
|
|
21
|
+
*/
|
|
19
22
|
entitlementTemplate: {
|
|
20
23
|
[k: string]: any;
|
|
21
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricefeature.d.ts","sourceRoot":"","sources":["../../../src/models/pricefeature.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,EA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CAMP,CAAC;AAEH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricefeature.js","sourceRoot":"","sources":["../../../src/models/pricefeature.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pricefeature.js","sourceRoot":"","sources":["../../../src/models/pricefeature.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CH,kEAQC;AAcD,oDAQC;AA3ED,0CAA4B;AAC5B,kDAA8C;AAKjC,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACV,CAAC;AAmBX,gBAAgB;AACH,QAAA,8BAA8B,GAEvC,CAAC,CAAC,UAAU,CAAC,wBAAgB,CAAC,CAAC;AAEnC,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,sCAA8B,CAAC,QAAQ,EAAE;CAChD,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;AAED,gBAAgB;AACH,QAAA,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,mBAAmB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,yCAAiC,CAAC,CAAC,QAAQ,EAAE;CACpE,CAAC,CAAC;AAEH,SAAgB,oBAAoB,CAClC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -5,7 +5,7 @@ export type PriceFeatureInput = {
|
|
|
5
5
|
*/
|
|
6
6
|
featureId: string;
|
|
7
7
|
/**
|
|
8
|
-
* Template for entitlement values when this feature is provisioned
|
|
8
|
+
* Template for entitlement values when this feature is provisioned. Omit the field to attach the feature without declaring an allowance. An explicit empty object declares an allowance with default values.
|
|
9
9
|
*/
|
|
10
10
|
entitlementTemplate?: {
|
|
11
11
|
[k: string]: any;
|
|
@@ -75,7 +75,7 @@ export type PriceProperties2 = {
|
|
|
75
75
|
*/
|
|
76
76
|
export type PriceProperties1 = {
|
|
77
77
|
/**
|
|
78
|
-
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field. A negative value defines a usage-scaled rebate: the line's subtotal is negative and reduces the invoice. A rebate never drives an invoice total below zero, so set rebate rates below the charges they offset. A negative unitPrice is only valid on a metered price (a billableMetricId is required — there is no usage to scale on a fee price) and cannot be combined with grantDiscountEnabled, a hard-limit feature, or a pricingUnitId. When a rebate and a charge price share a billable metric, they
|
|
78
|
+
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field. A negative value defines a usage-scaled rebate: the line's subtotal is negative and reduces the invoice. A rebate never drives an invoice total below zero, so set rebate rates below the charges they offset. A negative unitPrice is only valid on a metered price (a billableMetricId is required — there is no usage to scale on a fee price) and cannot be combined with grantDiscountEnabled, a hard-limit feature, or a pricingUnitId. When a rebate and a charge price share a billable metric but attach to different features, they compute against different quantity bases: a price attached to a feature bills the overage against its allowance, while a featureless price bills the raw metered usage. That is a permitted configuration, not an error. Attach both to the same feature to bill them against one basis.
|
|
79
79
|
*/
|
|
80
80
|
unitPrice: string;
|
|
81
81
|
};
|
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.9.
|
|
34
|
+
readonly sdkVersion: "0.9.4";
|
|
35
35
|
readonly genVersion: "2.879.13";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.9.4 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.9.
|
|
34
|
+
sdkVersion: "0.9.4",
|
|
35
35
|
genVersion: "2.879.13",
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 0.9.4 2.879.13 0.1.0 @paygentic/sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { InvoiceLineItem } from "./invoicelineitem.js";
|
|
@@ -50,6 +50,20 @@ export declare const PdfSource: {
|
|
|
50
50
|
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
51
51
|
*/
|
|
52
52
|
export type PdfSource = ClosedEnum<typeof PdfSource>;
|
|
53
|
+
/**
|
|
54
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
55
|
+
*/
|
|
56
|
+
export declare const DocumentWithheldReason: {
|
|
57
|
+
readonly TaxUnreconciled: "tax_unreconciled";
|
|
58
|
+
readonly IssuerIdentityIncomplete: "issuer_identity_incomplete";
|
|
59
|
+
readonly TaxComponentUnpriceable: "tax_component_unpriceable";
|
|
60
|
+
readonly LedgerMismatch: "ledger_mismatch";
|
|
61
|
+
readonly TaxProviderDisagrees: "tax_provider_disagrees";
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
65
|
+
*/
|
|
66
|
+
export type DocumentWithheldReason = OpenEnum<typeof DocumentWithheldReason>;
|
|
53
67
|
/**
|
|
54
68
|
* The current status of the invoice
|
|
55
69
|
*/
|
|
@@ -198,6 +212,10 @@ export type Invoice = {
|
|
|
198
212
|
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
199
213
|
*/
|
|
200
214
|
pdfSource?: PdfSource | null | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
217
|
+
*/
|
|
218
|
+
documentWithheldReason?: DocumentWithheldReason | null | undefined;
|
|
201
219
|
/**
|
|
202
220
|
* The end of the billing period
|
|
203
221
|
*/
|
|
@@ -255,6 +273,8 @@ export declare function invoiceLineItemsFromJSON(jsonString: string): SafeParseR
|
|
|
255
273
|
/** @internal */
|
|
256
274
|
export declare const PdfSource$inboundSchema: z.ZodNativeEnum<typeof PdfSource>;
|
|
257
275
|
/** @internal */
|
|
276
|
+
export declare const DocumentWithheldReason$inboundSchema: z.ZodType<DocumentWithheldReason, z.ZodTypeDef, unknown>;
|
|
277
|
+
/** @internal */
|
|
258
278
|
export declare const InvoiceStatus$inboundSchema: z.ZodNativeEnum<typeof InvoiceStatus>;
|
|
259
279
|
/** @internal */
|
|
260
280
|
export declare const Tax$inboundSchema: z.ZodType<Tax, z.ZodTypeDef, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,M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AAE,CAAC,CAAC,OAAO,CACpD,gBAAgB,EAChB,CAAC,CAAC,UAAU,EACZ,OAAO,CAOP,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAMvD;AAED,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,SAAS,CAC9C,CAAC;AAEzB,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAC0C,CAAC;AAEpD,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,aAAa,CACvD,OAAO,aAAa,CACS,CAAC;AAEhC,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAWhE,CAAC;AAEL,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAM1C;AAED,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CA0DxE,CAAC;AAEL,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAM9C"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
6
7
|
import { InvoiceLineItem$inboundSchema, } from "./invoicelineitem.js";
|
|
7
8
|
import { ResolvedItem$inboundSchema } from "./resolveditem.js";
|
|
8
9
|
/**
|
|
@@ -18,6 +19,16 @@ export const PdfSource = {
|
|
|
18
19
|
Paygentic: "paygentic",
|
|
19
20
|
TaxProvider: "tax_provider",
|
|
20
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
24
|
+
*/
|
|
25
|
+
export const DocumentWithheldReason = {
|
|
26
|
+
TaxUnreconciled: "tax_unreconciled",
|
|
27
|
+
IssuerIdentityIncomplete: "issuer_identity_incomplete",
|
|
28
|
+
TaxComponentUnpriceable: "tax_component_unpriceable",
|
|
29
|
+
LedgerMismatch: "ledger_mismatch",
|
|
30
|
+
TaxProviderDisagrees: "tax_provider_disagrees",
|
|
31
|
+
};
|
|
21
32
|
/**
|
|
22
33
|
* The current status of the invoice
|
|
23
34
|
*/
|
|
@@ -51,6 +62,8 @@ export function invoiceLineItemsFromJSON(jsonString) {
|
|
|
51
62
|
export const PdfSource$inboundSchema = z
|
|
52
63
|
.nativeEnum(PdfSource);
|
|
53
64
|
/** @internal */
|
|
65
|
+
export const DocumentWithheldReason$inboundSchema = openEnums.inboundSchema(DocumentWithheldReason);
|
|
66
|
+
/** @internal */
|
|
54
67
|
export const InvoiceStatus$inboundSchema = z.nativeEnum(InvoiceStatus);
|
|
55
68
|
/** @internal */
|
|
56
69
|
export const Tax$inboundSchema = z
|
|
@@ -92,6 +105,8 @@ export const Invoice$inboundSchema = z.object({
|
|
|
92
105
|
paymentUrl: z.nullable(z.string()).optional(),
|
|
93
106
|
pdfUrl: z.nullable(z.string()).optional(),
|
|
94
107
|
pdfSource: z.nullable(PdfSource$inboundSchema).optional(),
|
|
108
|
+
documentWithheldReason: z.nullable(DocumentWithheldReason$inboundSchema)
|
|
109
|
+
.optional(),
|
|
95
110
|
periodEnd: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
96
111
|
periodStart: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
97
112
|
permalink: z.nullable(z.string()).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../src/models/invoice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAEL,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAgB,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;CACV,CAAC;AAgCX;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,cAAc;CACnB,CAAC;AAMX;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAs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
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
/**
|
|
6
|
-
* The type of line item. 'discount' line items
|
|
6
|
+
* 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
7
|
*/
|
|
8
8
|
export declare const LineItemType: {
|
|
9
9
|
readonly Fee: "fee";
|
|
10
10
|
readonly Metered: "metered";
|
|
11
11
|
readonly Manual: "manual";
|
|
12
12
|
readonly Discount: "discount";
|
|
13
|
+
readonly Adjustment: "adjustment";
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
|
-
* The type of line item. 'discount' line items
|
|
16
|
+
* 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.
|
|
16
17
|
*/
|
|
17
18
|
export type LineItemType = ClosedEnum<typeof LineItemType>;
|
|
18
19
|
/**
|
|
@@ -63,7 +64,7 @@ export type LineItem = {
|
|
|
63
64
|
*/
|
|
64
65
|
invoiceId?: string | null | undefined;
|
|
65
66
|
/**
|
|
66
|
-
* The type of line item. 'discount' line items
|
|
67
|
+
* 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.
|
|
67
68
|
*/
|
|
68
69
|
type: LineItemType;
|
|
69
70
|
/**
|
|
@@ -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;AA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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,CAgCP,CAAC;AAEH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAM/C"}
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
/**
|
|
7
|
-
* The type of line item. 'discount' line items
|
|
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.
|
|
8
8
|
*/
|
|
9
9
|
export const LineItemType = {
|
|
10
10
|
Fee: "fee",
|
|
11
11
|
Metered: "metered",
|
|
12
12
|
Manual: "manual",
|
|
13
13
|
Discount: "discount",
|
|
14
|
+
Adjustment: "adjustment",
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
17
|
* Whether this item is pending or already on an invoice
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineitem.js","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"lineitem.js","sourceRoot":"","sources":["../../../src/models/lineitem.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,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ares for the feature. An empty object where the price attaches the feature without declaring one.
|
|
21
|
+
*/
|
|
19
22
|
entitlementTemplate: {
|
|
20
23
|
[k: string]: any;
|
|
21
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricefeature.d.ts","sourceRoot":"","sources":["../../../src/models/pricefeature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC1C,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,aAAa,CAC1D,OAAO,gBAAgB,CACS,CAAC;AAEnC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU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CACS,CAAC;AAEnC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D;AAED,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricefeature.js","sourceRoot":"","sources":["../../../src/models/pricefeature.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACV,CAAC;
|
|
1
|
+
{"version":3,"file":"pricefeature.js","sourceRoot":"","sources":["../../../src/models/pricefeature.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACV,CAAC;AAmBX,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAEvC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEnC,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,8BAA8B,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,mBAAmB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;CACpE,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAClC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -5,7 +5,7 @@ export type PriceFeatureInput = {
|
|
|
5
5
|
*/
|
|
6
6
|
featureId: string;
|
|
7
7
|
/**
|
|
8
|
-
* Template for entitlement values when this feature is provisioned
|
|
8
|
+
* Template for entitlement values when this feature is provisioned. Omit the field to attach the feature without declaring an allowance. An explicit empty object declares an allowance with default values.
|
|
9
9
|
*/
|
|
10
10
|
entitlementTemplate?: {
|
|
11
11
|
[k: string]: any;
|
|
@@ -75,7 +75,7 @@ export type PriceProperties2 = {
|
|
|
75
75
|
*/
|
|
76
76
|
export type PriceProperties1 = {
|
|
77
77
|
/**
|
|
78
|
-
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field. A negative value defines a usage-scaled rebate: the line's subtotal is negative and reduces the invoice. A rebate never drives an invoice total below zero, so set rebate rates below the charges they offset. A negative unitPrice is only valid on a metered price (a billableMetricId is required — there is no usage to scale on a fee price) and cannot be combined with grantDiscountEnabled, a hard-limit feature, or a pricingUnitId. When a rebate and a charge price share a billable metric, they
|
|
78
|
+
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field. A negative value defines a usage-scaled rebate: the line's subtotal is negative and reduces the invoice. A rebate never drives an invoice total below zero, so set rebate rates below the charges they offset. A negative unitPrice is only valid on a metered price (a billableMetricId is required — there is no usage to scale on a fee price) and cannot be combined with grantDiscountEnabled, a hard-limit feature, or a pricingUnitId. When a rebate and a charge price share a billable metric but attach to different features, they compute against different quantity bases: a price attached to a feature bills the overage against its allowance, while a featureless price bills the raw metered usage. That is a permitted configuration, not an error. Attach both to the same feature to bill them against one basis.
|
|
79
79
|
*/
|
|
80
80
|
unitPrice: string;
|
|
81
81
|
};
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.9.
|
|
68
|
+
sdkVersion: "0.9.4",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.9.4 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
package/src/models/invoice.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -62,6 +63,21 @@ export const PdfSource = {
|
|
|
62
63
|
*/
|
|
63
64
|
export type PdfSource = ClosedEnum<typeof PdfSource>;
|
|
64
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
68
|
+
*/
|
|
69
|
+
export const DocumentWithheldReason = {
|
|
70
|
+
TaxUnreconciled: "tax_unreconciled",
|
|
71
|
+
IssuerIdentityIncomplete: "issuer_identity_incomplete",
|
|
72
|
+
TaxComponentUnpriceable: "tax_component_unpriceable",
|
|
73
|
+
LedgerMismatch: "ledger_mismatch",
|
|
74
|
+
TaxProviderDisagrees: "tax_provider_disagrees",
|
|
75
|
+
} as const;
|
|
76
|
+
/**
|
|
77
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
78
|
+
*/
|
|
79
|
+
export type DocumentWithheldReason = OpenEnum<typeof DocumentWithheldReason>;
|
|
80
|
+
|
|
65
81
|
/**
|
|
66
82
|
* The current status of the invoice
|
|
67
83
|
*/
|
|
@@ -210,6 +226,10 @@ export type Invoice = {
|
|
|
210
226
|
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
211
227
|
*/
|
|
212
228
|
pdfSource?: PdfSource | null | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `tax_provider` or null, and never `paygentic`. Use it to tell a withheld document apart from an invoice the tax provider serves by design — both report pdfSource `tax_provider`, but only a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
231
|
+
*/
|
|
232
|
+
documentWithheldReason?: DocumentWithheldReason | null | undefined;
|
|
213
233
|
/**
|
|
214
234
|
* The end of the billing period
|
|
215
235
|
*/
|
|
@@ -292,6 +312,13 @@ export function invoiceLineItemsFromJSON(
|
|
|
292
312
|
export const PdfSource$inboundSchema: z.ZodNativeEnum<typeof PdfSource> = z
|
|
293
313
|
.nativeEnum(PdfSource);
|
|
294
314
|
|
|
315
|
+
/** @internal */
|
|
316
|
+
export const DocumentWithheldReason$inboundSchema: z.ZodType<
|
|
317
|
+
DocumentWithheldReason,
|
|
318
|
+
z.ZodTypeDef,
|
|
319
|
+
unknown
|
|
320
|
+
> = openEnums.inboundSchema(DocumentWithheldReason);
|
|
321
|
+
|
|
295
322
|
/** @internal */
|
|
296
323
|
export const InvoiceStatus$inboundSchema: z.ZodNativeEnum<
|
|
297
324
|
typeof InvoiceStatus
|
|
@@ -360,6 +387,8 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
360
387
|
paymentUrl: z.nullable(z.string()).optional(),
|
|
361
388
|
pdfUrl: z.nullable(z.string()).optional(),
|
|
362
389
|
pdfSource: z.nullable(PdfSource$inboundSchema).optional(),
|
|
390
|
+
documentWithheldReason: z.nullable(DocumentWithheldReason$inboundSchema)
|
|
391
|
+
.optional(),
|
|
363
392
|
periodEnd: z.string().datetime({ offset: true }).transform(v =>
|
|
364
393
|
new Date(v)
|
|
365
394
|
),
|
package/src/models/lineitem.ts
CHANGED
|
@@ -9,16 +9,17 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* The type of line item. 'discount' line items
|
|
12
|
+
* 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.
|
|
13
13
|
*/
|
|
14
14
|
export const LineItemType = {
|
|
15
15
|
Fee: "fee",
|
|
16
16
|
Metered: "metered",
|
|
17
17
|
Manual: "manual",
|
|
18
18
|
Discount: "discount",
|
|
19
|
+
Adjustment: "adjustment",
|
|
19
20
|
} as const;
|
|
20
21
|
/**
|
|
21
|
-
* The type of line item. 'discount' line items
|
|
22
|
+
* 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.
|
|
22
23
|
*/
|
|
23
24
|
export type LineItemType = ClosedEnum<typeof LineItemType>;
|
|
24
25
|
|
|
@@ -72,7 +73,7 @@ export type LineItem = {
|
|
|
72
73
|
*/
|
|
73
74
|
invoiceId?: string | null | undefined;
|
|
74
75
|
/**
|
|
75
|
-
* The type of line item. 'discount' line items
|
|
76
|
+
* 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.
|
|
76
77
|
*/
|
|
77
78
|
type: LineItemType;
|
|
78
79
|
/**
|
|
@@ -24,6 +24,9 @@ export type PriceFeatureFeature = {
|
|
|
24
24
|
export type PriceFeature = {
|
|
25
25
|
id: string;
|
|
26
26
|
featureId: string;
|
|
27
|
+
/**
|
|
28
|
+
* The allowance this price declares for the feature. An empty object where the price attaches the feature without declaring one.
|
|
29
|
+
*/
|
|
27
30
|
entitlementTemplate: { [k: string]: any };
|
|
28
31
|
feature?: PriceFeatureFeature | undefined;
|
|
29
32
|
};
|
|
@@ -10,7 +10,7 @@ export type PriceFeatureInput = {
|
|
|
10
10
|
*/
|
|
11
11
|
featureId: string;
|
|
12
12
|
/**
|
|
13
|
-
* Template for entitlement values when this feature is provisioned
|
|
13
|
+
* Template for entitlement values when this feature is provisioned. Omit the field to attach the feature without declaring an allowance. An explicit empty object declares an allowance with default values.
|
|
14
14
|
*/
|
|
15
15
|
entitlementTemplate?: { [k: string]: any } | undefined;
|
|
16
16
|
};
|
|
@@ -86,7 +86,7 @@ export type PriceProperties2 = {
|
|
|
86
86
|
*/
|
|
87
87
|
export type PriceProperties1 = {
|
|
88
88
|
/**
|
|
89
|
-
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field. A negative value defines a usage-scaled rebate: the line's subtotal is negative and reduces the invoice. A rebate never drives an invoice total below zero, so set rebate rates below the charges they offset. A negative unitPrice is only valid on a metered price (a billableMetricId is required — there is no usage to scale on a fee price) and cannot be combined with grantDiscountEnabled, a hard-limit feature, or a pricingUnitId. When a rebate and a charge price share a billable metric, they
|
|
89
|
+
* Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field. A negative value defines a usage-scaled rebate: the line's subtotal is negative and reduces the invoice. A rebate never drives an invoice total below zero, so set rebate rates below the charges they offset. A negative unitPrice is only valid on a metered price (a billableMetricId is required — there is no usage to scale on a fee price) and cannot be combined with grantDiscountEnabled, a hard-limit feature, or a pricingUnitId. When a rebate and a charge price share a billable metric but attach to different features, they compute against different quantity bases: a price attached to a feature bills the overage against its allowance, while a featureless price bills the raw metered usage. That is a permitted configuration, not an error. Attach both to the same feature to bill them against one basis.
|
|
90
90
|
*/
|
|
91
91
|
unitPrice: string;
|
|
92
92
|
};
|