@flexprice/mcp-server 2.1.1 → 2.1.3
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/bin/mcp-server.js +1499 -724
- package/bin/mcp-server.js.map +64 -28
- package/bun.lock +33 -33
- package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.d.ts +16 -0
- package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.d.ts.map +1 -0
- package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.js +82 -0
- package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.js.map +1 -0
- package/esm/funcs/{plansPostPlansIdClone.d.ts → plansClonePlan.d.ts} +3 -3
- package/esm/funcs/plansClonePlan.d.ts.map +1 -0
- package/esm/funcs/{plansPostPlansIdClone.js → plansClonePlan.js} +5 -5
- package/esm/funcs/plansClonePlan.js.map +1 -0
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.d.ts +4 -4
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.d.ts.map +1 -1
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.js +4 -4
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.js.map +1 -1
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.d.ts +16 -0
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.d.ts.map +1 -0
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.js +88 -0
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/encodings.d.ts +1 -0
- package/esm/lib/encodings.d.ts.map +1 -1
- package/esm/lib/encodings.js +6 -0
- package/esm/lib/encodings.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +7 -3
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.d.ts +7 -0
- package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.d.ts.map +1 -0
- package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.js +35 -0
- package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.js.map +1 -0
- package/esm/mcp-server/tools/plansClonePlan.d.ts +7 -0
- package/esm/mcp-server/tools/plansClonePlan.d.ts.map +1 -0
- package/esm/mcp-server/tools/{plansPostPlansIdClone.js → plansClonePlan.js} +7 -7
- package/esm/mcp-server/tools/plansClonePlan.js.map +1 -0
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.d.ts +1 -1
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js +4 -4
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js.map +1 -1
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.d.ts +7 -0
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.d.ts.map +1 -0
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js +35 -0
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js.map +1 -0
- package/esm/models/address.d.ts +11 -0
- package/esm/models/address.d.ts.map +1 -0
- package/esm/models/address.js +13 -0
- package/esm/models/address.js.map +1 -0
- package/esm/models/alertstate.d.ts +16 -0
- package/esm/models/alertstate.d.ts.map +1 -0
- package/esm/models/alertstate.js +17 -0
- package/esm/models/alertstate.js.map +1 -0
- package/esm/models/autotopup.d.ts +9 -0
- package/esm/models/autotopup.d.ts.map +1 -0
- package/esm/models/autotopup.js +11 -0
- package/esm/models/autotopup.js.map +1 -0
- package/esm/models/billingcadence.d.ts +0 -2
- package/esm/models/billingcadence.d.ts.map +1 -1
- package/esm/models/billingcadence.js +0 -2
- package/esm/models/billingcadence.js.map +1 -1
- package/esm/models/billingperiod.d.ts +2 -0
- package/esm/models/billingperiod.d.ts.map +1 -1
- package/esm/models/billingperiod.js +2 -0
- package/esm/models/billingperiod.js.map +1 -1
- package/esm/models/changedinvoice.d.ts +14 -0
- package/esm/models/changedinvoice.d.ts.map +1 -0
- package/esm/models/changedinvoice.js +16 -0
- package/esm/models/changedinvoice.js.map +1 -0
- package/esm/models/changedinvoiceaction.d.ts +18 -0
- package/esm/models/changedinvoiceaction.d.ts.map +1 -0
- package/esm/models/changedinvoiceaction.js +16 -0
- package/esm/models/changedinvoiceaction.js.map +1 -0
- package/esm/models/changedinvoicestatus.d.ts +18 -0
- package/esm/models/changedinvoicestatus.d.ts.map +1 -0
- package/esm/models/changedinvoicestatus.js +16 -0
- package/esm/models/changedinvoicestatus.js.map +1 -0
- package/esm/models/changedlineitem.d.ts +12 -0
- package/esm/models/changedlineitem.d.ts.map +1 -0
- package/esm/models/changedlineitem.js +14 -0
- package/esm/models/changedlineitem.js.map +1 -0
- package/esm/models/changedlineitemaction.d.ts +20 -0
- package/esm/models/changedlineitemaction.d.ts.map +1 -0
- package/esm/models/changedlineitemaction.js +18 -0
- package/esm/models/changedlineitemaction.js.map +1 -0
- package/esm/models/changedresources.d.ts +11 -0
- package/esm/models/changedresources.d.ts.map +1 -0
- package/esm/models/changedresources.js +13 -0
- package/esm/models/changedresources.js.map +1 -0
- package/esm/models/changedsubscription.d.ts +10 -0
- package/esm/models/changedsubscription.d.ts.map +1 -0
- package/esm/models/changedsubscription.js +13 -0
- package/esm/models/changedsubscription.js.map +1 -0
- package/esm/models/changedsubscriptionaction.d.ts +18 -0
- package/esm/models/changedsubscriptionaction.d.ts.map +1 -0
- package/esm/models/changedsubscriptionaction.js +16 -0
- package/esm/models/changedsubscriptionaction.js.map +1 -0
- package/esm/models/cloneplanop.d.ts +12 -0
- package/esm/models/cloneplanop.d.ts.map +1 -0
- package/esm/models/{postplansidcloneop.js → cloneplanop.js} +4 -3
- package/esm/models/cloneplanop.js.map +1 -0
- package/esm/models/createpricerequest.d.ts +0 -2
- package/esm/models/createpricerequest.d.ts.map +1 -1
- package/esm/models/createpricerequest.js +0 -2
- package/esm/models/createpricerequest.js.map +1 -1
- package/esm/models/createsubscriptionrequest.d.ts +1 -2
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +1 -2
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/creditbreakdown.d.ts +7 -0
- package/esm/models/creditbreakdown.d.ts.map +1 -0
- package/esm/models/creditbreakdown.js +9 -0
- package/esm/models/creditbreakdown.js.map +1 -0
- package/esm/models/creditgrantcadence.d.ts +1 -1
- package/esm/models/executesubscriptionmodifyop.d.ts +6 -6
- package/esm/models/executesubscriptionmodifyop.d.ts.map +1 -1
- package/esm/models/executesubscriptionmodifyop.js +5 -5
- package/esm/models/executesubscriptionmodifyop.js.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.d.ts +11 -0
- package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -0
- package/esm/models/executesubscriptionmodifyrequest.js +13 -0
- package/esm/models/executesubscriptionmodifyrequest.js.map +1 -0
- package/esm/models/getmeterusagepreviewinvoiceop.d.ts +6 -0
- package/esm/models/getmeterusagepreviewinvoiceop.d.ts.map +1 -0
- package/esm/models/getmeterusagepreviewinvoiceop.js +11 -0
- package/esm/models/getmeterusagepreviewinvoiceop.js.map +1 -0
- package/esm/models/invoicefilter.d.ts +1 -0
- package/esm/models/invoicefilter.d.ts.map +1 -1
- package/esm/models/invoicefilter.js +1 -0
- package/esm/models/invoicefilter.js.map +1 -1
- package/esm/models/invoiceresponse.d.ts +1 -0
- package/esm/models/invoiceresponse.d.ts.map +1 -1
- package/esm/models/invoiceresponse.js +1 -0
- package/esm/models/invoiceresponse.js.map +1 -1
- package/esm/models/lineitemquantitychange.d.ts +8 -0
- package/esm/models/lineitemquantitychange.d.ts.map +1 -0
- package/esm/models/lineitemquantitychange.js +10 -0
- package/esm/models/lineitemquantitychange.js.map +1 -0
- package/esm/models/previewsubscriptionmodifyop.d.ts +12 -0
- package/esm/models/previewsubscriptionmodifyop.d.ts.map +1 -0
- package/esm/models/previewsubscriptionmodifyop.js +16 -0
- package/esm/models/previewsubscriptionmodifyop.js.map +1 -0
- package/esm/models/submodifyinheritancerequest.d.ts +6 -0
- package/esm/models/submodifyinheritancerequest.d.ts.map +1 -0
- package/esm/models/{executesubscriptioninheritancerequest.js → submodifyinheritancerequest.js} +2 -2
- package/esm/models/submodifyinheritancerequest.js.map +1 -0
- package/esm/models/submodifyquantitychangerequest.d.ts +7 -0
- package/esm/models/submodifyquantitychangerequest.d.ts.map +1 -0
- package/esm/models/submodifyquantitychangerequest.js +9 -0
- package/esm/models/submodifyquantitychangerequest.js.map +1 -0
- package/esm/models/subscriptionmodifyresponse.d.ts +9 -0
- package/esm/models/subscriptionmodifyresponse.d.ts.map +1 -0
- package/esm/models/subscriptionmodifyresponse.js +11 -0
- package/esm/models/subscriptionmodifyresponse.js.map +1 -0
- package/esm/models/subscriptionmodifytype.d.ts +12 -0
- package/esm/models/subscriptionmodifytype.d.ts.map +1 -0
- package/esm/models/subscriptionmodifytype.js +13 -0
- package/esm/models/subscriptionmodifytype.js.map +1 -0
- package/esm/models/subscriptionphasecreaterequest.d.ts +2 -0
- package/esm/models/subscriptionphasecreaterequest.d.ts.map +1 -1
- package/esm/models/subscriptionphasecreaterequest.js +3 -0
- package/esm/models/subscriptionphasecreaterequest.js.map +1 -1
- package/esm/models/subscriptionpricecreaterequest.d.ts +0 -2
- package/esm/models/subscriptionpricecreaterequest.d.ts.map +1 -1
- package/esm/models/subscriptionpricecreaterequest.js +0 -2
- package/esm/models/subscriptionpricecreaterequest.js.map +1 -1
- package/esm/models/tenantbillingdetails.d.ts +10 -0
- package/esm/models/tenantbillingdetails.d.ts.map +1 -0
- package/esm/models/tenantbillingdetails.js +13 -0
- package/esm/models/tenantbillingdetails.js.map +1 -0
- package/esm/models/tenantresponse.d.ts +15 -0
- package/esm/models/tenantresponse.d.ts.map +1 -0
- package/esm/models/tenantresponse.js +15 -0
- package/esm/models/tenantresponse.js.map +1 -0
- package/esm/models/transactionreason.d.ts +30 -0
- package/esm/models/transactionreason.d.ts.map +1 -0
- package/esm/models/transactionreason.js +31 -0
- package/esm/models/transactionreason.js.map +1 -0
- package/esm/models/transactionstatus.d.ts +14 -0
- package/esm/models/transactionstatus.d.ts.map +1 -0
- package/esm/models/transactionstatus.js +15 -0
- package/esm/models/transactionstatus.js.map +1 -0
- package/esm/models/transactiontype.d.ts +12 -0
- package/esm/models/transactiontype.d.ts.map +1 -0
- package/esm/models/transactiontype.js +13 -0
- package/esm/models/transactiontype.js.map +1 -0
- package/esm/models/userresponse.d.ts +12 -0
- package/esm/models/userresponse.d.ts.map +1 -0
- package/esm/models/userresponse.js +14 -0
- package/esm/models/userresponse.js.map +1 -0
- package/esm/models/usertype.d.ts +12 -0
- package/esm/models/usertype.d.ts.map +1 -0
- package/esm/models/usertype.js +13 -0
- package/esm/models/usertype.js.map +1 -0
- package/esm/models/walletconfig.d.ts +7 -0
- package/esm/models/walletconfig.d.ts.map +1 -0
- package/esm/models/walletconfig.js +10 -0
- package/esm/models/walletconfig.js.map +1 -0
- package/esm/models/walletconfigpricetype.d.ts +14 -0
- package/esm/models/walletconfigpricetype.d.ts.map +1 -0
- package/esm/models/walletconfigpricetype.js +15 -0
- package/esm/models/walletconfigpricetype.js.map +1 -0
- package/esm/models/walletresponse.d.ts +39 -0
- package/esm/models/walletresponse.d.ts.map +1 -0
- package/esm/models/walletresponse.js +39 -0
- package/esm/models/walletresponse.js.map +1 -0
- package/esm/models/walletstatus.d.ts +14 -0
- package/esm/models/walletstatus.d.ts.map +1 -0
- package/esm/models/walletstatus.js +15 -0
- package/esm/models/walletstatus.js.map +1 -0
- package/esm/models/wallettransactionresponse.d.ts +46 -0
- package/esm/models/wallettransactionresponse.d.ts.map +1 -0
- package/esm/models/wallettransactionresponse.js +46 -0
- package/esm/models/wallettransactionresponse.js.map +1 -0
- package/esm/models/wallettxreferencetype.d.ts +16 -0
- package/esm/models/wallettxreferencetype.d.ts.map +1 -0
- package/esm/models/wallettxreferencetype.js +17 -0
- package/esm/models/wallettxreferencetype.js.map +1 -0
- package/esm/models/wallettype.d.ts +12 -0
- package/esm/models/wallettype.d.ts.map +1 -0
- package/esm/models/wallettype.js +13 -0
- package/esm/models/wallettype.js.map +1 -0
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +10 -2
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/manifest.json +11 -3
- package/package.json +1 -1
- package/src/funcs/invoicesGetMeterUsagePreviewInvoice.ts +144 -0
- package/src/funcs/{plansPostPlansIdClone.ts → plansClonePlan.ts} +9 -9
- package/src/funcs/subscriptionsExecuteSubscriptionModify.ts +7 -7
- package/src/funcs/subscriptionsPreviewSubscriptionModify.ts +153 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +9 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -3
- package/src/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.ts +47 -0
- package/src/mcp-server/tools/{plansPostPlansIdClone.ts → plansClonePlan.ts} +6 -6
- package/src/mcp-server/tools/subscriptionsExecuteSubscriptionModify.ts +4 -4
- package/src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts +45 -0
- package/src/models/address.ts +23 -0
- package/src/models/alertstate.ts +21 -0
- package/src/models/autotopup.ts +19 -0
- package/src/models/billingcadence.ts +0 -2
- package/src/models/billingperiod.ts +2 -0
- package/src/models/changedinvoice.ts +41 -0
- package/src/models/changedinvoiceaction.ts +23 -0
- package/src/models/changedinvoicestatus.ts +25 -0
- package/src/models/changedlineitem.ts +29 -0
- package/src/models/changedlineitemaction.ts +25 -0
- package/src/models/changedresources.ts +28 -0
- package/src/models/changedsubscription.ts +28 -0
- package/src/models/changedsubscriptionaction.ts +25 -0
- package/src/models/{postplansidcloneop.ts → cloneplanop.ts} +9 -10
- package/src/models/createpricerequest.ts +0 -3
- package/src/models/createsubscriptionrequest.ts +4 -3
- package/src/models/creditbreakdown.ts +15 -0
- package/src/models/executesubscriptionmodifyop.ts +14 -14
- package/src/models/executesubscriptionmodifyrequest.ts +31 -0
- package/src/models/getmeterusagepreviewinvoiceop.ts +21 -0
- package/src/models/invoicefilter.ts +4 -0
- package/src/models/invoiceresponse.ts +4 -0
- package/src/models/lineitemquantitychange.ts +21 -0
- package/src/models/previewsubscriptionmodifyop.ts +39 -0
- package/src/models/{executesubscriptioninheritancerequest.ts → submodifyinheritancerequest.ts} +3 -3
- package/src/models/submodifyquantitychangerequest.ts +19 -0
- package/src/models/subscriptionmodifyresponse.ts +25 -0
- package/src/models/subscriptionmodifytype.ts +17 -0
- package/src/models/subscriptionphasecreaterequest.ts +9 -0
- package/src/models/subscriptionpricecreaterequest.ts +0 -3
- package/src/models/tenantbillingdetails.ts +21 -0
- package/src/models/tenantresponse.ts +29 -0
- package/src/models/transactionreason.ts +35 -0
- package/src/models/transactionstatus.ts +19 -0
- package/src/models/transactiontype.ts +17 -0
- package/src/models/userresponse.ts +23 -0
- package/src/models/usertype.ts +17 -0
- package/src/models/walletconfig.ts +20 -0
- package/src/models/walletconfigpricetype.ts +19 -0
- package/src/models/walletresponse.ts +74 -0
- package/src/models/walletstatus.ts +19 -0
- package/src/models/wallettransactionresponse.ts +104 -0
- package/src/models/wallettxreferencetype.ts +21 -0
- package/src/models/wallettype.ts +17 -0
- package/src/tool-names.ts +10 -2
- package/esm/funcs/plansPostPlansIdClone.d.ts.map +0 -1
- package/esm/funcs/plansPostPlansIdClone.js.map +0 -1
- package/esm/mcp-server/tools/plansPostPlansIdClone.d.ts +0 -7
- package/esm/mcp-server/tools/plansPostPlansIdClone.d.ts.map +0 -1
- package/esm/mcp-server/tools/plansPostPlansIdClone.js.map +0 -1
- package/esm/models/executesubscriptioninheritancerequest.d.ts +0 -6
- package/esm/models/executesubscriptioninheritancerequest.d.ts.map +0 -1
- package/esm/models/executesubscriptioninheritancerequest.js.map +0 -1
- package/esm/models/postplansidcloneop.d.ts +0 -12
- package/esm/models/postplansidcloneop.d.ts.map +0 -1
- package/esm/models/postplansidcloneop.js.map +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ErrorResponse, ErrorResponse$zodSchema } from "./errorresponse.js";
|
|
7
|
+
import {
|
|
8
|
+
ExecuteSubscriptionModifyRequest,
|
|
9
|
+
ExecuteSubscriptionModifyRequest$zodSchema,
|
|
10
|
+
} from "./executesubscriptionmodifyrequest.js";
|
|
11
|
+
import {
|
|
12
|
+
SubscriptionModifyResponse,
|
|
13
|
+
SubscriptionModifyResponse$zodSchema,
|
|
14
|
+
} from "./subscriptionmodifyresponse.js";
|
|
15
|
+
|
|
16
|
+
export type PreviewSubscriptionModifyRequest = {
|
|
17
|
+
id: string;
|
|
18
|
+
body: ExecuteSubscriptionModifyRequest;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const PreviewSubscriptionModifyRequest$zodSchema: z.ZodType<
|
|
22
|
+
PreviewSubscriptionModifyRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
body: ExecuteSubscriptionModifyRequest$zodSchema.describe(
|
|
25
|
+
"Modification preview request",
|
|
26
|
+
),
|
|
27
|
+
id: z.string().describe("Subscription ID"),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export type PreviewSubscriptionModifyResponse =
|
|
31
|
+
| SubscriptionModifyResponse
|
|
32
|
+
| ErrorResponse;
|
|
33
|
+
|
|
34
|
+
export const PreviewSubscriptionModifyResponse$zodSchema: z.ZodType<
|
|
35
|
+
PreviewSubscriptionModifyResponse
|
|
36
|
+
> = z.union([
|
|
37
|
+
SubscriptionModifyResponse$zodSchema,
|
|
38
|
+
ErrorResponse$zodSchema,
|
|
39
|
+
]);
|
package/src/models/{executesubscriptioninheritancerequest.ts → submodifyinheritancerequest.ts}
RENAMED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
|
-
export type
|
|
7
|
+
export type SubModifyInheritanceRequest = {
|
|
8
8
|
external_customer_ids_to_inherit_subscription?: Array<string> | undefined;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const
|
|
12
|
-
|
|
11
|
+
export const SubModifyInheritanceRequest$zodSchema: z.ZodType<
|
|
12
|
+
SubModifyInheritanceRequest
|
|
13
13
|
> = z.object({
|
|
14
14
|
external_customer_ids_to_inherit_subscription: z.array(z.string()).optional(),
|
|
15
15
|
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
LineItemQuantityChange,
|
|
8
|
+
LineItemQuantityChange$zodSchema,
|
|
9
|
+
} from "./lineitemquantitychange.js";
|
|
10
|
+
|
|
11
|
+
export type SubModifyQuantityChangeRequest = {
|
|
12
|
+
line_items: Array<LineItemQuantityChange>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const SubModifyQuantityChangeRequest$zodSchema: z.ZodType<
|
|
16
|
+
SubModifyQuantityChangeRequest
|
|
17
|
+
> = z.object({
|
|
18
|
+
line_items: z.array(LineItemQuantityChange$zodSchema),
|
|
19
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
ChangedResources,
|
|
8
|
+
ChangedResources$zodSchema,
|
|
9
|
+
} from "./changedresources.js";
|
|
10
|
+
import {
|
|
11
|
+
SubscriptionResponse,
|
|
12
|
+
SubscriptionResponse$zodSchema,
|
|
13
|
+
} from "./subscriptionresponse.js";
|
|
14
|
+
|
|
15
|
+
export type SubscriptionModifyResponse = {
|
|
16
|
+
changed_resources?: ChangedResources | undefined;
|
|
17
|
+
subscription?: SubscriptionResponse | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const SubscriptionModifyResponse$zodSchema: z.ZodType<
|
|
21
|
+
SubscriptionModifyResponse
|
|
22
|
+
> = z.object({
|
|
23
|
+
changed_resources: ChangedResources$zodSchema.optional(),
|
|
24
|
+
subscription: SubscriptionResponse$zodSchema.optional(),
|
|
25
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const SubscriptionModifyType = {
|
|
9
|
+
Inheritance: "inheritance",
|
|
10
|
+
QuantityChange: "quantity_change",
|
|
11
|
+
} as const;
|
|
12
|
+
export type SubscriptionModifyType = ClosedEnum<typeof SubscriptionModifyType>;
|
|
13
|
+
|
|
14
|
+
export const SubscriptionModifyType$zodSchema = z.enum([
|
|
15
|
+
"inheritance",
|
|
16
|
+
"quantity_change",
|
|
17
|
+
]);
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
CreateSubscriptionLineItemRequest,
|
|
8
|
+
CreateSubscriptionLineItemRequest$zodSchema,
|
|
9
|
+
} from "./createsubscriptionlineitemrequest.js";
|
|
6
10
|
import {
|
|
7
11
|
OverrideLineItemRequest,
|
|
8
12
|
OverrideLineItemRequest$zodSchema,
|
|
@@ -12,6 +16,7 @@ export type SubscriptionPhaseCreateRequest = {
|
|
|
12
16
|
coupons?: Array<string> | undefined;
|
|
13
17
|
end_date?: string | undefined;
|
|
14
18
|
line_item_coupons?: { [k: string]: Array<string> } | undefined;
|
|
19
|
+
line_items?: Array<CreateSubscriptionLineItemRequest> | undefined;
|
|
15
20
|
metadata?: { [k: string]: string } | undefined;
|
|
16
21
|
override_line_items?: Array<OverrideLineItemRequest> | undefined;
|
|
17
22
|
start_date: string;
|
|
@@ -28,6 +33,10 @@ export const SubscriptionPhaseCreateRequest$zodSchema: z.ZodType<
|
|
|
28
33
|
.describe(
|
|
29
34
|
"LineItemCoupons represents line item-level coupons (map of line_item_id to coupon IDs)",
|
|
30
35
|
),
|
|
36
|
+
line_items: z.array(CreateSubscriptionLineItemRequest$zodSchema).optional()
|
|
37
|
+
.describe(
|
|
38
|
+
"LineItems are extra line items to add during this phase, primarily one-time charges.\nEach item's start_date defaults to the phase's start_date when not provided.",
|
|
39
|
+
),
|
|
31
40
|
metadata: z.record(z.string(), z.string()).optional(),
|
|
32
41
|
override_line_items: z.array(OverrideLineItemRequest$zodSchema).optional()
|
|
33
42
|
.describe(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { BillingCadence, BillingCadence$zodSchema } from "./billingcadence.js";
|
|
7
6
|
import { BillingModel, BillingModel$zodSchema } from "./billingmodel.js";
|
|
8
7
|
import { BillingPeriod, BillingPeriod$zodSchema } from "./billingperiod.js";
|
|
9
8
|
import { BillingTier, BillingTier$zodSchema } from "./billingtier.js";
|
|
@@ -25,7 +24,6 @@ import { PriceUnitType, PriceUnitType$zodSchema } from "./priceunittype.js";
|
|
|
25
24
|
|
|
26
25
|
export type SubscriptionPriceCreateRequest = {
|
|
27
26
|
amount?: string | undefined;
|
|
28
|
-
billing_cadence: BillingCadence;
|
|
29
27
|
billing_model: BillingModel;
|
|
30
28
|
billing_period: BillingPeriod;
|
|
31
29
|
billing_period_count?: number | undefined;
|
|
@@ -52,7 +50,6 @@ export const SubscriptionPriceCreateRequest$zodSchema: z.ZodType<
|
|
|
52
50
|
SubscriptionPriceCreateRequest
|
|
53
51
|
> = z.object({
|
|
54
52
|
amount: z.string().optional(),
|
|
55
|
-
billing_cadence: BillingCadence$zodSchema,
|
|
56
53
|
billing_model: BillingModel$zodSchema,
|
|
57
54
|
billing_period: BillingPeriod$zodSchema,
|
|
58
55
|
billing_period_count: z.int().optional(),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { Address, Address$zodSchema } from "./address.js";
|
|
7
|
+
|
|
8
|
+
export type TenantBillingDetails = {
|
|
9
|
+
address?: Address | undefined;
|
|
10
|
+
email?: string | undefined;
|
|
11
|
+
help_email?: string | undefined;
|
|
12
|
+
phone?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const TenantBillingDetails$zodSchema: z.ZodType<TenantBillingDetails> = z
|
|
16
|
+
.object({
|
|
17
|
+
address: Address$zodSchema.optional(),
|
|
18
|
+
email: z.string().optional(),
|
|
19
|
+
help_email: z.string().optional(),
|
|
20
|
+
phone: z.string().optional(),
|
|
21
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
TenantBillingDetails,
|
|
8
|
+
TenantBillingDetails$zodSchema,
|
|
9
|
+
} from "./tenantbillingdetails.js";
|
|
10
|
+
|
|
11
|
+
export type TenantResponse = {
|
|
12
|
+
billing_details?: TenantBillingDetails | undefined;
|
|
13
|
+
created_at?: string | undefined;
|
|
14
|
+
id?: string | undefined;
|
|
15
|
+
metadata?: { [k: string]: string } | undefined;
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
status?: string | undefined;
|
|
18
|
+
updated_at?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const TenantResponse$zodSchema: z.ZodType<TenantResponse> = z.object({
|
|
22
|
+
billing_details: TenantBillingDetails$zodSchema.optional(),
|
|
23
|
+
created_at: z.iso.datetime({ offset: true }).optional(),
|
|
24
|
+
id: z.string().optional(),
|
|
25
|
+
metadata: z.record(z.string(), z.string()).optional(),
|
|
26
|
+
name: z.string().optional(),
|
|
27
|
+
status: z.string().optional(),
|
|
28
|
+
updated_at: z.iso.datetime({ offset: true }).optional(),
|
|
29
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const TransactionReason = {
|
|
9
|
+
InvoicePayment: "INVOICE_PAYMENT",
|
|
10
|
+
FreeCreditGrant: "FREE_CREDIT_GRANT",
|
|
11
|
+
SubscriptionCreditGrant: "SUBSCRIPTION_CREDIT_GRANT",
|
|
12
|
+
PurchasedCreditInvoiced: "PURCHASED_CREDIT_INVOICED",
|
|
13
|
+
PurchasedCreditDirect: "PURCHASED_CREDIT_DIRECT",
|
|
14
|
+
CreditNote: "CREDIT_NOTE",
|
|
15
|
+
CreditExpired: "CREDIT_EXPIRED",
|
|
16
|
+
WalletTermination: "WALLET_TERMINATION",
|
|
17
|
+
ManualBalanceDebit: "MANUAL_BALANCE_DEBIT",
|
|
18
|
+
CreditAdjustment: "CREDIT_ADJUSTMENT",
|
|
19
|
+
InvoiceVoidRefund: "INVOICE_VOID_REFUND",
|
|
20
|
+
} as const;
|
|
21
|
+
export type TransactionReason = ClosedEnum<typeof TransactionReason>;
|
|
22
|
+
|
|
23
|
+
export const TransactionReason$zodSchema = z.enum([
|
|
24
|
+
"INVOICE_PAYMENT",
|
|
25
|
+
"FREE_CREDIT_GRANT",
|
|
26
|
+
"SUBSCRIPTION_CREDIT_GRANT",
|
|
27
|
+
"PURCHASED_CREDIT_INVOICED",
|
|
28
|
+
"PURCHASED_CREDIT_DIRECT",
|
|
29
|
+
"CREDIT_NOTE",
|
|
30
|
+
"CREDIT_EXPIRED",
|
|
31
|
+
"WALLET_TERMINATION",
|
|
32
|
+
"MANUAL_BALANCE_DEBIT",
|
|
33
|
+
"CREDIT_ADJUSTMENT",
|
|
34
|
+
"INVOICE_VOID_REFUND",
|
|
35
|
+
]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const TransactionStatus = {
|
|
9
|
+
Pending: "pending",
|
|
10
|
+
Completed: "completed",
|
|
11
|
+
Failed: "failed",
|
|
12
|
+
} as const;
|
|
13
|
+
export type TransactionStatus = ClosedEnum<typeof TransactionStatus>;
|
|
14
|
+
|
|
15
|
+
export const TransactionStatus$zodSchema = z.enum([
|
|
16
|
+
"pending",
|
|
17
|
+
"completed",
|
|
18
|
+
"failed",
|
|
19
|
+
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const TransactionType = {
|
|
9
|
+
Credit: "credit",
|
|
10
|
+
Debit: "debit",
|
|
11
|
+
} as const;
|
|
12
|
+
export type TransactionType = ClosedEnum<typeof TransactionType>;
|
|
13
|
+
|
|
14
|
+
export const TransactionType$zodSchema = z.enum([
|
|
15
|
+
"credit",
|
|
16
|
+
"debit",
|
|
17
|
+
]);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { TenantResponse, TenantResponse$zodSchema } from "./tenantresponse.js";
|
|
7
|
+
import { UserType, UserType$zodSchema } from "./usertype.js";
|
|
8
|
+
|
|
9
|
+
export type UserResponse = {
|
|
10
|
+
email?: string | undefined;
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
roles?: Array<string> | undefined;
|
|
13
|
+
tenant?: TenantResponse | undefined;
|
|
14
|
+
type?: UserType | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const UserResponse$zodSchema: z.ZodType<UserResponse> = z.object({
|
|
18
|
+
email: z.string().optional().describe("Empty for service accounts"),
|
|
19
|
+
id: z.string().optional(),
|
|
20
|
+
roles: z.array(z.string()).optional(),
|
|
21
|
+
tenant: TenantResponse$zodSchema.optional(),
|
|
22
|
+
type: UserType$zodSchema.optional(),
|
|
23
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const UserType = {
|
|
9
|
+
User: "user",
|
|
10
|
+
ServiceAccount: "service_account",
|
|
11
|
+
} as const;
|
|
12
|
+
export type UserType = ClosedEnum<typeof UserType>;
|
|
13
|
+
|
|
14
|
+
export const UserType$zodSchema = z.enum([
|
|
15
|
+
"user",
|
|
16
|
+
"service_account",
|
|
17
|
+
]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
WalletConfigPriceType,
|
|
8
|
+
WalletConfigPriceType$zodSchema,
|
|
9
|
+
} from "./walletconfigpricetype.js";
|
|
10
|
+
|
|
11
|
+
export type WalletConfig = {
|
|
12
|
+
allowed_price_types?: Array<WalletConfigPriceType> | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const WalletConfig$zodSchema: z.ZodType<WalletConfig> = z.object({
|
|
16
|
+
allowed_price_types: z.array(WalletConfigPriceType$zodSchema).optional()
|
|
17
|
+
.describe(
|
|
18
|
+
"AllowedPriceTypes is a list of price types that are allowed for the wallet\nnil means all price types are allowed",
|
|
19
|
+
),
|
|
20
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const WalletConfigPriceType = {
|
|
9
|
+
All: "ALL",
|
|
10
|
+
Usage: "USAGE",
|
|
11
|
+
Fixed: "FIXED",
|
|
12
|
+
} as const;
|
|
13
|
+
export type WalletConfigPriceType = ClosedEnum<typeof WalletConfigPriceType>;
|
|
14
|
+
|
|
15
|
+
export const WalletConfigPriceType$zodSchema = z.enum([
|
|
16
|
+
"ALL",
|
|
17
|
+
"USAGE",
|
|
18
|
+
"FIXED",
|
|
19
|
+
]);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { AlertSettings, AlertSettings$zodSchema } from "./alertsettings.js";
|
|
7
|
+
import { AlertState, AlertState$zodSchema } from "./alertstate.js";
|
|
8
|
+
import { AutoTopup, AutoTopup$zodSchema } from "./autotopup.js";
|
|
9
|
+
import {
|
|
10
|
+
CreditBreakdown,
|
|
11
|
+
CreditBreakdown$zodSchema,
|
|
12
|
+
} from "./creditbreakdown.js";
|
|
13
|
+
import { Status, Status$zodSchema } from "./status.js";
|
|
14
|
+
import { WalletConfig, WalletConfig$zodSchema } from "./walletconfig.js";
|
|
15
|
+
import { WalletStatus, WalletStatus$zodSchema } from "./walletstatus.js";
|
|
16
|
+
import { WalletType, WalletType$zodSchema } from "./wallettype.js";
|
|
17
|
+
|
|
18
|
+
export type WalletResponse = {
|
|
19
|
+
alert_settings?: AlertSettings | undefined;
|
|
20
|
+
alert_state?: AlertState | undefined;
|
|
21
|
+
auto_topup?: AutoTopup | undefined;
|
|
22
|
+
balance?: string | undefined;
|
|
23
|
+
config?: WalletConfig | undefined;
|
|
24
|
+
conversion_rate?: string | undefined;
|
|
25
|
+
created_at?: string | undefined;
|
|
26
|
+
created_by?: string | undefined;
|
|
27
|
+
credit_balance?: string | undefined;
|
|
28
|
+
credits_available_breakdown?: CreditBreakdown | undefined;
|
|
29
|
+
currency?: string | undefined;
|
|
30
|
+
customer_id?: string | undefined;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
environment_id?: string | undefined;
|
|
33
|
+
id?: string | undefined;
|
|
34
|
+
metadata?: { [k: string]: string } | undefined;
|
|
35
|
+
name?: string | undefined;
|
|
36
|
+
status?: Status | undefined;
|
|
37
|
+
tenant_id?: string | undefined;
|
|
38
|
+
topup_conversion_rate?: string | undefined;
|
|
39
|
+
updated_at?: string | undefined;
|
|
40
|
+
updated_by?: string | undefined;
|
|
41
|
+
wallet_status?: WalletStatus | undefined;
|
|
42
|
+
wallet_type?: WalletType | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const WalletResponse$zodSchema: z.ZodType<WalletResponse> = z.object({
|
|
46
|
+
alert_settings: AlertSettings$zodSchema.optional(),
|
|
47
|
+
alert_state: AlertState$zodSchema.optional(),
|
|
48
|
+
auto_topup: AutoTopup$zodSchema.optional(),
|
|
49
|
+
balance: z.string().optional(),
|
|
50
|
+
config: WalletConfig$zodSchema.optional(),
|
|
51
|
+
conversion_rate: z.string().optional().describe(
|
|
52
|
+
"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits",
|
|
53
|
+
),
|
|
54
|
+
created_at: z.iso.datetime({ offset: true }).optional(),
|
|
55
|
+
created_by: z.string().optional(),
|
|
56
|
+
credit_balance: z.string().optional(),
|
|
57
|
+
credits_available_breakdown: CreditBreakdown$zodSchema.optional(),
|
|
58
|
+
currency: z.string().optional(),
|
|
59
|
+
customer_id: z.string().optional(),
|
|
60
|
+
description: z.string().optional(),
|
|
61
|
+
environment_id: z.string().optional(),
|
|
62
|
+
id: z.string().optional(),
|
|
63
|
+
metadata: z.record(z.string(), z.string()).optional(),
|
|
64
|
+
name: z.string().optional(),
|
|
65
|
+
status: Status$zodSchema.optional(),
|
|
66
|
+
tenant_id: z.string().optional(),
|
|
67
|
+
topup_conversion_rate: z.string().optional().describe(
|
|
68
|
+
"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits",
|
|
69
|
+
),
|
|
70
|
+
updated_at: z.iso.datetime({ offset: true }).optional(),
|
|
71
|
+
updated_by: z.string().optional(),
|
|
72
|
+
wallet_status: WalletStatus$zodSchema.optional(),
|
|
73
|
+
wallet_type: WalletType$zodSchema.optional(),
|
|
74
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const WalletStatus = {
|
|
9
|
+
Active: "active",
|
|
10
|
+
Frozen: "frozen",
|
|
11
|
+
Closed: "closed",
|
|
12
|
+
} as const;
|
|
13
|
+
export type WalletStatus = ClosedEnum<typeof WalletStatus>;
|
|
14
|
+
|
|
15
|
+
export const WalletStatus$zodSchema = z.enum([
|
|
16
|
+
"active",
|
|
17
|
+
"frozen",
|
|
18
|
+
"closed",
|
|
19
|
+
]);
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
CustomerResponse,
|
|
8
|
+
CustomerResponse$zodSchema,
|
|
9
|
+
} from "./customerresponse.js";
|
|
10
|
+
import { Status, Status$zodSchema } from "./status.js";
|
|
11
|
+
import {
|
|
12
|
+
TransactionReason,
|
|
13
|
+
TransactionReason$zodSchema,
|
|
14
|
+
} from "./transactionreason.js";
|
|
15
|
+
import {
|
|
16
|
+
TransactionStatus,
|
|
17
|
+
TransactionStatus$zodSchema,
|
|
18
|
+
} from "./transactionstatus.js";
|
|
19
|
+
import {
|
|
20
|
+
TransactionType,
|
|
21
|
+
TransactionType$zodSchema,
|
|
22
|
+
} from "./transactiontype.js";
|
|
23
|
+
import { UserResponse, UserResponse$zodSchema } from "./userresponse.js";
|
|
24
|
+
import { WalletResponse, WalletResponse$zodSchema } from "./walletresponse.js";
|
|
25
|
+
import {
|
|
26
|
+
WalletTxReferenceType,
|
|
27
|
+
WalletTxReferenceType$zodSchema,
|
|
28
|
+
} from "./wallettxreferencetype.js";
|
|
29
|
+
|
|
30
|
+
export type WalletTransactionResponse = {
|
|
31
|
+
amount?: string | undefined;
|
|
32
|
+
conversion_rate?: string | undefined;
|
|
33
|
+
created_at?: string | undefined;
|
|
34
|
+
created_by?: string | undefined;
|
|
35
|
+
created_by_user?: UserResponse | undefined;
|
|
36
|
+
credit_amount?: string | undefined;
|
|
37
|
+
credit_balance_after?: string | undefined;
|
|
38
|
+
credit_balance_before?: string | undefined;
|
|
39
|
+
credits_available?: string | undefined;
|
|
40
|
+
currency?: string | undefined;
|
|
41
|
+
customer?: CustomerResponse | undefined;
|
|
42
|
+
customer_id?: string | undefined;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
environment_id?: string | undefined;
|
|
45
|
+
expiry_date?: string | undefined;
|
|
46
|
+
id?: string | undefined;
|
|
47
|
+
idempotency_key?: string | undefined;
|
|
48
|
+
metadata?: { [k: string]: string } | undefined;
|
|
49
|
+
priority?: number | undefined;
|
|
50
|
+
reference_id?: string | undefined;
|
|
51
|
+
reference_type?: WalletTxReferenceType | undefined;
|
|
52
|
+
status?: Status | undefined;
|
|
53
|
+
tenant_id?: string | undefined;
|
|
54
|
+
topup_conversion_rate?: string | undefined;
|
|
55
|
+
transaction_reason?: TransactionReason | undefined;
|
|
56
|
+
transaction_status?: TransactionStatus | undefined;
|
|
57
|
+
type?: TransactionType | undefined;
|
|
58
|
+
updated_at?: string | undefined;
|
|
59
|
+
updated_by?: string | undefined;
|
|
60
|
+
wallet?: WalletResponse | undefined;
|
|
61
|
+
wallet_id?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const WalletTransactionResponse$zodSchema: z.ZodType<
|
|
65
|
+
WalletTransactionResponse
|
|
66
|
+
> = z.object({
|
|
67
|
+
amount: z.string().optional(),
|
|
68
|
+
conversion_rate: z.string().optional().describe(
|
|
69
|
+
"conversion_rate is the conversion rate for the transaction to the currency",
|
|
70
|
+
),
|
|
71
|
+
created_at: z.iso.datetime({ offset: true }).optional(),
|
|
72
|
+
created_by: z.string().optional(),
|
|
73
|
+
created_by_user: UserResponse$zodSchema.optional(),
|
|
74
|
+
credit_amount: z.string().optional(),
|
|
75
|
+
credit_balance_after: z.string().optional(),
|
|
76
|
+
credit_balance_before: z.string().optional(),
|
|
77
|
+
credits_available: z.string().optional(),
|
|
78
|
+
currency: z.string().optional(),
|
|
79
|
+
customer: CustomerResponse$zodSchema.optional().describe(
|
|
80
|
+
"Customer response object containing all customer information",
|
|
81
|
+
),
|
|
82
|
+
customer_id: z.string().optional(),
|
|
83
|
+
description: z.string().optional(),
|
|
84
|
+
environment_id: z.string().optional(),
|
|
85
|
+
expiry_date: z.iso.datetime({ offset: true }).optional(),
|
|
86
|
+
id: z.string().optional(),
|
|
87
|
+
idempotency_key: z.string().optional(),
|
|
88
|
+
metadata: z.record(z.string(), z.string()).optional(),
|
|
89
|
+
priority: z.int().optional(),
|
|
90
|
+
reference_id: z.string().optional(),
|
|
91
|
+
reference_type: WalletTxReferenceType$zodSchema.optional(),
|
|
92
|
+
status: Status$zodSchema.optional(),
|
|
93
|
+
tenant_id: z.string().optional(),
|
|
94
|
+
topup_conversion_rate: z.string().optional().describe(
|
|
95
|
+
"topup_conversion_rate is the conversion rate for the topup to the currency",
|
|
96
|
+
),
|
|
97
|
+
transaction_reason: TransactionReason$zodSchema.optional(),
|
|
98
|
+
transaction_status: TransactionStatus$zodSchema.optional(),
|
|
99
|
+
type: TransactionType$zodSchema.optional(),
|
|
100
|
+
updated_at: z.iso.datetime({ offset: true }).optional(),
|
|
101
|
+
updated_by: z.string().optional(),
|
|
102
|
+
wallet: WalletResponse$zodSchema.optional(),
|
|
103
|
+
wallet_id: z.string().optional(),
|
|
104
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const WalletTxReferenceType = {
|
|
9
|
+
Payment: "PAYMENT",
|
|
10
|
+
External: "EXTERNAL",
|
|
11
|
+
Request: "REQUEST",
|
|
12
|
+
Invoice: "INVOICE",
|
|
13
|
+
} as const;
|
|
14
|
+
export type WalletTxReferenceType = ClosedEnum<typeof WalletTxReferenceType>;
|
|
15
|
+
|
|
16
|
+
export const WalletTxReferenceType$zodSchema = z.enum([
|
|
17
|
+
"PAYMENT",
|
|
18
|
+
"EXTERNAL",
|
|
19
|
+
"REQUEST",
|
|
20
|
+
"INVOICE",
|
|
21
|
+
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const WalletType = {
|
|
9
|
+
PrePaid: "PRE_PAID",
|
|
10
|
+
PostPaid: "POST_PAID",
|
|
11
|
+
} as const;
|
|
12
|
+
export type WalletType = ClosedEnum<typeof WalletType>;
|
|
13
|
+
|
|
14
|
+
export const WalletType$zodSchema = z.enum([
|
|
15
|
+
"PRE_PAID",
|
|
16
|
+
"POST_PAID",
|
|
17
|
+
]);
|
package/src/tool-names.ts
CHANGED
|
@@ -44,6 +44,10 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
44
44
|
"name": "create-invoice",
|
|
45
45
|
"description": "Create one-off invoice\n\nUse when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready."
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
"name": "get-meter-usage-preview-invoice",
|
|
49
|
+
"description": "Get invoice preview using meter_usage data\n\nPreview invoice using the meter_usage table for usage data instead of feature_usage."
|
|
50
|
+
},
|
|
47
51
|
{
|
|
48
52
|
"name": "get-invoice-preview",
|
|
49
53
|
"description": "Get invoice preview\n\nUse when showing a customer what they will be charged (e.g. preview before checkout or plan change). No invoice is created."
|
|
@@ -145,7 +149,7 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
145
149
|
"description": "Delete plan\n\nUse when retiring a plan (e.g. end-of-life). Existing subscriptions may be affected. Returns 200 with success message."
|
|
146
150
|
},
|
|
147
151
|
{
|
|
148
|
-
"name": "
|
|
152
|
+
"name": "clone-plan",
|
|
149
153
|
"description": "Clone a plan\n\nClone an existing plan, copying its active prices, published entitlements, and published credit grants"
|
|
150
154
|
},
|
|
151
155
|
{
|
|
@@ -250,7 +254,11 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
250
254
|
},
|
|
251
255
|
{
|
|
252
256
|
"name": "execute-subscription-modify",
|
|
253
|
-
"description": "
|
|
257
|
+
"description": "Execute subscription modification\n\nExecute a mid-cycle subscription modification (inheritance or quantity change)."
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "preview-subscription-modify",
|
|
261
|
+
"description": "Preview subscription modification\n\nPreview the impact of a mid-cycle subscription modification without committing changes."
|
|
254
262
|
},
|
|
255
263
|
{
|
|
256
264
|
"name": "pause-subscription",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plansPostPlansIdClone.d.ts","sourceRoot":"","sources":["../../src/funcs/plansPostPlansIdClone.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,uBAAuB,EAExB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,QAAQ,EACN,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|