@paygentic/sdk 0.10.4 → 0.10.6
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/funcs/pricesUpdate.d.ts +3 -0
- package/dist/commonjs/funcs/pricesUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/pricesUpdate.js +3 -0
- package/dist/commonjs/funcs/pricesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/testClocksAdvance.d.ts +1 -1
- package/dist/commonjs/funcs/testClocksAdvance.js +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/changereason.d.ts +3 -2
- package/dist/commonjs/models/changereason.d.ts.map +1 -1
- package/dist/commonjs/models/changereason.js +2 -1
- package/dist/commonjs/models/changereason.js.map +1 -1
- package/dist/commonjs/models/editsubscriptionintervalsrequestunion.d.ts +3 -3
- package/dist/commonjs/models/errors/deletecustomer.d.ts +8 -0
- package/dist/commonjs/models/errors/deletecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/errors/deletecustomer.js +3 -0
- package/dist/commonjs/models/errors/deletecustomer.js.map +1 -1
- package/dist/commonjs/models/errors/deletefee.d.ts +8 -0
- package/dist/commonjs/models/errors/deletefee.d.ts.map +1 -1
- package/dist/commonjs/models/errors/deletefee.js +3 -0
- package/dist/commonjs/models/errors/deletefee.js.map +1 -1
- package/dist/commonjs/models/errors/deleteprice.d.ts +8 -0
- package/dist/commonjs/models/errors/deleteprice.d.ts.map +1 -1
- package/dist/commonjs/models/errors/deleteprice.js +3 -0
- package/dist/commonjs/models/errors/deleteprice.js.map +1 -1
- package/dist/commonjs/models/errors/error.d.ts +8 -0
- package/dist/commonjs/models/errors/error.d.ts.map +1 -1
- package/dist/commonjs/models/errors/error.js +3 -0
- package/dist/commonjs/models/errors/error.js.map +1 -1
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts +8 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts.map +1 -1
- package/dist/commonjs/models/errors/recordinvoicepayment.js +3 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.js.map +1 -1
- package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts +8 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/retrypaymentresponseerror.js +3 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.js.map +1 -1
- package/dist/commonjs/models/errors/updateprice.d.ts +8 -0
- package/dist/commonjs/models/errors/updateprice.d.ts.map +1 -1
- package/dist/commonjs/models/errors/updateprice.js +3 -0
- package/dist/commonjs/models/errors/updateprice.js.map +1 -1
- package/dist/commonjs/models/errors/validationerror.d.ts +8 -0
- package/dist/commonjs/models/errors/validationerror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/validationerror.js +3 -0
- package/dist/commonjs/models/errors/validationerror.js.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.d.ts +1 -1
- package/dist/commonjs/models/operations/getbillablemetricmeter.d.ts +1 -1
- package/dist/commonjs/models/operations/getcostsummary.d.ts +1 -1
- package/dist/commonjs/models/operations/listbillablemetricevents.d.ts +1 -1
- package/dist/commonjs/models/operations/terminatesubscription.d.ts +1 -1
- package/dist/commonjs/models/operations/updateprice.d.ts +0 -24
- package/dist/commonjs/models/operations/updateprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateprice.js +1 -12
- package/dist/commonjs/models/operations/updateprice.js.map +1 -1
- package/dist/commonjs/models/permission.d.ts +5 -0
- package/dist/commonjs/models/permission.d.ts.map +1 -1
- package/dist/commonjs/models/permission.js +5 -0
- package/dist/commonjs/models/permission.js.map +1 -1
- package/dist/commonjs/models/retrypaymentresponse.d.ts +4 -0
- package/dist/commonjs/models/retrypaymentresponse.d.ts.map +1 -1
- package/dist/commonjs/models/retrypaymentresponse.js +1 -0
- package/dist/commonjs/models/retrypaymentresponse.js.map +1 -1
- package/dist/commonjs/models/subscription.d.ts +1 -0
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +1 -0
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/subscriptionintervalchange.d.ts +1 -1
- package/dist/commonjs/sdk/prices.d.ts +3 -0
- package/dist/commonjs/sdk/prices.d.ts.map +1 -1
- package/dist/commonjs/sdk/prices.js +3 -0
- package/dist/commonjs/sdk/prices.js.map +1 -1
- package/dist/commonjs/sdk/testclocks.d.ts +1 -1
- package/dist/commonjs/sdk/testclocks.js +1 -1
- package/dist/esm/funcs/pricesUpdate.d.ts +3 -0
- package/dist/esm/funcs/pricesUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/pricesUpdate.js +3 -0
- package/dist/esm/funcs/pricesUpdate.js.map +1 -1
- package/dist/esm/funcs/testClocksAdvance.d.ts +1 -1
- package/dist/esm/funcs/testClocksAdvance.js +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/changereason.d.ts +3 -2
- package/dist/esm/models/changereason.d.ts.map +1 -1
- package/dist/esm/models/changereason.js +2 -1
- package/dist/esm/models/changereason.js.map +1 -1
- package/dist/esm/models/editsubscriptionintervalsrequestunion.d.ts +3 -3
- package/dist/esm/models/errors/deletecustomer.d.ts +8 -0
- package/dist/esm/models/errors/deletecustomer.d.ts.map +1 -1
- package/dist/esm/models/errors/deletecustomer.js +3 -0
- package/dist/esm/models/errors/deletecustomer.js.map +1 -1
- package/dist/esm/models/errors/deletefee.d.ts +8 -0
- package/dist/esm/models/errors/deletefee.d.ts.map +1 -1
- package/dist/esm/models/errors/deletefee.js +3 -0
- package/dist/esm/models/errors/deletefee.js.map +1 -1
- package/dist/esm/models/errors/deleteprice.d.ts +8 -0
- package/dist/esm/models/errors/deleteprice.d.ts.map +1 -1
- package/dist/esm/models/errors/deleteprice.js +3 -0
- package/dist/esm/models/errors/deleteprice.js.map +1 -1
- package/dist/esm/models/errors/error.d.ts +8 -0
- package/dist/esm/models/errors/error.d.ts.map +1 -1
- package/dist/esm/models/errors/error.js +3 -0
- package/dist/esm/models/errors/error.js.map +1 -1
- package/dist/esm/models/errors/recordinvoicepayment.d.ts +8 -0
- package/dist/esm/models/errors/recordinvoicepayment.d.ts.map +1 -1
- package/dist/esm/models/errors/recordinvoicepayment.js +3 -0
- package/dist/esm/models/errors/recordinvoicepayment.js.map +1 -1
- package/dist/esm/models/errors/retrypaymentresponseerror.d.ts +8 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.d.ts.map +1 -1
- package/dist/esm/models/errors/retrypaymentresponseerror.js +3 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.js.map +1 -1
- package/dist/esm/models/errors/updateprice.d.ts +8 -0
- package/dist/esm/models/errors/updateprice.d.ts.map +1 -1
- package/dist/esm/models/errors/updateprice.js +3 -0
- package/dist/esm/models/errors/updateprice.js.map +1 -1
- package/dist/esm/models/errors/validationerror.d.ts +8 -0
- package/dist/esm/models/errors/validationerror.d.ts.map +1 -1
- package/dist/esm/models/errors/validationerror.js +3 -0
- package/dist/esm/models/errors/validationerror.js.map +1 -1
- package/dist/esm/models/operations/createsubscription.d.ts +1 -1
- package/dist/esm/models/operations/getbillablemetricmeter.d.ts +1 -1
- package/dist/esm/models/operations/getcostsummary.d.ts +1 -1
- package/dist/esm/models/operations/listbillablemetricevents.d.ts +1 -1
- package/dist/esm/models/operations/terminatesubscription.d.ts +1 -1
- package/dist/esm/models/operations/updateprice.d.ts +0 -24
- package/dist/esm/models/operations/updateprice.d.ts.map +1 -1
- package/dist/esm/models/operations/updateprice.js +0 -11
- package/dist/esm/models/operations/updateprice.js.map +1 -1
- package/dist/esm/models/permission.d.ts +5 -0
- package/dist/esm/models/permission.d.ts.map +1 -1
- package/dist/esm/models/permission.js +5 -0
- package/dist/esm/models/permission.js.map +1 -1
- package/dist/esm/models/retrypaymentresponse.d.ts +4 -0
- package/dist/esm/models/retrypaymentresponse.d.ts.map +1 -1
- package/dist/esm/models/retrypaymentresponse.js +1 -0
- package/dist/esm/models/retrypaymentresponse.js.map +1 -1
- package/dist/esm/models/subscription.d.ts +1 -0
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +1 -0
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/subscriptionintervalchange.d.ts +1 -1
- package/dist/esm/sdk/prices.d.ts +3 -0
- package/dist/esm/sdk/prices.d.ts.map +1 -1
- package/dist/esm/sdk/prices.js +3 -0
- package/dist/esm/sdk/prices.js.map +1 -1
- package/dist/esm/sdk/testclocks.d.ts +1 -1
- package/dist/esm/sdk/testclocks.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/pricesUpdate.ts +3 -0
- package/src/funcs/testClocksAdvance.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/changereason.ts +3 -2
- package/src/models/editsubscriptionintervalsrequestunion.ts +3 -3
- package/src/models/errors/deletecustomer.ts +10 -0
- package/src/models/errors/deletefee.ts +10 -0
- package/src/models/errors/deleteprice.ts +10 -0
- package/src/models/errors/error.ts +10 -0
- package/src/models/errors/recordinvoicepayment.ts +10 -0
- package/src/models/errors/retrypaymentresponseerror.ts +10 -0
- package/src/models/errors/updateprice.ts +10 -0
- package/src/models/errors/validationerror.ts +10 -0
- package/src/models/operations/createsubscription.ts +1 -1
- package/src/models/operations/getbillablemetricmeter.ts +1 -1
- package/src/models/operations/getcostsummary.ts +1 -1
- package/src/models/operations/listbillablemetricevents.ts +1 -1
- package/src/models/operations/terminatesubscription.ts +1 -1
- package/src/models/operations/updateprice.ts +0 -30
- package/src/models/permission.ts +5 -0
- package/src/models/retrypaymentresponse.ts +5 -0
- package/src/models/subscription.ts +1 -0
- package/src/models/subscriptionintervalchange.ts +1 -1
- package/src/sdk/prices.ts +3 -0
- package/src/sdk/testclocks.ts +1 -1
|
@@ -34,6 +34,10 @@ export type ErrorTData = {
|
|
|
34
34
|
* Present on a 403 from the authorization check. The permissions the caller needs for this request.
|
|
35
35
|
*/
|
|
36
36
|
requiredPermissions?: Array<string> | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
39
|
+
*/
|
|
40
|
+
requestId?: string | undefined;
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
/**
|
|
@@ -60,6 +64,10 @@ export class ErrorT extends PaygenticError {
|
|
|
60
64
|
* Present on a 403 from the authorization check. The permissions the caller needs for this request.
|
|
61
65
|
*/
|
|
62
66
|
requiredPermissions?: Array<string> | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
69
|
+
*/
|
|
70
|
+
requestId?: string | undefined;
|
|
63
71
|
|
|
64
72
|
/** The original data that was passed to this error instance. */
|
|
65
73
|
data$: ErrorTData;
|
|
@@ -78,6 +86,7 @@ export class ErrorT extends PaygenticError {
|
|
|
78
86
|
if (err.requiredPermissions != null) {
|
|
79
87
|
this.requiredPermissions = err.requiredPermissions;
|
|
80
88
|
}
|
|
89
|
+
if (err.requestId != null) this.requestId = err.requestId;
|
|
81
90
|
|
|
82
91
|
this.name = "ErrorT";
|
|
83
92
|
}
|
|
@@ -92,6 +101,7 @@ export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
|
|
|
92
101
|
details: z.record(z.any()).optional(),
|
|
93
102
|
reason: models.AuthorizationDenialReason$inboundSchema.optional(),
|
|
94
103
|
requiredPermissions: z.array(z.string()).optional(),
|
|
104
|
+
requestId: z.string().optional(),
|
|
95
105
|
request$: z.instanceof(Request),
|
|
96
106
|
response$: z.instanceof(Response),
|
|
97
107
|
body$: z.string(),
|
|
@@ -34,6 +34,10 @@ export type UnprocessableEntityErrorData = {
|
|
|
34
34
|
* Present on a 403 from the authorization check. The permissions the caller needs for this request.
|
|
35
35
|
*/
|
|
36
36
|
requiredPermissions?: Array<string> | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
39
|
+
*/
|
|
40
|
+
requestId?: string | undefined;
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
/**
|
|
@@ -60,6 +64,10 @@ export class UnprocessableEntityError extends PaygenticError {
|
|
|
60
64
|
* Present on a 403 from the authorization check. The permissions the caller needs for this request.
|
|
61
65
|
*/
|
|
62
66
|
requiredPermissions?: Array<string> | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
69
|
+
*/
|
|
70
|
+
requestId?: string | undefined;
|
|
63
71
|
|
|
64
72
|
/** The original data that was passed to this error instance. */
|
|
65
73
|
data$: UnprocessableEntityErrorData;
|
|
@@ -78,6 +86,7 @@ export class UnprocessableEntityError extends PaygenticError {
|
|
|
78
86
|
if (err.requiredPermissions != null) {
|
|
79
87
|
this.requiredPermissions = err.requiredPermissions;
|
|
80
88
|
}
|
|
89
|
+
if (err.requestId != null) this.requestId = err.requestId;
|
|
81
90
|
|
|
82
91
|
this.name = "UnprocessableEntityError";
|
|
83
92
|
}
|
|
@@ -95,6 +104,7 @@ export const UnprocessableEntityError$inboundSchema: z.ZodType<
|
|
|
95
104
|
details: z.record(z.any()).optional(),
|
|
96
105
|
reason: models.AuthorizationDenialReason$inboundSchema.optional(),
|
|
97
106
|
requiredPermissions: z.array(z.string()).optional(),
|
|
107
|
+
requestId: z.string().optional(),
|
|
98
108
|
request$: z.instanceof(Request),
|
|
99
109
|
response$: z.instanceof(Response),
|
|
100
110
|
body$: z.string(),
|
|
@@ -30,6 +30,10 @@ export type RetryPaymentResponseErrorData = {
|
|
|
30
30
|
* Why a payment retry did not collect the money.
|
|
31
31
|
*/
|
|
32
32
|
error?: models.RetryPaymentError | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
35
|
+
*/
|
|
36
|
+
requestId?: string | undefined;
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
/**
|
|
@@ -56,6 +60,10 @@ export class RetryPaymentResponseError extends PaygenticError {
|
|
|
56
60
|
* Why a payment retry did not collect the money.
|
|
57
61
|
*/
|
|
58
62
|
error?: models.RetryPaymentError | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
65
|
+
*/
|
|
66
|
+
requestId?: string | undefined;
|
|
59
67
|
|
|
60
68
|
/** The original data that was passed to this error instance. */
|
|
61
69
|
data$: RetryPaymentResponseErrorData;
|
|
@@ -73,6 +81,7 @@ export class RetryPaymentResponseError extends PaygenticError {
|
|
|
73
81
|
this.invoiceId = err.invoiceId;
|
|
74
82
|
if (err.paymentIntentId != null) this.paymentIntentId = err.paymentIntentId;
|
|
75
83
|
if (err.error != null) this.error = err.error;
|
|
84
|
+
if (err.requestId != null) this.requestId = err.requestId;
|
|
76
85
|
|
|
77
86
|
this.name = "RetryPaymentResponseError";
|
|
78
87
|
}
|
|
@@ -89,6 +98,7 @@ export const RetryPaymentResponseError$inboundSchema: z.ZodType<
|
|
|
89
98
|
invoiceId: z.string(),
|
|
90
99
|
paymentIntentId: z.string().optional(),
|
|
91
100
|
error: models.RetryPaymentError$inboundSchema.optional(),
|
|
101
|
+
requestId: z.string().optional(),
|
|
92
102
|
request$: z.instanceof(Request),
|
|
93
103
|
response$: z.instanceof(Response),
|
|
94
104
|
body$: z.string(),
|
|
@@ -10,6 +10,10 @@ import { PaygenticError } from "./paygenticerror.js";
|
|
|
10
10
|
* Price cannot be restructured because a subscription still bills it directly
|
|
11
11
|
*/
|
|
12
12
|
export type UpdatePriceConflictErrorData = {
|
|
13
|
+
/**
|
|
14
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
15
|
+
*/
|
|
16
|
+
requestId?: string | undefined;
|
|
13
17
|
error?: string | undefined;
|
|
14
18
|
message: string;
|
|
15
19
|
/**
|
|
@@ -23,6 +27,10 @@ export type UpdatePriceConflictErrorData = {
|
|
|
23
27
|
* Price cannot be restructured because a subscription still bills it directly
|
|
24
28
|
*/
|
|
25
29
|
export class UpdatePriceConflictError extends PaygenticError {
|
|
30
|
+
/**
|
|
31
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
32
|
+
*/
|
|
33
|
+
requestId?: string | undefined;
|
|
26
34
|
error?: string | undefined;
|
|
27
35
|
/**
|
|
28
36
|
* Machine-readable conflict code. Open set: a new code may appear, so branch on the ones you handle and treat anything else as an unhandled conflict.
|
|
@@ -40,6 +48,7 @@ export class UpdatePriceConflictError extends PaygenticError {
|
|
|
40
48
|
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
41
49
|
super(message, httpMeta);
|
|
42
50
|
this.data$ = err;
|
|
51
|
+
if (err.requestId != null) this.requestId = err.requestId;
|
|
43
52
|
if (err.error != null) this.error = err.error;
|
|
44
53
|
this.code = err.code;
|
|
45
54
|
if (err.details != null) this.details = err.details;
|
|
@@ -54,6 +63,7 @@ export const UpdatePriceConflictError$inboundSchema: z.ZodType<
|
|
|
54
63
|
z.ZodTypeDef,
|
|
55
64
|
unknown
|
|
56
65
|
> = z.object({
|
|
66
|
+
requestId: z.string().optional(),
|
|
57
67
|
error: z.string().optional(),
|
|
58
68
|
message: z.string(),
|
|
59
69
|
code: z.string(),
|
|
@@ -19,6 +19,10 @@ export type ValidationErrorData = {
|
|
|
19
19
|
* Array of field-specific validation errors
|
|
20
20
|
*/
|
|
21
21
|
errors: Array<models.ErrorT>;
|
|
22
|
+
/**
|
|
23
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
24
|
+
*/
|
|
25
|
+
requestId?: string | undefined;
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
export class ValidationError extends PaygenticError {
|
|
@@ -30,6 +34,10 @@ export class ValidationError extends PaygenticError {
|
|
|
30
34
|
* Array of field-specific validation errors
|
|
31
35
|
*/
|
|
32
36
|
errors: Array<models.ErrorT>;
|
|
37
|
+
/**
|
|
38
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
39
|
+
*/
|
|
40
|
+
requestId?: string | undefined;
|
|
33
41
|
|
|
34
42
|
/** The original data that was passed to this error instance. */
|
|
35
43
|
data$: ValidationErrorData;
|
|
@@ -43,6 +51,7 @@ export class ValidationError extends PaygenticError {
|
|
|
43
51
|
this.data$ = err;
|
|
44
52
|
if (err.error != null) this.error = err.error;
|
|
45
53
|
this.errors = err.errors;
|
|
54
|
+
if (err.requestId != null) this.requestId = err.requestId;
|
|
46
55
|
|
|
47
56
|
this.name = "ValidationError";
|
|
48
57
|
}
|
|
@@ -57,6 +66,7 @@ export const ValidationError$inboundSchema: z.ZodType<
|
|
|
57
66
|
error: models.ErrorEnum$inboundSchema.default("validation_error"),
|
|
58
67
|
message: z.string(),
|
|
59
68
|
errors: z.array(z.lazy(() => models.ErrorT$inboundSchema)),
|
|
69
|
+
requestId: z.string().optional(),
|
|
60
70
|
request$: z.instanceof(Request),
|
|
61
71
|
response$: z.instanceof(Response),
|
|
62
72
|
body$: z.string(),
|
|
@@ -130,7 +130,7 @@ export type CreateSubscriptionRequest = {
|
|
|
130
130
|
*/
|
|
131
131
|
metadata?: { [k: string]: models.SubscriptionMetadata } | undefined;
|
|
132
132
|
/**
|
|
133
|
-
* Why a change was made. `correction`
|
|
133
|
+
* Why a change was made. `correction` repairs data that was entered wrong; `migration` moves a contract from another system; `commercial` is a real change to the deal; `contractual` applies a step the original contract scheduled, such as an annual uplift. Defaults to `unspecified`.
|
|
134
134
|
*/
|
|
135
135
|
changeReason?: models.ChangeReason | undefined;
|
|
136
136
|
/**
|
|
@@ -32,7 +32,7 @@ export type GetCostSummaryRequest = {
|
|
|
32
32
|
*/
|
|
33
33
|
from: Date;
|
|
34
34
|
/**
|
|
35
|
-
* End of the query window, excluded: the read counts from <= t < to (ISO 8601). Required together with 'from'.
|
|
35
|
+
* End of the query window, excluded: the read counts from <= t < to (ISO 8601). Required together with 'from'. At most 403 days after `from`.
|
|
36
36
|
*/
|
|
37
37
|
to: Date;
|
|
38
38
|
/**
|
|
@@ -12,7 +12,7 @@ export type TerminateSubscriptionRequestBody = {
|
|
|
12
12
|
*/
|
|
13
13
|
reason: string;
|
|
14
14
|
/**
|
|
15
|
-
* Why a change was made. `correction`
|
|
15
|
+
* Why a change was made. `correction` repairs data that was entered wrong; `migration` moves a contract from another system; `commercial` is a real change to the deal; `contractual` applies a step the original contract scheduled, such as an annual uplift. Defaults to `unspecified`.
|
|
16
16
|
*/
|
|
17
17
|
changeReason?: models.ChangeReason | undefined;
|
|
18
18
|
};
|
|
@@ -5,23 +5,10 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
10
|
import * as models from "../index.js";
|
|
12
11
|
|
|
13
|
-
/**
|
|
14
|
-
* Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
|
|
15
|
-
*/
|
|
16
|
-
export const UpdatePricePaymentTerm = {
|
|
17
|
-
InArrears: "in_arrears",
|
|
18
|
-
InAdvance: "in_advance",
|
|
19
|
-
} as const;
|
|
20
|
-
/**
|
|
21
|
-
* Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
|
|
22
|
-
*/
|
|
23
|
-
export type UpdatePricePaymentTerm = ClosedEnum<typeof UpdatePricePaymentTerm>;
|
|
24
|
-
|
|
25
12
|
export type UpdatePriceRequestBody = {
|
|
26
13
|
/**
|
|
27
14
|
* Unique identifier for a billable metric
|
|
@@ -44,14 +31,6 @@ export type UpdatePriceRequestBody = {
|
|
|
44
31
|
*/
|
|
45
32
|
model?: models.PriceModelInput | undefined;
|
|
46
33
|
properties?: models.PriceProperties | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
|
|
49
|
-
*/
|
|
50
|
-
paymentTerm?: UpdatePricePaymentTerm | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* ISO 8601 duration for recurring fees (e.g., 'P1M' for monthly, 'P1Y' for yearly, or 'P0D' for one-time)
|
|
53
|
-
*/
|
|
54
|
-
billingCadence?: string | null | undefined;
|
|
55
34
|
/**
|
|
56
35
|
* Feature to associate. Set to null to remove existing feature. Omit to leave unchanged.
|
|
57
36
|
*/
|
|
@@ -92,11 +71,6 @@ export type UpdatePriceDetails = {
|
|
|
92
71
|
subscriptionCount?: number | undefined;
|
|
93
72
|
};
|
|
94
73
|
|
|
95
|
-
/** @internal */
|
|
96
|
-
export const UpdatePricePaymentTerm$outboundSchema: z.ZodNativeEnum<
|
|
97
|
-
typeof UpdatePricePaymentTerm
|
|
98
|
-
> = z.nativeEnum(UpdatePricePaymentTerm);
|
|
99
|
-
|
|
100
74
|
/** @internal */
|
|
101
75
|
export type UpdatePriceRequestBody$Outbound = {
|
|
102
76
|
billableMetricId?: string | undefined;
|
|
@@ -105,8 +79,6 @@ export type UpdatePriceRequestBody$Outbound = {
|
|
|
105
79
|
invoiceDisplayGroup?: string | null | undefined;
|
|
106
80
|
model?: string | undefined;
|
|
107
81
|
properties?: models.PriceProperties$Outbound | undefined;
|
|
108
|
-
paymentTerm?: string | undefined;
|
|
109
|
-
billingCadence?: string | null | undefined;
|
|
110
82
|
feature?: models.PriceFeatureInput$Outbound | null | undefined;
|
|
111
83
|
grantDiscountEnabled?: boolean | undefined;
|
|
112
84
|
isObligation?: boolean | undefined;
|
|
@@ -127,8 +99,6 @@ export const UpdatePriceRequestBody$outboundSchema: z.ZodType<
|
|
|
127
99
|
invoiceDisplayGroup: z.nullable(z.string()).optional(),
|
|
128
100
|
model: models.PriceModelInput$outboundSchema.optional(),
|
|
129
101
|
properties: models.PriceProperties$outboundSchema.optional(),
|
|
130
|
-
paymentTerm: UpdatePricePaymentTerm$outboundSchema.optional(),
|
|
131
|
-
billingCadence: z.nullable(z.string()).optional(),
|
|
132
102
|
feature: z.nullable(models.PriceFeatureInput$outboundSchema).optional(),
|
|
133
103
|
grantDiscountEnabled: z.boolean().optional(),
|
|
134
104
|
isObligation: z.boolean().optional(),
|
package/src/models/permission.ts
CHANGED
|
@@ -38,6 +38,8 @@ export const Permission = {
|
|
|
38
38
|
PortalSessionsRead: "portalSessions:read",
|
|
39
39
|
PlatformUsersRead: "platformUsers:read",
|
|
40
40
|
PlatformAdminRead: "platformAdmin:read",
|
|
41
|
+
LoginLockoutRead: "loginLockout:read",
|
|
42
|
+
PlatformSystemRead: "platformSystem:read",
|
|
41
43
|
OrganizationCreationRead: "organizationCreation:read",
|
|
42
44
|
ComplianceRead: "compliance:read",
|
|
43
45
|
TaxSettingsRead: "taxSettings:read",
|
|
@@ -81,6 +83,8 @@ export const Permission = {
|
|
|
81
83
|
PortalSessionsWrite: "portalSessions:write",
|
|
82
84
|
PlatformUsersWrite: "platformUsers:write",
|
|
83
85
|
PlatformAdminWrite: "platformAdmin:write",
|
|
86
|
+
LoginLockoutWrite: "loginLockout:write",
|
|
87
|
+
PlatformSystemWrite: "platformSystem:write",
|
|
84
88
|
OrganizationCreationWrite: "organizationCreation:write",
|
|
85
89
|
ComplianceWrite: "compliance:write",
|
|
86
90
|
TaxSettingsWrite: "taxSettings:write",
|
|
@@ -97,6 +101,7 @@ export const Permission = {
|
|
|
97
101
|
EventsWrite: "events:write",
|
|
98
102
|
InvoicesIssue: "invoices:issue",
|
|
99
103
|
InvoicesVoid: "invoices:void",
|
|
104
|
+
InvoicesTransition: "invoices:transition",
|
|
100
105
|
PaymentsRefund: "payments:refund",
|
|
101
106
|
OrganizationDelete: "organization:delete",
|
|
102
107
|
OwnershipTransfer: "ownership:transfer",
|
|
@@ -49,6 +49,10 @@ export type RetryPaymentResponse = {
|
|
|
49
49
|
* Why a payment retry did not collect the money.
|
|
50
50
|
*/
|
|
51
51
|
error?: RetryPaymentError | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.
|
|
54
|
+
*/
|
|
55
|
+
requestId?: string | undefined;
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
/** @internal */
|
|
@@ -67,6 +71,7 @@ export const RetryPaymentResponse$inboundSchema: z.ZodType<
|
|
|
67
71
|
invoiceId: z.string(),
|
|
68
72
|
paymentIntentId: z.string().optional(),
|
|
69
73
|
error: RetryPaymentError$inboundSchema.optional(),
|
|
74
|
+
requestId: z.string().optional(),
|
|
70
75
|
});
|
|
71
76
|
|
|
72
77
|
export function retryPaymentResponseFromJSON(
|
|
@@ -136,6 +136,7 @@ export const TerminationChangeReason = {
|
|
|
136
136
|
Correction: "correction",
|
|
137
137
|
Migration: "migration",
|
|
138
138
|
Unspecified: "unspecified",
|
|
139
|
+
Contractual: "contractual",
|
|
139
140
|
} as const;
|
|
140
141
|
/**
|
|
141
142
|
* Why the subscription was terminated. Null while it is not terminated.
|
|
@@ -24,7 +24,7 @@ export type SubscriptionIntervalChange = {
|
|
|
24
24
|
merchantId: string;
|
|
25
25
|
subscriptionId: string;
|
|
26
26
|
/**
|
|
27
|
-
* Why a change was made. `correction`
|
|
27
|
+
* Why a change was made. `correction` repairs data that was entered wrong; `migration` moves a contract from another system; `commercial` is a real change to the deal; `contractual` applies a step the original contract scheduled, such as an annual uplift. Defaults to `unspecified`.
|
|
28
28
|
*/
|
|
29
29
|
changeReason: ChangeReason;
|
|
30
30
|
description: string | null;
|
package/src/sdk/prices.ts
CHANGED
|
@@ -57,6 +57,9 @@ export class Prices extends ClientSDK {
|
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Update
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Updates a price. `paymentTerm` and `billingCadence` are fixed when the price is created: a request that sends either one is refused with a 400. To change them, create a new price.
|
|
60
63
|
*/
|
|
61
64
|
async update(
|
|
62
65
|
request: operations.UpdatePriceRequest,
|
package/src/sdk/testclocks.ts
CHANGED
|
@@ -68,7 +68,7 @@ export class TestClocks extends ClientSDK {
|
|
|
68
68
|
* Advance
|
|
69
69
|
*
|
|
70
70
|
* @remarks
|
|
71
|
-
* Advances the test clock's current time. You can either specify a new absolute time or advance by a duration.
|
|
71
|
+
* Advances the test clock's current time. You can either specify a new absolute time or advance by a duration. A clock moves forward only, and at most 1 year per call: a time earlier than the clock's current time, or more than 1 year after it, returns 400. To move further, advance more than once.
|
|
72
72
|
*/
|
|
73
73
|
async advance(
|
|
74
74
|
request: operations.AdvanceTestClockRequest,
|