@paygentic/sdk 0.9.6 → 0.9.7
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/invoicelineitem.d.ts +25 -0
- package/dist/commonjs/models/invoicelineitem.d.ts.map +1 -1
- package/dist/commonjs/models/invoicelineitem.js +15 -1
- package/dist/commonjs/models/invoicelineitem.js.map +1 -1
- package/dist/commonjs/models/lineitem.d.ts +3 -3
- package/dist/commonjs/models/lineitem.js +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/invoicelineitem.d.ts +25 -0
- package/dist/esm/models/invoicelineitem.d.ts.map +1 -1
- package/dist/esm/models/invoicelineitem.js +14 -0
- package/dist/esm/models/invoicelineitem.js.map +1 -1
- package/dist/esm/models/lineitem.d.ts +3 -3
- package/dist/esm/models/lineitem.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/invoicelineitem.ts +36 -0
- package/src/models/lineitem.ts +3 -3
|
@@ -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.7";
|
|
35
35
|
readonly genVersion: "2.879.13";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.9.7 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.7",
|
|
39
39
|
genVersion: "2.879.13",
|
|
40
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
40
|
+
userAgent: "speakeasy-sdk/typescript 0.9.7 2.879.13 0.1.0 @paygentic/sdk",
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.js.map
|
|
@@ -14,6 +14,17 @@ export declare const EventType: {
|
|
|
14
14
|
* Type of event: 'usage' for billable metric events, 'fee' for fee events, 'discount' for grant discount line items (subtotal/total are negative, representing a credit)
|
|
15
15
|
*/
|
|
16
16
|
export type EventType = ClosedEnum<typeof EventType>;
|
|
17
|
+
/**
|
|
18
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
19
|
+
*/
|
|
20
|
+
export declare const InvoiceLineItemPaymentTerm: {
|
|
21
|
+
readonly InAdvance: "in_advance";
|
|
22
|
+
readonly InArrears: "in_arrears";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
26
|
+
*/
|
|
27
|
+
export type InvoiceLineItemPaymentTerm = ClosedEnum<typeof InvoiceLineItemPaymentTerm>;
|
|
17
28
|
/**
|
|
18
29
|
* Type of line item: 'charge' for regular billing, 'refund' for refunded items (amounts are negated)
|
|
19
30
|
*/
|
|
@@ -50,6 +61,18 @@ export type InvoiceLineItem = {
|
|
|
50
61
|
* The price this line was generated from, or `null` when the line has no originating charge. With `itemId` it says whether a missing tag is fixable: `priceId` set and `itemId` null means the charge was simply untagged, which tagging it and restamping resolves; both null means the line records a grant-credit purchase, which is deferred revenue and is never tagged. Any measure of outstanding mapping work must exclude the latter or it can never reach zero.
|
|
51
62
|
*/
|
|
52
63
|
priceId?: string | null | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Start of the billed window this line covers, inclusive. Distinct from the invoice's own period, which is the union of its lines' windows (earliest start to latest end) and so covers time no single line bills on a mixed-timing invoice.
|
|
66
|
+
*/
|
|
67
|
+
periodStart?: Date | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* End of the billed window this line covers, exclusive — the instant at `periodEnd` belongs to the next window. Equal to `periodStart` on a one-off charge, which bills at an instant and has no period grid.
|
|
70
|
+
*/
|
|
71
|
+
periodEnd?: Date | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
74
|
+
*/
|
|
75
|
+
paymentTerm?: InvoiceLineItemPaymentTerm | null | undefined;
|
|
53
76
|
/**
|
|
54
77
|
* Display name for this line item on invoices
|
|
55
78
|
*/
|
|
@@ -102,6 +125,8 @@ export type InvoiceLineItem = {
|
|
|
102
125
|
/** @internal */
|
|
103
126
|
export declare const EventType$inboundSchema: z.ZodNativeEnum<typeof EventType>;
|
|
104
127
|
/** @internal */
|
|
128
|
+
export declare const InvoiceLineItemPaymentTerm$inboundSchema: z.ZodNativeEnum<typeof InvoiceLineItemPaymentTerm>;
|
|
129
|
+
/** @internal */
|
|
105
130
|
export declare const InvoiceLineItemLineItemType$inboundSchema: z.ZodNativeEnum<typeof InvoiceLineItemLineItemType>;
|
|
106
131
|
/** @internal */
|
|
107
132
|
export declare const InvoiceLineItem$inboundSchema: z.ZodType<InvoiceLineItem, z.ZodTypeDef, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoicelineitem.d.ts","sourceRoot":"","sources":["../../../src/models/invoicelineitem.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,SAAS;;;;CAIZ,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;CAG9B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,2BAA2B,CACnC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,2BAA2B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,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,SAAS,CAC9C,CAAC;AAEzB,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,aAAa,CACpE,OAAO,0BAA0B,CACS,CAAC;AAE7C,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,aAAa,CACrE,OAAO,2BAA2B,CACS,CAAC;AAE9C,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAAO,CACnD,eAAe,EACf,CAAC,CAAC,UAAU,EACZ,OAAO,CAyBP,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.InvoiceLineItem$inboundSchema = exports.InvoiceLineItemLineItemType$inboundSchema = exports.EventType$inboundSchema = exports.InvoiceLineItemLineItemType = exports.EventType = void 0;
|
|
39
|
+
exports.InvoiceLineItem$inboundSchema = exports.InvoiceLineItemLineItemType$inboundSchema = exports.InvoiceLineItemPaymentTerm$inboundSchema = exports.EventType$inboundSchema = exports.InvoiceLineItemLineItemType = exports.InvoiceLineItemPaymentTerm = exports.EventType = void 0;
|
|
40
40
|
exports.invoiceLineItemFromJSON = invoiceLineItemFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
@@ -48,6 +48,13 @@ exports.EventType = {
|
|
|
48
48
|
Fee: "fee",
|
|
49
49
|
Discount: "discount",
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
53
|
+
*/
|
|
54
|
+
exports.InvoiceLineItemPaymentTerm = {
|
|
55
|
+
InAdvance: "in_advance",
|
|
56
|
+
InArrears: "in_arrears",
|
|
57
|
+
};
|
|
51
58
|
/**
|
|
52
59
|
* Type of line item: 'charge' for regular billing, 'refund' for refunded items (amounts are negated)
|
|
53
60
|
*/
|
|
@@ -59,6 +66,8 @@ exports.InvoiceLineItemLineItemType = {
|
|
|
59
66
|
exports.EventType$inboundSchema = z
|
|
60
67
|
.nativeEnum(exports.EventType);
|
|
61
68
|
/** @internal */
|
|
69
|
+
exports.InvoiceLineItemPaymentTerm$inboundSchema = z.nativeEnum(exports.InvoiceLineItemPaymentTerm);
|
|
70
|
+
/** @internal */
|
|
62
71
|
exports.InvoiceLineItemLineItemType$inboundSchema = z.nativeEnum(exports.InvoiceLineItemLineItemType);
|
|
63
72
|
/** @internal */
|
|
64
73
|
exports.InvoiceLineItem$inboundSchema = z.object({
|
|
@@ -68,6 +77,11 @@ exports.InvoiceLineItem$inboundSchema = z.object({
|
|
|
68
77
|
billableMetricId: z.string(),
|
|
69
78
|
itemId: z.nullable(z.string()).optional(),
|
|
70
79
|
priceId: z.nullable(z.string()).optional(),
|
|
80
|
+
periodStart: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
81
|
+
.optional(),
|
|
82
|
+
periodEnd: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
83
|
+
.optional(),
|
|
84
|
+
paymentTerm: z.nullable(exports.InvoiceLineItemPaymentTerm$inboundSchema).optional(),
|
|
71
85
|
invoiceDisplayName: z.string(),
|
|
72
86
|
lineItemType: exports.InvoiceLineItemLineItemType$inboundSchema,
|
|
73
87
|
meterEventId: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoicelineitem.js","sourceRoot":"","sources":["../../../src/models/invoicelineitem.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"invoicelineitem.js","sourceRoot":"","sources":["../../../src/models/invoicelineitem.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqLH,0DAQC;AA3LD,0CAA4B;AAC5B,kDAA8C;AAK9C;;GAEG;AACU,QAAA,SAAS,GAAG;IACvB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;CACZ,CAAC;AAMX;;GAEG;AACU,QAAA,0BAA0B,GAAG;IACxC,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;CACf,CAAC;AAQX;;GAEG;AACU,QAAA,2BAA2B,GAAG;IACzC,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC;AA+FX,gBAAgB;AACH,QAAA,uBAAuB,GAAsC,CAAC;KACxE,UAAU,CAAC,iBAAS,CAAC,CAAC;AAEzB,gBAAgB;AACH,QAAA,wCAAwC,GAEjD,CAAC,CAAC,UAAU,CAAC,kCAA0B,CAAC,CAAC;AAE7C,gBAAgB;AACH,QAAA,yCAAyC,GAElD,CAAC,CAAC,UAAU,CAAC,mCAA2B,CAAC,CAAC;AAE9C,gBAAgB;AACH,QAAA,6BAA6B,GAItC,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,+BAAuB;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B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AAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -28,14 +28,14 @@ export declare const LineItemStatus: {
|
|
|
28
28
|
*/
|
|
29
29
|
export type LineItemStatus = ClosedEnum<typeof LineItemStatus>;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
32
32
|
*/
|
|
33
33
|
export declare const LineItemPaymentTerm: {
|
|
34
34
|
readonly InAdvance: "in_advance";
|
|
35
35
|
readonly InArrears: "in_arrears";
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
39
39
|
*/
|
|
40
40
|
export type LineItemPaymentTerm = ClosedEnum<typeof LineItemPaymentTerm>;
|
|
41
41
|
export type LineItem = {
|
|
@@ -112,7 +112,7 @@ export type LineItem = {
|
|
|
112
112
|
*/
|
|
113
113
|
meteredQuantity?: string | null | undefined;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
116
116
|
*/
|
|
117
117
|
paymentTerm?: LineItemPaymentTerm | null | undefined;
|
|
118
118
|
/**
|
|
@@ -58,7 +58,7 @@ exports.LineItemStatus = {
|
|
|
58
58
|
Invoiced: "invoiced",
|
|
59
59
|
};
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
62
62
|
*/
|
|
63
63
|
exports.LineItemPaymentTerm = {
|
|
64
64
|
InAdvance: "in_advance",
|
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.7";
|
|
35
35
|
readonly genVersion: "2.879.13";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.9.7 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.7",
|
|
35
35
|
genVersion: "2.879.13",
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 0.9.7 2.879.13 0.1.0 @paygentic/sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|
|
@@ -14,6 +14,17 @@ export declare const EventType: {
|
|
|
14
14
|
* Type of event: 'usage' for billable metric events, 'fee' for fee events, 'discount' for grant discount line items (subtotal/total are negative, representing a credit)
|
|
15
15
|
*/
|
|
16
16
|
export type EventType = ClosedEnum<typeof EventType>;
|
|
17
|
+
/**
|
|
18
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
19
|
+
*/
|
|
20
|
+
export declare const InvoiceLineItemPaymentTerm: {
|
|
21
|
+
readonly InAdvance: "in_advance";
|
|
22
|
+
readonly InArrears: "in_arrears";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
26
|
+
*/
|
|
27
|
+
export type InvoiceLineItemPaymentTerm = ClosedEnum<typeof InvoiceLineItemPaymentTerm>;
|
|
17
28
|
/**
|
|
18
29
|
* Type of line item: 'charge' for regular billing, 'refund' for refunded items (amounts are negated)
|
|
19
30
|
*/
|
|
@@ -50,6 +61,18 @@ export type InvoiceLineItem = {
|
|
|
50
61
|
* The price this line was generated from, or `null` when the line has no originating charge. With `itemId` it says whether a missing tag is fixable: `priceId` set and `itemId` null means the charge was simply untagged, which tagging it and restamping resolves; both null means the line records a grant-credit purchase, which is deferred revenue and is never tagged. Any measure of outstanding mapping work must exclude the latter or it can never reach zero.
|
|
51
62
|
*/
|
|
52
63
|
priceId?: string | null | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Start of the billed window this line covers, inclusive. Distinct from the invoice's own period, which is the union of its lines' windows (earliest start to latest end) and so covers time no single line bills on a mixed-timing invoice.
|
|
66
|
+
*/
|
|
67
|
+
periodStart?: Date | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* End of the billed window this line covers, exclusive — the instant at `periodEnd` belongs to the next window. Equal to `periodStart` on a one-off charge, which bills at an instant and has no period grid.
|
|
70
|
+
*/
|
|
71
|
+
periodEnd?: Date | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
74
|
+
*/
|
|
75
|
+
paymentTerm?: InvoiceLineItemPaymentTerm | null | undefined;
|
|
53
76
|
/**
|
|
54
77
|
* Display name for this line item on invoices
|
|
55
78
|
*/
|
|
@@ -102,6 +125,8 @@ export type InvoiceLineItem = {
|
|
|
102
125
|
/** @internal */
|
|
103
126
|
export declare const EventType$inboundSchema: z.ZodNativeEnum<typeof EventType>;
|
|
104
127
|
/** @internal */
|
|
128
|
+
export declare const InvoiceLineItemPaymentTerm$inboundSchema: z.ZodNativeEnum<typeof InvoiceLineItemPaymentTerm>;
|
|
129
|
+
/** @internal */
|
|
105
130
|
export declare const InvoiceLineItemLineItemType$inboundSchema: z.ZodNativeEnum<typeof InvoiceLineItemLineItemType>;
|
|
106
131
|
/** @internal */
|
|
107
132
|
export declare const InvoiceLineItem$inboundSchema: z.ZodType<InvoiceLineItem, z.ZodTypeDef, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoicelineitem.d.ts","sourceRoot":"","sources":["../../../src/models/invoicelineitem.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,SAAS;;;;CAIZ,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;CAG9B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,2BAA2B,CACnC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,2BAA2B,CAAC;IAC1C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;I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AuB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,SAAS,CAC9C,CAAC;AAEzB,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,aAAa,CACpE,OAAO,0BAA0B,CACS,CAAC;AAE7C,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,aAAa,CACrE,OAAO,2BAA2B,CACS,CAAC;AAE9C,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAAO,CACnD,eAAe,EACf,CAAC,CAAC,UAAU,EACZ,OAAO,CAyBP,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
|
|
@@ -11,6 +11,13 @@ export const EventType = {
|
|
|
11
11
|
Fee: "fee",
|
|
12
12
|
Discount: "discount",
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
16
|
+
*/
|
|
17
|
+
export const InvoiceLineItemPaymentTerm = {
|
|
18
|
+
InAdvance: "in_advance",
|
|
19
|
+
InArrears: "in_arrears",
|
|
20
|
+
};
|
|
14
21
|
/**
|
|
15
22
|
* Type of line item: 'charge' for regular billing, 'refund' for refunded items (amounts are negated)
|
|
16
23
|
*/
|
|
@@ -22,6 +29,8 @@ export const InvoiceLineItemLineItemType = {
|
|
|
22
29
|
export const EventType$inboundSchema = z
|
|
23
30
|
.nativeEnum(EventType);
|
|
24
31
|
/** @internal */
|
|
32
|
+
export const InvoiceLineItemPaymentTerm$inboundSchema = z.nativeEnum(InvoiceLineItemPaymentTerm);
|
|
33
|
+
/** @internal */
|
|
25
34
|
export const InvoiceLineItemLineItemType$inboundSchema = z.nativeEnum(InvoiceLineItemLineItemType);
|
|
26
35
|
/** @internal */
|
|
27
36
|
export const InvoiceLineItem$inboundSchema = z.object({
|
|
@@ -31,6 +40,11 @@ export const InvoiceLineItem$inboundSchema = z.object({
|
|
|
31
40
|
billableMetricId: z.string(),
|
|
32
41
|
itemId: z.nullable(z.string()).optional(),
|
|
33
42
|
priceId: z.nullable(z.string()).optional(),
|
|
43
|
+
periodStart: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
44
|
+
.optional(),
|
|
45
|
+
periodEnd: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
46
|
+
.optional(),
|
|
47
|
+
paymentTerm: z.nullable(InvoiceLineItemPaymentTerm$inboundSchema).optional(),
|
|
34
48
|
invoiceDisplayName: z.string(),
|
|
35
49
|
lineItemType: InvoiceLineItemLineItemType$inboundSchema,
|
|
36
50
|
meterEventId: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoicelineitem.js","sourceRoot":"","sources":["../../../src/models/invoicelineitem.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,SAAS,GAAG;IACvB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;CACZ,CAAC;AAMX;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC;
|
|
1
|
+
{"version":3,"file":"invoicelineitem.js","sourceRoot":"","sources":["../../../src/models/invoicelineitem.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CA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|
31
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
32
32
|
*/
|
|
33
33
|
export declare const LineItemPaymentTerm: {
|
|
34
34
|
readonly InAdvance: "in_advance";
|
|
35
35
|
readonly InArrears: "in_arrears";
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
39
39
|
*/
|
|
40
40
|
export type LineItemPaymentTerm = ClosedEnum<typeof LineItemPaymentTerm>;
|
|
41
41
|
export type LineItem = {
|
|
@@ -112,7 +112,7 @@ export type LineItem = {
|
|
|
112
112
|
*/
|
|
113
113
|
meteredQuantity?: string | null | undefined;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
116
116
|
*/
|
|
117
117
|
paymentTerm?: LineItemPaymentTerm | null | undefined;
|
|
118
118
|
/**
|
|
@@ -21,7 +21,7 @@ export const LineItemStatus = {
|
|
|
21
21
|
Invoiced: "invoiced",
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
25
25
|
*/
|
|
26
26
|
export const LineItemPaymentTerm = {
|
|
27
27
|
InAdvance: "in_advance",
|
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.7",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.9.7 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
|
@@ -21,6 +21,20 @@ export const EventType = {
|
|
|
21
21
|
*/
|
|
22
22
|
export type EventType = ClosedEnum<typeof EventType>;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
26
|
+
*/
|
|
27
|
+
export const InvoiceLineItemPaymentTerm = {
|
|
28
|
+
InAdvance: "in_advance",
|
|
29
|
+
InArrears: "in_arrears",
|
|
30
|
+
} as const;
|
|
31
|
+
/**
|
|
32
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
33
|
+
*/
|
|
34
|
+
export type InvoiceLineItemPaymentTerm = ClosedEnum<
|
|
35
|
+
typeof InvoiceLineItemPaymentTerm
|
|
36
|
+
>;
|
|
37
|
+
|
|
24
38
|
/**
|
|
25
39
|
* Type of line item: 'charge' for regular billing, 'refund' for refunded items (amounts are negated)
|
|
26
40
|
*/
|
|
@@ -60,6 +74,18 @@ export type InvoiceLineItem = {
|
|
|
60
74
|
* The price this line was generated from, or `null` when the line has no originating charge. With `itemId` it says whether a missing tag is fixable: `priceId` set and `itemId` null means the charge was simply untagged, which tagging it and restamping resolves; both null means the line records a grant-credit purchase, which is deferred revenue and is never tagged. Any measure of outstanding mapping work must exclude the latter or it can never reach zero.
|
|
61
75
|
*/
|
|
62
76
|
priceId?: string | null | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Start of the billed window this line covers, inclusive. Distinct from the invoice's own period, which is the union of its lines' windows (earliest start to latest end) and so covers time no single line bills on a mixed-timing invoice.
|
|
79
|
+
*/
|
|
80
|
+
periodStart?: Date | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* End of the billed window this line covers, exclusive — the instant at `periodEnd` belongs to the next window. Equal to `periodStart` on a one-off charge, which bills at an instant and has no period grid.
|
|
83
|
+
*/
|
|
84
|
+
periodEnd?: Date | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* When this line falls due relative to the window it covers: `in_advance` at the window's start, `in_arrears` at its end. A metered line is stamped `in_arrears`, because usage is only known once the window closes — but metered rows written before that rule carry `null` and were never backfilled, so do not read a metered line's term as guaranteed. `null` also means the line is not billed on a term of its own: manual, grant-discount and adjustment lines carry no term, and an adjustment instead falls due with the charge it reduces. Treat `null` as an expected value on any line type, not an error.
|
|
87
|
+
*/
|
|
88
|
+
paymentTerm?: InvoiceLineItemPaymentTerm | null | undefined;
|
|
63
89
|
/**
|
|
64
90
|
* Display name for this line item on invoices
|
|
65
91
|
*/
|
|
@@ -114,6 +140,11 @@ export type InvoiceLineItem = {
|
|
|
114
140
|
export const EventType$inboundSchema: z.ZodNativeEnum<typeof EventType> = z
|
|
115
141
|
.nativeEnum(EventType);
|
|
116
142
|
|
|
143
|
+
/** @internal */
|
|
144
|
+
export const InvoiceLineItemPaymentTerm$inboundSchema: z.ZodNativeEnum<
|
|
145
|
+
typeof InvoiceLineItemPaymentTerm
|
|
146
|
+
> = z.nativeEnum(InvoiceLineItemPaymentTerm);
|
|
147
|
+
|
|
117
148
|
/** @internal */
|
|
118
149
|
export const InvoiceLineItemLineItemType$inboundSchema: z.ZodNativeEnum<
|
|
119
150
|
typeof InvoiceLineItemLineItemType
|
|
@@ -131,6 +162,11 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
131
162
|
billableMetricId: z.string(),
|
|
132
163
|
itemId: z.nullable(z.string()).optional(),
|
|
133
164
|
priceId: z.nullable(z.string()).optional(),
|
|
165
|
+
periodStart: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
166
|
+
.optional(),
|
|
167
|
+
periodEnd: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
168
|
+
.optional(),
|
|
169
|
+
paymentTerm: z.nullable(InvoiceLineItemPaymentTerm$inboundSchema).optional(),
|
|
134
170
|
invoiceDisplayName: z.string(),
|
|
135
171
|
lineItemType: InvoiceLineItemLineItemType$inboundSchema,
|
|
136
172
|
meterEventId: z.string(),
|
package/src/models/lineitem.ts
CHANGED
|
@@ -36,14 +36,14 @@ export const LineItemStatus = {
|
|
|
36
36
|
export type LineItemStatus = ClosedEnum<typeof LineItemStatus>;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
40
40
|
*/
|
|
41
41
|
export const LineItemPaymentTerm = {
|
|
42
42
|
InAdvance: "in_advance",
|
|
43
43
|
InArrears: "in_arrears",
|
|
44
44
|
} as const;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
47
47
|
*/
|
|
48
48
|
export type LineItemPaymentTerm = ClosedEnum<typeof LineItemPaymentTerm>;
|
|
49
49
|
|
|
@@ -121,7 +121,7 @@ export type LineItem = {
|
|
|
121
121
|
*/
|
|
122
122
|
meteredQuantity?: string | null | undefined;
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* When the line falls due relative to the window it covers. A fee line carries its price's term; a metered line is stamped `in_arrears`, though metered rows predating that rule carry `null`. Manual, grant-discount and adjustment lines are billed on no term of their own and are `null`. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
125
125
|
*/
|
|
126
126
|
paymentTerm?: LineItemPaymentTerm | null | undefined;
|
|
127
127
|
/**
|