@polar-sh/sdk 0.48.0 → 0.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/organizationfeaturesettings.d.ts +5 -0
- package/dist/commonjs/models/components/organizationfeaturesettings.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationfeaturesettings.js +4 -0
- package/dist/commonjs/models/components/organizationfeaturesettings.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionupdate.d.ts +3 -5
- package/dist/commonjs/models/components/subscriptionupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptionupdate.js +2 -6
- package/dist/commonjs/models/components/subscriptionupdate.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionupdatebase.d.ts +31 -0
- package/dist/commonjs/models/components/subscriptionupdatebase.d.ts.map +1 -0
- package/dist/commonjs/models/components/{subscriptionupdateproduct.js → subscriptionupdatebase.js} +11 -7
- package/dist/commonjs/models/components/subscriptionupdatebase.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/organizationfeaturesettings.d.ts +5 -0
- package/dist/esm/models/components/organizationfeaturesettings.d.ts.map +1 -1
- package/dist/esm/models/components/organizationfeaturesettings.js +4 -0
- package/dist/esm/models/components/organizationfeaturesettings.js.map +1 -1
- package/dist/esm/models/components/subscriptionupdate.d.ts +3 -5
- package/dist/esm/models/components/subscriptionupdate.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptionupdate.js +2 -6
- package/dist/esm/models/components/subscriptionupdate.js.map +1 -1
- package/dist/esm/models/components/subscriptionupdatebase.d.ts +31 -0
- package/dist/esm/models/components/subscriptionupdatebase.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdatebase.js +24 -0
- package/dist/esm/models/components/subscriptionupdatebase.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/organizationfeaturesettings.ts +9 -0
- package/src/models/components/subscriptionupdate.ts +10 -26
- package/src/models/components/subscriptionupdatebase.ts +70 -0
- package/dist/commonjs/models/components/subscriptionupdatediscount.d.ts +0 -15
- package/dist/commonjs/models/components/subscriptionupdatediscount.d.ts.map +0 -1
- package/dist/commonjs/models/components/subscriptionupdatediscount.js +0 -54
- package/dist/commonjs/models/components/subscriptionupdatediscount.js.map +0 -1
- package/dist/commonjs/models/components/subscriptionupdateproduct.d.ts +0 -21
- package/dist/commonjs/models/components/subscriptionupdateproduct.d.ts.map +0 -1
- package/dist/commonjs/models/components/subscriptionupdateproduct.js.map +0 -1
- package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts +0 -15
- package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts.map +0 -1
- package/dist/commonjs/models/components/subscriptionupdatetrial.js +0 -54
- package/dist/commonjs/models/components/subscriptionupdatetrial.js.map +0 -1
- package/dist/esm/models/components/subscriptionupdatediscount.d.ts +0 -15
- package/dist/esm/models/components/subscriptionupdatediscount.d.ts.map +0 -1
- package/dist/esm/models/components/subscriptionupdatediscount.js +0 -17
- package/dist/esm/models/components/subscriptionupdatediscount.js.map +0 -1
- package/dist/esm/models/components/subscriptionupdateproduct.d.ts +0 -21
- package/dist/esm/models/components/subscriptionupdateproduct.d.ts.map +0 -1
- package/dist/esm/models/components/subscriptionupdateproduct.js +0 -20
- package/dist/esm/models/components/subscriptionupdateproduct.js.map +0 -1
- package/dist/esm/models/components/subscriptionupdatetrial.d.ts +0 -15
- package/dist/esm/models/components/subscriptionupdatetrial.d.ts.map +0 -1
- package/dist/esm/models/components/subscriptionupdatetrial.js +0 -17
- package/dist/esm/models/components/subscriptionupdatetrial.js.map +0 -1
- package/src/models/components/subscriptionupdatediscount.ts +0 -41
- package/src/models/components/subscriptionupdateproduct.ts +0 -54
- package/src/models/components/subscriptionupdatetrial.ts +0 -41
|
@@ -14,6 +14,11 @@ import {
|
|
|
14
14
|
SubscriptionRevoke$Outbound,
|
|
15
15
|
SubscriptionRevoke$outboundSchema,
|
|
16
16
|
} from "./subscriptionrevoke.js";
|
|
17
|
+
import {
|
|
18
|
+
SubscriptionUpdateBase,
|
|
19
|
+
SubscriptionUpdateBase$Outbound,
|
|
20
|
+
SubscriptionUpdateBase$outboundSchema,
|
|
21
|
+
} from "./subscriptionupdatebase.js";
|
|
17
22
|
import {
|
|
18
23
|
SubscriptionUpdateBillingPeriod,
|
|
19
24
|
SubscriptionUpdateBillingPeriod$Outbound,
|
|
@@ -24,61 +29,40 @@ import {
|
|
|
24
29
|
SubscriptionUpdateClear$Outbound,
|
|
25
30
|
SubscriptionUpdateClear$outboundSchema,
|
|
26
31
|
} from "./subscriptionupdateclear.js";
|
|
27
|
-
import {
|
|
28
|
-
SubscriptionUpdateDiscount,
|
|
29
|
-
SubscriptionUpdateDiscount$Outbound,
|
|
30
|
-
SubscriptionUpdateDiscount$outboundSchema,
|
|
31
|
-
} from "./subscriptionupdatediscount.js";
|
|
32
|
-
import {
|
|
33
|
-
SubscriptionUpdateProduct,
|
|
34
|
-
SubscriptionUpdateProduct$Outbound,
|
|
35
|
-
SubscriptionUpdateProduct$outboundSchema,
|
|
36
|
-
} from "./subscriptionupdateproduct.js";
|
|
37
32
|
import {
|
|
38
33
|
SubscriptionUpdateSeats,
|
|
39
34
|
SubscriptionUpdateSeats$Outbound,
|
|
40
35
|
SubscriptionUpdateSeats$outboundSchema,
|
|
41
36
|
} from "./subscriptionupdateseats.js";
|
|
42
|
-
import {
|
|
43
|
-
SubscriptionUpdateTrial,
|
|
44
|
-
SubscriptionUpdateTrial$Outbound,
|
|
45
|
-
SubscriptionUpdateTrial$outboundSchema,
|
|
46
|
-
} from "./subscriptionupdatetrial.js";
|
|
47
37
|
|
|
48
38
|
export type SubscriptionUpdate =
|
|
49
|
-
| SubscriptionUpdateProduct
|
|
50
|
-
| SubscriptionUpdateDiscount
|
|
51
|
-
| SubscriptionUpdateTrial
|
|
52
39
|
| SubscriptionUpdateSeats
|
|
53
40
|
| SubscriptionUpdateBillingPeriod
|
|
54
41
|
| SubscriptionCancel
|
|
55
42
|
| SubscriptionRevoke
|
|
56
|
-
| SubscriptionUpdateClear
|
|
43
|
+
| SubscriptionUpdateClear
|
|
44
|
+
| SubscriptionUpdateBase;
|
|
57
45
|
|
|
58
46
|
/** @internal */
|
|
59
47
|
export type SubscriptionUpdate$Outbound =
|
|
60
|
-
| SubscriptionUpdateProduct$Outbound
|
|
61
|
-
| SubscriptionUpdateDiscount$Outbound
|
|
62
|
-
| SubscriptionUpdateTrial$Outbound
|
|
63
48
|
| SubscriptionUpdateSeats$Outbound
|
|
64
49
|
| SubscriptionUpdateBillingPeriod$Outbound
|
|
65
50
|
| SubscriptionCancel$Outbound
|
|
66
51
|
| SubscriptionRevoke$Outbound
|
|
67
|
-
| SubscriptionUpdateClear$Outbound
|
|
52
|
+
| SubscriptionUpdateClear$Outbound
|
|
53
|
+
| SubscriptionUpdateBase$Outbound;
|
|
68
54
|
|
|
69
55
|
/** @internal */
|
|
70
56
|
export const SubscriptionUpdate$outboundSchema: z.ZodMiniType<
|
|
71
57
|
SubscriptionUpdate$Outbound,
|
|
72
58
|
SubscriptionUpdate
|
|
73
59
|
> = smartUnion([
|
|
74
|
-
SubscriptionUpdateProduct$outboundSchema,
|
|
75
|
-
SubscriptionUpdateDiscount$outboundSchema,
|
|
76
|
-
SubscriptionUpdateTrial$outboundSchema,
|
|
77
60
|
SubscriptionUpdateSeats$outboundSchema,
|
|
78
61
|
SubscriptionUpdateBillingPeriod$outboundSchema,
|
|
79
62
|
SubscriptionCancel$outboundSchema,
|
|
80
63
|
SubscriptionRevoke$outboundSchema,
|
|
81
64
|
SubscriptionUpdateClear$outboundSchema,
|
|
65
|
+
SubscriptionUpdateBase$outboundSchema,
|
|
82
66
|
]);
|
|
83
67
|
|
|
84
68
|
export function subscriptionUpdateToJSON(
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
SubscriptionProrationBehavior,
|
|
9
|
+
SubscriptionProrationBehavior$outboundSchema,
|
|
10
|
+
} from "./subscriptionprorationbehavior.js";
|
|
11
|
+
|
|
12
|
+
export type SubscriptionUpdateBase = {
|
|
13
|
+
/**
|
|
14
|
+
* Update subscription to another product.
|
|
15
|
+
*/
|
|
16
|
+
productId?: string | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Determine how to handle the proration billing. If not provided, will use the default organization setting.
|
|
19
|
+
*/
|
|
20
|
+
prorationBehavior?: SubscriptionProrationBehavior | null | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle.
|
|
23
|
+
*/
|
|
24
|
+
discountId?: string | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately.
|
|
27
|
+
*/
|
|
28
|
+
trialEnd?: Date | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type SubscriptionUpdateBase$Outbound = {
|
|
33
|
+
product_id?: string | null | undefined;
|
|
34
|
+
proration_behavior?: string | null | undefined;
|
|
35
|
+
discount_id?: string | null | undefined;
|
|
36
|
+
trial_end?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const SubscriptionUpdateBase$outboundSchema: z.ZodMiniType<
|
|
41
|
+
SubscriptionUpdateBase$Outbound,
|
|
42
|
+
SubscriptionUpdateBase
|
|
43
|
+
> = z.pipe(
|
|
44
|
+
z.object({
|
|
45
|
+
productId: z.optional(z.nullable(z.string())),
|
|
46
|
+
prorationBehavior: z.optional(
|
|
47
|
+
z.nullable(SubscriptionProrationBehavior$outboundSchema),
|
|
48
|
+
),
|
|
49
|
+
discountId: z.optional(z.nullable(z.string())),
|
|
50
|
+
trialEnd: z.optional(
|
|
51
|
+
z.nullable(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
52
|
+
),
|
|
53
|
+
}),
|
|
54
|
+
z.transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
productId: "product_id",
|
|
57
|
+
prorationBehavior: "proration_behavior",
|
|
58
|
+
discountId: "discount_id",
|
|
59
|
+
trialEnd: "trial_end",
|
|
60
|
+
});
|
|
61
|
+
}),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export function subscriptionUpdateBaseToJSON(
|
|
65
|
+
subscriptionUpdateBase: SubscriptionUpdateBase,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
SubscriptionUpdateBase$outboundSchema.parse(subscriptionUpdateBase),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
export type SubscriptionUpdateDiscount = {
|
|
3
|
-
/**
|
|
4
|
-
* Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle.
|
|
5
|
-
*/
|
|
6
|
-
discountId: string | null;
|
|
7
|
-
};
|
|
8
|
-
/** @internal */
|
|
9
|
-
export type SubscriptionUpdateDiscount$Outbound = {
|
|
10
|
-
discount_id: string | null;
|
|
11
|
-
};
|
|
12
|
-
/** @internal */
|
|
13
|
-
export declare const SubscriptionUpdateDiscount$outboundSchema: z.ZodMiniType<SubscriptionUpdateDiscount$Outbound, SubscriptionUpdateDiscount>;
|
|
14
|
-
export declare function subscriptionUpdateDiscountToJSON(subscriptionUpdateDiscount: SubscriptionUpdateDiscount): string;
|
|
15
|
-
//# sourceMappingURL=subscriptionupdatediscount.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatediscount.d.ts","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatediscount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,mCAAmC,GAAG;IAChD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,WAAW,CACnE,mCAAmC,EACnC,0BAA0B,CAU3B,CAAC;AAEF,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.SubscriptionUpdateDiscount$outboundSchema = void 0;
|
|
40
|
-
exports.subscriptionUpdateDiscountToJSON = subscriptionUpdateDiscountToJSON;
|
|
41
|
-
const z = __importStar(require("zod/v4-mini"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
/** @internal */
|
|
44
|
-
exports.SubscriptionUpdateDiscount$outboundSchema = z.pipe(z.object({
|
|
45
|
-
discountId: z.nullable(z.string()),
|
|
46
|
-
}), z.transform((v) => {
|
|
47
|
-
return (0, primitives_js_1.remap)(v, {
|
|
48
|
-
discountId: "discount_id",
|
|
49
|
-
});
|
|
50
|
-
}));
|
|
51
|
-
function subscriptionUpdateDiscountToJSON(subscriptionUpdateDiscount) {
|
|
52
|
-
return JSON.stringify(exports.SubscriptionUpdateDiscount$outboundSchema.parse(subscriptionUpdateDiscount));
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=subscriptionupdatediscount.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatediscount.js","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatediscount.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,4EAMC;AApCD,+CAAiC;AACjC,2DAA0D;AAc1D,gBAAgB;AACH,QAAA,yCAAyC,GAGlD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,SAAgB,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,iDAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
import { SubscriptionProrationBehavior } from "./subscriptionprorationbehavior.js";
|
|
3
|
-
export type SubscriptionUpdateProduct = {
|
|
4
|
-
/**
|
|
5
|
-
* Update subscription to another product.
|
|
6
|
-
*/
|
|
7
|
-
productId: string;
|
|
8
|
-
/**
|
|
9
|
-
* Determine how to handle the proration billing. If not provided, will use the default organization setting.
|
|
10
|
-
*/
|
|
11
|
-
prorationBehavior?: SubscriptionProrationBehavior | null | undefined;
|
|
12
|
-
};
|
|
13
|
-
/** @internal */
|
|
14
|
-
export type SubscriptionUpdateProduct$Outbound = {
|
|
15
|
-
product_id: string;
|
|
16
|
-
proration_behavior?: string | null | undefined;
|
|
17
|
-
};
|
|
18
|
-
/** @internal */
|
|
19
|
-
export declare const SubscriptionUpdateProduct$outboundSchema: z.ZodMiniType<SubscriptionUpdateProduct$Outbound, SubscriptionUpdateProduct>;
|
|
20
|
-
export declare function subscriptionUpdateProductToJSON(subscriptionUpdateProduct: SubscriptionUpdateProduct): string;
|
|
21
|
-
//# sourceMappingURL=subscriptionupdateproduct.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdateproduct.d.ts","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdateproduct.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,6BAA6B,EAE9B,MAAM,oCAAoC,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,CAAC;CACtE,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAChD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAc1B,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdateproduct.js","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdateproduct.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CH,0EAMC;AAjDD,+CAAiC;AACjC,2DAA0D;AAC1D,yFAG4C;AAmB5C,gBAAgB;AACH,QAAA,wCAAwC,GAGjD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAC3B,CAAC,CAAC,QAAQ,CAAC,+EAA4C,CAAC,CACzD;CACF,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,iBAAiB,EAAE,oBAAoB;KACxC,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,SAAgB,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,gDAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
export type SubscriptionUpdateTrial = {
|
|
3
|
-
/**
|
|
4
|
-
* Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately.
|
|
5
|
-
*/
|
|
6
|
-
trialEnd: Date;
|
|
7
|
-
};
|
|
8
|
-
/** @internal */
|
|
9
|
-
export type SubscriptionUpdateTrial$Outbound = {
|
|
10
|
-
trial_end: string;
|
|
11
|
-
};
|
|
12
|
-
/** @internal */
|
|
13
|
-
export declare const SubscriptionUpdateTrial$outboundSchema: z.ZodMiniType<SubscriptionUpdateTrial$Outbound, SubscriptionUpdateTrial>;
|
|
14
|
-
export declare function subscriptionUpdateTrialToJSON(subscriptionUpdateTrial: SubscriptionUpdateTrial): string;
|
|
15
|
-
//# sourceMappingURL=subscriptionupdatetrial.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatetrial.d.ts","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatetrial.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,gCAAgC,GAAG;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,WAAW,CAChE,gCAAgC,EAChC,uBAAuB,CAUxB,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,uBAAuB,EAAE,uBAAuB,GAC/C,MAAM,CAIR"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.SubscriptionUpdateTrial$outboundSchema = void 0;
|
|
40
|
-
exports.subscriptionUpdateTrialToJSON = subscriptionUpdateTrialToJSON;
|
|
41
|
-
const z = __importStar(require("zod/v4-mini"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
/** @internal */
|
|
44
|
-
exports.SubscriptionUpdateTrial$outboundSchema = z.pipe(z.object({
|
|
45
|
-
trialEnd: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
46
|
-
}), z.transform((v) => {
|
|
47
|
-
return (0, primitives_js_1.remap)(v, {
|
|
48
|
-
trialEnd: "trial_end",
|
|
49
|
-
});
|
|
50
|
-
}));
|
|
51
|
-
function subscriptionUpdateTrialToJSON(subscriptionUpdateTrial) {
|
|
52
|
-
return JSON.stringify(exports.SubscriptionUpdateTrial$outboundSchema.parse(subscriptionUpdateTrial));
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=subscriptionupdatetrial.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatetrial.js","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatetrial.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,sEAMC;AApCD,+CAAiC;AACjC,2DAA0D;AAc1D,gBAAgB;AACH,QAAA,sCAAsC,GAG/C,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;CAC9D,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,SAAgB,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,8CAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
export type SubscriptionUpdateDiscount = {
|
|
3
|
-
/**
|
|
4
|
-
* Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle.
|
|
5
|
-
*/
|
|
6
|
-
discountId: string | null;
|
|
7
|
-
};
|
|
8
|
-
/** @internal */
|
|
9
|
-
export type SubscriptionUpdateDiscount$Outbound = {
|
|
10
|
-
discount_id: string | null;
|
|
11
|
-
};
|
|
12
|
-
/** @internal */
|
|
13
|
-
export declare const SubscriptionUpdateDiscount$outboundSchema: z.ZodMiniType<SubscriptionUpdateDiscount$Outbound, SubscriptionUpdateDiscount>;
|
|
14
|
-
export declare function subscriptionUpdateDiscountToJSON(subscriptionUpdateDiscount: SubscriptionUpdateDiscount): string;
|
|
15
|
-
//# sourceMappingURL=subscriptionupdatediscount.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatediscount.d.ts","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatediscount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,mCAAmC,GAAG;IAChD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,WAAW,CACnE,mCAAmC,EACnC,0BAA0B,CAU3B,CAAC;AAEF,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4-mini";
|
|
5
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
/** @internal */
|
|
7
|
-
export const SubscriptionUpdateDiscount$outboundSchema = z.pipe(z.object({
|
|
8
|
-
discountId: z.nullable(z.string()),
|
|
9
|
-
}), z.transform((v) => {
|
|
10
|
-
return remap$(v, {
|
|
11
|
-
discountId: "discount_id",
|
|
12
|
-
});
|
|
13
|
-
}));
|
|
14
|
-
export function subscriptionUpdateDiscountToJSON(subscriptionUpdateDiscount) {
|
|
15
|
-
return JSON.stringify(SubscriptionUpdateDiscount$outboundSchema.parse(subscriptionUpdateDiscount));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=subscriptionupdatediscount.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatediscount.js","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatediscount.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAc1D,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAGlD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
import { SubscriptionProrationBehavior } from "./subscriptionprorationbehavior.js";
|
|
3
|
-
export type SubscriptionUpdateProduct = {
|
|
4
|
-
/**
|
|
5
|
-
* Update subscription to another product.
|
|
6
|
-
*/
|
|
7
|
-
productId: string;
|
|
8
|
-
/**
|
|
9
|
-
* Determine how to handle the proration billing. If not provided, will use the default organization setting.
|
|
10
|
-
*/
|
|
11
|
-
prorationBehavior?: SubscriptionProrationBehavior | null | undefined;
|
|
12
|
-
};
|
|
13
|
-
/** @internal */
|
|
14
|
-
export type SubscriptionUpdateProduct$Outbound = {
|
|
15
|
-
product_id: string;
|
|
16
|
-
proration_behavior?: string | null | undefined;
|
|
17
|
-
};
|
|
18
|
-
/** @internal */
|
|
19
|
-
export declare const SubscriptionUpdateProduct$outboundSchema: z.ZodMiniType<SubscriptionUpdateProduct$Outbound, SubscriptionUpdateProduct>;
|
|
20
|
-
export declare function subscriptionUpdateProductToJSON(subscriptionUpdateProduct: SubscriptionUpdateProduct): string;
|
|
21
|
-
//# sourceMappingURL=subscriptionupdateproduct.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdateproduct.d.ts","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdateproduct.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,6BAA6B,EAE9B,MAAM,oCAAoC,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,CAAC;CACtE,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAChD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAc1B,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4-mini";
|
|
5
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
import { SubscriptionProrationBehavior$outboundSchema, } from "./subscriptionprorationbehavior.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const SubscriptionUpdateProduct$outboundSchema = z.pipe(z.object({
|
|
9
|
-
productId: z.string(),
|
|
10
|
-
prorationBehavior: z.optional(z.nullable(SubscriptionProrationBehavior$outboundSchema)),
|
|
11
|
-
}), z.transform((v) => {
|
|
12
|
-
return remap$(v, {
|
|
13
|
-
productId: "product_id",
|
|
14
|
-
prorationBehavior: "proration_behavior",
|
|
15
|
-
});
|
|
16
|
-
}));
|
|
17
|
-
export function subscriptionUpdateProductToJSON(subscriptionUpdateProduct) {
|
|
18
|
-
return JSON.stringify(SubscriptionUpdateProduct$outboundSchema.parse(subscriptionUpdateProduct));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=subscriptionupdateproduct.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdateproduct.js","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdateproduct.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAEL,4CAA4C,GAC7C,MAAM,oCAAoC,CAAC;AAmB5C,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAGjD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAC3B,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC,CACzD;CACF,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,iBAAiB,EAAE,oBAAoB;KACxC,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
export type SubscriptionUpdateTrial = {
|
|
3
|
-
/**
|
|
4
|
-
* Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately.
|
|
5
|
-
*/
|
|
6
|
-
trialEnd: Date;
|
|
7
|
-
};
|
|
8
|
-
/** @internal */
|
|
9
|
-
export type SubscriptionUpdateTrial$Outbound = {
|
|
10
|
-
trial_end: string;
|
|
11
|
-
};
|
|
12
|
-
/** @internal */
|
|
13
|
-
export declare const SubscriptionUpdateTrial$outboundSchema: z.ZodMiniType<SubscriptionUpdateTrial$Outbound, SubscriptionUpdateTrial>;
|
|
14
|
-
export declare function subscriptionUpdateTrialToJSON(subscriptionUpdateTrial: SubscriptionUpdateTrial): string;
|
|
15
|
-
//# sourceMappingURL=subscriptionupdatetrial.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatetrial.d.ts","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatetrial.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,gCAAgC,GAAG;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,WAAW,CAChE,gCAAgC,EAChC,uBAAuB,CAUxB,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,uBAAuB,EAAE,uBAAuB,GAC/C,MAAM,CAIR"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4-mini";
|
|
5
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
/** @internal */
|
|
7
|
-
export const SubscriptionUpdateTrial$outboundSchema = z.pipe(z.object({
|
|
8
|
-
trialEnd: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
9
|
-
}), z.transform((v) => {
|
|
10
|
-
return remap$(v, {
|
|
11
|
-
trialEnd: "trial_end",
|
|
12
|
-
});
|
|
13
|
-
}));
|
|
14
|
-
export function subscriptionUpdateTrialToJSON(subscriptionUpdateTrial) {
|
|
15
|
-
return JSON.stringify(SubscriptionUpdateTrial$outboundSchema.parse(subscriptionUpdateTrial));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=subscriptionupdatetrial.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionupdatetrial.js","sourceRoot":"","sources":["../../../../src/models/components/subscriptionupdatetrial.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAc1D,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAG/C,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;CAC9D,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,sCAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
|
|
8
|
-
export type SubscriptionUpdateDiscount = {
|
|
9
|
-
/**
|
|
10
|
-
* Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle.
|
|
11
|
-
*/
|
|
12
|
-
discountId: string | null;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export type SubscriptionUpdateDiscount$Outbound = {
|
|
17
|
-
discount_id: string | null;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const SubscriptionUpdateDiscount$outboundSchema: z.ZodMiniType<
|
|
22
|
-
SubscriptionUpdateDiscount$Outbound,
|
|
23
|
-
SubscriptionUpdateDiscount
|
|
24
|
-
> = z.pipe(
|
|
25
|
-
z.object({
|
|
26
|
-
discountId: z.nullable(z.string()),
|
|
27
|
-
}),
|
|
28
|
-
z.transform((v) => {
|
|
29
|
-
return remap$(v, {
|
|
30
|
-
discountId: "discount_id",
|
|
31
|
-
});
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
export function subscriptionUpdateDiscountToJSON(
|
|
36
|
-
subscriptionUpdateDiscount: SubscriptionUpdateDiscount,
|
|
37
|
-
): string {
|
|
38
|
-
return JSON.stringify(
|
|
39
|
-
SubscriptionUpdateDiscount$outboundSchema.parse(subscriptionUpdateDiscount),
|
|
40
|
-
);
|
|
41
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
8
|
-
SubscriptionProrationBehavior,
|
|
9
|
-
SubscriptionProrationBehavior$outboundSchema,
|
|
10
|
-
} from "./subscriptionprorationbehavior.js";
|
|
11
|
-
|
|
12
|
-
export type SubscriptionUpdateProduct = {
|
|
13
|
-
/**
|
|
14
|
-
* Update subscription to another product.
|
|
15
|
-
*/
|
|
16
|
-
productId: string;
|
|
17
|
-
/**
|
|
18
|
-
* Determine how to handle the proration billing. If not provided, will use the default organization setting.
|
|
19
|
-
*/
|
|
20
|
-
prorationBehavior?: SubscriptionProrationBehavior | null | undefined;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type SubscriptionUpdateProduct$Outbound = {
|
|
25
|
-
product_id: string;
|
|
26
|
-
proration_behavior?: string | null | undefined;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/** @internal */
|
|
30
|
-
export const SubscriptionUpdateProduct$outboundSchema: z.ZodMiniType<
|
|
31
|
-
SubscriptionUpdateProduct$Outbound,
|
|
32
|
-
SubscriptionUpdateProduct
|
|
33
|
-
> = z.pipe(
|
|
34
|
-
z.object({
|
|
35
|
-
productId: z.string(),
|
|
36
|
-
prorationBehavior: z.optional(
|
|
37
|
-
z.nullable(SubscriptionProrationBehavior$outboundSchema),
|
|
38
|
-
),
|
|
39
|
-
}),
|
|
40
|
-
z.transform((v) => {
|
|
41
|
-
return remap$(v, {
|
|
42
|
-
productId: "product_id",
|
|
43
|
-
prorationBehavior: "proration_behavior",
|
|
44
|
-
});
|
|
45
|
-
}),
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
export function subscriptionUpdateProductToJSON(
|
|
49
|
-
subscriptionUpdateProduct: SubscriptionUpdateProduct,
|
|
50
|
-
): string {
|
|
51
|
-
return JSON.stringify(
|
|
52
|
-
SubscriptionUpdateProduct$outboundSchema.parse(subscriptionUpdateProduct),
|
|
53
|
-
);
|
|
54
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
|
|
8
|
-
export type SubscriptionUpdateTrial = {
|
|
9
|
-
/**
|
|
10
|
-
* Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately.
|
|
11
|
-
*/
|
|
12
|
-
trialEnd: Date;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export type SubscriptionUpdateTrial$Outbound = {
|
|
17
|
-
trial_end: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const SubscriptionUpdateTrial$outboundSchema: z.ZodMiniType<
|
|
22
|
-
SubscriptionUpdateTrial$Outbound,
|
|
23
|
-
SubscriptionUpdateTrial
|
|
24
|
-
> = z.pipe(
|
|
25
|
-
z.object({
|
|
26
|
-
trialEnd: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
27
|
-
}),
|
|
28
|
-
z.transform((v) => {
|
|
29
|
-
return remap$(v, {
|
|
30
|
-
trialEnd: "trial_end",
|
|
31
|
-
});
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
export function subscriptionUpdateTrialToJSON(
|
|
36
|
-
subscriptionUpdateTrial: SubscriptionUpdateTrial,
|
|
37
|
-
): string {
|
|
38
|
-
return JSON.stringify(
|
|
39
|
-
SubscriptionUpdateTrial$outboundSchema.parse(subscriptionUpdateTrial),
|
|
40
|
-
);
|
|
41
|
-
}
|